|
@@ -85,9 +85,15 @@ App.ManageCredentialsFormView = Em.View.extend({
|
|
|
* @type {string}
|
|
|
*/
|
|
|
storageType: function() {
|
|
|
- return this.get('storeCredentials') ? credentialsUtils.STORE_TYPES.PERSISTENT : credentialsUtils.STORE_TYPES.TEMPORARY;
|
|
|
+ return credentialsUtils.STORE_TYPES.PERSISTENT;
|
|
|
}.property('storeCredentials'),
|
|
|
|
|
|
+ formHeader: function() {
|
|
|
+ return this.get('isRemovable') ?
|
|
|
+ Em.I18n.t('admin.kerberos.credentials.form.header.stored') :
|
|
|
+ Em.I18n.t('admin.kerberos.credentials.form.header.not.stored');
|
|
|
+ }.property('isRemovable'),
|
|
|
+
|
|
|
/**
|
|
|
* Message to display in tooltip regarding persistent storage state.
|
|
|
*
|
|
@@ -157,11 +163,12 @@ App.ManageCredentialsFormView = Em.View.extend({
|
|
|
/**
|
|
|
* Remove KDC credentials action.
|
|
|
*
|
|
|
- * @returns {App.ModalPopup}
|
|
|
+ * @returns {object} for better testing purpose returns object { deferred: $.Deferred, popup: App.ModalPopup }
|
|
|
*/
|
|
|
removeKDCCredentials: function() {
|
|
|
var t = Em.I18n.t;
|
|
|
var self = this;
|
|
|
+ var dfd = $.Deferred();
|
|
|
this.set('actionStatus', false);
|
|
|
var popup = App.showConfirmationPopup(
|
|
|
function() {
|
|
@@ -172,6 +179,7 @@ App.ManageCredentialsFormView = Em.View.extend({
|
|
|
self.prepareContent();
|
|
|
self.set('actionStatus', Em.I18n.t('common.success'));
|
|
|
self.get('parentView').set('isCredentialsRemoved', true);
|
|
|
+ dfd.resolve();
|
|
|
});
|
|
|
}, t('admin.kerberos.credentials.remove.confirmation.body'),
|
|
|
function () {},
|
|
@@ -179,7 +187,10 @@ App.ManageCredentialsFormView = Em.View.extend({
|
|
|
t('yes'),
|
|
|
false);
|
|
|
popup.set('secondary', t('no'));
|
|
|
- return popup;
|
|
|
+ return {
|
|
|
+ deferred: dfd,
|
|
|
+ popup: popup
|
|
|
+ };
|
|
|
},
|
|
|
|
|
|
/**
|