Chelsea Shaw d2116025be
UI: Move useOpenApi and getHelpUrl methods to util (#27764)
* Add map between model types and helpUrls, update tests

* replace modelProto.getHelpUrl with new helper util

* Remove all useOpenApi and getHelpUrl instances from models

* Add missing auth config model type
2024-07-15 10:57:06 -05:00

39 lines
941 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { attr } from '@ember-data/model';
import { withFormFields } from 'vault/decorators/model-form-fields';
import PkiCertificateBaseModel from './base';
const generateFromRole = [
{
default: ['csr', 'commonName', 'customTtl', 'format', 'removeRootsFromChain'],
},
{
'Subject Alternative Name (SAN) Options': [
'excludeCnFromSans',
'altNames',
'ipSans',
'uriSans',
'otherSans',
],
},
];
@withFormFields(null, generateFromRole)
export default class PkiCertificateSignModel extends PkiCertificateBaseModel {
@attr('string') role; // role name to create certificate against for request URL
@attr('string', {
label: 'CSR',
editType: 'textarea',
})
csr;
@attr('boolean', {
subText: 'When checked, the CA chain will not include self-signed CA certificates.',
})
removeRootsFromChain;
}