Explorar el Código

AMBARI-8584. "Remove host" action on 'Confirm Hosts' step after page refresh does not work (alexantonenko)

Alex Antonenko hace 10 años
padre
commit
5f2c1a2178

+ 1 - 1
ambari-web/app/controllers/installer.js

@@ -113,7 +113,7 @@ App.InstallerController = App.WizardController.extend({
   removeHosts: function (hosts) {
     var dbHosts = this.getDBProperty('hosts');
     hosts.forEach(function (_hostInfo) {
-      var host = _hostInfo.hostName;
+      var host = _hostInfo.name;
       delete dbHosts[host];
     });
     this.setDBProperty('hosts', dbHosts);

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

@@ -85,7 +85,7 @@ App.AddHostController = App.WizardController.extend({
   removeHosts: function (hosts) {
     var dbHosts = this.getDBProperty('hosts');
     hosts.forEach(function (_hostInfo) {
-      var host = _hostInfo.hostName;
+      var host = _hostInfo.name;
       delete dbHosts[host];
     });
     this.setDBProperty('hosts', dbHosts);

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

@@ -51,7 +51,7 @@ describe('App.AddHostController', function () {
         title: 'Host is passed, db is empty',
         content: {
           hosts: [
-            {hostName: 'host1'}
+            {name: 'host1'}
           ],
           dbHosts: {}
         },
@@ -61,7 +61,7 @@ describe('App.AddHostController', function () {
         title: 'Passed host different from hosts in db',
         content: {
           hosts: [
-            {hostName: 'host1'}
+            {name: 'host1'}
           ],
           dbHosts: {
             'host2': {}
@@ -75,7 +75,7 @@ describe('App.AddHostController', function () {
         title: 'Passed host match host in db',
         content: {
           hosts: [
-            {hostName: 'host1'}
+            {name: 'host1'}
           ],
           dbHosts: {
             'host1': {}