You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/08/04 13:13:27 UTC
ambari git commit: AMBARI-12629. FE: Service summary memory leaks.
(alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 48a0d2acc -> d7b3ec8e1
AMBARI-12629. FE: Service summary memory leaks. (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7b3ec8e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7b3ec8e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7b3ec8e
Branch: refs/heads/trunk
Commit: d7b3ec8e1e47f792685630daaa17976ea193ac4e
Parents: 48a0d2a
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Aug 4 14:06:33 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Tue Aug 4 14:06:33 2015 +0300
----------------------------------------------------------------------
.../main/service/info/summary/base.hbs | 6 +-
.../service/info/summary/master_components.hbs | 5 +-
.../app/views/common/chart/linear_time.js | 69 ++++++----
.../app/views/common/quick_view_link_view.js | 6 +
.../main/service/info/components_list_view.js | 28 ++++-
.../app/views/main/service/info/summary.js | 125 ++++++++++++++-----
ambari-web/app/views/main/service/menu.js | 15 ++-
ambari-web/app/views/main/service/service.js | 5 +-
.../app/views/main/service/services/hbase.js | 4 +-
.../app/views/main/service/services/hdfs.js | 10 +-
.../app/views/main/service/services/yarn.js | 7 +-
11 files changed, 205 insertions(+), 75 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/templates/main/service/info/summary/base.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary/base.hbs b/ambari-web/app/templates/main/service/info/summary/base.hbs
index de18721..e2a7529 100644
--- a/ambari-web/app/templates/main/service/info/summary/base.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/base.hbs
@@ -16,6 +16,6 @@
* limitations under the License.
}}
-{{view App.SummaryMasterComponentsView mastersCompBinding="view.content.mastersObj"}}
-{{view App.SummarySlaveComponentsView slavesObjBinding="view.content.slavesObj"}}
-{{view App.SummaryClientComponentsView clientsObjBinding="view.content.clientObj"}}
+{{view App.SummaryMasterComponentsView mastersCompBinding="view.parentView.mastersObj"}}
+{{view App.SummarySlaveComponentsView slavesObjBinding="view.parentView.slavesObj"}}
+{{view App.SummaryClientComponentsView clientsObjBinding="view.parentView.clientObj"}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/templates/main/service/info/summary/master_components.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary/master_components.hbs b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
index 58630b7..5d6c3a6 100644
--- a/ambari-web/app/templates/main/service/info/summary/master_components.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
@@ -28,11 +28,8 @@
</a>
</td>
<td>
- <span rel='healthTooltip' {{bindAttr class="comp.statusClass comp.statusIconClass" data-original-title="comp.passiveTooltip"}}></span>
+ <span rel='SummaryComponentHealthTooltip' {{bindAttr class="comp.statusClass comp.statusIconClass" data-original-title="comp.passiveTooltip"}}></span>
{{comp.componentTextStatus}}
</td>
</tr>
{{/each}}
-
-
-
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/views/common/chart/linear_time.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/chart/linear_time.js b/ambari-web/app/views/common/chart/linear_time.js
index fc360d4..b0ae9a2 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -100,6 +100,7 @@ App.ChartLinearTimeView = Ember.View.extend({
*/
_seriesPropertiesWidget: null,
+
/**
* Renderer type
* See <code>Rickshaw.Graph.Renderer</code> for more info
@@ -150,6 +151,14 @@ App.ChartLinearTimeView = Ember.View.extend({
*/
displayUnit: null,
+ _containerSelector: function() {
+ return ['#', this.get('id'), '-container'].join('');
+ }.property('id'),
+
+ _popupSelector: function() {
+ return [this.get('_containerSelector'), this.get('popupSuffix')].join('');
+ }.property('_containerSelector'),
+
didInsertElement: function () {
this.loadData();
this.registerGraph();
@@ -159,6 +168,12 @@ App.ChartLinearTimeView = Ember.View.extend({
});
},
+ willDestroyElement: function () {
+ this.$("[rel='ZoomInTooltip']").tooltip('destroy');
+ $(this.get('_containerSelector') + ' li.line').off();
+ $(this.get('_popupSelector') + ' li.line').off();
+ },
+
registerGraph: function() {
var graph = {
name: this.get('title'),
@@ -369,24 +384,25 @@ App.ChartLinearTimeView = Ember.View.extend({
}
var seriesData = this.transformToSeries(jsonData);
- //if graph opened as modal popup
- var popup_path = $("#" + this.get('id') + "-container" + this.get('popupSuffix'));
- var graph_container = $("#" + this.get('id') + "-container");
- if(popup_path.length) {
- popup_path.children().each(function () {
- $(this).children().remove();
- });
- this.set('isPopup', true);
- }
- else {
- graph_container.children().each(function (index, value) {
- $(value).children().remove();
- });
- }
+ //if graph opened as modal popup
+ var popup_path = $(this.get('_popupSelector'));
+ var graph_container = $(this.get('_containerSelector'));
+ var container;
+ if(popup_path.length) {
+ popup_path.children().each(function () {
+ $(this).children().remove();
+ });
+ this.set('isPopup', true);
+ }
+ else {
+ graph_container.children().each(function () {
+ $(this).children().remove();
+ });
+ }
if (this.checkSeries(seriesData)) {
// Check container exists (may be not, if we go to another page and wait while graphs loading)
if (graph_container.length) {
- var container = $("#" + this.get('id') + "-container");
+ container = $(this.get('_containerSelector'));
this.draw(seriesData);
this.set('hasData', true);
//move yAxis value lower to make them fully visible
@@ -406,6 +422,9 @@ App.ChartLinearTimeView = Ember.View.extend({
}
this.set('isPopup', false);
}
+ graph_container = null;
+ container = null;
+ popup_path = null;
},
/**
@@ -612,12 +631,12 @@ App.ChartLinearTimeView = Ember.View.extend({
});
if (!isPopup) {
- overlayElement.addEventListener('mousemove', function () {
+ $(overlayElement).on('mousemove', function () {
$(xaxisElement).removeClass('hide');
$(legendElement).removeClass('hide');
$(chartElement).children("div").removeClass('hide');
});
- overlayElement.addEventListener('mouseout', function () {
+ $(overlayElement).on('mouseout', function () {
$(legendElement).addClass('hide');
});
_graph.onUpdate(function () {
@@ -625,6 +644,10 @@ App.ChartLinearTimeView = Ember.View.extend({
});
}
+ this.$().on('remove', function() {
+ $(overlayElement).off();
+ });
+
//show the graph when it's loaded
_graph.onUpdate(function() {
self.set('isReady', true);
@@ -654,10 +677,9 @@ App.ChartLinearTimeView = Ember.View.extend({
});
_graph.update();
- var selector = '#'+this.get('id')+'-container'+this.get('popupSuffix');
- $(selector + ' li.line').click(function() {
+ $(this.get('_popupSelector') + ' li.line').click(function() {
var series = [];
- $(selector + ' a.action').each(function(index, v) {
+ $(this.get('_popupSelector') + ' a.action').each(function(index, v) {
series[index] = v.parentNode.classList;
});
self.set('_seriesProperties', series);
@@ -667,10 +689,9 @@ App.ChartLinearTimeView = Ember.View.extend({
}
else {
_graph.update();
- var selector = '#'+this.get('id')+'-container';
- $(selector + ' li.line').click(function() {
+ $(this.get('_containerSelector') + ' li.line').click(function() {
var series = [];
- $(selector + ' a.action').each(function(index, v) {
+ $(this.get('_containerSelector') + ' a.action').each(function(index, v) {
series[index] = v.parentNode.classList;
});
self.set('_seriesPropertiesWidget', series);
@@ -1172,4 +1193,4 @@ App.ChartLinearTimeView.LoadAggregator = Em.Object.create({
return fields.join(",");
}
-});
\ No newline at end of file
+});
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/views/common/quick_view_link_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js
index fc3293a..5065752 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -109,6 +109,12 @@ App.QuickViewLinks = Em.View.extend({
this.setQuickLinks();
},
+ willDestroyElement: function() {
+ this.get('configProperties').clear();
+ this.get('actualTags').clear();
+ this.get('quickLinks').clear();
+ },
+
findComponentHost: function (components, componentName) {
var component = components.find(function (item) {
return item.host_components.someProperty('HostRoles.component_name', componentName);
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/views/main/service/info/components_list_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/components_list_view.js b/ambari-web/app/views/main/service/info/components_list_view.js
index 6c98f3f..c0a9922 100644
--- a/ambari-web/app/views/main/service/info/components_list_view.js
+++ b/ambari-web/app/views/main/service/info/components_list_view.js
@@ -20,9 +20,33 @@ var App = require('app');
App.SummaryMasterComponentsView = Em.View.extend({
templateName: require('templates/main/service/info/summary/master_components'),
- mastersComp: null,
+ mastersCurrentLength: 0,
+ mastersComp: [],
+ mastersCompWillChange: function() {
+ this.removeTooltips();
+ }.observesBefore('mastersComp.length'),
+ mastersCompDidChange: function() {
+ this.attachTooltip();
+ }.observes('mastersComp.length'),
+
+ removeTooltips: function() {
+ if ($('[rel=SummaryComponentHealthTooltip]').length) {
+ $('[rel=SummaryComponentHealthTooltip]').tooltip('destroy');
+ }
+ },
+
+ attachTooltip: function() {
+ if ($('[rel=SummaryComponentHealthTooltip]').length) {
+ App.tooltip($('[rel=SummaryComponentHealthTooltip]'));
+ }
+ },
+
didInsertElement: function() {
- App.tooltip($('[rel=healthTooltip]'));
+ this.attachTooltip();
+ },
+
+ willDestroyElement: function() {
+ $('[rel=SummaryComponentHealthTooltip]').tooltip('destroy');
}
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index 42adf76..96f3313 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -30,6 +30,28 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
attributes:null,
/**
+ * Contain array with list of master components from <code>App.Service.hostComponets</code> which are
+ * <code>App.HostComponent</code> models.
+ * @type {App.HostComponent[]}
+ */
+ mastersObj: [],
+ mastersLength: 0,
+
+ /**
+ * Contain array with list of slave components models <code>App.SlaveComponent</code>.
+ * @type {App.SlaveComponent[]}
+ */
+ slavesObj: [],
+ slavesLength: 0,
+
+ /**
+ * Contain array with list of client components models <code>App.ClientComponent</code>.
+ * @type {App.ClientComponent[]}
+ */
+ clientObj: [],
+ clientsLength: 0,
+
+ /**
* @property {String} templatePathPrefix - base path for custom templates
* if you want to add custom template, add <service_name>.hbs file to
* templates/main/service/info/summary folder.
@@ -129,6 +151,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
var service=this.get('controller.content');
return (App.singleNodeInstall ? "http://" + App.singleNodeAlias + ":19888" : "http://" + service.get("hostComponents").findProperty('isMaster', true).get("host").get("publicHostName")+":19888");
}.property('controller.content'),
+
/**
* Property related to ZOOKEEPER service, is unused for other services
* @return {Object}
@@ -144,27 +167,55 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
return {};
}.property('controller.content'),
- mastersObj: function() {
- return this.get('service.hostComponents').filterProperty('isMaster', true);
- }.property('service'),
- /**
- * Contain array with list of client components models <code>App.ClientComponent</code>.
- * @type {Array}
- */
- clientObj: function () {
- var clientComponents = this.get('controller.content.clientComponents').toArray();
- return clientComponents.get('length') ? clientComponents : [];
- }.property('service.clientComponents.@each.totalCount'),
+ componentsLengthDidChange: function() {
+ var self = this;
+ if (!this.get('service')) return;
+ Em.run.once(self, 'setComponentsContent');
+ }.observes('service.hostComponents.length', 'service.slaveComponents.@each.totalCount', 'service.clientComponents.@each.totalCount'),
+
+ setComponentsContent: function() {
+ Em.run.next(function() {
+ var masters = this.get('service.hostComponents').filterProperty('isMaster');
+ var slaves = this.get('service.slaveComponents').toArray();
+ var clients = this.get('service.clientComponents').toArray();
+
+ if (this.get('mastersLength') != masters.length) {
+ this.updateComponentList(this.get('mastersObj'), masters);
+ this.set('mastersLength', masters.length);
+ }
+ if (this.get('slavesLength') != slaves.length) {
+ this.updateComponentList(this.get('slavesObj'), slaves);
+ this.set('slavesLength', slaves.length);
+ }
+ if (this.get('clientsLength') != clients.length) {
+ this.updateComponentList(this.get('clientObj'), clients);
+ this.set('clientsLength', clients.length);
+ }
+ }.bind(this));
+ },
- /**
- * Contain array with list of slave components models <code>App.SlaveComponent</code>.
- * @type {Array}
- */
- slavesObj: function() {
- var slaveComponents = this.get('controller.content.slaveComponents').toArray();
- return slaveComponents.get('length') ? slaveComponents : [];
- }.property('service.slaveComponents.@each.totalCount', 'service.slaveComponents.@each.startedCount'),
+
+ updateComponentList: function(source, data) {
+ var sourceIds = source.mapProperty('id');
+ var dataIds = data.mapProperty('id');
+ if (sourceIds.length == 0) {
+ source.pushObjects(data);
+ }
+ if (source.length > data.length) {
+ sourceIds.forEach(function(item, index) {
+ if (!dataIds.contains(item)) {
+ source.removeAt(index);
+ }
+ });
+ } else if (source.length < data.length) {
+ dataIds.forEach(function(item, index) {
+ if (!sourceIds.contains(item)) {
+ source.pushObject(data.objectAt(index));
+ }
+ });
+ }
+ },
data:{
hive:{
@@ -188,8 +239,10 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
}.property('comp')
}),
- service:function () {
- var svc = this.get('controller.content');
+ service: null,
+
+ getServiceModel: function (serviceName) {
+ var svc = App.Service.find(serviceName);
var svcName = svc.get('serviceName');
if (svcName) {
switch (svcName.toLowerCase()) {
@@ -213,7 +266,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
}
}
return svc;
- }.property('controller.content.serviceName').volatile(),
+ },
isHide:true,
moreStatsView:Em.View.extend({
@@ -309,7 +362,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
var stackService = App.StackService.find().findProperty('serviceName', serviceName);
if (!graphNames && !stackService.get('isServiceWithWidgets')) {
- self.set('serviceMetricGraphs', []);
+ self.get('serviceMetricGraphs').clear();
self.set('isServiceMetricLoaded', false);
return;
}
@@ -485,8 +538,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
});
} else {
serviceSummaryView = Em.View.extend({
- templateName: this.get('templatePathPrefix') + 'base',
- content: this
+ templateName: this.get('templatePathPrefix') + 'base'
});
}
this.set('serviceSummaryView', serviceSummaryView);
@@ -522,6 +574,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
didInsertElement: function () {
var svcName = this.get('controller.content.serviceName');
+ this.set('service', this.getServiceModel(svcName));
var isMetricsSupported = svcName != 'STORM' || App.get('isStormMetricsSupported');
this.get('controller').getActiveWidgetLayout();
@@ -551,18 +604,26 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
App.tooltip($("[rel='add-widget-tooltip']"));
// enalble description show up on hover
$('.thumbnail').hoverIntent(function() {
- var self = this;
- setTimeout(function() {
- if ($(self).is(':hover')) {
- $(self).find('.hidden-description').fadeIn(200);
- }
- }, 1000);
+ if ($(this).is(':hover')) {
+ $(this).find('.hidden-description').delay(1000).fadeIn(200).end();
+ }
}, function() {
- $(this).find('.hidden-description').hide();
+ $(this).find('.hidden-description').stop().hide().end();
});
}, 1000);
},
+ willDestroyElement: function() {
+ $("[rel='add-widget-tooltip']").tooltip('destroy');
+ $('.thumbnail').off();
+ $('#widget_layout').sortable('destroy');
+ this.get('serviceMetricGraphs').clear();
+ this.set('service', null);
+ this.get('mastersObj').clear();
+ this.get('slavesObj').clear();
+ this.get('clientObj').clear();
+ },
+
/**
* Define if some widget is currently moving
* @type {boolean}
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/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 729729c..a462ac1 100644
--- a/ambari-web/app/views/main/service/menu.js
+++ b/ambari-web/app/views/main/service/menu.js
@@ -33,7 +33,12 @@ App.MainServiceMenuView = Em.CollectionView.extend({
didInsertElement:function () {
App.router.location.addObserver('lastSetURL', this, 'renderOnRoute');
this.renderOnRoute();
- App.tooltip($(".restart-required-service"), {html:true, placement:"right"});
+ App.tooltip(this.$(".restart-required-service"), {html:true, placement:"right"});
+ },
+
+ willDestroyElement: function() {
+ App.router.location.removeObserver('lastSetURL', this, 'renderOnRoute');
+ this.$(".restart-required-service").tooltip('destroy');
},
activeServiceId:null,
@@ -50,7 +55,6 @@ App.MainServiceMenuView = Em.CollectionView.extend({
var sub_url = reg.exec(last_url);
var service_id = (null != sub_url) ? sub_url[1] : 1;
this.set('activeServiceId', service_id);
-
},
tagName:'ul',
@@ -137,7 +141,12 @@ App.TopNavServiceMenuView = Em.CollectionView.extend({
didInsertElement:function () {
App.router.location.addObserver('lastSetURL', this, 'renderOnRoute');
this.renderOnRoute();
- App.tooltip($(".restart-required-service"), {html:true, placement:"right"});
+ App.tooltip(this.$(".restart-required-service"), {html:true, placement:"right"});
+ },
+
+ willDestroyElement: function() {
+ App.router.location.removeObserver('lastSetURL', this, 'renderOnRoute');
+ this.$(".restart-required-service").tooltip('destroy');
},
activeServiceId:null,
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/views/main/service/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/service.js b/ambari-web/app/views/main/service/service.js
index bfb5e34..75eeab8 100644
--- a/ambari-web/app/views/main/service/service.js
+++ b/ambari-web/app/views/main/service/service.js
@@ -132,7 +132,10 @@ App.MainDashboardServiceView = Em.View.extend({
templateName: require('templates/main/service/info/summary/master_components'),
mastersComp: function () {
return this.get('parentView.service.hostComponents').filterProperty('isMaster', true);
- }.property("service")
+ }.property("service"),
+ willDestroyElement: function() {
+ $('[rel=healthTooltip]').tooltip('destroy');
+ }
}),
formatUnavailable: function(value){
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/views/main/service/services/hbase.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/hbase.js b/ambari-web/app/views/main/service/services/hbase.js
index f4c5194..ebed92f 100644
--- a/ambari-web/app/views/main/service/services/hbase.js
+++ b/ambari-web/app/views/main/service/services/hbase.js
@@ -35,8 +35,6 @@ App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({
return this.get('masters').filterProperty('haStatus', 'false');
}.property('masters'),
-
-
regionServesText: function () {
if (this.get('service.regionServersTotal') == 0) {
return '';
@@ -144,4 +142,4 @@ App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({
componentName: 'PHOENIX_QUERY_SERVER'
});
}.property()
-});
\ No newline at end of file
+});
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/views/main/service/services/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/hdfs.js b/ambari-web/app/views/main/service/services/hdfs.js
index c81f4a0..f469a89 100644
--- a/ambari-web/app/views/main/service/services/hdfs.js
+++ b/ambari-web/app/views/main/service/services/hdfs.js
@@ -57,12 +57,20 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
}
});
return masterComponents;
- }.property('parentView.service.hostComponents.length')
+ }.property('parentView.service.hostComponents.length'),
+ willDestroyElement: function() {
+ $('[rel=healthTooltip]').tooltip('destroy')
+ }
}),
didInsertElement: function() {
App.tooltip($("[rel='tooltip']"));
},
+
+ willDestroyElement: function() {
+ $("[rel='tooltip']").tooltip('destroy');
+ },
+
dataNodesDead: function () {
return this.get('service.dataNodesInstalled');
}.property('service.dataNodesInstalled'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b3ec8e/ambari-web/app/views/main/service/services/yarn.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/yarn.js b/ambari-web/app/views/main/service/services/yarn.js
index 2f24b19..55d0e53 100644
--- a/ambari-web/app/views/main/service/services/yarn.js
+++ b/ambari-web/app/views/main/service/services/yarn.js
@@ -134,9 +134,12 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
queues: function() {
return Em.I18n.t('dashboard.services.yarn.queues.msg').format(this.formatUnavailable(this.get('service.queuesCount')));
}.property('service.queuesCount'),
-
+
didInsertElement: function(){
App.tooltip($("[rel='queue-tooltip']"), {html: true, placement: "right"});
- }
+ },
+ willDestroyElement: function(){
+ $("[rel='queue-tooltip']").tooltip('destroy');
+ }
});