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, {
|
export default Controller.extend(BackendCrumbMixin, {
|
||||||
backendController: controller('vault.cluster.secrets.backend'),
|
backendController: controller('vault.cluster.secrets.backend'),
|
||||||
|
queryParams: ['version'],
|
||||||
|
version: '',
|
||||||
|
reset() {
|
||||||
|
this.set('version', '');
|
||||||
|
},
|
||||||
actions: {
|
actions: {
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
// closure actions don't bubble to routes,
|
// closure actions don't bubble to routes,
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
import EditBase from './secret-edit';
|
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)}}
|
{{#if (and (eq mode 'show') canEdit)}}
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<LinkTo
|
<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}}
|
@replace={{true}}
|
||||||
class="link link-plain has-text-weight-semibold"
|
class="link link-plain has-text-weight-semibold"
|
||||||
>
|
>
|
||||||
|
{{#if isV2}}
|
||||||
|
Create new version
|
||||||
|
{{else}}
|
||||||
Edit Secret
|
Edit Secret
|
||||||
|
{{/if}}
|
||||||
</LinkTo>
|
</LinkTo>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
Loading…
Reference in a new issue