ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-3888. Incorrect restart required tooltip view (Denys Buzhor via alexantonenko)
Date Wed, 27 Nov 2013 19:05:13 GMT
Updated Branches:
  refs/heads/trunk b368344c1 -> 599cbe27a


AMBARI-3888. Incorrect restart required tooltip view (Denys Buzhor via alexantonenko)


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

Branch: refs/heads/trunk
Commit: 599cbe27a22c782917508540ec4667793c441a51
Parents: b368344
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Wed Nov 27 21:05:13 2013 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Nov 27 21:05:13 2013 +0200

----------------------------------------------------------------------
 .../app/templates/main/service/menu_item.hbs       |  6 +-----
 ambari-web/app/views/main/service/menu.js          | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/599cbe27/ambari-web/app/templates/main/service/menu_item.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/menu_item.hbs b/ambari-web/app/templates/main/service/menu_item.hbs
index e3ef2cf..5169a50 100644
--- a/ambari-web/app/templates/main/service/menu_item.hbs
+++ b/ambari-web/app/templates/main/service/menu_item.hbs
@@ -24,9 +24,5 @@
       {{view.alertsCount}}
     </span>
   {{/if}}
-  {{#if App.supports.hostOverrides}}
-	  {{#if view.content.isRestartRequired}}
-	    <i class="icon-refresh restart-required-service" rel="tooltip" title="{{unbound view.restartRequiredMessage}}"></i>
-	  {{/if}}
-	{{/if}}
+  <i rel="tooltip" {{bindAttr class=":icon-refresh :restart-required-service view.content.isRestartRequired::hide"
data-original-title="view.restartRequiredMessage"}}"></i>
 </a>

http://git-wip-us.apache.org/repos/asf/ambari/blob/599cbe27/ambari-web/app/views/main/service/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/menu.js b/ambari-web/app/views/main/service/menu.js
index f090266..f7cf9d5 100644
--- a/ambari-web/app/views/main/service/menu.js
+++ b/ambari-web/app/views/main/service/menu.js
@@ -58,14 +58,18 @@ App.MainServiceMenuView = Em.CollectionView.extend({
 
   itemViewClass:Em.View.extend({
 
+    classNameBindings:["active", "clients"],
+    templateName:require('templates/main/service/menu_item'),
+    restartRequiredMessage: null,
+
     shouldBeRestarted: function() {
       return this.get('content.hostComponents').someProperty('staleConfigs', true);
     }.property('content.hostComponents.@each.staleConfigs'),
 
-    classNameBindings:["active", "clients"],
     active:function () {
       return this.get('content.id') == this.get('parentView.activeServiceId') ? 'active'
: '';
     }.property('parentView.activeServiceId'),
+
     alertsCount: function () {
       var allAlerts = App.router.get('clusterController.alerts');
       var serviceId = this.get('content.serviceName');
@@ -74,8 +78,8 @@ App.MainServiceMenuView = Em.CollectionView.extend({
       }
       return 0;
     }.property('App.router.clusterController.alerts'),
-    
-    restartRequiredMessage: function() {
+
+    refreshRestartRequiredMessage: function() {
       var restarted, componentsCount, hostsCount, message;
       restarted = this.get('content.restartRequiredHostsAndComponents');
       componentsCount = 0;
@@ -87,9 +91,8 @@ App.MainServiceMenuView = Em.CollectionView.extend({
       }
       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')
+      this.set('restartRequiredMessage', message);
+    }.observes('content.restartRequiredHostsAndComponents')
   })
+
 });


Mime
View raw message