You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/04/10 17:41:57 UTC

[2/2] ambari git commit: AMBARI-10440. Manual RU - Client-only services need restart to advertise version (alexantonenko)

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/136b3b65
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/136b3b65
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/136b3b65

Branch: refs/heads/trunk
Commit: 136b3b65c0837dd2b163bf722091431b3f6cca41
Parents: 3eba89a
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Apr 10 18:01:53 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Apr 10 18:41:51 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host/details.js    |  4 +---
 ambari-web/app/models/host_component.js            |  2 +-
 ambari-web/app/templates/main/host/summary.hbs     |  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/136b3b65/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 23b86bc..99fea74 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -1906,9 +1906,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/136b3b65/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 bd4c69a..93804a3 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -245,7 +245,7 @@ App.HostComponentActionMap = {
         action: 'refreshConfigs',
         label: Em.I18n.t('hosts.host.details.refreshConfigs'),
         cssClass: 'icon-refresh',
-        disabled: !ctx.get('controller.content.isRestartRequired')
+        disabled: false
       },
       REFRESHQUEUES: {
         action: 'refreshYarnQueues',

http://git-wip-us.apache.org/repos/asf/ambari/blob/136b3b65/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 3d72c2f..31df85d 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/136b3b65/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 19a160b..84545d0 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -1796,23 +1796,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/136b3b65/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 62e4814..4805004 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", "disabled": false},