ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [43/50] [abbrv] ambari git commit: AMBARI-13945. Missing HDFS tag.HAState JMX Metric Causes JavaScript Errors (akovalenko)
Date Wed, 18 Nov 2015 16:51:39 GMT
AMBARI-13945. Missing HDFS tag.HAState JMX Metric Causes JavaScript Errors (akovalenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 4ffa82967a657fad1919a3fe6ed4f6dd8b77099a
Parents: 7031576
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Wed Nov 18 17:46:41 2015 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Wed Nov 18 17:49:19 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/mappers/service_metrics_mapper.js | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4ffa8296/ambari-web/app/mappers/service_metrics_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js
index b68d28b..1ac2b54 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -402,14 +402,8 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
       if (this.isHostComponentPresent(component, 'NAMENODE')) {
         //enabled HA
         if (component.host_components.length == 2) {
-          var haState1;
-          var haState2;
-          if (component.host_components[1].metrics && component.host_components[1].metrics.dfs)
{
-            haState2 = component.host_components[1].metrics.dfs.FSNamesystem.HAState;
-          }
-          if (component.host_components[0].metrics && component.host_components[0].metrics.dfs)
{
-            haState1 = component.host_components[0].metrics.dfs.FSNamesystem.HAState;
-          }
+          var haState1 = Em.get(component.host_components[0], 'metrics.dfs.FSNamesystem.HAState');
+          var haState2 = Em.get(component.host_components[1], 'metrics.dfs.FSNamesystem.HAState');
           var active_name_node = [];
           var standby_name_nodes = [];
           switch (haState1) {


Mime
View raw message