Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: ListView empty states consistent links #25221

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ui/app/templates/components/generated-item-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@
this.itemType
}} will be listed here. Create your first {{this.itemType}} to get started."
>
<LinkTo @route="vault.cluster.access.method.item.create" @model={{this.itemType}} class="link">
Create
{{singularize this.itemType}}
</LinkTo>
<Hds::Link::Standalone
@icon="plus"
@text="Create {{singularize this.itemType}}"
@route="vault.cluster.access.method.item.create"
@model={{this.itemType}}
/>
</list.empty>
{{else if list.item}}
<ListItem @linkParams={{array "vault.cluster.access.method.item.show" this.itemType list.item.id}} as |Item|>
Expand Down
6 changes: 2 additions & 4 deletions ui/app/templates/vault/cluster/access/namespaces/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
<ListView @items={{this.model}} @itemNoun="namespace" @paginationRouteName="vault.cluster.access.namespaces" as |list|>
{{#if list.empty}}
<list.empty>
<Hds::Link::Standalone @icon="plus" @text="Create Namespace" @route="vault.cluster.access.namespaces.create" />

<Hds::Link::Standalone
@icon="docs-link"
@text="Learn more"
@icon="learn-link"
@text="Secure multi-tenancy with namespaces tutorial"
@href={{doc-link "/vault/tutorials/enterprise/namespaces"}}
/>
</list.empty>
Expand Down
4 changes: 1 addition & 3 deletions ui/lib/kmip/addon/templates/credentials/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
@title="No credentials yet for this role"
@message="You can generate new credentials that will be limited to this role's allowed operations, then you can distribute them to your KMIP clients."
>
<LinkTo @route="credentials.generate">
Generate credentials
</LinkTo>
<Hds::Link::Standalone @icon="plus" @text="Generate credentials" @route="credentials.generate" />
</list.empty>
{{else if list.item}}
<ListItem
Expand Down
4 changes: 1 addition & 3 deletions ui/lib/kmip/addon/templates/scope/roles.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@
@title="No roles in this scope yet"
@message="Roles let you generate credentials with a specified set of KMIP operations permissions that clients are allowed to perform."
>
<LinkTo @route="scope.roles.create">
Create a role
</LinkTo>
<Hds::Link::Standalone @icon="plus" @text="Create a role" @route="scope.roles.create" />
</list.empty>
{{else if list.item}}
<ListItem @linkPrefix={{this.mountPoint}} @linkParams={{array "credentials" this.scope list.item.id}} as |Item|>
Expand Down
4 changes: 1 addition & 3 deletions ui/lib/kmip/addon/templates/scopes/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
@title="KMIP Secrets Engine"
@message="First, let's create a scope that our roles and credentials will belong to. A client can only access objects within their role's scope."
>
<LinkTo @route="scopes.create">
Create a scope
</LinkTo>
<Hds::Link::Standalone @icon="plus" @text="Create a scope" @route="scopes.create" />
</list.empty>
{{else if list.item}}
<ListItem @linkPrefix={{this.mountPoint}} @linkParams={{array "scope.roles" list.item.id}} as |Item|>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
@text="Sync secrets"
@icon="chevron-right"
@iconPosition="trailing"
class="has-top-margin-xs"
@route="secrets.destinations.destination.sync"
/>
</EmptyState>
Expand Down
Loading