create version from old versions uses that data in the edit page
This commit is contained in:
parent
51af5d2e1c
commit
46b5b99f5f
|
@ -3,6 +3,11 @@ import BackendCrumbMixin from 'vault/mixins/backend-crumb';
|
|||
|
||||
export default Controller.extend(BackendCrumbMixin, {
|
||||
backendController: controller('vault.cluster.secrets.backend'),
|
||||
queryParams: ['version'],
|
||||
version: '',
|
||||
reset() {
|
||||
this.set('version', '');
|
||||
},
|
||||
actions: {
|
||||
refresh: function() {
|
||||
// closure actions don't bubble to routes,
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
import EditBase from './secret-edit';
|
||||
|
||||
export default EditBase.extend();
|
||||
export default EditBase.extend({
|
||||
queryParams: {
|
||||
version: {
|
||||
refreshModel: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -55,11 +55,15 @@
|
|||
{{#if (and (eq mode 'show') canEdit)}}
|
||||
<div class="control">
|
||||
<LinkTo
|
||||
@params={{array (concat 'vault.cluster.secrets.backend.' (if (eq mode 'show') 'edit' 'show')) model.id }}
|
||||
@params={{array (concat 'vault.cluster.secrets.backend.' (if (eq mode 'show') 'edit' 'show')) model.id (if isV2 (query-params version=this.modelForData.version))}}
|
||||
@replace={{true}}
|
||||
class="link link-plain has-text-weight-semibold"
|
||||
>
|
||||
Edit Secret
|
||||
{{#if isV2}}
|
||||
Create new version
|
||||
{{else}}
|
||||
Edit Secret
|
||||
{{/if}}
|
||||
</LinkTo>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue