<commit_before>(function (angular, c3, _) {

    "use strict";

    angular.module("mfl.dashboard.controllers", ["mfl.dashboard.wrapper"])

    .controller("mfl.dashboard.content", ["$scope", "$filter", "dashboardApi",
        "mfl.auth.services.login",
        function ($scope, $filter, dashboardApi, loginService) {
            $scope.title = {
                icon: "fa-dashboard",
                name: "Dashboard"
            };
            $scope.user = loginService.getUser();
            $scope.chart = null;
            $scope.spinner = true;
            $scope.county = false;
            var c3_generate = function (_payload){
                c3.generate(_payload);
                $scope.loading = false;
            };
            var updateRecent = function (params) {
                $scope.recent_spinner = true;
                dashboardApi.api.filter(params)
                .success(function(data) {
                    $scope.summary = data;
                    $scope.recent_spinner = false;
                }).error(function (err) {
                    $scope.err = err;
                    $scope.recent_spinner = false;
                });
            };
            $scope.weekly = function () {
                updateRecent({"weekly":"True"});
            };
            $scope.monthly = function () {
                updateRecent({"monthly":"True"});
            };
            $scope.quarterly = function () {
                updateRecent({"quarterly":"True"});
            };
            $scope.showGraph = function(_data) {
                //owner chart
                var owners_chart = function (_dt) {
                    var _list = [];

                    angular.forEach(_dt.owner_types, function (item) {
                        item.name = $filter("uppercase")(item.name);
                        var _item = [item.name, item.count];
                        _list[_list.length] = _item;
                    });

                    var obj = {
                        bindto: "#chartowners",
                        data: {
                            columns: _list,
                            type : "pie"
                        },
                        empty: {
                            label:{
                                text: "no data"
                            }<commit_msg>Caters for partial responses<commit_after>(function (angular, c3, _) {

    "use strict";

    angular.module("mfl.dashboard.controllers", ["mfl.dashboard.wrapper"])

    .controller("mfl.dashboard.content", ["$scope", "$filter", "dashboardApi",
        "mfl.auth.services.login",
        function ($scope, $filter, dashboardApi, loginService) {
            $scope.title = {
                icon: "fa-dashboard",
                name: "Dashboard"
            };
            $scope.user = loginService.getUser();
            $scope.chart = null;
            $scope.spinner = true;
            $scope.county = false;
            var c3_generate = function (_payload){
                c3.generate(_payload);
                $scope.loading = false;
            };
            var updateRecent = function (params) {
                $scope.recent_spinner = true;
                dashboardApi.api.filter(params)
                .success(function(data) {
                    $scope.summary.recently_created = data.recently_created;
                    $scope.recent_spinner = false;
                }).error(function (err) {
                    $scope.err = err;
                    $scope.recent_spinner = false;
                });
            };
            $scope.weekly = function () {
                updateRecent({"weekly":"True","fields":"recently_created"});
            };
            $scope.monthly = function () {
                updateRecent({"monthly":"True","fields":"recently_created"});
            };
            $scope.quarterly = function () {
                updateRecent({"quarterly":"True","fields":"recently_created"});
            };
            $scope.showGraph = function(_data) {
                //owner chart
                var owners_chart = function (_dt) {
                    var _list = [];

                    angular.forEach(_dt.owner_types, function (item) {
                        item.name = $filter("uppercase")(item.name);
                        var _item = [item.name, item.count];
                        _list[_list.length] = _item;
                    });

                    var obj = {
                        bindto: "#chartowners",
                        data: {
                            columns: _list,
                            type : "pie"
                        },
                        empty: {
                            label:{
                                text: "no data"
                            }
{'fraction_non_alphanumeric': 0.11992504684572143, 'fraction_numerical': 0.0012492192379762648, 'mean_word_length': 1.1256637168141592, 'pattern_counts': {'":': 9, '<': 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': '2114857', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1130, 'n_words': 201}