You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/06/01 19:14:02 UTC
[2/2] ambari git commit: AMBARI-11586. Blank Screen in Review
configurations (alexantonenko)
AMBARI-11586. Blank Screen in Review configurations (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/748b2a18
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/748b2a18
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/748b2a18
Branch: refs/heads/trunk
Commit: 748b2a188fb87b8311677f34b232c960816ab72f
Parents: 8db087a
Author: Alex Antonenko <hi...@gmail.com>
Authored: Mon Jun 1 19:47:14 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Mon Jun 1 20:13:55 2015 +0300
----------------------------------------------------------------------
ambari-web/app/router.js | 2 +
ambari-web/app/routes/installer.js | 83 ++++++++++++++-----------
ambari-web/app/views/wizard/step10_view.js | 1 +
ambari-web/app/views/wizard/step7_view.js | 6 +-
ambari-web/app/views/wizard/step8_view.js | 1 +
ambari-web/app/views/wizard/step9_view.js | 1 +
6 files changed, 57 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/748b2a18/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 549c34b..9ea8f54 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -54,6 +54,8 @@ App.Router = Em.Router.extend({
enableLogging: true,
isFwdNavigation: true,
backBtnForHigherStep: false,
+ transitionInProgress: false,
+
/**
* Is true, if cluster.provisioning_state is equal to 'INSTALLED'
http://git-wip-us.apache.org/repos/asf/ambari/blob/748b2a18/ambari-web/app/routes/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js
index 849e942..6cc053e 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -273,20 +273,22 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
var controller = router.get('installerController');
var wizardStep6Controller = router.get('wizardStep6Controller');
var wizardStep7Controller = router.get('wizardStep7Controller');
-
- if (!wizardStep6Controller.get('submitDisabled')) {
- wizardStep6Controller.showValidationIssuesAcceptBox(function () {
- controller.saveSlaveComponentHosts(wizardStep6Controller);
- controller.get('content').set('serviceConfigProperties', null);
- controller.setDBProperty('serviceConfigProperties', null);
- controller.setDBProperty('advancedServiceConfig', null);
- controller.setDBProperty('serviceConfigGroups', null);
- controller.setDBProperty('recommendationsHostGroups', wizardStep6Controller.get('content.recommendationsHostGroups'));
- controller.setDBProperty('recommendationsConfigs', null);
- controller.loadAdvancedConfigs(wizardStep7Controller);
- wizardStep7Controller.set('isAdvancedConfigLoaded', false);
- router.transitionTo('step7');
- });
+ if(!router.transitionInProgress) {
+ router.set('transitionInProgress', true);
+ if (!wizardStep6Controller.get('submitDisabled')) {
+ wizardStep6Controller.showValidationIssuesAcceptBox(function () {
+ controller.saveSlaveComponentHosts(wizardStep6Controller);
+ controller.get('content').set('serviceConfigProperties', null);
+ controller.setDBProperty('serviceConfigProperties', null);
+ controller.setDBProperty('advancedServiceConfig', null);
+ controller.setDBProperty('serviceConfigGroups', null);
+ controller.setDBProperty('recommendationsHostGroups', wizardStep6Controller.get('content.recommendationsHostGroups'));
+ controller.setDBProperty('recommendationsConfigs', null);
+ controller.loadAdvancedConfigs(wizardStep7Controller);
+ wizardStep7Controller.set('isAdvancedConfigLoaded', false);
+ router.transitionTo('step7');
+ });
+ }
}
}
}),
@@ -322,12 +324,15 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
}
},
next: function (router) {
- var controller = router.get('installerController');
- var wizardStep7Controller = router.get('wizardStep7Controller');
- controller.saveServiceConfigProperties(wizardStep7Controller);
- controller.saveServiceConfigGroups(wizardStep7Controller);
- controller.setDBProperty('recommendationsConfigs', wizardStep7Controller.get('recommendationsConfigs'));
- router.transitionTo('step8');
+ if(!router.transitionInProgress) {
+ router.set('transitionInProgress', true);
+ var controller = router.get('installerController');
+ var wizardStep7Controller = router.get('wizardStep7Controller');
+ controller.saveServiceConfigProperties(wizardStep7Controller);
+ controller.saveServiceConfigGroups(wizardStep7Controller);
+ controller.setDBProperty('recommendationsConfigs', wizardStep7Controller.get('recommendationsConfigs'));
+ router.transitionTo('step8');
+ }
}
}),
@@ -345,16 +350,19 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
},
back: Em.Router.transitionTo('step7'),
next: function (router) {
- var installerController = router.get('installerController');
- var wizardStep8Controller = router.get('wizardStep8Controller');
- // invoke API call to install selected services
- installerController.installServices(false, function () {
- installerController.setInfoForStep9();
- // We need to do recovery based on whether we are in Add Host or Installer wizard
- installerController.saveClusterState('CLUSTER_INSTALLING_3');
- wizardStep8Controller.set('servicesInstalled', true);
- router.transitionTo('step9');
- });
+ if (!router.transitionInProgress) {
+ router.set('transitionInProgress', true);
+ var installerController = router.get('installerController');
+ var wizardStep8Controller = router.get('wizardStep8Controller');
+ // invoke API call to install selected services
+ installerController.installServices(false, function () {
+ installerController.setInfoForStep9();
+ // We need to do recovery based on whether we are in Add Host or Installer wizard
+ installerController.saveClusterState('CLUSTER_INSTALLING_3');
+ wizardStep8Controller.set('servicesInstalled', true);
+ router.transitionTo('step9');
+ });
+ }
}
}),
@@ -404,12 +412,15 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
}
},
next: function (router) {
- var installerController = router.get('installerController');
- var wizardStep9Controller = router.get('wizardStep9Controller');
- installerController.saveInstalledHosts(wizardStep9Controller);
-
- installerController.saveClusterState('CLUSTER_INSTALLED_4');
- router.transitionTo('step10');
+ if(!router.transitionInProgress) {
+ router.set('transitionInProgress', true);
+ var installerController = router.get('installerController');
+ var wizardStep9Controller = router.get('wizardStep9Controller');
+ installerController.saveInstalledHosts(wizardStep9Controller);
+
+ installerController.saveClusterState('CLUSTER_INSTALLED_4');
+ router.transitionTo('step10');
+ }
}
}),
http://git-wip-us.apache.org/repos/asf/ambari/blob/748b2a18/ambari-web/app/views/wizard/step10_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step10_view.js b/ambari-web/app/views/wizard/step10_view.js
index 7975125..858a4b2 100644
--- a/ambari-web/app/views/wizard/step10_view.js
+++ b/ambari-web/app/views/wizard/step10_view.js
@@ -25,6 +25,7 @@ App.WizardStep10View = Em.View.extend({
didInsertElement: function () {
this.get('controller').loadStep();
+ App.get('router').set('transitionInProgress', false);
},
serviceRestartText: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/748b2a18/ambari-web/app/views/wizard/step7_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step7_view.js b/ambari-web/app/views/wizard/step7_view.js
index e1348b7..9cea52f 100644
--- a/ambari-web/app/views/wizard/step7_view.js
+++ b/ambari-web/app/views/wizard/step7_view.js
@@ -20,5 +20,9 @@
var App = require('app');
App.WizardStep7View = Em.View.extend({
- templateName: require('templates/wizard/step7')
+ templateName: require('templates/wizard/step7'),
+
+ didInsertElement: function () {
+ App.get('router').set('transitionInProgress', false);
+ }
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/748b2a18/ambari-web/app/views/wizard/step8_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step8_view.js b/ambari-web/app/views/wizard/step8_view.js
index 3d17742..20d666f 100644
--- a/ambari-web/app/views/wizard/step8_view.js
+++ b/ambari-web/app/views/wizard/step8_view.js
@@ -25,6 +25,7 @@ App.WizardStep8View = Em.View.extend(App.wizardDeployProgressViewMixin, {
didInsertElement: function () {
this.get('controller').loadStep();
+ App.get('router').set('transitionInProgress', false);
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/748b2a18/ambari-web/app/views/wizard/step9_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step9_view.js b/ambari-web/app/views/wizard/step9_view.js
index 996a7ab..4344dae 100644
--- a/ambari-web/app/views/wizard/step9_view.js
+++ b/ambari-web/app/views/wizard/step9_view.js
@@ -237,6 +237,7 @@ App.WizardStep9View = App.TableView.extend({
didInsertElement: function () {
this.onStatus();
this.get('controller').navigateStep();
+ App.get('router').set('transitionInProgress', false);
},
/**