Parcourir la source

AMBARI-11152. Graph widget becomes unclickable after the description is shown on hover-wait.(XIWANG)

Xi Wang il y a 10 ans
Parent
commit
77bb70603d

+ 1 - 5
ambari-web/app/templates/common/widget/graph_widget.hbs

@@ -31,11 +31,7 @@
       </a>
     {{/isAccessible}}
     <div class="content"> {{view view.graphView}}</div>
-    {{#if view.content.description}}
-      <div class="hidden-description">
-        {{view.content.description}}
-      </div>
-    {{/if}}
+
   {{else}}
     <div class="spinner"></div>
   {{/if}}

+ 6 - 1
ambari-web/app/templates/main/charts/linear_time.hbs

@@ -28,6 +28,11 @@
   {{#unless view.noTitleUnderGraph}}
     <div id="{{unbound view.id}}-title" class="chart-title">{{view.title}}</div>
   {{/unless}}
-
 </div>
 
+{{#if view.description}}
+  <div class="hidden-description" {{action showGraphInPopup target="view"}}>
+    {{view.description}}
+  </div>
+{{/if}}
+

+ 3 - 0
ambari-web/app/views/common/widget/graph_widget_view.js

@@ -250,6 +250,9 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
 
     noTitleUnderGraph: true,
     inWidget: true,
+    description: function () {
+      return this.get('parentView.content.description');
+    }.property('parentView.content.description'),
 
     /**
      * set custom time range for graph widget