incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-2913 HDP2: HBase summary shows empty regions in transition. (atkach)
Date Thu, 15 Aug 2013 15:03:22 GMT
Updated Branches:
  refs/heads/trunk 57228eb9f -> 08001043a


AMBARI-2913 HDP2: HBase summary shows empty regions in transition. (atkach)


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

Branch: refs/heads/trunk
Commit: 08001043a0bbff089e512fdafae98b9cc633b9d0
Parents: 57228eb
Author: atkach <andrey91.07@gmail.com>
Authored: Thu Aug 15 18:03:19 2013 +0300
Committer: atkach <andrey91.07@gmail.com>
Committed: Thu Aug 15 18:03:19 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/mappers/service_mapper.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/08001043/ambari-web/app/mappers/service_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_mapper.js b/ambari-web/app/mappers/service_mapper.js
index a3d9a13..8ea2fda 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -548,7 +548,12 @@ App.servicesMapper = App.QuickDataMapper.create({
         item.masterComponent = component;
         finalConfig = jQuery.extend(finalConfig, hbaseConfig);
         var regionsArray = App.parseJSON(component.ServiceComponentInfo.RegionsInTransition);
-        item.regions_in_transition = regionsArray == null ? 0 : regionsArray.length;
+        //regions_in_transition can have various type of value: null, array or int
+        if (Array.isArray(regionsArray)) {
+          item.regions_in_transition = regionsArray.length;
+        } else {
+          item.regions_in_transition = regionsArray == null ? 0 : regionsArray;
+        }
       }
       if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name
== "HBASE_REGIONSERVER") {
         if (!item.region_servers) {


Mime
View raw message