CRM-16173 - ManageCtrl - Display errors about AppMetas
authorTim Otten <totten@civicrm.org>
Wed, 8 Jul 2015 00:21:20 +0000 (17:21 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 14 Jul 2015 04:00:09 +0000 (21:00 -0700)
ang/crmCxn/ManageCtrl.js

index 794646f75f58e6606d7e10da140f63d92281b9d4..9e7d127c7545da1c1cb6ec056c19af38b79c1137 100644 (file)
@@ -2,7 +2,13 @@
 
   angular.module('crmCxn').controller('CrmCxnManageCtrl', function CrmCxnManageCtrl($scope, apiCalls, crmApi, crmUiAlert, crmBlocker, crmStatus, $timeout, dialogService) {
     var ts = $scope.ts = CRM.ts(null);
-    $scope.appMetas = apiCalls.appMetas.values;
+    if (apiCalls.appMetas.is_error) {
+      $scope.appMetas = [];
+      CRM.alert(apiCalls.appMetas.error_message, ts('Application List Unavailable'), 'error');
+    }
+    else {
+      $scope.appMetas = apiCalls.appMetas.values;
+    }
     $scope.cxns = apiCalls.cxns.values;
     $scope.alerts = _.where(apiCalls.sysCheck.values, {name: 'checkCxnOverrides'});