<commit_before>/**
 * Created by issa on 4/15/14.
 */

function NotificationsDetailController($scope,$routeParams,messageService,SettingsByKey, DashboardNotificationsDetail, ngTableParams) {

    $scope.$parent.currentTab = 'NOTIFICATIONS-DETAIL';
    $scope.notificationDetail = {};
    $scope.notificationDetail.tableName = $routeParams.detailTable;

    if(!isUndefined($routeParams.detailTable)){
        var pageTitleKey =  'title.notification.type.'+ $routeParams.detailTable+'.detail';
        var pageTitle = messageService.get(pageTitleKey);
        $scope.detailTable = pageTitleKey === pageTitle ? $routeParams.detailTable :pageTitle;
    }

    if(!isUndefined($routeParams.detailTable) &&
        !isUndefined($routeParams.alertId)){
        var columnsToHide =  $routeParams.detailTable+'_HIDDEN_COLUMNS';
        SettingsByKey.get({key: columnsToHide.toUpperCase()},function (data){
            $scope.colsToHide = data.settings.value.split(",");
        });

        DashboardNotificationsDetail.get({alertId:$routeParams.alertId, detailTable:$routeParams.detailTable},function(stockData){
            $scope.notificationDetail.datarows = stockData.detail;
            if(!isUndefined($scope.notificationDetail.datarows)){

                var cols =  _.keys(_.first($scope.notificationDetail.datarows));
                $scope.notificationColumns = [];
                $.each(cols, function(idx,item){
                    var colTitleKey = 'label.notification.column.'+item;
                    var colTitle = messageService.get(colTitleKey);<commit_msg>Check if hidden columns setting is set for alert detail page<commit_after>/**
 * Created by issa on 4/15/14.
 */

function NotificationsDetailController($scope,$routeParams,messageService,SettingsByKey, DashboardNotificationsDetail, ngTableParams) {

    $scope.$parent.currentTab = 'NOTIFICATIONS-DETAIL';
    $scope.notificationDetail = {};
    $scope.notificationDetail.tableName = $routeParams.detailTable;

    if(!isUndefined($routeParams.detailTable)){
        var pageTitleKey =  'title.notification.type.'+ $routeParams.detailTable+'.detail';
        var pageTitle = messageService.get(pageTitleKey);
        $scope.detailTable = pageTitleKey === pageTitle ? $routeParams.detailTable :pageTitle;
    }

    if(!isUndefined($routeParams.detailTable) &&
        !isUndefined($routeParams.alertId)){
        var columnsToHide =  $routeParams.detailTable+'_HIDDEN_COLUMNS';
        SettingsByKey.get({key: columnsToHide.toUpperCase()},function (data){
            if(!isUndefined(data.settings)){
                $scope.colsToHide = data.settings.value.split(",");
            }
        });

        DashboardNotificationsDetail.get({alertId:$routeParams.alertId, detailTable:$routeParams.detailTable},function(stockData){
            $scope.notificationDetail.datarows = stockData.detail;
            if(!isUndefined($scope.notificationDetail.datarows)){

                var cols =  _.keys(_.first($scope.notificationDetail.datarows));
                $scope.notificationColumns = [];
                $.each(cols, function(idx,item){
                    var colTitleKey = 'label.notification.column.'+item;
                    var colTitle = messageService.get(colTitleKey);
{'fraction_non_alphanumeric': 0.12546125461254612, 'fraction_numerical': 0.003075030750307503, 'mean_word_length': 3.407859078590786, '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': '4829233', 'n_tokens_mistral': 907, 'n_tokens_neox': 875, 'n_words': 120}