Merge pull request #21993 from mattwire/aclcachequery2
[civicrm-core.git] / ang / crmStatusPage / StatusPageCtrl.js
index 4abca2ab81eabf038ca98d6f7e0507e65d87e588..5dad04fc593c67f282ce5bcd62909ca057144ebc 100644 (file)
@@ -1,6 +1,6 @@
 (function(angular, $, _) {
 
-  angular.module('statuspage').controller('statuspageStatusPage',
+  angular.module('crmStatusPage').controller('crmStatusPageCtrl',
     function($scope, crmApi, crmStatus, statusData) {
       $scope.ts = CRM.ts();
       $scope.help = CRM.help;
@@ -10,7 +10,7 @@
       // Refresh the list. Optionally execute api calls first.
       function refresh(apiCalls, title) {
         title = title || 'Untitled operation';
-        apiCalls = (apiCalls || []).concat([['System', 'check', {sequential: 1}]]);
+        apiCalls = (apiCalls || []).concat([['System', 'check', {sequential: 1, options: {limit: 0, sort: 'severity_id DESC'}}]]);
         $('#crm-status-list').block();
         crmApi(apiCalls, true)
           .then(function(results) {
@@ -40,7 +40,7 @@
           }]
         ], 'Set preference');
       };
-      
+
       $scope.countVisible = function(visibility) {
         return _.filter($scope.statuses, function(s) {
           return s.is_visible == visibility && s.severity_id >= 2;