ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-15075. Edit Widget Wizard still open even though it was closed/saved in the previous step. (jaimin)
Date Thu, 18 Feb 2016 19:31:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 67c9e8131 -> 2b1f7496e


AMBARI-15075. Edit Widget Wizard still open even though it was closed/saved in the previous
step. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2b1f7496
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2b1f7496
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2b1f7496

Branch: refs/heads/branch-2.2
Commit: 2b1f7496e87741836691de9b22ba7511014c64e8
Parents: 67c9e81
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri Feb 19 01:00:08 2016 +0530
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri Feb 19 01:00:20 2016 +0530

----------------------------------------------------------------------
 .../service/widgets/create/wizard_controller.js     | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2b1f7496/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
index 69f63ed..d45b936 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
@@ -416,14 +416,21 @@ App.WidgetWizardController = App.WizardController.extend({
     var service = App.Service.find(this.get('content.widgetService'));
 
     this.finish();
-    this.get('popup').hide();
-    App.router.transitionTo('main.services.service.summary', service);
-    if (!App.get('testMode')) {
+    var self = this;
+    var successCallBack = function() {
+      self.get('popup').hide();
+      App.router.transitionTo('main.services.service.summary', service);
+      App.get('router.updateController').updateAll();
+    };
+
+    if (App.get('testMode')) {
+      successCallBack();
+    } else {
       App.clusterStatus.setClusterStatus({
         clusterName: App.router.getClusterName(),
         clusterState: 'DEFAULT',
         localdb: App.db.data
-      });
+      }, {successCallback: successCallBack});
     }
   },
 
@@ -435,6 +442,5 @@ App.WidgetWizardController = App.WizardController.extend({
     this.setCurrentStep('1', false, true);
     this.save('widgetType', '');
     this.resetDbNamespace();
-    App.get('router.updateController').updateAll();
   }
 });


Mime
View raw message