mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-29 14:41:09 +01:00
UI/Custom empty state messages for transit and transform (#13090)
* customizes empty state messages for transit and transform * adds changelog * clarifies key name
This commit is contained in:
parent
231ef1de62
commit
6725a37f47
3
changelog/13090.txt
Normal file
3
changelog/13090.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
```release-note:improvement
|
||||||
|
ui: customizes empty state messages for transit and transform
|
||||||
|
```
|
||||||
@ -87,6 +87,7 @@ const SECRET_BACKENDS = {
|
|||||||
displayName: 'Transformation',
|
displayName: 'Transformation',
|
||||||
navigateTree: false,
|
navigateTree: false,
|
||||||
listItemPartial: 'secret-list/transform-list-item',
|
listItemPartial: 'secret-list/transform-list-item',
|
||||||
|
firstStep: 'create a transformation and a role',
|
||||||
tabs: [
|
tabs: [
|
||||||
{
|
{
|
||||||
name: 'transformations',
|
name: 'transformations',
|
||||||
@ -136,6 +137,7 @@ const SECRET_BACKENDS = {
|
|||||||
navigateTree: false,
|
navigateTree: false,
|
||||||
editComponent: 'transit-edit',
|
editComponent: 'transit-edit',
|
||||||
listItemPartial: 'secret-list/item',
|
listItemPartial: 'secret-list/item',
|
||||||
|
firstStep: 'create an encryption key',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { fragment } from 'ember-data-model-fragments/attributes';
|
|||||||
import fieldToAttrs, { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
import fieldToAttrs, { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
||||||
import { validator, buildValidations } from 'ember-cp-validations';
|
import { validator, buildValidations } from 'ember-cp-validations';
|
||||||
|
|
||||||
//identity will be managed separately and the inclusion
|
// identity will be managed separately and the inclusion
|
||||||
//of the system backend is an implementation detail
|
// of the system backend is an implementation detail
|
||||||
const LIST_EXCLUDED_BACKENDS = ['system', 'identity'];
|
const LIST_EXCLUDED_BACKENDS = ['system', 'identity'];
|
||||||
|
|
||||||
const Validations = buildValidations({
|
const Validations = buildValidations({
|
||||||
|
|||||||
@ -68,7 +68,7 @@ export default Route.extend({
|
|||||||
if (noConnectionCapabilities) {
|
if (noConnectionCapabilities) {
|
||||||
return 'You cannot yet generate credentials. Ask your administrator if you think you should have access.';
|
return 'You cannot yet generate credentials. Ask your administrator if you think you should have access.';
|
||||||
} else {
|
} else {
|
||||||
return 'You can connect and external database to Vault. We recommend that you create a user for Vault rather than using the database root user.';
|
return 'You can connect an external database to Vault. We recommend that you create a user for Vault rather than using the database root user.';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
controller.set('showEmptyState', showEmptyState);
|
controller.set('showEmptyState', showEmptyState);
|
||||||
|
|||||||
@ -113,6 +113,16 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if (eq baseKey.id '')}}
|
{{#if (eq baseKey.id '')}}
|
||||||
|
{{#if (and options.firstStep (not tab))}}
|
||||||
|
<EmptyState
|
||||||
|
@title="Get started with {{capitalize backendType}}"
|
||||||
|
@message="To use {{backendType}}, you'll need to {{options.firstStep}}."
|
||||||
|
>
|
||||||
|
<SecretLink @mode="create" @secret="" @queryParams={{query-params initialKey=(or filter baseKey.id) itemType=tab}} @class="link">
|
||||||
|
{{options.create}}
|
||||||
|
</SecretLink>
|
||||||
|
</EmptyState>
|
||||||
|
{{else}}
|
||||||
<EmptyState
|
<EmptyState
|
||||||
@title="No {{pluralize options.item}} in this backend"
|
@title="No {{pluralize options.item}} in this backend"
|
||||||
@message="Secrets in this backend will be listed here. Add a secret to get started."
|
@message="Secrets in this backend will be listed here. Add a secret to get started."
|
||||||
@ -121,6 +131,7 @@
|
|||||||
{{options.create}}
|
{{options.create}}
|
||||||
</SecretLink>
|
</SecretLink>
|
||||||
</EmptyState>
|
</EmptyState>
|
||||||
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if filterIsFolder}}
|
{{#if filterIsFolder}}
|
||||||
<EmptyState
|
<EmptyState
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user