Sfoglia il codice sorgente

AMBARI-3861. Modify hover text information for restart indicator (Denys Buzhor via alexantonenko)

Alex Antonenko 11 anni fa
parent
commit
938810b4fc

+ 1 - 1
ambari-web/app/templates/main/service/menu_item.hbs

@@ -26,7 +26,7 @@
   {{/if}}
   {{#if App.supports.hostOverrides}}
 	  {{#if view.content.isRestartRequired}}
-	    <i class="icon-refresh restart-required-service" rel="tooltip" title="{{unbound view.content.restartRequiredMessage}}"></i>
+	    <i class="icon-refresh restart-required-service" rel="tooltip" title="{{unbound view.restartRequiredMessage}}"></i>
 	  {{/if}}
 	{{/if}}
 </a>

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

@@ -31,9 +31,9 @@
     </tr>
     <tr>
       <td>{{t services.service.config_groups_popup.group_desc_lable }}:</td>
-      <td class="textarea-full-width">
-        {{view Ember.TextArea valueBinding="configGroupDesc" rows="4"}}
+      <td class="row-fluid">
+        {{view Ember.TextArea classNames="span12" valueBinding="configGroupDesc" rows="4"}}
       </td>
     </tr>
   </table>
-</div>
+</div>

+ 16 - 1
ambari-web/app/views/main/service/menu.js

@@ -74,7 +74,22 @@ App.MainServiceMenuView = Em.CollectionView.extend({
       }
       return 0;
     }.property('App.router.clusterController.alerts'),
+    
+    restartRequiredMessage: function() {
+      var restarted, componentsCount, hostsCount, message;
+      restarted = this.get('content.restartRequiredHostsAndComponents');
+      componentsCount = 0;
+      hostsCount = 0;
+      message = "";
+      for (var host in restarted) {
+        hostsCount++;
+        componentsCount += restarted[host].length;
+      }
+      message += componentsCount + ' ' + Em.I18n.t('common.components') + ' ' + Em.I18n.t('on') + ' ' +
+        hostsCount + ' ' + Em.I18n.t('common.hosts') + ' ' + Em.I18n.t('services.service.config.restartService.needToRestartEnd');
+      return message;
+    }.property('content.isRestartRequired'),
 
     templateName:require('templates/main/service/menu_item')
   })
-});
+});