AMBARI-3816 UI tweaks with stop/start actions in stale_config restart indicator. (ababiichuk)
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 9e4ed70..708b1dc 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -972,12 +972,12 @@
var staleComponents = this.get('content.hostComponents').filterProperty('staleConfigs', true);
var commandName = "stop_component";
if(e.context) {
- if(!staleComponents.findProperty('workStatus','INSTALLED')){
+ if(!staleComponents.findProperty('workStatus','STARTED')){
return;
}
- }else {
+ } else {
commandName = "start_component";
- if(!staleComponents.findProperty('workStatus','STARTED')){
+ if(!staleComponents.findProperty('workStatus','INSTALLED')){
return;
}
};
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 10c27da..70b811a 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1317,8 +1317,8 @@
'hosts.host.details.hostActions':'Host Actions',
'hosts.host.details.needToRestart':'Host needs {0} components restarted',
'hosts.host.details.needToRestart.button':'Restart components',
- 'hosts.host.details.needToRestart.stopButton':'Stop components',
- 'hosts.host.details.needToRestart.startButton':'Start components',
+ 'hosts.host.details.needToRestart.stopButton':'Stop Components',
+ 'hosts.host.details.needToRestart.startButton':'Start Components',
'hosts.host.details.deleteHost':'Delete Host',
'hosts.host.details.startAllComponents':'Start All Components',
'hosts.host.details.stopAllComponents':'Stop All Components',
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 29b6e1b..02cf3fa 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -3106,6 +3106,9 @@
width: 160px;
height: 30px;
}
+ .icon-refresh {
+ color: #FDB82F;
+ }
}
.host-components .btn-group {
diff --git a/ambari-web/app/templates/main/host/summary.hbs b/ambari-web/app/templates/main/host/summary.hbs
index 63416fb..7350b31 100644
--- a/ambari-web/app/templates/main/host/summary.hbs
+++ b/ambari-web/app/templates/main/host/summary.hbs
@@ -31,11 +31,11 @@
<div class="alert alert-warning clearfix">
<i class="icon-refresh"></i> {{view.needToRestartMessage}}
<br/>
- <button {{bindAttr class=":btn :btn-warning :restart-components :pull-left view.stopComponentsIsDisabled:disabled" }} {{action restartComponents view.isStopCommand target="controller"}}>
+ <button {{bindAttr class=":btn :restart-components :pull-left view.stopComponentsIsDisabled::btn-danger view.stopComponentsIsDisabled:disabled" }} {{action restartComponents view.isStopCommand target="controller"}}>
{{t hosts.host.details.needToRestart.stopButton}}
</button>
<span class="restart-components pull-left"> </span>
- <button {{bindAttr class=":btn :btn-warning :restart-components :pull-left view.startComponentsIsDisabled:disabled" }} {{action restartComponents target="controller"}}>
+ <button {{bindAttr class=":btn :restart-components :pull-left view.startComponentsIsDisabled::btn-success view.startComponentsIsDisabled:disabled" }} {{action restartComponents target="controller"}}>
{{t hosts.host.details.needToRestart.startButton}}
</button>
</div>
diff --git a/ambari-web/app/templates/main/service/info/configs.hbs b/ambari-web/app/templates/main/service/info/configs.hbs
index a47b358..15bc6a6 100644
--- a/ambari-web/app/templates/main/service/info/configs.hbs
+++ b/ambari-web/app/templates/main/service/info/configs.hbs
@@ -25,11 +25,11 @@
<div class="alert alert-warning clearfix">
<i class="icon-refresh"></i> {{{view.needToRestartMessage}}} <a href="#" {{action showComponentsShouldBeRestarted target="controller"}}>{{view.componentsCount}} {{t common.components}}</a> {{t on}} <a href="#" {{action showHostsShouldBeRestarted target="controller"}}>{{view.hostsCount}} {{t dashboard.services.hosts}}</a> {{t services.service.config.restartService.needToRestartEnd}}
- <button {{bindAttr class=":btn :btn-warning :restart-components :pull-right view.startComponentsIsDisabled:disabled" }} {{action restartComponents target="controller"}}>
+ <button {{bindAttr class=":btn :restart-components :pull-right view.startComponentsIsDisabled::btn-success view.startComponentsIsDisabled:disabled" }} {{action restartComponents target="controller"}}>
{{t hosts.host.details.needToRestart.startButton}}
</button>
<span class="restart-components pull-right"> </span>
- <button {{bindAttr class=":btn :btn-warning :restart-components :pull-right view.stopComponentsIsDisabled:disabled" }} {{action restartComponents view.isStopCommand target="controller"}}>
+ <button {{bindAttr class=":btn :restart-components :pull-right view.stopComponentsIsDisabled::btn-danger view.stopComponentsIsDisabled:disabled" }} {{action restartComponents view.isStopCommand target="controller"}}>
{{t hosts.host.details.needToRestart.stopButton}}
</button>
</div>
diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js
index 47a56fa..29c656a 100644
--- a/ambari-web/app/views/main/host/summary.js
+++ b/ambari-web/app/views/main/host/summary.js
@@ -40,18 +40,18 @@
stopComponentsIsDisabled: function () {
var staleComponents = this.get('sortedComponents').filterProperty('staleConfigs', true);
- if(!staleComponents.findProperty('workStatus','INSTALLED')){
+ if(!staleComponents.findProperty('workStatus','STARTED')){
return true;
- }else{
+ } else {
return false;
}
}.property('sortedComponents.@each.workStatus'),
startComponentsIsDisabled:function () {
var staleComponents = this.get('sortedComponents').filterProperty('staleConfigs', true);
- if(!staleComponents.findProperty('workStatus','STARTED')){
+ if(!staleComponents.findProperty('workStatus','INSTALLED')){
return true;
- }else{
+ } else {
return false;
}
}.property('sortedComponents.@each.workStatus'),