Selaa lähdekoodia

AMBARI-2455. JS error when zoom Cluster Load widget or other usage widgets. (Xi Wang via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1495640 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 vuotta sitten
vanhempi
commit
5113a33d9a

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

@@ -19,14 +19,15 @@
 <div class="screensaver chart-container" {{bindAttr class="view.isReady:hide"}} >
   <div id="{{unbound view.id}}-title" class="chart-title">{{view.title}}</div>
 </div>
-<div  id="{{unbound view.id}}-container" class="chart-container hide" {{bindAttr class="view.isReady:show"}}  {{action showGraphInPopup target="view"}} rel="ZoomInTooltip" title="Click to zoom">
-  <div id="{{unbound view.id}}-yaxis" class="chart-y-axis"></div>
-  <div id="{{unbound view.id}}-xaxis" class="chart-x-axis"></div>
+<div  id="{{unbound view.id}}-container" class="chart-container hide" {{bindAttr class="view.isReady:show"}}  rel="ZoomInTooltip" title="Click to zoom">
+  <div id="{{unbound view.id}}-yaxis" class="chart-y-axis" {{action showGraphInPopup target="view"}}></div>
+  <div id="{{unbound view.id}}-xaxis" class="chart-x-axis" {{action showGraphInPopup target="view"}}></div>
   <div id="{{unbound view.id}}-legend" class="chart-legend"></div>
-  <div id="{{unbound view.id}}-chart" class="chart"></div>
-  <div id="{{unbound view.id}}-timeline" class="timeline"></div>
+  <div id="{{unbound view.id}}-chart" class="chart"  {{action showGraphInPopup target="view"}}></div>
+  <div id="{{unbound view.id}}-timeline" class="timeline" {{action showGraphInPopup target="view"}}></div>
   {{#unless view.noTitleUnderGraph}}
     <div id="{{unbound view.id}}-title" class="chart-title">{{view.title}}</div>
   {{/unless}}
 
 </div>
+

+ 1 - 1
ambari-web/app/views/common/chart/linear_time.js

@@ -612,7 +612,7 @@ App.ChartLinearTimeView = Ember.View.extend({
       var self = this;
       // In popup save selected metrics and show only them after data update
       _graph.series.forEach(function(series, index) {
-        if (self.get('_seriesProperties') !== null && self.get('_seriesProperties')[index] !== null) {
+        if (self.get('_seriesProperties') !== null && self.get('_seriesProperties')[index] !== null && self.get('_seriesProperties')[index] !== undefined ) {
           if(self.get('_seriesProperties')[self.get('_seriesProperties').length - index - 1].length > 1) {
             $('#'+self.get('id')+'-container'+self.get('popupSuffix')+' a.action:eq('+(self.get('_seriesProperties').length - index - 1)+')').parent('li').addClass('disabled');
             series.disable();