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/03/25 23:04:47 UTC
svn commit: r1460914 - in /incubator/ambari/trunk: CHANGES.txt
ambari-web/app/controllers/main/admin/security/add/step3.js
ambari-web/app/routes/add_security.js
ambari-web/app/templates/main/admin/security/add/step3.hbs
Author: jaimin
Date: Mon Mar 25 22:04:47 2013
New Revision: 1460914
URL: http://svn.apache.org/r1460914
Log:
AMBARI-1706. Security wizard: "Done" and "back" buttons on Apply step should be disabled while step is in progress. (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/routes/add_security.js
incubator/ambari/trunk/ambari-web/app/templates/main/admin/security/add/step3.hbs
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1460914&r1=1460913&r2=1460914&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon Mar 25 22:04:47 2013
@@ -519,6 +519,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-1706. Security wizard: "Done" and "back" buttons on Apply step
+ should be disabled while step is in progress. (jaimin)
+
AMBARI-1705. Remove redundant API calls to update service configuration
while disabling security. (jaimin)
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=1460914&r1=1460913&r2=1460914&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 Mon Mar 25 22:04:47 2013
@@ -46,6 +46,7 @@ App.MainAdminSecurityAddStep3Controller
clearStep: function () {
this.get('stages').clear();
this.set('isSubmitDisabled', true);
+ this.get('serviceConfigTags').clear();
},
loadStep: function () {
@@ -56,6 +57,12 @@ App.MainAdminSecurityAddStep3Controller
this.moveToNextStage();
},
+ enableSubmit: function () {
+ if (this.get('stages').someProperty('isError', true) || this.get('stages').everyProperty('isSuccess', true)) {
+ this.set('isSubmitDisabled', false);
+ }
+ }.observes('stages.@each.isCompleted'),
+
updateServices: function () {
this.services.clear();
var services = this.get("services");
@@ -120,9 +127,6 @@ App.MainAdminSecurityAddStep3Controller
var nextStage = this.get('stages').findProperty('isStarted', false);
if (nextStage) {
nextStage.set('isStarted', true);
- this.set('isSubmitDisabled', true);
- } else {
- this.set('isSubmitDisabled', false);
}
},
@@ -484,4 +488,5 @@ App.MainAdminSecurityAddStep3Controller
}
}, this);
}
+
});
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=1460914&r1=1460913&r2=1460914&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/add_security.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/add_security.js Mon Mar 25 22:04:47 2013
@@ -114,10 +114,18 @@ module.exports = Em.Route.extend({
controller.connectOutlet('mainAdminSecurityAddStep3', controller.get('content'));
})
},
- back: Em.Router.transitionTo('step2'),
+ back: function (router, context) {
+ var controller = router.get('mainAdminSecurityAddStep3Controller');
+ if (!controller.get('isSubmitDisabled')) {
+ router.transitionTo('step2');
+ }
+ },
done: function (router, context) {
router.get('mainAdminSecurityController').setAddSecurityWizardStatus(null);
- $(context.currentTarget).parents("#modal").find(".close").trigger('click');
+ var controller = router.get('mainAdminSecurityAddStep3Controller');
+ if (!controller.get('isSubmitDisabled')) {
+ $(context.currentTarget).parents("#modal").find(".close").trigger('click');
+ }
}
}),
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/admin/security/add/step3.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/admin/security/add/step3.hbs?rev=1460914&r1=1460913&r2=1460914&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/admin/security/add/step3.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/admin/security/add/step3.hbs Mon Mar 25 22:04:47 2013
@@ -24,7 +24,8 @@
{{view App.MainServiceReconfigureView}}
<div class="btn-area">
- <a class="btn" {{action back}}>← {{t common.back}}</a>
+ <a class="btn" {{bindAttr disabled="isSubmitDisabled"}}
+ {{action back}}>← {{t common.back}}</a>
<a class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}}
{{action done}}>{{t common.done}} </a>
</div>
\ No newline at end of file