mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
UI - make engine list more consistent with the auth method list (#4598)
* remove expanding behavior from engines list and add a configuration route * use page header component, secret tab component for the template on the secret engine configuration route * move abstraction to secret-list-header and remove secret-tabs * add attrs to secret engine model and adjust mount controller code to support that * fix top level nav so that we can use the back button properly * fix tests
This commit is contained in:
@@ -3,6 +3,8 @@ import DS from 'ember-data';
|
||||
import { queryRecord } from 'ember-computed-query';
|
||||
import { fragment } from 'ember-data-model-fragments/attributes';
|
||||
|
||||
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
||||
|
||||
const { attr } = DS;
|
||||
const { computed } = Ember;
|
||||
|
||||
@@ -16,11 +18,26 @@ export default DS.Model.extend({
|
||||
name: attr('string'),
|
||||
type: attr('string'),
|
||||
description: attr('string'),
|
||||
config: attr('object'),
|
||||
options: fragment('mount-options'),
|
||||
config: fragment('mount-config', { defaultValue: {} }),
|
||||
options: fragment('mount-options', { defaultValue: {} }),
|
||||
local: attr('boolean'),
|
||||
sealWrap: attr('boolean'),
|
||||
|
||||
formFields: [
|
||||
'type',
|
||||
'path',
|
||||
'description',
|
||||
'accessor',
|
||||
'local',
|
||||
'sealWrap',
|
||||
'config.{defaultLeaseTtl,maxLeaseTtl}',
|
||||
'options.{version}',
|
||||
],
|
||||
|
||||
attrs: computed('formFields', function() {
|
||||
return expandAttributeMeta(this, this.get('formFields'));
|
||||
}),
|
||||
|
||||
shouldIncludeInList: computed('type', function() {
|
||||
return !LIST_EXCLUDED_BACKENDS.includes(this.get('type'));
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user