vault/ui/lib/pki/addon/components/page/pki-configure-create.ts
claire bontempo e97371680c
Re-add custom flash service so engines can extend cluster's template (#19963)
* Revert "UI: Remove custom service (#19925)"

This reverts commit b04751d22437b06947a84148c499c4728602b5e1.

* replace stickyInfo with options info

* revert replacing custom stickyInfo

* change flash message name to be consistent throughout application

* make service imports consistent for k8 engine

* replace stickyInfo with options info

* Revert "change flash message name to be consistent throughout application"

This reverts commit 17de49894de3976ed708fcf15f19f6f1eb1012a5.

* add comment

---------

Co-authored-by: Chelsea Shaw <cshaw@hashicorp.com>
2023-04-03 13:13:59 -06:00

62 lines
1.9 KiB
TypeScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
import { tracked } from '@glimmer/tracking';
// TYPES
import Store from '@ember-data/store';
import Router from '@ember/routing/router';
import FlashMessageService from 'vault/services/flash-messages';
import PkiActionModel from 'vault/models/pki/action';
import { Breadcrumb } from 'vault/vault/app-types';
interface Args {
config: PkiActionModel;
onCancel: CallableFunction;
breadcrumbs: Breadcrumb;
}
/**
* @module PkiConfigureCreate
* Page::PkiConfigureCreate component is used to configure a PKI engine mount.
* The component shows three options for configuration and which form
* is shown. The sub-forms rendered handle rendering the form itself
* and form submission and cancel actions.
*/
export default class PkiConfigureCreate extends Component<Args> {
@service declare readonly store: Store;
@service declare readonly router: Router;
@service declare readonly flashMessages: FlashMessageService;
@tracked title = 'Configure PKI';
get configTypes() {
return [
{
key: 'import',
icon: 'download',
label: 'Import a CA',
description:
'Import CA information via a PEM file containing the CA certificate and any private keys, concatenated together, in any order.',
},
{
key: 'generate-root',
icon: 'file-plus',
label: 'Generate root',
description:
'Generates a new self-signed CA certificate and private key. This generated root will sign its own CRL.',
},
{
key: 'generate-csr',
icon: 'files',
label: 'Generate intermediate CSR',
description:
'Generate a new CSR for signing, optionally generating a new private key. No new issuer is created by this call.',
},
];
}
}