From 4cb2968787309e995b773a15f1e6c1a7913ecafb Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 30 Oct 2015 16:09:28 -0400 Subject: [PATCH] CRM-13823 - Only count status messages with priority >= 3 --- ang/crmStatusPage.js | 1 - ang/crmStatusPage/StatusPageCtrl.js | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ang/crmStatusPage.js b/ang/crmStatusPage.js index 781dff7bdd..b472efb237 100644 --- a/ang/crmStatusPage.js +++ b/ang/crmStatusPage.js @@ -5,7 +5,6 @@ ]); // router - angular.module('statuspage').config( function($routeProvider) { $routeProvider.when('/status', { controller: 'statuspageStatusPage', diff --git a/ang/crmStatusPage/StatusPageCtrl.js b/ang/crmStatusPage/StatusPageCtrl.js index 9b89c86185..48242a59ea 100644 --- a/ang/crmStatusPage/StatusPageCtrl.js +++ b/ang/crmStatusPage/StatusPageCtrl.js @@ -24,8 +24,10 @@ }); }; - $scope.countVisible = function(is_visible) { - return _.where($scope.statuses, {is_visible: is_visible}).length; + $scope.countVisible = function(visibility) { + return _.filter($scope.statuses, function(s) { + return s.is_visible == visibility && s.severity_id >= 3; + }).length; }; }); -- 2.25.1