Author: yusaku
Date: Fri Jun 21 23:55:31 2013
New Revision: 1495640

URL: http://svn.apache.org/r1495640
Log:
AMBARI-2455. JS error when zoom Cluster Load widget or other usage widgets. (Xi 
Wang via yusaku)

Modified:
    incubator/ambari/trunk/ambari-web/app/templates/main/charts/linear_time.hbs
    incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js

Modified: 
incubator/ambari/trunk/ambari-web/app/templates/main/charts/linear_time.hbs
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/charts/linear_time.hbs?rev=1495640&r1=1495639&r2=1495640&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/charts/linear_time.hbs 
(original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/charts/linear_time.hbs 
Fri Jun 21 23:55:31 2013
@@ -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>
+

Modified: 
incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js?rev=1495640&r1=1495639&r2=1495640&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js 
(original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js Fri 
Jun 21 23:55:31 2013
@@ -612,7 +612,7 @@ App.ChartLinearTimeView = Ember.View.ext
       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();


Reply via email to