incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1496714 - in /incubator/ambari/branches/branch-1.2.5/ambari-web/app: controllers/main/admin/security/add/step3.js controllers/main/admin/security/disable.js routes/add_security.js routes/main.js
Date Wed, 26 Jun 2013 02:39:55 GMT
Author: yusaku
Date: Wed Jun 26 02:39:55 2013
New Revision: 1496714

URL: http://svn.apache.org/r1496714
Log:
AMBARI-2481. Changing browser while enable security results in wizard not visible. (jaimin
via yusaku)

Modified:
    incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/add/step3.js
    incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/disable.js
    incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/add_security.js
    incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/main.js

Modified: incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/add/step3.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/add/step3.js?rev=1496714&r1=1496713&r2=1496714&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/add/step3.js
(original)
+++ incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/add/step3.js
Wed Jun 26 02:39:55 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('stages.@each.requestId', 'stages.@each.isStarted', 'stages.@each.isCompleted')
 });

Modified: incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/disable.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/disable.js?rev=1496714&r1=1496713&r2=1496714&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/disable.js
(original)
+++ incubator/ambari/branches/branch-1.2.5/ambari-web/app/controllers/main/admin/security/disable.js
Wed Jun 26 02:39:55 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('stages.@each.requestId', 'stages.@each.isStarted', 'stages.@each.isCompleted')
 
 });

Modified: incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/add_security.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/add_security.js?rev=1496714&r1=1496713&r2=1496714&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/add_security.js (original)
+++ incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/add_security.js Wed Jun 26
02:39:55 2013
@@ -92,8 +92,7 @@ module.exports = Em.Route.extend({
               this.fitHeight();
             }
           }
-        )
-        ;
+        );
 
         App.router.transitionTo('step' + currentStep);
       } else {

Modified: incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/main.js?rev=1496714&r1=1496713&r2=1496714&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/branches/branch-1.2.5/ambari-web/app/routes/main.js Wed Jun 26 02:39:55
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');



Mime
View raw message