You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/04/04 02:17:28 UTC

svn commit: r1464240 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/controllers/main/admin/security/add/step3.js ambari-web/app/data/secure_properties.js ambari-web/app/routes/add_security.js

Author: jaimin
Date: Thu Apr  4 00:17:27 2013
New Revision: 1464240

URL: http://svn.apache.org/r1464240
Log:
AMBARI-1782. Security wizard navigation: Restrict user on step3 until the decision of the step is reached. (jaimin)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
    incubator/ambari/trunk/ambari-web/app/data/secure_properties.js
    incubator/ambari/trunk/ambari-web/app/routes/add_security.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1464240&r1=1464239&r2=1464240&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Apr  4 00:17:27 2013
@@ -178,6 +178,9 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-1782. Security wizard navigation: Restrict user on step3 until
+ the decision of the step is reached. (jaimin)
+
  AMBARI-1652. Background operation display enhancements. (yusaku)
 
  AMBARI-1686. Implement Test IvoryService to functional test mirroring API.

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=1464240&r1=1464239&r2=1464240&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 Thu Apr  4 00:17:27 2013
@@ -60,6 +60,7 @@ App.MainAdminSecurityAddStep3Controller 
   enableSubmit: function () {
     if (this.get('stages').someProperty('isError', true) || this.get('stages').everyProperty('isSuccess', true)) {
       this.set('isSubmitDisabled', false);
+      App.router.get('addSecurityController').setStepsEnable();
     }
   }.observes('stages.@each.isCompleted'),
 

Modified: incubator/ambari/trunk/ambari-web/app/data/secure_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/secure_properties.js?rev=1464240&r1=1464239&r2=1464240&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/secure_properties.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/secure_properties.js Thu Apr  4 00:17:27 2013
@@ -75,7 +75,7 @@ module.exports =
       "value": "",
       "defaultValue": "EXAMPLE.COM",
       "description": "Realm name to be used for all principal names",
-      "displayType": "principal",
+      "displayType": "advanced",
       "isVisible": true,
       "isOverrideable": false,
       "serviceName": "GENERAL",
@@ -456,7 +456,7 @@ module.exports =
     //ZooKeeper
     {
       "id": "puppet var",
-      "name": "zooKeeper_primary_name",
+      "name": "zookeeper_primary_name",
       "displayName": "Primary name",
       "value": "",
       "defaultValue": "zk",
@@ -469,7 +469,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "zooKeeper_keytab",
+      "name": "zookeeper_keytab_path",
       "displayName": "Path to keytab file",
       "value": "",
       "defaultValue": "/etc/security/keytabs/zk.service.keytab",

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=1464240&r1=1464239&r2=1464240&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/add_security.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/add_security.js Thu Apr  4 00:17:27 2013
@@ -15,10 +15,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+var App = require('app');
 
 module.exports = Em.Route.extend({
   route: '/addSecurity',
-  App: require('app'),
   enter: function (router) {
     console.log('in /security/add:enter');
 
@@ -45,12 +45,14 @@ module.exports = Em.Route.extend({
             router.transitionTo('adminSecurity.index');
           },
           onClose: function () {
-            this.hide();
-            App.router.get('updateController').set('isWorking', true);
-            mainAdminSecurityController.setAddSecurityWizardStatus(null);
-            router.get('addSecurityController').setCurrentStep(1);
-            router.get('addSecurityController.content').saveCurrentStage(2);
-            router.transitionTo('adminSecurity.index');
+            if (router.get('addSecurityController.currentStep') != 3 || (router.get('addSecurityController.currentStep') == 3 && router.get('mainAdminSecurityAddStep3Controller.isSubmitDisabled') === false)) {
+              this.hide();
+              App.router.get('updateController').set('isWorking', true);
+              mainAdminSecurityController.setAddSecurityWizardStatus(null);
+              router.get('addSecurityController').setCurrentStep(1);
+              router.get('addSecurityController.content').saveCurrentStage(2);
+              router.transitionTo('adminSecurity.index');
+            }
           },
           didInsertElement: function () {
             this.fitHeight();
@@ -110,10 +112,14 @@ module.exports = Em.Route.extend({
       var controller = router.get('addSecurityController');
       controller.dataLoading().done(function () {
         controller.setCurrentStep('3');
+        controller.setLowerStepsDisable(3);
         controller.loadAllPriorSteps();
         controller.connectOutlet('mainAdminSecurityAddStep3', controller.get('content'));
       })
     },
+    unroutePath: function () {
+      return false;
+    },
     back: function (router, context) {
       var controller = router.get('mainAdminSecurityAddStep3Controller');
       if (!controller.get('isSubmitDisabled')) {