You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/02/03 17:52:36 UTC
[1/2] git commit: AMBARI-4506 Add properties to storm-site.xml for
Storm metrics. (Denys Buzhor)
Updated Branches:
refs/heads/trunk 0de2e012b -> aa25d928f
AMBARI-4506 Add properties to storm-site.xml for Storm metrics. (Denys Buzhor)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aa25d928
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aa25d928
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aa25d928
Branch: refs/heads/trunk
Commit: aa25d928faa0251754acf830f3a83c68b0292cc9
Parents: a127257
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Mon Feb 3 18:51:52 2014 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Mon Feb 3 18:52:21 2014 +0200
----------------------------------------------------------------------
.../services/STORM/configuration/storm-site.xml | 6 ++--
.../app/controllers/wizard/step7_controller.js | 35 ++++++++++++++++++++
.../app/controllers/wizard/step8_controller.js | 9 +++--
ambari-web/app/data/HDP2/site_properties.js | 21 +++++++-----
.../storm_defaults_provider.js | 8 +----
.../validators/storm_configs_validator.js | 17 +---------
6 files changed, 59 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/aa25d928/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/configuration/storm-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/configuration/storm-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/configuration/storm-site.xml
index f81b3c3..de0a00c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/configuration/storm-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/configuration/storm-site.xml
@@ -113,7 +113,7 @@
</property>
<property>
<name>nimbus.childopts</name>
- <value>-Xmx1024m</value>
+ <value></value>
<description></description>
</property>
<property>
@@ -243,7 +243,7 @@
</property>
<property>
<name>supervisor.childopts</name>
- <value>-Xmx256m</value>
+ <value></value>
<description></description>
</property>
<property>
@@ -273,7 +273,7 @@
</property>
<property>
<name>worker.childopts</name>
- <value>-Xmx768m</value>
+ <value></value>
<description></description>
</property>
<property>
http://git-wip-us.apache.org/repos/asf/ambari/blob/aa25d928/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index afd186d..f75c15b 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -308,7 +308,39 @@ App.WizardStep7Controller = Em.Controller.extend({
}
}
},
+ /**
+ * Resolve dependency between configs.
+ * @param serviceName {String}
+ * @param configs {Mixed}
+ */
+ resolveServiceDependencyConfigs: function (serviceName, configs) {
+ switch (serviceName) {
+ case 'STORM':
+ this.resolveStormConfigs(configs);
+ break;
+ default:
+ break;
+ }
+ },
+ resolveStormConfigs: function(configs) {
+ var dependentConfigs, gangliaServerHost;
+ dependentConfigs = ['nimbus.childopts', 'supervisor.childopts', 'worker.childopts'];
+ // if Ganglia selected or installed, set ganglia host to configs
+ if (this.get('installedServiceNames').contains('STORM') && this.get('installedServiceNames').contains('GANGLIA')) return;
+ if (this.get('allSelectedServiceNames').contains('GANGLIA') || this.get('installedServiceNames').contains('GANGLIA')) {
+ gangliaServerHost = this.get('wizardController').getDBProperty('masterComponentHosts').findProperty('component', 'GANGLIA_SERVER').hostName;
+ dependentConfigs.forEach(function(configName){
+ var config = configs.findProperty('name', configName);
+ config.value = config.defaultValue.format(gangliaServerHost);
+ }, this);
+ } else {
+ // if Ganglia not selected remove config
+ dependentConfigs.forEach(function(configName){
+ configs.removeAt(configs.indexOf(configs.findProperty('name', configName)));
+ }, this);
+ }
+ },
/**
* On load function
*/
@@ -339,6 +371,9 @@ App.WizardStep7Controller = Em.Controller.extend({
this.getConfigTags();
this.setInstalledServiceConfigs(this.get('serviceConfigTags'), configs);
}
+ if (this.get('allSelectedServiceNames').contains('STORM') || this.get('installedServiceNames').contains('STORM')) {
+ this.resolveServiceDependencyConfigs('STORM', configs);
+ }
//STEP 6: Distribute configs by service and wrap each one in App.ServiceConfigProperty (configs -> serviceConfigs)
var serviceConfigs = App.config.renderConfigs(configs, storedConfigs, this.get('allSelectedServiceNames'), this.get('installedServiceNames'), localDB);
if (this.get('wizardController.name') === 'addServiceController') {
http://git-wip-us.apache.org/repos/asf/ambari/blob/aa25d928/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 0052f44..e8da981 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1385,9 +1385,14 @@ App.WizardStep8Controller = Em.Controller.extend({
createStormSiteObj: function () {
var configs = this.get('configs').filterProperty('filename', 'storm-site.xml');
var stormProperties = {};
+ var specialProperties = ["storm.zookeeper.servers", "nimbus.childopts", "supervisor.childopts", "worker.childopts"];
configs.forEach(function (_configProperty) {
- if (_configProperty.name == "storm.zookeeper.servers") {
- stormProperties[_configProperty.name] = JSON.stringify(_configProperty.value).replace(/"/g, "'");
+ if (specialProperties.contains(_configProperty.name)) {
+ if (_configProperty.name == "storm.zookeeper.servers") {
+ stormProperties[_configProperty.name] = JSON.stringify(_configProperty.value).replace(/"/g, "'");
+ } else {
+ stormProperties[_configProperty.name] = JSON.stringify(_configProperty.value).replace(/"/g,"");
+ }
} else {
stormProperties[_configProperty.name] = App.config.escapeXMLCharacters(_configProperty.value);
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/aa25d928/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 8cfdd07..afa4838 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -981,12 +981,13 @@ module.exports =
"name": "nimbus.childopts",
"displayName": "nimbus.childopts",
"description": "",
- "defaultValue": "",
+ "defaultValue": "-javaagent:/var/lib/storm/jmxetric-1.0.4.jar=host={0},port=8649,wireformat31x=true,mode=multicast,config=/var/lib/storm/jmxetric-conf.xml,process=Nimbus_JVM -Xmx1024m",
"isReconfigurable": true,
- "isVisible": true,
+ "isVisible": false,
"isRequiredByAgent": true,
"serviceName": "STORM",
- "category": "Nimbus"
+ "category": "Nimbus",
+ "filename": "storm-site.xml"
},
{
"id": "site property",
@@ -1128,14 +1129,15 @@ module.exports =
"id":"site property",
"description":"",
"isReconfigurable": true,
- "isVisible":true,
+ "isVisible":false,
"isRequiredByAgent":true,
"serviceName":"STORM",
"category":"Supervisor",
"displayName":"supervisor.childopts",
"name":"supervisor.childopts",
- "defaultValue":"-Xmx256m",
- "displayType":"string"
+ "defaultValue":"-javaagent:/var/lib/storm/jmxetric-1.0.4.jar=host={0},port=8650,wireformat31x=true,mode=multicast,config=/var/lib/storm/jmxetric-conf.xml,process=Supervisor_JVM -Xmx256m",
+ "displayType":"string",
+ "filename": "storm-site.xml"
},
{
"id":"site property",
@@ -1354,14 +1356,15 @@ module.exports =
"id": "site property",
"description": "",
"isReconfigurable": true,
- "isVisible": true,
+ "isVisible": false,
"isRequiredByAgent": true,
"serviceName": "STORM",
"category": "Advanced",
"displayName": "worker.childopts",
"name": "worker.childopts",
- "defaultValue": "-Xmx768m",
- "displayType": "string"
+ "defaultValue": "-javaagent:/var/lib/storm/jmxetric-1.0.4.jar=host={0},port=8650,wireformat31x=true,mode=multicast,config=/var/lib/storm/jmxetric-conf.xml,process=Worker_%ID%_JVM -Xmx768m",
+ "displayType": "string",
+ "filename": "storm-site.xml"
},
/**********************************************tez-site***************************************/
http://git-wip-us.apache.org/repos/asf/ambari/blob/aa25d928/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js b/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js
index 196defd..cdd8ab9 100644
--- a/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js
+++ b/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js
@@ -26,12 +26,9 @@ App.STORMDefaultsProvider = App.DefaultsProvider.create({
* List of the configs that should be calculated
*/
configsTemplate: {
- 'supervisor.childopts': null,
- 'nimbus.childopts': null,
'drpc.childopts': null,
'ui.childopts': null,
- 'logviewer.childopts': null,
- 'worker.childopts': null
+ 'logviewer.childopts': null
},
// @todo fill with correct values
@@ -43,12 +40,9 @@ App.STORMDefaultsProvider = App.DefaultsProvider.create({
if (!this.clusterDataIsValid()) {
return configs;
}
- configs['supervisor.childopts'] = '-Xmx256m';
- configs['nimbus.childopts'] = '-Xmx1024m';
configs['drpc.childopts'] = '-Xmx768m';
configs['ui.childopts'] = '-Xmx768m';
configs['logviewer.childopts'] = '-Xmx128m';
- configs['worker.childopts'] = '-Xmx768m';
return configs;
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/aa25d928/ambari-web/app/utils/configs/validators/storm_configs_validator.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/validators/storm_configs_validator.js b/ambari-web/app/utils/configs/validators/storm_configs_validator.js
index 69fe18b..a2470f5 100644
--- a/ambari-web/app/utils/configs/validators/storm_configs_validator.js
+++ b/ambari-web/app/utils/configs/validators/storm_configs_validator.js
@@ -23,20 +23,9 @@ App.STORMConfigsValidator = App.ServiceConfigsValidator.create({
* List of the configs that should be validated
*/
configValidators: {
- 'supervisor.childopts': 'supervisorChildOpts',
- 'nimbus.childopts': 'nimbusChildOpts',
'drpc.childopts': 'drpcChildOpts',
'ui.childopts': 'uiChildOpts',
- 'logviewer.childopts': 'logviewerChildOpts',
- 'worker.childopts': 'workerChildOpts'
- },
-
- supervisorChildOpts: function(config) {
- return this.validateXmxValue(config);
- },
-
- nimbusChildOpts: function(config) {
- return this.validateXmxValue(config);
+ 'logviewer.childopts': 'logviewerChildOpts'
},
drpcChildOpts: function(config) {
@@ -49,9 +38,5 @@ App.STORMConfigsValidator = App.ServiceConfigsValidator.create({
logviewerChildOpts: function(config) {
return this.validateXmxValue(config);
- },
-
- workerChildOpts: function(config) {
- return this.validateXmxValue(config);
}
});
[2/2] git commit: AMBARI-4507 Out-of-Service mode icon and tooltips.
(ababiichuk)
Posted by ab...@apache.org.
AMBARI-4507 Out-of-Service mode icon and tooltips. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a127257e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a127257e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a127257e
Branch: refs/heads/trunk
Commit: a127257e718c3a2e3a05b3c23be2e809f3a6b422
Parents: 0de2e01
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Mon Feb 3 18:49:39 2014 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Mon Feb 3 18:52:21 2014 +0200
----------------------------------------------------------------------
ambari-web/app/messages.js | 9 ++++++---
ambari-web/app/models/host.js | 5 ++++-
ambari-web/app/models/host_component.js | 14 ++++++++++++++
ambari-web/app/styles/application.less | 4 ++++
ambari-web/app/templates/main/host/summary.hbs | 12 +++++-------
.../service/info/summary/master_components.hbs | 2 +-
ambari-web/app/views/main/dashboard/service.js | 3 +++
.../app/views/main/dashboard/service/hdfs.js | 3 +++
ambari-web/app/views/main/host/summary.js | 17 +++++++++++++++--
ambari-web/app/views/main/service/info/summary.js | 3 +++
10 files changed, 58 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 9f277aa..d872583 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1343,8 +1343,8 @@ Em.I18n.translations = {
'hosts.table.restartComponents.withNames':'Restart {0}',
'hosts.table.restartComponents.withoutNames':'{0} components should be restarted',
- 'hosts.table.componentsInPassiveState.withNames':'{0} in passive state',
- 'hosts.table.componentsInPassiveState.withoutNames':'{0} components in passive state',
+ 'hosts.table.componentsInPassiveState.withNames':'{0} in Out-of-Service mode',
+ 'hosts.table.componentsInPassiveState.withoutNames':'{0} components in Out-of-Service mode',
'hosts.table.menu.l1.selectedHosts':'Selected Hosts',
'hosts.table.menu.l1.filteredHosts':'Filtered Hosts',
@@ -1435,7 +1435,10 @@ Em.I18n.translations = {
'hosts.host.decommissioned':'Decommissioned',
'hosts.host.decommissioning':'Decommissioning...',
-
+ 'hosts.component.passive.implied.host.mode.tooltip':'Cannot Turn Off Out-of-Service mode because Host is in Out-of-Service mode',
+ 'hosts.component.passive.implied.service.mode.tooltip':'Cannot Turn Off Out-of-Service mode because {0} is in Out-of-Service mode',
+ 'hosts.component.passive.mode':'Component is in Out-of-Service mode',
+ 'hosts.host.passive.mode':'Host is in Out-of-Service mode',
'hosts.host.alert.noAlerts':'No alerts',
'hosts.host.alert.noAlerts.message':'There are no alerts for this host.',
'hosts.host.healthStatus.heartBeatNotReceived':'The server has not received a heartbeat from this host for more than 3 minutes.',
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/ambari-web/app/models/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host.js b/ambari-web/app/models/host.js
index 297607f..1c72637 100644
--- a/ambari-web/app/models/host.js
+++ b/ambari-web/app/models/host.js
@@ -231,6 +231,9 @@ App.Host = DS.Model.extend({
return item.get('workStatus') !== App.HostComponentStatus.started;
});
var output = '';
+ if (this.get('passiveState') != 'ACTIVE') {
+ return Em.I18n.t('hosts.host.passive.mode');
+ }
switch (this.get('healthClass')){
case 'health-status-DEAD-RED':
hostComponents = hostComponents.filterProperty('isMaster', true);
@@ -254,7 +257,7 @@ App.Host = DS.Model.extend({
break;
}
return output;
- }.property('hostComponents.@each.workStatus')
+ }.property('hostComponents.@each.workStatus','hostComponents.@each.passiveState')
});
App.Host.FIXTURES = [];
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index 3d8384a..f46a1d6 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -156,6 +156,20 @@ App.HostComponent = DS.Model.extend({
* User friendly host component status
* @returns {String}
*/
+ isActive: function() {
+ return (this.get('passiveState') == 'ACTIVE');
+ }.property('passiveState'),
+
+ passiveTooltip: function() {
+ if (!this.get('isActive')) {
+ return Em.I18n.t('hosts.component.passive.mode');
+ }
+ }.property('isActive'),
+
+ statusClass: function() {
+ return this.get('isActive') ? this.get('workStatus') : 'icon-medkit';
+ }.property('workStatus','isActive'),
+
componentTextStatus: function () {
return App.HostComponentStatus.getTextStatus(this.get("workStatus"));
}.property('workStatus','isDecommissioning')
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 22f13a9..9257e8e 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1770,6 +1770,10 @@ width:100%;
color: #666;
font-size: 13px;
+ .icon-medkit {
+ color: black!important;
+ }
+
td.summary-label {
width: 180px;
text-align: right;
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/ambari-web/app/templates/main/host/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/summary.hbs b/ambari-web/app/templates/main/host/summary.hbs
index ebdd90b..a27b2c3 100644
--- a/ambari-web/app/templates/main/host/summary.hbs
+++ b/ambari-web/app/templates/main/host/summary.hbs
@@ -47,7 +47,7 @@
</a>
{{/if}}
{{else}}
- <span {{bindAttr class="view.statusClass :components-health"}}></span>
+ <span rel='componentHealthTooltip' {{bindAttr class="view.statusClass :components-health" title="view.componentTextStatus"}}></span>
{{/if}}
{{#if component.displayNameAdvanced}}
{{component.displayNameAdvanced}}
@@ -193,23 +193,21 @@
</a>
</li>
{{/if}}
- {{#unless view.isImplied}}
{{#if view.isActive}}
- <li {{bindAttr class="view.noActionAvailable"}}>
- <a href="javascript:void(null)"
+ <li rel='passiveTooltip' {{bindAttr class="view.noActionAvailable" title="view.passiveImpliedTextStatus"}}>
+ <a href="javascript:void(null)" {{bindAttr class="view.isImplied:disabled"}}
data-toggle="modal" {{action "turnOnOffPassiveConfirmation" view.content target="controller"}}>
{{t passiveState.turnOn}}
</a>
</li>
{{else}}
- <li {{bindAttr class="view.noActionAvailable"}}>
- <a href="javascript:void(null)"
+ <li rel='passiveTooltip' {{bindAttr class="view.noActionAvailable" title="view.passiveImpliedTextStatus"}}>
+ <a href="javascript:void(null)" {{bindAttr class="view.isImplied:disabled"}}
data-toggle="modal" {{action "turnOnOffPassiveConfirmation" view.content target="controller"}}>
{{t passiveState.turnOff}}
</a>
</li>
{{/if}}
- {{/unless}}
{{/unless}}
</ul>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/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 977fbcc..caf8611 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,7 +28,7 @@
</a>
</td>
<td>
- <span {{bindAttr class="masterComp.workStatus"}}></span>
+ <span rel='healthTooltip' {{bindAttr class="masterComp.statusClass" title="masterComp.passiveTooltip"}}></span>
{{masterComp.componentTextStatus}}
</td>
</tr>
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/ambari-web/app/views/main/dashboard/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service.js b/ambari-web/app/views/main/dashboard/service.js
index b20285a..53508d6 100644
--- a/ambari-web/app/views/main/dashboard/service.js
+++ b/ambari-web/app/views/main/dashboard/service.js
@@ -115,6 +115,9 @@ App.MainDashboardServiceView = Em.View.extend({
}.property('controller.data'),
dashboardMasterComponentView : Em.View.extend({
+ didInsertElement: function() {
+ App.tooltip($('[rel=healthTooltip]'));
+ },
templateName: require('templates/main/service/info/summary/master_components'),
mastersComp : function(){
return this.get('parentView.service.hostComponents').filterProperty('isMaster', true);
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/ambari-web/app/views/main/dashboard/service/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service/hdfs.js b/ambari-web/app/views/main/dashboard/service/hdfs.js
index 8927a5c..96caf49 100644
--- a/ambari-web/app/views/main/dashboard/service/hdfs.js
+++ b/ambari-web/app/views/main/dashboard/service/hdfs.js
@@ -38,6 +38,9 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
}),
dashboardMasterComponentView: Em.View.extend({
+ didInsertElement: function() {
+ App.tooltip($('[rel=healthTooltip]'));
+ },
templateName: require('templates/main/service/info/summary/master_components'),
mastersComp : function() {
return this.get('parentView.service.hostComponents').filter(function(comp){
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/ambari-web/app/views/main/host/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js
index 9172fb8..8d5f412 100644
--- a/ambari-web/app/views/main/host/summary.js
+++ b/ambari-web/app/views/main/host/summary.js
@@ -224,6 +224,8 @@ App.MainHostSummaryView = Em.View.extend({
ComponentView: Em.View.extend({
content: null,
didInsertElement: function () {
+ App.tooltip($('[rel=componentHealthTooltip]'));
+ App.tooltip($('[rel=passiveTooltip]'));
if (this.get('isInProgress')) {
this.doBlinking();
}
@@ -262,6 +264,9 @@ App.MainHostSummaryView = Em.View.extend({
* Return host component text status
*/
componentTextStatus: function () {
+ if (this.get('content.passiveState') != 'ACTIVE') {
+ return Em.I18n.t('hosts.component.passive.mode');
+ }
var workStatus = this.get("workStatus");
var componentTextStatus = this.get('content.componentTextStatus');
var hostComponent = this.get('hostComponent');
@@ -289,9 +294,17 @@ App.MainHostSummaryView = Em.View.extend({
}
}
return componentTextStatus;
- }.property('workStatus','isDataNodeRecommissionAvailable', 'isDataNodeDecommissioning', 'isNodeManagerRecommissionAvailable',
+ }.property('content.passiveState','workStatus','isDataNodeRecommissionAvailable', 'isDataNodeDecommissioning', 'isNodeManagerRecommissionAvailable',
'isTaskTrackerRecommissionAvailable', 'isRegionServerRecommissionAvailable', 'isRegionServerDecommissioning'),
+ passiveImpliedTextStatus: function() {
+ if(this.get('parentView.content.passiveState') === 'PASSIVE') {
+ return Em.I18n.t('hosts.component.passive.implied.host.mode.tooltip');
+ } else if(this.get('content.service.passiveState') === 'PASSIVE') {
+ return Em.I18n.t('hosts.component.passive.implied.service.mode.tooltip').format(this.get('content.service.serviceName'));
+ }
+ }.property('content.passiveState','parentView.content.passiveState'),
+
statusClass: function () {
//If the component is DataNode
if (this.get('isDataNode')) {
@@ -433,7 +446,7 @@ App.MainHostSummaryView = Em.View.extend({
}.property('content.passiveState'),
isImplied: function() {
- return (this.get('content.passiveState') == "IMPLIED");
+ return (this.get('parentView.content.passiveState') === 'PASSIVE' || this.get('content.service.passiveState') === 'PASSIVE');
}.property('content.passiveState'),
isDecommissioning: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/a127257e/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 26f4141..47fa265 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -55,6 +55,9 @@ App.MainServiceInfoSummaryView = Em.View.extend({
servicesHaveClients: ["OOZIE", "ZOOKEEPER", "HIVE", "MAPREDUCE2", "TEZ"],
sumMasterComponentView : Em.View.extend({
+ didInsertElement: function() {
+ App.tooltip($('[rel=healthTooltip]'));
+ },
templateName: require('templates/main/service/info/summary/master_components'),
mastersComp : function(){
return this.get('parentView.service.hostComponents').filterProperty('isMaster', true);