Browse Source

AMBARI-9316. Adding host on kerberized cluster fails. (jaimin via yusaku)

Yusaku Sako 10 years ago
parent
commit
c0167f89d7

+ 1 - 1
ambari-web/app/controllers/main/host/add_controller.js

@@ -152,7 +152,7 @@ App.AddHostController = App.WizardController.extend({
    */
   saveClients: function () {
     var serviceComponents = App.StackServiceComponent.find();
-    var services = this.get('content.services').filterProperty('isSelected');
+    var services = this.get('content.services').filterProperty('isInstallable').filterProperty('isSelected');
     var clients = this.getClientsToInstall(services, serviceComponents);
     this.setDBProperty('clientInfo', clients);
     this.set('content.clients', clients);

+ 2 - 2
ambari-web/test/controllers/main/host/add_controller_test.js

@@ -602,10 +602,10 @@ describe('App.AddHostController', function () {
       controller.getClientsToInstall.restore();
     });
     it("", function () {
-      controller.set('content.services', [Em.Object.create({'isSelected': true})]);
+      controller.set('content.services', [Em.Object.create({'isSelected': true, 'isInstallable': true})]);
       controller.saveClients();
       expect(controller.getClientsToInstall.calledWith(
-        [Em.Object.create({'isSelected': true})],
+        [Em.Object.create({'isSelected': true, 'isInstallable': true})],
         'StackServiceComponent'
       )).to.be.true;
       expect(controller.setDBProperty.calledWith('clientInfo', ['client'])).to.be.true;