<commit_before>'use strict';

angular.module('adagios.view.dashboard', ['ngRoute',
                                          'adagios.tactical',
                                          'adagios.table',
                                          'adagios.live'
                                         ])

    .value('dashboardConfig', {})

    .config(['$routeProvider', function ($routeProvider) {
        $routeProvider.when('/dashboard', {
            templateUrl: 'dashboard/dashboard.html',
            controller: 'DashboardCtrl'
        });
    }])

    .controller('DashboardCtrl', ['$scope', 'dashboardConfig', 'getServices', function ($scope, dashboardConfig, getServices) {

        var fields = ['state'],
            filters = {'isnot' : { 'state' : ['0'] }},
            apiName = 'hosts';

        $scope.dashboardTitle = dashboardConfig.title;
        $scope.dashboardCellsText = dashboardConfig.cellsText.join();
        $scope.dashboardCellsName = dashboardConfig.cellsName.join();
        $scope.dashboardApiName = dashboardConfig.apiName;
        $scope.dashboardFilters = dashboardConfig.filters;
        $scope.dashboardIsWrappable = dashboardConfig.isWrappable;
        $scope.dashboardNoRepeatCell = dashboardConfig.noRepeatCell;
        $scope.dashboardRefreshInterval = dashboardConfig.refreshInterval;

        getServices(fields, filters, apiName)
            .success(function (data) {
                $scope.nbHostProblems = data.length;
            });

    }])

    .run(['readConfig', 'dashboardConfig', function (readConfig, dashboardConfig) {
        dashboardConfig.title = readConfig.data.dashboardConfig.title;
        dashboardConfig.cellsText = readConfig.data.dashboardConfig.cells.text;
        dashboardConfig.cellsName = readConfig.data.dashboardConfig.cells.name;
        dashboardConfig.apiName = readConfig.data.dashboardConfig.apiName;
        dashboardConfig.filters = readConfig.data.dashboardConfig.filters;
        dashboardConfig.isWrappable = readConfig.data.dashboardConfig.isWrappable;
        dashboardConfig.noRepeatCell = readConfig.data.dashboardConfig.noRepeatCell;
        dashboardConfig.refreshInterval = readConfig.data.dashboardConfig.refreshInterval;
    }]);
<commit_msg>Fix unit tests of table module<commit_after>'use strict';

angular.module('adagios.view.dashboard', ['ngRoute',
                                          'adagios.tactical',
                                          'adagios.table',
                                          'adagios.live'
                                         ])

    .value('dashboardConfig', {})

    .config(['$routeProvider', function ($routeProvider) {
        $routeProvider.when('/dashboard', {
            templateUrl: 'dashboard/dashboard.html',
            controller: 'DashboardCtrl'
        });
    }])

    .controller('DashboardCtrl', ['$scope', '$timeout', 'dashboardConfig', 'getServices', function ($scope, $timeout, dashboardConfig, getServices) {

        var fields = ['state'],
            filters = {'isnot' : { 'state' : ['0'] }},
            filters2 = {'isnot' : { 'state' : ['2'] }},
            apiName = 'hosts';

        $scope.dashboardTitle = dashboardConfig.title;
        $scope.dashboardCellsText = dashboardConfig.cellsText.join();
        $scope.dashboardCellsName = dashboardConfig.cellsName.join();
        $scope.dashboardApiName = dashboardConfig.apiName;
        $scope.dashboardFilters = dashboardConfig.filters;
        $scope.dashboardIsWrappable = dashboardConfig.isWrappable;
        $scope.dashboardNoRepeatCell = dashboardConfig.noRepeatCell;
        $scope.dashboardRefreshInterval = dashboardConfig.refreshInterval;

        $scope.filters2 = filters2;
        

        getServices(fields, filters, apiName)
            .success(function (data) {
                $scope.nbHostProblems = data.length;
            });

        $timeout(function() { console.log("CHANGE"); $scope.dashboardFilters = $scope.filters2; }, 5000);

    }])

    .run(['readConfig', 'dashboardConfig', function (readConfig, dashboardConfig) {
        dashboardConfig.title = readConfig.data.dashboardConfig.title;
        dashboardConfig.cellsText = readConfig.data.dashboardConfig.cells.text;
        dashboardConfig.cellsName = readConfig.data.dashboardConfig.cells.name;
        dashboardConfig.apiName = readConfig.data.dashboardConfig.apiName;
        dashboardConfig.filters = readConfig.data.dashboardConfig.filters;
        dashboardConfig.isWrappable = readConfig.data.dashboardConfig.isWrappable;
        dashboardConfig.noRepeatCell = readConfig.data.dashboardConfig.noRepeatCell;
        dashboardConfig.refreshInterval = readConfig.data.dashboardConfig.refreshInterval;
    }]);

{'fraction_non_alphanumeric': 0.11696277495769881, 'fraction_numerical': 0.002326565143824027, 'mean_word_length': 2.5317401045556385, '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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2102112', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1240, 'n_words': 172}