CRM-13823 - Only count status messages with priority >= 3
authorColeman Watts <coleman@civicrm.org>
Fri, 30 Oct 2015 20:09:28 +0000 (16:09 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 30 Oct 2015 20:18:27 +0000 (16:18 -0400)
ang/crmStatusPage.js
ang/crmStatusPage/StatusPageCtrl.js

index 781dff7bdd8d327ee592af3c6089e9e8fb7a4d5e..b472efb237a8f4203f0cbb82f8697f09f2a71284 100644 (file)
@@ -5,7 +5,6 @@
   ]);
 
   // router
-
   angular.module('statuspage').config( function($routeProvider) {
     $routeProvider.when('/status', {
       controller: 'statuspageStatusPage',
index 9b89c861857af4e33d100a1e5b39a9e746b869aa..48242a59eac3e28cafbce528a8a99246d039d795 100644 (file)
           });
       };
       
-      $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;
       };
     });