|
@@ -152,6 +152,23 @@ App.HostComponentView = Em.View.extend({
|
|
|
*/
|
|
|
isActive: Em.computed.equal('content.passiveState', 'OFF'),
|
|
|
|
|
|
+ /**
|
|
|
+ * Tooltip message for switch maintenance mode option
|
|
|
+ * @type {Strting}
|
|
|
+ */
|
|
|
+ maintenanceTooltip: function () {
|
|
|
+ switch (this.get('content.passiveState')) {
|
|
|
+ case 'IMPLIED_FROM_SERVICE':
|
|
|
+ return Em.I18n.t('passiveState.disabled.impliedFromHighLevel').format(this.get('content.displayName'), this.get('content.service.serviceName'));
|
|
|
+ case 'IMPLIED_FROM_HOST':
|
|
|
+ return Em.I18n.t('passiveState.disabled.impliedFromHighLevel').format(this.get('content.displayName'), this.get('content.host.hostName'));
|
|
|
+ case 'IMPLIED_FROM_SERVICE_AND_HOST':
|
|
|
+ return Em.I18n.t('passiveState.disabled.impliedFromServiceAndHost').format(this.get('content.displayName'), this.get('content.service.serviceName'), this.get('content.host.hostName'));
|
|
|
+ default:
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }.property('content.passiveState'),
|
|
|
+
|
|
|
/**
|
|
|
* Shows whether we need to show Delete button
|
|
|
* @type {bool}
|