<commit_before>'use strict';

angular.module('graphs').controller('GraphsController', ['$scope', '$rootScope', '$state', '$stateParams', 'Dashboards','Graphite','TestRuns','$log', 'Tags',
	function($scope, $rootScope, $state, $stateParams, Dashboards, Graphite, TestRuns, $log, Tags) {

            /* Get deeplink zoom params from query string */

            if($state.params.zoomFrom) TestRuns.zoomFrom = $state.params.zoomFrom;

            if($state.params.zoomUntil) TestRuns.zoomUntil = $state.params.zoomUntil;


            $scope.value = $stateParams.tag;

        /* reset zoom*/
        $scope.resetZoom = function(){

                //TestRuns.zoomFrom = TestRuns.selected.start;
                //TestRuns.zoomUntil = TestRuns.selected.end;

                /*reset zoom*/
                TestRuns.zoomFrom = "";
                TestRuns.zoomUntil = "";

                $state.go($state.current, {}, {reload: true});



        }

        /* Zoom lock enabled by default */
        $scope.zoomLock = true;

        $scope.init = function(){

                Dashboards.get($stateParams.productName, $stateParams.dashboardName).then(function (dashboard){

                        $scope.dashboard = Dashboards.selected;

                        $scope.metrics = addAccordionState(Dashboards.selected.metrics);

                        /* Get tags used in metrics */
                        $scope.tags = Tags.setTags($scope.metrics, $stateParams.productName, $stateParams.dashboardName, $stateParams.testRunId);<commit_msg>code clean up<commit_after>'use strict';

angular.module('graphs').controller('GraphsController', ['$scope', '$rootScope', '$state', '$stateParams', 'Dashboards','Graphite','TestRuns','$log', 'Tags',
	function($scope, $rootScope, $state, $stateParams, Dashboards, Graphite, TestRuns, $log, Tags) {


	/* Get deeplink zoom params from query string */

         if($state.params.zoomFrom) TestRuns.zoomFrom = $state.params.zoomFrom;

         if($state.params.zoomUntil) TestRuns.zoomUntil = $state.params.zoomUntil;


         $scope.value = $stateParams.tag;

        /* reset zoom*/
        $scope.resetZoom = function(){

                /*reset zoom*/
                TestRuns.zoomFrom = "";
                TestRuns.zoomUntil = "";

                $state.go($state.current, {}, {reload: true});

        }

        /* Zoom lock enabled by default */
        $scope.zoomLock = true;

        $scope.init = function(){

                Dashboards.get($stateParams.productName, $stateParams.dashboardName).then(function (dashboard){

                        $scope.dashboard = Dashboards.selected;

                        $scope.metrics = addAccordionState(Dashboards.selected.metrics);

                        /* Get tags used in metrics */
                        $scope.tags = Tags.setTags($scope.metrics, $stateParams.productName, $stateParams.dashboardName, $stateParams.testRunId);
{'fraction_non_alphanumeric': 0.1399795151928986, 'fraction_numerical': 0.0, 'mean_word_length': 2.295838020247469, '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': '3434443', 'n_tokens_mistral': 839, 'n_tokens_neox': 786, 'n_words': 145}