ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-11746. Create Widget: Active HBase Master is not an available option. (jaimin)
Date Sat, 06 Jun 2015 06:28:12 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b2cb50885 -> c0ff2b7e8


AMBARI-11746. Create Widget: Active HBase Master is not an available option. (jaimin)


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

Branch: refs/heads/trunk
Commit: c0ff2b7e806d956f65ff137a6af4281d8fc77019
Parents: b2cb508
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri Jun 5 23:22:11 2015 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri Jun 5 23:27:50 2015 -0700

----------------------------------------------------------------------
 .../main/service/widgets/create/wizard_controller.js      |  3 +++
 ambari-web/app/mixins/common/widgets/widget_mixin.js      | 10 +++++-----
 .../views/main/service/widgets/create/expression_view.js  |  7 +------
 3 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c0ff2b7e/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
index d6a92ef..69f63ed 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
@@ -325,6 +325,9 @@ App.WidgetWizardController = App.WizardController.extend({
       case 'RESOURCEMANAGER':
         metricObj.host_component_criteria = 'host_components/HostRoles/ha_state=ACTIVE';
         break;
+      case 'HBASE_MASTER':
+        metricObj.host_component_criteria = 'host_components/metrics/hbase/master/IsActiveMaster=true';
+        break;
       default:
         metricObj.host_component_criteria = ' ';
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/c0ff2b7e/ambari-web/app/mixins/common/widgets/widget_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js
index 95c7555..961ce7d 100644
--- a/ambari-web/app/mixins/common/widgets/widget_mixin.js
+++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js
@@ -188,21 +188,21 @@ App.WidgetMixin = Ember.Mixin.create({
       case 'NAMENODE':
         if (request.host_component_criteria === 'host_components/metrics/dfs/FSNamesystem/HAState=active')
{
           var hdfs = App.HDFSService.find().objectAt(0);
-          if (hdfs.get('isNnHaEnabled')) {
-            return request.host_component_criteria.replace('host_components/', '&');
+          if (!hdfs.get('isNnHaEnabled')) {
+            return '';
           }
         }
         break;
       case 'RESOURCEMANAGER':
         if (request.host_component_criteria === 'host_components/HostRoles/ha_state=ACTIVE')
{
           var yarn = App.YARNService.find().objectAt(0);
-          if (yarn.get('isRMHaEnabled')) {
-            return request.host_component_criteria.replace('host_components/', '&');
+          if (!yarn.get('isRMHaEnabled')) {
+            return '';
           }
         }
         break;
     }
-    return '';
+    return request.host_component_criteria.replace('host_components/', '&').trim();
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/c0ff2b7e/ambari-web/app/views/main/service/widgets/create/expression_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/widgets/create/expression_view.js b/ambari-web/app/views/main/service/widgets/create/expression_view.js
index eb41656..dc1f493 100644
--- a/ambari-web/app/views/main/service/widgets/create/expression_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/expression_view.js
@@ -335,15 +335,10 @@ App.AddMetricExpressionView = Em.View.extend({
     for (var serviceName in servicesMap) {
       var components = [];
       for (var componentId in servicesMap[serviceName].components) {
-
-        //HBase service should not show "Active HBase master"
-        var isActiveHbaseMaster = servicesMap[serviceName].components[componentId].component_name
=== 'HBASE_MASTER' &&
-          servicesMap[serviceName].components[componentId].level === 'HOSTCOMPONENT';
-
         // Hide the option if none of the hostComponent is created in the cluster yet
         var componentName = servicesMap[serviceName].components[componentId].component_name;
         var isHostComponentAbsent = !App.HostComponent.find().filterProperty('componentName',componentName).length;
-        if (isActiveHbaseMaster || isHostComponentAbsent) continue;
+        if (isHostComponentAbsent) continue;
         var component = Em.Object.create({
           componentName: servicesMap[serviceName].components[componentId].component_name,
           level: servicesMap[serviceName].components[componentId].level,


Mime
View raw message