UI/fix kvv2 version (#11258)

* Update default form values for kv

* Group kv version option in 'Method Options' group

* Fix tests, explicitly set if select input does not have default

* Handle array of objects from adapterError.errors in MessageError component

* Add changelog
This commit is contained in:
Chelsea Shaw
2021-04-02 15:17:42 -05:00
committed by GitHub
parent 866da6deae
commit 8cdcd5c8d2
7 changed files with 26 additions and 17 deletions

View File

@@ -60,8 +60,17 @@ export default Model.extend({
formFieldGroups: computed('engineType', function() {
let type = this.engineType;
let defaultGroup = { default: ['path'] };
let optionsGroup = {
'Method Options': [
'description',
'config.listingVisibility',
'local',
'sealWrap',
'config.{defaultLeaseTtl,maxLeaseTtl,auditNonHmacRequestKeys,auditNonHmacResponseKeys,passthroughRequestHeaders}',
],
};
if (type === 'kv' || type === 'generic') {
defaultGroup.default.push('options.{version}');
optionsGroup['Method Options'].unshift('options.{version}');
}
if (type === 'database') {
// For the Database Secret Engine we want to highlight the defaultLeaseTtl and maxLeaseTtl, removing them from the options object
@@ -79,18 +88,7 @@ export default Model.extend({
},
];
}
return [
defaultGroup,
{
'Method Options': [
'description',
'config.listingVisibility',
'local',
'sealWrap',
'config.{defaultLeaseTtl,maxLeaseTtl,auditNonHmacRequestKeys,auditNonHmacResponseKeys,passthroughRequestHeaders}',
],
},
];
return [defaultGroup, optionsGroup];
}),
attrs: computed('formFields', function() {