<commit_before>import smartStatusController from 'tower/smart-status/smart-status.controller.js';
export default [  function() {
    return {
        scope: {
            jobs: '='
        },
        restrict: 'E',
        link: function (scope, element){

            scope.formatter = function(sparklines, options, point){
                var status = options.userOptions.tooltipValueLookups.status[point.offset];
                //capitalize first letter
                status = status.charAt(0).toUpperCase() + status.slice(1);
                return "<div class=\"smart-status-tooltip\">Job ID: " +
                  options.userOptions.tooltipValueLookups.jobs[point.offset] +
                  "<br>Status: <span style=\"color: " + point.color + "\">&#9679;</span>"+status+"</div>" ;
            };

            element.sparkline(scope.sparkArray, {
                type: 'tristate',
                width: '4em',
                height: '2em',
                barWidth: 7,
                barSpacing: 2,
                zeroBarColor: 'grey',
                posBarColor: '#00aa00',
                negBarColor: '#aa0000',
                tooltipFormatter: scope.formatter,
                tooltipFormat: '{{value:jobs}}',
                tooltipValueLookups: {
                    jobs: scope.jobIds,
                    status: scope.smartStatus
                }
            });

            $('aw-smart-status:eq('+scope.$index+')').bind('sparklineClick', function(ev) {
                var sparkline = ev.sparklines[0],
                    job = sparkline.getCurrentRegionFields(),
                    id;
                id = sparkline.options.userOptions.tooltipValueLookups.jobs[job.offset];
                location.href = '/#/jobs/' + id;
            });

        },
        controller: smartStatusController
    };
}];<commit_msg>fixed click event element selector for smart status<commit_after>import smartStatusController from 'tower/smart-status/smart-status.controller.js';
export default [  function() {
    return {
        scope: {
            jobs: '='
        },
        restrict: 'E',
        link: function (scope, element){

            scope.formatter = function(sparklines, options, point){
                var status = options.userOptions.tooltipValueLookups.status[point.offset];
                //capitalize first letter
                status = status.charAt(0).toUpperCase() + status.slice(1);
                return "<div class=\"smart-status-tooltip\">Job ID: " +
                  options.userOptions.tooltipValueLookups.jobs[point.offset] +
                  "<br>Status: <span style=\"color: " + point.color + "\">&#9679;</span>"+status+"</div>" ;
            };

            element.sparkline(scope.sparkArray, {
                type: 'tristate',
                width: '4em',
                height: '2em',
                barWidth: 7,
                barSpacing: 2,
                zeroBarColor: 'grey',
                posBarColor: '#00aa00',
                negBarColor: '#aa0000',
                tooltipFormatter: scope.formatter,
                tooltipFormat: '{{value:jobs}}',
                tooltipValueLookups: {
                    jobs: scope.jobIds,
                    status: scope.smartStatus
                }
            });

            element.bind('sparklineClick', function(ev) {
                var sparkline = ev.sparklines[0],
                    job = sparkline.getCurrentRegionFields(),
                    id;
                id = sparkline.options.userOptions.tooltipValueLookups.jobs[job.offset];
                location.href = '/#/jobs/' + id;
            });

        },
        controller: smartStatusController
    };
}];
{'fraction_non_alphanumeric': 0.12533765532144786, 'fraction_numerical': 0.010264721772015126, 'mean_word_length': 1.5450171821305843, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2764559', 'n_tokens_mistral': 1021, 'n_tokens_neox': 920, 'n_words': 167}