Updated Branches: refs/heads/trunk 8950f9112 -> 8b5583fee
AMBARI-2898. Progress popup is working incorrectly in Security wizard, Stack Upgrade wizard, and HA wizard. (Antonenko Alexander via yusaku) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/8b5583fe Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/8b5583fe Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/8b5583fe Branch: refs/heads/trunk Commit: 8b5583fee770c47546d9d2ae843e394f3cba5592 Parents: 8950f91 Author: Yusaku Sako <[email protected]> Authored: Wed Aug 14 11:53:58 2013 -0700 Committer: Yusaku Sako <[email protected]> Committed: Wed Aug 14 11:53:58 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/utils/host_progress_popup.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8b5583fe/ambari-web/app/utils/host_progress_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/host_progress_popup.js b/ambari-web/app/utils/host_progress_popup.js index 93e4e6e..8f102d8 100644 --- a/ambari-web/app/utils/host_progress_popup.js +++ b/ambari-web/app/utils/host_progress_popup.js @@ -53,11 +53,12 @@ App.HostPopup = Em.Object.create({ * @param showServices */ initPopup: function (serviceName, controller, showServices) { - this.set("serviceName", serviceName); - this.set("serviceController", controller); if (!showServices) { + this.clearHostPopup(); this.set("popupHeaderName", serviceName); } + this.set("serviceName", serviceName); + this.set("serviceController", controller); this.set("showServices", showServices); this.set("inputData", this.get("serviceController.services")); if(this.get('showServices')){ @@ -68,6 +69,19 @@ App.HostPopup = Em.Object.create({ return this.createPopup(); }, + clearHostPopup: function () { + this.set('servicesInfo', null); + this.set('hosts', null); + this.set('inputData', null); + this.set('serviceName', ""); + this.set('currentServiceId', null); + this.set('previousServiceId', null); + this.set('popupHeaderName', ""); + this.set('serviceController', null); + this.set('showServices', false); + this.set('currentHostName', null); + }, + /** * Depending on tasks status * @param tasks @@ -298,7 +312,7 @@ App.HostPopup = Em.Object.create({ var existedHosts = self.get('hosts'); - if (hosts) { + if (hosts.length > 0) { if (existedHosts && this.get('currentServiceId') === this.get('previousServiceId')) { existedHosts.forEach(function (host) { var newHostInfo = hosts.findProperty('name', host.get('name'));
