<commit_before>'use strict';

/**
 * @ngdoc directive
 * @name eveTravelHelperApp.directive:ethPaged
 * @scope
 * @restrict E
 * @description
 * # ethPaged
 * Wrapper for ui-bootstrap's pagination, encapsulating interaction between
 * services and variables
 */
angular.module('eveTravelHelperApp')
  .directive('ethPaged', function() {
    return {
      scope: {
        items: '=',
        listFn: '&',
        extractFn: '&'
      },
      controller: ['$scope', '$attrs', '$log', function($scope, $attrs, $log) {
        $scope.items = [];
        $scope.currentPage = 1;
        $scope.itemsPerPage = 20;
        $scope.maxSize = 10;
        $scope.totalItems = 8030;
        $scope.pageChanged = function() {
          $log.log('Page changed to: ' + $scope.currentPage);
          $scope.listFn({page: $scope.currentPage})
          .then(function(result) {
            $scope.items = $scope.extractFn({data: result.data});
          });
        };
        $scope.pageChanged();

      }],
      template: '<pagination ng-model="currentPage" ng-change="pageChanged()" max-size="maxSize" total-items="totalItems"></pagination>',
      restrict: 'E'
    };
  });<commit_msg>Cleaned up some hard-coded values<commit_after>'use strict';

/**
 * @ngdoc directive
 * @name eveTravelHelperApp.directive:ethPaged
 * @scope
 * @restrict E
 * @description
 * # ethPaged
 * Wrapper for ui-bootstrap's pagination, encapsulating interaction between
 * services and variables
 */
angular.module('eveTravelHelperApp')
  .directive('ethPaged', function() {
    return {
      scope: {
        items: '=',
        listFn: '&',
        extractFn: '&'
      },
      controller: ['$scope', '$attrs', '$log', function($scope, $attrs, $log) {
        $scope.items = [];
        $scope.currentPage = 1;
        $scope.totalItems = 8030;
        $scope.pageChanged = function() {
          $log.log('Page changed to: ' + $scope.currentPage);
          $scope.listFn({page: $scope.currentPage})
          .then(function(result) {
            $scope.items = $scope.extractFn({data: result.data});
          });
        };
        $scope.pageChanged();

      }],
      template: '<pagination ng-model="currentPage" ng-change="pageChanged()" total-items="totalItems"></pagination>',
      restrict: 'E'
    };
  });
{'fraction_non_alphanumeric': 0.16681184668989546, 'fraction_numerical': 0.006097560975609756, 'mean_word_length': 2.634493670886076, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2117278', 'n_tokens_mistral': 719, 'n_tokens_neox': 693, 'n_words': 131}