ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [2/3] ambari git commit: AMBARI-9886 Adding service: retry button does not refresh UI dialog after failure. (ababiichuk)
Date Tue, 03 Mar 2015 13:40:25 GMT
AMBARI-9886 Adding service: retry button does not refresh UI dialog after failure. (ababiichuk)


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

Branch: refs/heads/branch-2.0.0
Commit: 1307a18b2c3d2544ab483565c6b51e45dc0e7328
Parents: 1e5d278
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Tue Mar 3 12:59:57 2015 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Tue Mar 3 15:40:16 2015 +0200

----------------------------------------------------------------------
 .../controllers/main/service/add_controller.js  | 27 ++++++++------------
 ambari-web/app/routes/add_service_routes.js     |  8 +++++-
 2 files changed, 18 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1307a18b/ambari-web/app/controllers/main/service/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js
index 7cccb44..b340e68 100644
--- a/ambari-web/app/controllers/main/service/add_controller.js
+++ b/ambari-web/app/controllers/main/service/add_controller.js
@@ -524,33 +524,28 @@ App.AddServiceController = App.WizardController.extend(App.AddSecurityConfigs,
{
   },
 
   /**
-   * run this method after success/error callbacks
-   * for <code>installServicesRequest<code>
-   */
-  installServicesComplete: function () {
-    App.get('router.wizardStep8Controller').set('servicesInstalled', true);
-    this.setInfoForStep9();
-    this.saveClusterState('ADD_SERVICES_INSTALLING_3');
-    App.router.transitionTo('step7');
-  },
-
-  /**
-   * main method for installinf clients
+   * main method for installing additional clients and services
+   * @param {function} callback
    * @method installServices
    */
-  installServices: function () {
+  installServices: function (callback) {
     var self = this;
     this.set('content.cluster.oldRequestsId', []);
     this.installAdditionalClients().done(function () {
-      self.installSelectedServices();
+      self.installSelectedServices(callback);
     });
   },
 
-  installSelectedServices: function () {
+  /**
+   * method to install added services
+   * @param {function} callback
+   * @method installSelectedServices
+   */
+  installSelectedServices: function (callback) {
     var name = 'common.services.update';
     var selectedServices = this.get('content.services').filterProperty('isInstalled', false).filterProperty('isSelected',
true).mapProperty('serviceName');
     var data = this.generateDataForInstallServices(selectedServices);
-    this.installServicesRequest(name, data, this.installServicesComplete.bind(this));
+    this.installServicesRequest(name, data, callback.bind(this));
   },
 
   installServicesRequest: function (name, data, callback) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1307a18b/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index 44051ba..568b6cb 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -310,7 +310,13 @@ module.exports = App.WizardRoute.extend({
       }
     },
     next: function (router) {
-      router.get('addServiceController').installServices();
+      var addServiceController = router.get('addServiceController');
+      addServiceController.installServices(function () {
+        router.get('wizardStep8Controller').set('servicesInstalled', true);
+        addServiceController.setInfoForStep9();
+        addServiceController.saveClusterState('ADD_SERVICES_INSTALLING_3');
+        App.router.transitionTo('step7');
+      });
     }
   }),
 


Mime
View raw message