<commit_before>(function() {
    var DashboardCtrl = function($scope, Events, Widget, FileSaver, $routeParams, $location, $http, $timeout, $q, Dashboard, Parameters) {

    /**
     * changeCollapseValues for each widget sets the value received by param
     * @param  {boolean} value 
     */
    $scope.changeCollapseValues = function(value) {
      if ($scope.dashboard.widgets !== undefined) {
        _.forEach($scope.dashboard.widgets, function(widget) {
          _.forEach(widget, function(w) {
            w.isCollapsed = value;
          })
        })
      }
    };

    /**
     * collapseValue Get the collapse value depending if the first widget is visualization
     *
     */
    $scope.collapseValue = function() {
      var marked = false;
      if ($scope.dashboard.widgets !== undefined) {
        _.forEach($scope.dashboard.widgets, function(widget) {
          _.forEach(widget, function(w) {
            if (w.visualization && marked !== true) {
              w.isCollapsed = false;
              marked = true;
            } else {
              w.isCollapsed = true;
            }
          });
        });
      }
    };

      /**
       * excelFilters Creates a object that contains all the filters included on the dashboard
       * excluding some parameters like maxAge
       * @return {array}
       */
      var excelFilters = function() {
        var params = $location.search();
        var blacklist = Parameters.getBlackListParameters();
        var parameters = [];
        for (var propertyName in params) {
          if (!_.contains(blacklist, propertyName)) {
            var filter = {
              'Filters': propertyName.split('p_')[1],
              'Values': params[propertyName]
            };
            parameters.push(filter);
          }

        }
        if (parameters.length !== 0) {
          return parameters;
        }
        return null;
      }

      /**
       * exportWidgets For Each widget takes the data and exports that on a Sheet<commit_msg>replaced preffix replacement on filters<commit_after>(function() {
    var DashboardCtrl = function($scope, Events, Widget, FileSaver, $routeParams, $location, $http, $timeout, $q, Dashboard, Parameters) {

    /**
     * changeCollapseValues for each widget sets the value received by param
     * @param  {boolean} value 
     */
    $scope.changeCollapseValues = function(value) {
      if ($scope.dashboard.widgets !== undefined) {
        _.forEach($scope.dashboard.widgets, function(widget) {
          _.forEach(widget, function(w) {
            w.isCollapsed = value;
          })
        })
      }
    };

    /**
     * collapseValue Get the collapse value depending if the first widget is visualization
     *
     */
    $scope.collapseValue = function() {
      var marked = false;
      if ($scope.dashboard.widgets !== undefined) {
        _.forEach($scope.dashboard.widgets, function(widget) {
          _.forEach(widget, function(w) {
            if (w.visualization && marked !== true) {
              w.isCollapsed = false;
              marked = true;
            } else {
              w.isCollapsed = true;
            }
          });
        });
      }
    };

      /**
       * excelFilters Creates a object that contains all the filters included on the dashboard
       * excluding some parameters like maxAge
       * @return {array}
       */
      var excelFilters = function() {
        var params = $location.search();
        var blacklist = Parameters.getBlackListParameters();
        var parameters = [];
        for (var propertyName in params) {
          if (!_.contains(blacklist, propertyName)) {
            var filter = {
              'Filters': propertyName.slice(0, 2) === 'p_' ? propertyName.slice(2) : propertyName,
              'Values': params[propertyName]
            };
            parameters.push(filter);
          }

        }
        if (parameters.length !== 0) {
          return parameters;
        }
        return null;
      }

      /**
       * exportWidgets For Each widget takes the data and exports that on a Sheet
{'fraction_non_alphanumeric': 0.11252135709055407, 'fraction_numerical': 0.001464486209421528, 'mean_word_length': 1.8637316561844863, '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': '2390102', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1050, 'n_words': 285}