소스 검색

AMBARI-11292. Warn/error message should be shown in tooltip even on config name (Richard Zang via srimanth)

Srimanth Gunturi 10 년 전
부모
커밋
a077ad3f61

+ 1 - 1
ambari-web/app/templates/common/configs/widgets/config_label.hbs

@@ -20,6 +20,6 @@
   <div class="clearfix"></div>
   <p {{bindAttr class=":widget-config-label view.configLabelClass"}}>
    {{view view.issueView configBinding="view.config"}}
-   {{formatWordBreak view.configLabel}}
+   {{formatWordBreak view.configLabel data-original-titleBinding="view.issueMessage"}}
   </p>
 {{/if}}

+ 1 - 0
ambari-web/app/utils/helper.js

@@ -765,6 +765,7 @@ App.registerBoundHelper('formatNull', Em.View.extend({
  * {{formatWordBreak 'apple.banana.uranium'}}
  */
 App.registerBoundHelper('formatWordBreak', Em.View.extend({
+  attributeBindings: ["data-original-title"],
   tagName: 'span',
   template: Em.Handlebars.compile('{{{view.result}}}'),
 

+ 4 - 0
ambari-web/app/views/common/configs/widgets/config_widget_view.js

@@ -119,6 +119,8 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
 
   classNameBindings:['isComparison:compare-mode'],
 
+  issueMessage: '',
+
   issueView: Em.View.extend({
 
     tagName: 'i',
@@ -182,6 +184,7 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
       this.set('parentView.configLabelClass', issue.configLabelClass);
       this.set('issueIconClass', issue.iconClass);
       this.set('issueMessage', issue.message);
+      this.set('parentView.issueMessage', issue.message);
     },
 
     /**
@@ -325,6 +328,7 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
   }.observes('controller.recommendationTimeStamp'),
 
   didInsertElement: function () {
+    App.tooltip($(this.get('element')).find('span'));
     var self = this;
     var element = this.$();
     if (element) {