mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-28 04:10:44 -04:00
* updates oidc scope list view to use api service * updates oidc scope details route to use api service * updates oidc scopes edit and create views to use api service and form class * updates oidc scopes tests Co-authored-by: Jordan Reimer <zofskeez@gmail.com>
29 lines
913 B
TypeScript
29 lines
913 B
TypeScript
/**
|
|
* Copyright IBM Corp. 2016, 2025
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Form from 'vault/forms/form';
|
|
import FormField from 'vault/utils/forms/field';
|
|
import FormFieldGroup from 'vault/utils/forms/field-group';
|
|
|
|
import type { Validations } from 'vault/app-types';
|
|
import type { OidcWriteScopeRequest } from '@hashicorp/vault-client-typescript';
|
|
|
|
type OidcScopeFormData = OidcWriteScopeRequest & {
|
|
name: string;
|
|
};
|
|
|
|
export default class OidcScopeForm extends Form<OidcScopeFormData> {
|
|
formFieldGroups = [
|
|
new FormFieldGroup('default', [
|
|
new FormField('name', 'string', { editDisabled: true }),
|
|
new FormField('description', 'string', { editType: 'textarea' }),
|
|
new FormField('template', 'string', { label: 'JSON Template', editType: 'json', mode: 'ruby' }),
|
|
]),
|
|
];
|
|
|
|
validations: Validations = {
|
|
name: [{ type: 'presence', message: 'Name is required.' }],
|
|
};
|
|
}
|