Icu 11022 update dynamic credentials in sb form (#1901)

This commit is contained in:
Dharini Jeeva authored and GitHub committed 2023-09-18 14:23:30 -07:00
1 parent 4910070c95
commit 78d1e09a0d
8 files changed
+112 -33

No files matched your search

@@ -5,7 +5,7 @@
<Rose::Form
@onSubmit={{@submit}}
@cancel={{@cancel}}
@cancel={{this.cancel}}
@disabled={{@model.isSaving}}
@showEditToggle={{if @model.isNew false true}}
as |form|
@@ -113,4 +113,17 @@ export default class FormStorageBucketComponent extends Component {
this.args.model.disable_credential_rotation =
!this.args.model.disable_credential_rotation;
}
/**
* Call passed cancel function.
* Unset selected credentials.
*/
@action
cancel() {
this.args.cancel();
// Reset the tracked variable after rollback
this.selectedCredentialType = this.args.model.credentialType;
this.showDynamicCredentials =
this.args.model.credentialType === TYPE_CREDENTIAL_DYNAMIC;
}
}
@@ -14,12 +14,12 @@ export default class ScopesScopeStorageBucketsStorageBucketRoute extends Route {
// =methods
/**
* Load a user in current scope.
* Load a storage bucket in current scope.
* @param {object} params
* @param {string} params.storage_bucket_id
* @return {StorageBucketModel}
*/
async model({ storage_bucket_id }) {
model({ storage_bucket_id }) {
return this.store.findRecord('storage-bucket', storage_bucket_id);
}
}