ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-6597. Show Active/Standby note beside ResourceManager. (akovalenko)
Date Thu, 24 Jul 2014 15:43:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5035c7c19 -> 3f767220f


AMBARI-6597. Show Active/Standby note beside ResourceManager. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 3f767220fbec85471851ff4c1183b894a633e902
Parents: 5035c7c
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Thu Jul 24 18:38:19 2014 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Thu Jul 24 18:38:50 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/global/update_controller.js |  1 +
 ambari-web/app/mappers/service_metrics_mapper.js       | 11 +++++++++++
 ambari-web/app/messages.js                             |  2 ++
 3 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f767220/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index 210ffeb..22f13bc 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -350,6 +350,7 @@ App.UpdateController = Em.Controller.extend({
         'host_components/HostRoles/state,' +
         'host_components/HostRoles/maintenance_state,' +
         'host_components/HostRoles/stale_configs,' +
+        'host_components/HostRoles/ha_state,' +
         'host_components/metrics/jvm/memHeapUsedM,' +
         'host_components/metrics/jvm/HeapMemoryMax,' +
         'host_components/metrics/jvm/HeapMemoryUsed,' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f767220/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 33f56b8..ac4e8af 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -170,6 +170,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     host_id: 'HostRoles.host_name',
     host_name: 'HostRoles.host_name',
     stale_configs: 'HostRoles.stale_configs',
+    ha_state: 'HostRoles.ha_state',
     display_name_advanced: 'display_name_advanced',
     $service_id: 'none' /* will be set outside of parse function */
   },
@@ -312,6 +313,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
    */
   computeAdditionalRelations: function (hostComponents, services) {
     var isSecondaryNamenode = hostComponents.findProperty('component_name', 'SECONDARY_NAMENODE');
+    var isRMHAEnabled = hostComponents.filterProperty('component_name', 'RESOURCEMANAGER').length
> 1;
     services.setEach('tool_tip_content', '');
     // set tooltip for client-only services
     var clientOnlyServiceNames = App.get('services.clientOnly');
@@ -349,6 +351,15 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
           } else {
             hostComponent.display_name_advanced = null;
           }
+        } else if (hostComponent.component_name === 'RESOURCEMANAGER' && isRMHAEnabled
&& hostComponent.work_status === 'STARTED') {
+          switch (hostComponent.ha_state) {
+            case 'ACTIVE':
+              hostComponent.display_name_advanced = Em.I18n.t('dashboard.services.yarn.resourceManager.active');
+              break;
+            case 'STANDBY':
+              hostComponent.display_name_advanced = Em.I18n.t('dashboard.services.yarn.resourceManager.standby');
+              break;
+          }
         }
         if (service) {
           if (hostComponent.display_name_advanced) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f767220/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 775ba30..c0acf42 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1851,6 +1851,8 @@ Em.I18n.translations = {
   'dashboard.services.yarn.clients':'YARN Clients',
   'dashboard.services.yarn.client':'YARN Client',
   'dashboard.services.yarn.resourceManager.uptime':'ResourceManager Uptime',
+  'dashboard.services.yarn.resourceManager.active':'Active ResourceManager',
+  'dashboard.services.yarn.resourceManager.standby':'Standby ResourceManager',
   'dashboard.services.resourceManager.nodes.heap':'ResourceManager Heap',
   'dashboard.services.yarn.nodeManagers.status': 'NodeManagers Status',
   'dashboard.services.yarn.nodeManagers.status.msg': '{0} active / {1} lost / {2} unhealthy
/ {3} rebooted / {4} decommissioned',


Mime
View raw message