<commit_before>define([
  'app',
  'utils/parseLinkHeader'
], function(app, parseLinkHeader) {
  'use strict';

  var PER_PAGE = 50;

  return {
    parent: 'admin_layout',
    url: '/plans/',
    templateUrl: 'partials/admin/plan-list.html',
    controller: function($scope, planList, Collection) {
      function updatePageLinks(links) {
        var value = parseLinkHeader(links);

        $scope.pageLinks = value;
        $scope.nextPage = value.next || null;
        $scope.previousPage = value.previous || null;
      }

      $scope.getBuildStatus = function(build) {
        if (build.status.id == 'finished') {
          return build.result.name;
        } else {
          return build.status.name;
        }
      };

      function loadPlanList(url) {
        if (!url) {
          return;
        }
        $http.get(url)
          .success(function(data, status, headers){
            $scope.plans = new Collection(data, {
              limit: PER_PAGE
            });
            updatePageLinks(headers('Link'));
          });<commit_msg>Remove extra prefix slash for plan list<commit_after>define([
  'app',
  'utils/parseLinkHeader'
], function(app, parseLinkHeader) {
  'use strict';

  var PER_PAGE = 50;

  return {
    parent: 'admin_layout',
    url: 'plans/',
    templateUrl: 'partials/admin/plan-list.html',
    controller: function($scope, planList, Collection) {
      function updatePageLinks(links) {
        var value = parseLinkHeader(links);

        $scope.pageLinks = value;
        $scope.nextPage = value.next || null;
        $scope.previousPage = value.previous || null;
      }

      $scope.getBuildStatus = function(build) {
        if (build.status.id == 'finished') {
          return build.result.name;
        } else {
          return build.status.name;
        }
      };

      function loadPlanList(url) {
        if (!url) {
          return;
        }
        $http.get(url)
          .success(function(data, status, headers){
            $scope.plans = new Collection(data, {
              limit: PER_PAGE
            });
            updatePageLinks(headers('Link'));
          });
{'fraction_non_alphanumeric': 0.1306791569086651, 'fraction_numerical': 0.001873536299765808, 'mean_word_length': 2.034090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6418350', 'n_tokens_mistral': 632, 'n_tokens_neox': 616, 'n_words': 124}