ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject ambari git commit: AMBARI-17900. Disabling Alert Definition causes JS error (onechiporenko)
Date Tue, 26 Jul 2016 13:46:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk bcef91c8d -> 277f7d2e1


AMBARI-17900. Disabling Alert Definition causes JS error (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/277f7d2e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/277f7d2e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/277f7d2e

Branch: refs/heads/trunk
Commit: 277f7d2e1e87e8471432c0d5a66a418487f2e026
Parents: bcef91c
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Tue Jul 26 16:42:56 2016 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Tue Jul 26 16:46:50 2016 +0300

----------------------------------------------------------------------
 .../alert_definition_summary.js                 | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/277f7d2e/ambari-web/app/views/main/alerts/alert_definition/alert_definition_summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/alerts/alert_definition/alert_definition_summary.js
b/ambari-web/app/views/main/alerts/alert_definition/alert_definition_summary.js
index b102b3b..4c6378b 100644
--- a/ambari-web/app/views/main/alerts/alert_definition/alert_definition_summary.js
+++ b/ambari-web/app/views/main/alerts/alert_definition/alert_definition_summary.js
@@ -46,20 +46,22 @@ App.AlertDefinitionSummary = Em.View.extend({
         count: '',
         maintenanceCount: ''
       };
-      if (summary[state].count) {
-        var count = shortState;
-        if (showCounts) {
-          count += ' (' + summary[state].count + ')';
+      if (summary[state]) {
+        if (summary[state].count) {
+          var count = shortState;
+          if (showCounts) {
+            count += ' (' + summary[state].count + ')';
+          }
+          _stateSummary.count = count;
         }
-        _stateSummary.count = count;
-      }
-      // add status with maintenance mode icon
-      if (summary[state].maintenanceCount) {
-        var maintenanceCount = shortState;
-        if (showCounts) {
-          maintenanceCount += ' (' + summary[state].maintenanceCount + ')';
+        // add status with maintenance mode icon
+        if (summary[state].maintenanceCount) {
+          var maintenanceCount = shortState;
+          if (showCounts) {
+            maintenanceCount += ' (' + summary[state].maintenanceCount + ')';
+          }
+          _stateSummary.maintenanceCount = maintenanceCount;
         }
-        _stateSummary.maintenanceCount = maintenanceCount;
       }
       ret.push(_stateSummary);
     });


Mime
View raw message