Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 5fcfb6ab9 -> 96c6ccad1


AMBARI-10440. Manual RU - Client-only services need restart to advertise 
version (alexantonenko)


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

Branch: refs/heads/branch-2.0.maint
Commit: 96c6ccad1e8e618da4b20dcdcf73e4b83b88b5ae
Parents: 5fcfb6a
Author: Alex Antonenko <[email protected]>
Authored: Sat Apr 11 00:09:11 2015 +0300
Committer: Alex Antonenko <[email protected]>
Committed: Sat Apr 11 00:10:27 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host/details.js    |  4 +---
 ambari-web/app/templates/main/host/summary.hbs     |  2 +-
 ambari-web/app/views/main/service/item.js          |  2 +-
 .../test/controllers/main/host/details_test.js     | 17 +++--------------
 ambari-web/test/views/main/service/item_test.js    |  2 +-
 5 files changed, 7 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/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 1df8c0c..d935405 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -1864,9 +1864,7 @@ App.MainHostDetailsController = Em.Controller.extend({
    */
   refreshConfigs: function (event) {
     var self = this;
-    var components = event.context.filter(function (component) {
-      return component.get('staleConfigs');
-    });
+    var components = event.context;
     if (components.get('length') > 0) {
       return App.showConfirmationPopup(function () {
         batchUtils.restartHostComponents(components, 
Em.I18n.t('rollingrestart.context.allClientsOnSelectedHost').format(self.get('content.hostName')),
 "HOST");

http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/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 322522a..f0bf50f 100644
--- a/ambari-web/app/templates/main/host/summary.hbs
+++ b/ambari-web/app/templates/main/host/summary.hbs
@@ -86,7 +86,7 @@
                     </button>
                     <ul class="dropdown-menu">
                       <li>
-                        <a href="javascript:void(null)" {{bindAttr 
class="view.areClientWithStaleConfigs::disabled"}} data-toggle="modal" {{action 
refreshConfigs view.clients target="controller"}}>
+                        <a href="javascript:void(null)" data-toggle="modal" 
{{action refreshConfigs view.clients target="controller"}}>
                           {{t hosts.host.details.refreshConfigs}}
                         </a>
                       </li>

http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js 
b/ambari-web/app/views/main/service/item.js
index d6d9173..f902b78 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -62,7 +62,7 @@ App.MainServiceItemView = Em.View.extend({
         action: 'refreshConfigs',
         label: Em.I18n.t('hosts.host.details.refreshConfigs'),
         cssClass: 'icon-refresh',
-        disabled: !this.get('controller.content.isRestartRequired')
+        disabled: false
       },
       REFRESH_YARN_QUEUE: {
         action: 'refreshYarnQueues',

http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/ambari-web/test/controllers/main/host/details_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/host/details_test.js 
b/ambari-web/test/controllers/main/host/details_test.js
index b9612e4..2bd05f2 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -1762,23 +1762,12 @@ describe('App.MainHostDetailsController', function () {
       controller.refreshConfigs(event);
       expect(App.showConfirmationPopup.called).to.be.false;
     });
-    it('No components with stale configs', function () {
-      var event = {context: [Em.Object.create({
-        staleConfigs: false
-      })]};
-      controller.refreshConfigs(event);
-      expect(App.showConfirmationPopup.called).to.be.false;
-    });
-    it('Components with stale configs', function () {
-      var event = {context: [Em.Object.create({
-        staleConfigs: true
-      })]};
+    it('Some components present', function () {
+      var event = {context: [Em.Object.create()]};
       var popup = controller.refreshConfigs(event);
       expect(App.showConfirmationPopup.calledOnce).to.be.true;
       popup.onPrimary();
-      expect(batchUtils.restartHostComponents.calledWith([Em.Object.create({
-        staleConfigs: true
-      })])).to.be.true;
+      
expect(batchUtils.restartHostComponents.calledWith([Em.Object.create()])).to.be.true;
     });
   });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/ambari-web/test/views/main/service/item_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/service/item_test.js 
b/ambari-web/test/views/main/service/item_test.js
index 81a9bf9..baa5a02 100644
--- a/ambari-web/test/views/main/service/item_test.js
+++ b/ambari-web/test/views/main/service/item_test.js
@@ -248,7 +248,7 @@ describe('App.MainServiceItemView', function () {
             {'isAddDisabled-FLUME_HANDLER': ''}
           ],
           result: [
-            {"action": "refreshConfigs", "label": "Refresh configs", 
"cssClass": "icon-refresh", "disabled": true},
+            {"action": "refreshConfigs", "label": "Refresh configs", 
"cssClass": "icon-refresh", "disabled": false},
             {"action": "restartAllHostComponents", "context": "FLUME", 
"label": "Restart All", "cssClass": "icon-repeat", "disabled": false},
             {"action": "rollingRestart", "label": "Restart Flumes", 
"cssClass": "icon-time", "disabled": false, "context": "FLUME_HANDLER"},
             {"action": "runSmokeTest", "label": "Run Service Check", 
"cssClass": "icon-thumbs-up-alt"},

Reply via email to