<commit_before>GLClient.controller('MainCtrl', ['$scope', '$http', '$route', '$location', 'Node',
  function($scope, $http, $route, $location, Node) {
    $scope.started = true;

    $scope.custom_stylesheet = '/custom_stylesheet.css';
    $scope.logo = '/static/globaleaks_logo.png';

    $scope.update_node = function() {
      Node.get(function(node){
        $scope.node = node;
      });
    }

    $scope.update = function(model) {
      var success = {};
      success.message = "Updated " + model;
      model.$update(function(){
        if (!$scope.successes) {
          $scope.successes = [];
        };
        $scope.successes.push(success);
      });
    };

    $scope.randomFluff = function() {
      return Math.round(Math.random() * 1000000);
    }

    var refresh = function() {
      $scope.custom_stylesheet = '/custom_stylesheet.css?' + $scope.randomFluff();
      $scope.logo = '/static/globaleaks_logo.png?' + $scope.randomFluff();
    }

    $scope.$on("REFRESH", refresh);

    $scope.update_node();

    $scope.isHomepage = function() { 
      return ($location.path() == '/') ? true : false;
    }

    $scope.hasSubtitle = function() {
      return $scope.header_subtitle != '';
    }
  }
]);

TabCtrl = ['$scope', function($scope) {
  /* Empty controller function used to implement TAB pages */
}];

angular.module('GLClient.fileuploader', ['blueimp.fileupload'])
  .config(['$httpProvider', 'fileUploadProvider',
    function ($httpProvider, fileUploadProvider) {
      delete $httpProvider.defaults.headers.common['X-Requested-With'];
      angular.extend(fileUploadProvider.defaults, {
        multipart: false,
      });
    }
]);

<commit_msg>Redirect to wizard page if unconfigured.<commit_after>GLClient.controller('MainCtrl', ['$scope', '$http', '$route', '$location', 'Node',
  function($scope, $http, $route, $location, Node) {
    $scope.started = true;

    $scope.custom_stylesheet = '/custom_stylesheet.css';
    $scope.logo = '/static/globaleaks_logo.png';

    $scope.update_node = function() {
      Node.get(function(node){
        $scope.node = node;
        if ( ! $scope.node.configured ) {
          $location.path('/wizard');
        }
      });
    }

    $scope.update = function(model) {
      var success = {};
      success.message = "Updated " + model;
      model.$update(function(){
        if (!$scope.successes) {
          $scope.successes = [];
        };
        $scope.successes.push(success);
      });
    };

    $scope.randomFluff = function() {
      return Math.round(Math.random() * 1000000);
    }

    var refresh = function() {
      $scope.custom_stylesheet = '/custom_stylesheet.css?' + $scope.randomFluff();
      $scope.logo = '/static/globaleaks_logo.png?' + $scope.randomFluff();
    }

    $scope.$on("REFRESH", refresh);

    $scope.update_node();

    $scope.isHomepage = function() { 
      return ($location.path() == '/') ? true : false;
    }

    $scope.hasSubtitle = function() {
      return $scope.header_subtitle != '';
    }
  }
]);

TabCtrl = ['$scope', function($scope) {
  /* Empty controller function used to implement TAB pages */
}];

angular.module('GLClient.fileuploader', ['blueimp.fileupload'])
  .config(['$httpProvider', 'fileUploadProvider',
    function ($httpProvider, fileUploadProvider) {
      delete $httpProvider.defaults.headers.common['X-Requested-With'];
      angular.extend(fileUploadProvider.defaults, {
        multipart: false,
      });
    }
]);


{'fraction_non_alphanumeric': 0.17587795048934945, 'fraction_numerical': 0.004029936672423719, 'mean_word_length': 2.900112233445567, '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': '644004', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1051, 'n_words': 176}