ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject git commit: AMBARI-6410. Usability UX: Launch NameNode HA Wizard from Services Actions menu
Date Mon, 07 Jul 2014 22:29:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b3e1f7cfb -> fcc87a60a


AMBARI-6410. Usability UX: Launch NameNode HA Wizard from Services Actions menu


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

Branch: refs/heads/trunk
Commit: fcc87a60afe78883d6c1acfb476106e2953160cb
Parents: b3e1f7c
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Mon Jul 7 15:04:10 2014 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Mon Jul 7 15:21:36 2014 -0700

----------------------------------------------------------------------
 .../main/admin/highAvailability_controller.js           |  4 ++--
 ambari-web/app/controllers/main/service/item.js         | 12 ++++++++++++
 ambari-web/app/views/main/service/item.js               |  9 +++++++++
 3 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fcc87a60/ambari-web/app/controllers/main/admin/highAvailability_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
index cbc42bf..cb06002 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
@@ -55,7 +55,7 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
         return false;
       }
     }
-    App.router.transitionTo('enableHighAvailability');
+    App.router.transitionTo('main.admin.enableHighAvailability');
     return true;
   },
 
@@ -78,7 +78,7 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
   },
 
   disableHighAvailability: function () {
-    App.router.transitionTo('rollbackHighAvailability');
+    App.router.transitionTo('main.admin.rollbackHighAvailability');
   },
 
   setSecurityStatus: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcc87a60/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index a1bbf30..c93259e 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -358,6 +358,18 @@ App.MainServiceItemController = Em.Controller.extend({
     return (this.get('content.healthStatus') != 'green');
   }.property('content.healthStatus','isPending'),
 
+  enableHighAvailability: function() {
+    var ability_controller = App.router.get('mainAdminHighAvailabilityController');
+    ability_controller.setSecurityStatus();
+    ability_controller.enableHighAvailability();
+  },
+
+  disableHighAvailability: function() {
+    var ability_controller = App.router.get('mainAdminHighAvailabilityController');
+    ability_controller.setSecurityStatus();
+    ability_controller.disableHighAvailability();
+  },
+
   isPending:true
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcc87a60/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index 8afb3d0..4ee6a64 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -47,6 +47,15 @@ App.MainServiceItemView = Em.View.extend({
       if (serviceName == 'FLUME') {
         options.push({action: 'refreshConfigs', cssClass: 'icon-refresh', 'label': Em.I18n.t('hosts.host.details.refreshConfigs'),
disabled: disableRefreshConfgis});
       }
+      if (serviceName == 'HDFS') {
+        if (App.isHaEnabled) {
+          if (App.supports.autoRollbackHA) {
+            options.push({action: 'disableHighAvailability', cssClass: 'icon-arrow-down',
'label': Em.I18n.t('admin.highAvailability.button.disable')});
+          }
+        } else {
+          options.push({action: 'enableHighAvailability', cssClass: 'icon-arrow-up', 'label':
Em.I18n.t('admin.highAvailability.button.enable')});
+        }
+      }
       // Service Check and Reassign Master actions
       switch (serviceName) {
         case 'GANGLIA':


Mime
View raw message