You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/08/08 23:59:41 UTC

git commit: AMBARI-6798. HDFS rebalance UI cleanup.(xiwang)

Repository: ambari
Updated Branches:
  refs/heads/trunk 5962d489a -> 48f43e280


AMBARI-6798. HDFS rebalance UI cleanup.(xiwang)


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

Branch: refs/heads/trunk
Commit: 48f43e2801e93017ebeb233ecf7ab10ace3ca565
Parents: 5962d48
Author: Xi Wang <xi...@apache.org>
Authored: Fri Aug 8 14:46:09 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Fri Aug 8 14:59:13 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/item.js | 25 +++++++++++---------
 ambari-web/app/messages.js                      |  8 +++----
 2 files changed, 18 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/48f43e28/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 f0243de..9511b96 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -266,7 +266,7 @@ App.MainServiceItemController = Em.Controller.extend({
     App.showAlertPopup(Em.I18n.t('services.service.actions.run.yarnRefreshQueues.error'), error);
     console.warn('Error during refreshYarnQueues:'+error);
   },
- /**
+  /**
    * On click handler for rebalance Hdfs command from items menu
    */
   rebalanceHdfsNodes: function () {
@@ -276,7 +276,7 @@ App.MainServiceItemController = Em.Controller.extend({
       header: Em.I18n.t('services.service.actions.run.rebalanceHdfsNodes.context'),
       primary: Em.I18n.t('common.start'),
       secondary: Em.I18n.t('common.cancel'),
-      inputValue: 0,
+      inputValue: 10,
       errorMessage: Em.I18n.t('services.service.actions.run.rebalanceHdfsNodes.promptError'),
       isInvalid: function () {
         var intValue = Number(this.get('inputValue'));
@@ -285,22 +285,25 @@ App.MainServiceItemController = Em.Controller.extend({
         }
         return false;
       }.property('inputValue'),
+      disablePrimary : function() {
+        return this.get('isInvalid');
+      }.property('isInvalid'),
       onPrimary: function () {
         if (this.get('isInvalid')) {
           return;
         }
-    App.ajax.send({
-      name : 'service.item.rebalanceHdfsNodes',
+        App.ajax.send({
+          name : 'service.item.rebalanceHdfsNodes',
           sender: controller,
-      data : {
-        hosts : App.Service.find('HDFS').get('hostComponents').findProperty('componentName', 'NAMENODE').get('hostName'),
+          data : {
+            hosts : App.Service.find('HDFS').get('hostComponents').findProperty('componentName', 'NAMENODE').get('hostName'),
             threshold: this.get('inputValue')
-      },
-      success : 'rebalanceHdfsNodesSuccessCallback',
-      error : 'rebalanceHdfsNodesErrorCallback'
-    });
+          },
+          success : 'rebalanceHdfsNodesSuccessCallback',
+          error : 'rebalanceHdfsNodesErrorCallback'
+        });
         this.hide();
-  },
+      },
       bodyClass: Ember.View.extend({
         templateName: require('templates/common/prompt_popup'),
         text: Em.I18n.t('services.service.actions.run.rebalanceHdfsNodes.prompt'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/48f43e28/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 628b097..5f11b4f 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1181,12 +1181,12 @@ Em.I18n.translations = {
   'services.service.actions.downloadClientConfigs':'Download Client Configs',
   'services.service.actions.downloadClientConfigs.fail.popup.body':'Generation of {0} configurations file has failed. Do you want to try again?',
   'services.service.actions.run.rebalancer':'Run Rebalancer',
-  'services.service.actions.run.rebalanceHdfsNodes':'Run Rebalance HDFS nodes',
+  'services.service.actions.run.rebalanceHdfsNodes':'Rebalance HDFS',
   'services.service.actions.run.rebalanceHdfsNodes.title':'HDFS Rebalance NameNode',
-  'services.service.actions.run.rebalanceHdfsNodes.prompt':'Please enter Balancer treshold:',
+  'services.service.actions.run.rebalanceHdfsNodes.prompt':'Balancer threshold (percentage of disk capacity):',
   'services.service.actions.run.rebalanceHdfsNodes.promptTooltip':'Percentage of disk capacity. This overwrites the default threshold',
-  'services.service.actions.run.rebalanceHdfsNodes.promptError':'Value should be integer between 0 and 100',
-  'services.service.actions.run.rebalanceHdfsNodes.context':'Rebalance HDFS nodes',
+  'services.service.actions.run.rebalanceHdfsNodes.promptError':'Value should be number between 0 and 100',
+  'services.service.actions.run.rebalanceHdfsNodes.context':'Rebalance HDFS',
   'services.service.actions.run.rebalanceHdfsNodes.error':'Error during remote command: ',
   'services.service.actions.run.yarnRefreshQueues.menu':'Refresh YARN Capacity Scheduler',
   'services.service.actions.run.yarnRefreshQueues.context':'Refresh YARN Capacity Scheduler',