UI: pki configuration edit form (#20245)

* setup routing, move queries in ConfigurationIndex to parent resource route

* finish building out form, add model attrs build ttls

* add types

* update model attribute values, fix default ttl states

* remove defaults and use openApi, group with booleans

* add model to application route"

* add save functionality

* add error banner

* add transition after save

* use defaults from open api

* fix empty state language

* pass engine data

* change model attrs to ttl objects

* update types

* add invalid form alert to error block

* move data manipulation to serialize

* fix serializer, add comments

* add test for serializer

* edit configuration details view

* update details test

* change to updateRecord so POST request is made

* config/urls use POST instead of PUT

* add edit tests, update details

* add model hooks back to routes

* rearrange to remove dif

* remove createRecord for urls

* update comment

* wip sample ttl transform

* Revert "wip sample ttl transform"

This reverts commit 59fc179b5cd2994c4258e553e56667e29b3d6b72.

* revert changes, move model updates back to component

* simplify model fetches

* address comments;

* update pki/urls test

* update adapter test
This commit is contained in:
claire bontempo
2023-04-25 17:50:19 -04:00
committed by GitHub
parent 445e2e91c6
commit ac1cd58504
23 changed files with 784 additions and 181 deletions

View File

@@ -18,6 +18,7 @@
* @param onChange {Function} - This function will be passed a TTL object, which includes enabled{bool}, seconds{number}, timeString{string}, goSafeTimeString{string}.
* @param initialEnabled=false {Boolean} - Set this value if you want the toggle on when component is mounted
* @param label="Time to live (TTL)" {String} - Label is the main label that lives next to the toggle. Yielded values will replace the label
* @param labelDisabled=Label to display when TTL is toggled off
* @param helperTextEnabled="" {String} - This helper text is shown under the label when the toggle is switched on
* @param helperTextDisabled="" {String} - This helper text is shown under the label when the toggle is switched off
* @param initialValue=null {string} - InitialValue is the duration value which will be shown when the component is loaded. If it can't be parsed, will default to 0.
@@ -52,6 +53,9 @@ export default class TtlPickerComponent extends Component {
elementId = 'ttl-' + guidFor(this);
get label() {
if (this.args.label && this.args.labelDisabled) {
return this.enableTTL ? this.args.label : this.args.labelDisabled;
}
return this.args.label || 'Time to live (TTL)';
}
get helperText() {