incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject svn commit: r1499046 - in /incubator/ambari/trunk/ambari-web/app: controllers/main/admin/security/add/step3.js templates/common/configs/service_config.hbs
Date Tue, 02 Jul 2013 18:15:48 GMT
Author: jaimin
Date: Tue Jul  2 18:15:47 2013
New Revision: 1499046

URL: http://svn.apache.org/r1499046
Log:
AMBARI-2536. Security wizard: Back button remains enabled after a stage fails. (jaimin)

Modified:
    incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
    incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs

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=1499046&r1=1499045&r2=1499046&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 Tue
Jul  2 18:15:47 2013
@@ -30,7 +30,9 @@ App.MainAdminSecurityAddStep3Controller 
   globalProperties: [],
 
   isSubmitDisabled: true,
-  isBackBtnDisabled: true,
+  isBackBtnDisabled: function () {
+    return !this.get('stages').someProperty('isError', true);
+  }.property('stages.@each.isCompleted'),
 
   isOozieSelected: function () {
     return this.get('content.services').someProperty('serviceName', 'OOZIE');
@@ -109,14 +111,15 @@ App.MainAdminSecurityAddStep3Controller 
   },
 
   enableSubmit: function () {
+    var addSecurityController = App.router.get('addSecurityController');
     if (this.get('stages').someProperty('isError', true) || this.get('stages').everyProperty('isSuccess',
true)) {
       this.set('isSubmitDisabled', false);
       if (this.get('stages').someProperty('isError', true)) {
-        this.set('isBackBtnDisabled', false);
-        App.router.get('addSecurityController').setStepsEnable();
+        addSecurityController.setStepsEnable();
       }
     } else {
       this.set('isSubmitDisabled', true);
+      addSecurityController.setLowerStepsDisable(3);
     }
   }.observes('stages.@each.isCompleted'),
 
@@ -230,7 +233,7 @@ App.MainAdminSecurityAddStep3Controller 
     }, this);
     var dependentConfig = this.get('secureMapping').filterProperty('foreignKey');
     dependentConfig.forEach(function (_config) {
-      if (App.Service.find().mapProperty('serviceName').contains( _config.serviceName)) {
+      if (App.Service.find().mapProperty('serviceName').contains(_config.serviceName)) {
         this.setConfigValue(uiConfig, _config);
         uiConfig.pushObject({
           "id": "site property",
@@ -356,9 +359,9 @@ App.MainAdminSecurityAddStep3Controller 
         value: hiveHostName
       });
     }
-    var webHcatComponent =  App.Service.find('WEBHCAT').get('hostComponents').findProperty('componentName',
'WEBHCAT_SERVER');
-    if(this.isWebHcatSelected() && webHcatComponent) {
-     var webHcatHostName =  webHcatComponent.get('host.hostName');
+    var webHcatComponent = App.Service.find('WEBHCAT').get('hostComponents').findProperty('componentName',
'WEBHCAT_SERVER');
+    if (this.isWebHcatSelected() && webHcatComponent) {
+      var webHcatHostName = webHcatComponent.get('host.hostName');
       this.get('globalProperties').pushObject({
         id: 'puppet var',
         name: 'webhcat_server',

Modified: incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs?rev=1499046&r1=1499045&r2=1499046&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs Tue
Jul  2 18:15:47 2013
@@ -76,7 +76,7 @@
                               {{displayName}}
                               {{#if App.supports.secureCluster}}
                                 {{#if isSecureConfig}}
-                                  <a href="#"><i class="icon-lock" rel="tooltip"
data-toggle="tooltip" title="security knob"></i></a>
+                                  <a href="javascript:void(null);"><i class="icon-lock"
rel="tooltip" data-toggle="tooltip" title="security knob"></i></a>
                                 {{/if}}
                               {{/if}}
                             </label>



Mime
View raw message