Author: yusaku
Date: Wed Jun 26 02:40:44 2013
New Revision: 1496715
URL: http://svn.apache.org/r1496715
Log:
AMBARI-2481. Changing browser while enable security results in wizard not
visible. (jaimin via yusaku)
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js
incubator/ambari/trunk/ambari-web/app/routes/add_security.js
incubator/ambari/trunk/ambari-web/app/routes/main.js
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js?rev=1496715&r1=1496714&r2=1496715&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
Wed Jun 26 02:40:44 2013
@@ -268,7 +268,7 @@ App.MainAdminSecurityAddStep3Controller
globalValue = uiConfig.findProperty('name',
config.foreignKey[index]).value;
config._name = config.name.replace(_fkValue, globalValue);
} else if (this.get('globalProperties').someProperty('name',
config.foreignKey[index])) {
- globalValue = this.get('globalProperties').findProperty('name',
config.foreignKey[index]).value;
+ globalValue = this.get('globalProperties').findProperty('name',
config.foreignKey[index]).value;
config._name = config.name.replace(_fkValue, globalValue);
}
}, this);
@@ -354,8 +354,8 @@ App.MainAdminSecurityAddStep3Controller
var principalProperties = this.getPrincipalNames();
principalProperties.forEach(function (_principalProperty) {
var name = _principalProperty.name.replace('principal', 'primary');
- var value = _principalProperty.value.split('/')[0];
- this.get('globalProperties').pushObject({name:name,value:value});
+ var value = _principalProperty.value.split('/')[0];
+ this.get('globalProperties').pushObject({name: name, value: value});
}, this);
},
@@ -510,9 +510,9 @@ App.MainAdminSecurityAddStep3Controller
this.get('serviceConfigTags').forEach(function (_serviceConfigTags) {
_serviceConfigTags.newTagName = 'version' + (new Date).getTime();
if (_serviceConfigTags.siteName === 'global') {
- var nagiosPrincipalName =
this.get('globalProperties').findProperty('name','nagios_principal_name');
- var zkPrincipalName =
this.get('globalProperties').findProperty('name','zookeeper_principal_name');
- var realmName =
this.get('globalProperties').findProperty('name','kerberos_domain');
+ var nagiosPrincipalName =
this.get('globalProperties').findProperty('name', 'nagios_principal_name');
+ var zkPrincipalName =
this.get('globalProperties').findProperty('name', 'zookeeper_principal_name');
+ var realmName = this.get('globalProperties').findProperty('name',
'kerberos_domain');
nagiosPrincipalName.value = nagiosPrincipalName.value + '@' +
realmName.value;
zkPrincipalName.value = zkPrincipalName.value + '@' + realmName.value;
this.get('globalProperties').forEach(function (_globalProperty) {
@@ -546,5 +546,11 @@ App.MainAdminSecurityAddStep3Controller
stages.pushObject(stage);
}, this);
App.db.setSecurityDeployStages(stages);
+ App.clusterStatus.setClusterStatus({
+ clusterName: this.get('clusterName'),
+ clusterState: 'ADD_SECURITY_STEP_3',
+ wizardControllerName: App.router.get('addSecurityController.name'),
+ localdb: App.db.data
+ });
}.observes('[email protected]', '[email protected]',
'[email protected]')
});
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js?rev=1496715&r1=1496714&r2=1496715&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js
Wed Jun 26 02:40:44 2013
@@ -371,6 +371,12 @@ App.MainAdminSecurityDisableController =
stages.pushObject(stage);
}, this);
App.db.setSecurityDeployStages(stages);
+ App.clusterStatus.setClusterStatus({
+ clusterName: this.get('clusterName'),
+ clusterState: 'DISABLE_SECURITY',
+ wizardControllerName: this.get('name'),
+ localdb: App.db.data
+ });
}.observes('[email protected]', '[email protected]',
'[email protected]')
});
Modified: incubator/ambari/trunk/ambari-web/app/routes/add_security.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/add_security.js?rev=1496715&r1=1496714&r2=1496715&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/add_security.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/add_security.js Wed Jun 26
02:40:44 2013
@@ -92,8 +92,7 @@ module.exports = Em.Route.extend({
this.fitHeight();
}
}
- )
- ;
+ );
App.router.transitionTo('step' + currentStep);
} else {
Modified: incubator/ambari/trunk/ambari-web/app/routes/main.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/main.js?rev=1496715&r1=1496714&r2=1496715&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/main.js Wed Jun 26 02:40:44
2013
@@ -653,9 +653,18 @@ module.exports = Em.Route.extend({
enter: function (router) {
router.set('mainAdminController.category', "security");
var controller = router.get('mainAdminSecurityController');
- App.clusterStatus.updateFromServer();
- var currentClusterStatus = App.clusterStatus.get('value');
- App.db.data = currentClusterStatus.localdb;
+ if (!App.testMode) {
+ App.clusterStatus.updateFromServer();
+ var currentClusterStatus = App.clusterStatus.get('value');
+ App.db.data = currentClusterStatus.localdb;
+ if (currentClusterStatus.localdb.AddSecurity) {
+
App.db.setSecurityDeployStages(currentClusterStatus.localdb.AddSecurity.securityDeployStages);
+
controller.setAddSecurityWizardStatus(currentClusterStatus.localdb.AddSecurity.status);
+
App.db.setServiceConfigProperties(currentClusterStatus.localdb.Installer.configProperties);
+ App.db.setWizardCurrentStep('AddSecurity',
currentClusterStatus.localdb.AddSecurity.currentStep);
+ }
+
App.db.setDisableSecurityStatus(currentClusterStatus.localdb.disableSecurityStatus);
+ }
if (!(controller.getAddSecurityWizardStatus() === 'RUNNING') &&
!(controller.getDisableSecurityStatus() === 'RUNNING')) {
Em.run.next(function () {
router.transitionTo('adminSecurity.index');