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 2013/11/20 16:12:23 UTC

git commit: AMBARI-3816 UI tweaks with stop/start actions in stale_config restart indicator. (ababiichuk)

Updated Branches:
  refs/heads/trunk e08e809ba -> 1e02ae786


AMBARI-3816 UI tweaks with stop/start actions in stale_config restart indicator. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/1e02ae78
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/1e02ae78
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/1e02ae78

Branch: refs/heads/trunk
Commit: 1e02ae78614ae069611d6d0e0c1ba3197c182406
Parents: e08e809
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Wed Nov 20 17:00:20 2013 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed Nov 20 17:00:37 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host/details.js        | 6 +++---
 ambari-web/app/messages.js                             | 4 ++--
 ambari-web/app/styles/application.less                 | 3 +++
 ambari-web/app/templates/main/host/summary.hbs         | 4 ++--
 ambari-web/app/templates/main/service/info/configs.hbs | 4 ++--
 ambari-web/app/views/main/host/summary.js              | 8 ++++----
 6 files changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1e02ae78/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
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 @@ App.MainHostDetailsController = Em.Controller.extend({
     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;
       }
     };

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1e02ae78/ambari-web/app/messages.js
----------------------------------------------------------------------
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 @@ Em.I18n.translations = {
   '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',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1e02ae78/ambari-web/app/styles/application.less
----------------------------------------------------------------------
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 @@ background: url(	data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByU
       width: 160px;
       height: 30px;
     }
+    .icon-refresh {
+      color: #FDB82F;
+    }
   }
 
   .host-components .btn-group {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1e02ae78/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 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">&nbsp</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>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1e02ae78/ambari-web/app/templates/main/service/info/configs.hbs
----------------------------------------------------------------------
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">&nbsp</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>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1e02ae78/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 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 @@ App.MainHostSummaryView = Em.View.extend({
 
   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'),