ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-6675. Enable NameNode HA wizard->Review Page: Show spinner and disable next button while configurations are getting loaded. (alexantonenko)
Date Wed, 30 Jul 2014 15:39:37 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 657911553 -> dfea4b512


AMBARI-6675. Enable NameNode HA wizard->Review Page: Show spinner and disable next button
while configurations are getting loaded. (alexantonenko)


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

Branch: refs/heads/trunk
Commit: dfea4b512660758271d80541f98e23a5af3a7eb6
Parents: 6579115
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Wed Jul 30 18:36:39 2014 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Jul 30 18:36:39 2014 +0300

----------------------------------------------------------------------
 .../main/admin/highAvailability/nameNode/step3_controller.js | 8 +++++++-
 .../templates/main/admin/highAvailability/nameNode/step3.hbs | 8 +++++---
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/dfea4b51/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
index c222047..35967bd 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
@@ -25,6 +25,7 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
   serverConfigData: {},
   haConfig: $.extend(true, {}, require('data/HDP2/ha_properties').haConfig),
   once: false,
+  isLoaded: false,
 
   clearStep: function () {
     this.get('stepConfigs').clear();
@@ -75,6 +76,7 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
     this.set('serverConfigData',data);
     this.tweakServiceConfigs(this.get('haConfig.configs'));
     this.renderServiceConfigs(this.get('haConfig'));
+    this.set('isLoaded', true);
   },
 
 
@@ -165,7 +167,11 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
       serviceConfigProperty.set('isEditable', serviceConfigProperty.get('isReconfigurable'));
       serviceConfigProperty.validate();
     }, this);
-  }
+  },
+
+  isNextDisabled: function () {
+    return !this.get('isLoaded');
+  }.property('isLoaded')
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/dfea4b51/ambari-web/app/templates/main/admin/highAvailability/nameNode/step3.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/nameNode/step3.hbs b/ambari-web/app/templates/main/admin/highAvailability/nameNode/step3.hbs
index 4afbb11..a3123ba 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/nameNode/step3.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/nameNode/step3.hbs
@@ -67,13 +67,15 @@
 
 
 <div id="serviceConfig">
-
+{{#if controller.isLoaded}}
   {{{t admin.highAvailability.wizard.step3.confirm.config.body}}}
-
   {{view App.ServiceConfigView isNotEditableBinding="controller.isNotEditable"}}
+{{else}}
+  <div class="spinner"></div>
+{{/if}}
 </div>
 
 <div class="btn-area">
   <a class="btn" {{action back}}>&larr; {{t common.back}}</a>
-  <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+  <a class="btn btn-success pull-right" {{bindAttr disabled="controller.isNextDisabled"}}
{{action next}}>{{t common.next}} &rarr;</a>
 </div>


Mime
View raw message