Преглед изворни кода

AMBARI-9474. Add HiveServer2 popup allows to select deleted host as target one (alexantonenko)

Alex Antonenko пре 10 година
родитељ
комит
7316f1d147
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      ambari-web/app/controllers/main/host/details.js

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

@@ -1780,13 +1780,15 @@ App.MainHostDetailsController = Em.Controller.extend({
       }
     });
   },
-  deleteHostSuccessCallback: function (data) {
+  deleteHostSuccessCallback: function (data, rq, requestBody) {
     var self = this;
     App.router.get('updateController').updateHost(function () {
       self.loadConfigs('loadHiveConfigs');
       self.loadConfigs();
       App.router.transitionTo('hosts.index');
     });
+    if(!!(requestBody && requestBody.hostName))
+      App.hostsMapper.deleteRecord(App.Host.find().findProperty('hostName', requestBody.hostName));
     App.router.get('clusterController').getAllHostNames();
   },
   deleteHostErrorCallback: function (xhr, textStatus, errorThrown, opt) {