Browse Source

AMBARI-6114 No loading spinner on Add Service Wizard. (atkach)

atkach 11 years ago
parent
commit
77f1877c35

+ 7 - 3
ambari-web/app/templates/main/service/add.hbs

@@ -38,9 +38,13 @@
             </ul>
           </div>
         </div>
-        <div class="wizard-content well span9">
-          {{outlet}}
-        </div>
+          <div class="wizard-content well span9">
+            {{#if view.isLoaded}}
+              {{outlet}}
+            {{else}}
+                <div class="spinner"></div>
+            {{/if}}
+          </div>
       </div>
     </div>
   </div>

+ 5 - 1
ambari-web/app/views/main/service/add_view.js

@@ -23,6 +23,8 @@ App.AddServiceView = Em.View.extend({
 
   templateName: require('templates/main/service/add'),
 
+  isLoaded: false,
+
   isStep1Disabled: function () {
     return this.isStepDisabled(1);
   }.property('controller.isStepDisabled.@each.value').cacheable(),
@@ -55,11 +57,13 @@ App.AddServiceView = Em.View.extend({
     return this.get('controller.isStepDisabled').findProperty('step', index).get('value');
   },
 
-
   willInsertElement: function () {
     this.loadHosts();
   },
 
+  /**
+   * send request to fetch all hosts information
+   */
   loadHosts: function () {
     App.ajax.send({
       name: 'hosts.confirmed',