Pārlūkot izejas kodu

AMBARI-3855. YARN Client restart indicator not shown on host configs page. (akovalenko)

Aleksandr Kovalenko 11 gadi atpakaļ
vecāks
revīzija
7a6e05ec49

+ 3 - 0
ambari-web/app/controllers/main/host/details.js

@@ -991,6 +991,9 @@ App.MainHostDetailsController = Em.Controller.extend({
       onPrimary: function () {
         var hostComponents = this.content.get('content.hostComponents').filterProperty('staleConfigs', true);
         hostComponents.forEach(function(item){
+          if (item.get('isClient') && commandName === 'start_component') {
+            return false;
+          }
           var componentName = item.get('componentName');
           var hostName = item.get('host.hostName');
           App.ajax.send({

+ 1 - 5
ambari-web/app/templates/main/host/summary.hbs

@@ -154,11 +154,7 @@
                   <div class="span3 align-right">{{t common.clients}}&nbsp;/</div>
                   <div class="span7">
                     {{#each component in view.clients}}
-                      {{#if component.isLast}}
-                        {{component.displayName}}
-                        {{else}}
-                        {{component.displayName}},
-                      {{/if}}
+                      {{component.displayName}}{{#if component.staleConfigs}} <i class="text-warning icon-refresh"></i>{{/if}}{{#unless component.isLast}},{{/unless}}
                     {{/each}}
                 </div>
               {{/if}}

+ 2 - 2
ambari-web/app/views/main/host/summary.js

@@ -35,8 +35,8 @@ App.MainHostSummaryView = Em.View.extend({
   },
 
   needToRestartComponentsCount: function() {
-    return this.get('sortedComponents').filterProperty('staleConfigs', true).length;
-  }.property('sortedComponents.@each.staleConfigs'),
+    return this.get('content.hostComponents').filterProperty('staleConfigs', true).length;
+  }.property('content.hostComponents.@each.staleConfigs'),
 
   stopComponentsIsDisabled: function () {
     var staleComponents = this.get('sortedComponents').filterProperty('staleConfigs', true);