mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
LinkTo remove tagName lint warning (#14344)
* removal stage 1 * remove unused roles file * more changes and glimmerize toggle * clean up * fix * fixes * remove layout
This commit is contained in:
@@ -8,6 +8,17 @@
|
||||
ul {
|
||||
border-color: transparent;
|
||||
min-height: 3rem;
|
||||
|
||||
> a {
|
||||
&:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
&.is-active,
|
||||
&.is-active .tab {
|
||||
border-color: $blue;
|
||||
color: $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
|
||||
@@ -1,38 +1,22 @@
|
||||
<div class="tabs-container box is-sideless is-fullwidth is-paddingless is-marginless">
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.settings.configure-secret-backend"
|
||||
@model={{@model.id}}
|
||||
@query={{hash tab=""}}
|
||||
@tagName="li"
|
||||
data-test-aws-link="root-creds"
|
||||
>
|
||||
<LinkTo
|
||||
@route="vault.cluster.settings.configure-secret-backend"
|
||||
@model={{@model.id}}
|
||||
@query={{hash tab=""}}
|
||||
data-test-aws-link="root-creds"
|
||||
>
|
||||
Dynamic IAM root credentials
|
||||
</LinkTo>
|
||||
Dynamic IAM root credentials
|
||||
</LinkTo>
|
||||
<LinkTo
|
||||
@route="vault.cluster.settings.configure-secret-backend"
|
||||
@model={{@model.id}}
|
||||
@query={{hash tab="leases"}}
|
||||
@tagName="li"
|
||||
data-test-aws-link="leases"
|
||||
>
|
||||
<LinkTo
|
||||
@route="vault.cluster.settings.configure-secret-backend"
|
||||
@model={{@model.id}}
|
||||
@query={{hash tab="leases"}}
|
||||
data-test-aws-link="leases"
|
||||
>
|
||||
Leases
|
||||
</LinkTo>
|
||||
Leases
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -61,6 +45,7 @@
|
||||
(hash access_key=@accessKey iam_endpoint=@iamEndpoint sts_endpoint=@stsEndpoint secret_key=@secretKey region=@region)
|
||||
}}
|
||||
data-test-aws-root-creds-form="true"
|
||||
aria-label="save root creds form"
|
||||
>
|
||||
<div class="box is-fullwidth is-shadowless is-marginless">
|
||||
<NamespaceReminder @mode="save" @noun="configuration" />
|
||||
|
||||
@@ -1,28 +1,19 @@
|
||||
<div class="tabs-container box is-bottomless is-fullwidth is-paddingless">
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
{{#each (array "cert" "urls" "crl" "tidy") as |section|}}
|
||||
<LinkTo
|
||||
@route="vault.cluster.settings.configure-secret-backend.section"
|
||||
@model={{section}}
|
||||
@tagName="li"
|
||||
@activeClass="is-active"
|
||||
>
|
||||
<LinkTo @route="vault.cluster.settings.configure-secret-backend.section" @model={{section}}>
|
||||
{{#if (eq section "cert")}}
|
||||
CA certificate
|
||||
{{else if (eq section "urls")}}
|
||||
URLs
|
||||
{{else if (eq section "crl")}}
|
||||
CRL
|
||||
{{else if (eq section "tidy")}}
|
||||
Tidy
|
||||
{{/if}}
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.settings.configure-secret-backend.section" @model={{section}} @activeClass="is-active">
|
||||
{{#if (eq section "cert")}}
|
||||
CA certificate
|
||||
{{else if (eq section "urls")}}
|
||||
URLs
|
||||
{{else if (eq section "crl")}}
|
||||
CRL
|
||||
{{else if (eq section "tidy")}}
|
||||
Tidy
|
||||
{{/if}}
|
||||
</LinkTo>
|
||||
{{/each}}
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -8,18 +8,12 @@
|
||||
<div class="tabs-container box is-sideless is-fullwidth is-paddingless is-marginless">
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="vault.cluster.access.identity.index" @model={{pluralize this.identityType}} @tagName="li">
|
||||
<LinkTo @route="vault.cluster.access.identity.index" @model={{pluralize this.identityType}}>
|
||||
{{capitalize (pluralize this.identityType)}}
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.access.identity.index" @model={{pluralize this.identityType}}>
|
||||
{{capitalize (pluralize this.identityType)}}
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.access.identity.aliases.index" @model={{pluralize this.identityType}} @tagName="li">
|
||||
<LinkTo @route="vault.cluster.access.identity.aliases.index" @model={{pluralize this.identityType}}>
|
||||
Aliases
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.access.identity.aliases.index" @model={{pluralize this.identityType}}>
|
||||
Aliases
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -23,12 +23,10 @@
|
||||
(humanize @model.identityType)
|
||||
}}. Edit this {{lowercase (humanize @model.identityType)}} to get started."
|
||||
>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="vault.cluster.access.identity.edit" @model={{@model.id}} @tagName="button" class="link">
|
||||
<LinkTo @route="vault.cluster.access.identity.edit" @model={{@model.id}} class="link">
|
||||
Edit
|
||||
{{lowercase (humanize @model.identityType)}}
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
<LearnLink @path="/vault/identity-access-management/iam-identity">
|
||||
Learn more
|
||||
</LearnLink>
|
||||
|
||||
@@ -27,33 +27,25 @@
|
||||
<div class="tabs-container box is-bottomless is-marginless is-fullwidth is-paddingless">
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.secrets.backend.show"
|
||||
@model={{this.key.id}}
|
||||
@tagName="li"
|
||||
@activeClass="is-active"
|
||||
data-test-secret-tab
|
||||
>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.show">
|
||||
Secret
|
||||
</LinkTo>
|
||||
Secret
|
||||
</LinkTo>
|
||||
{{! must have read access to /metadata see tab or update to update metadata}}
|
||||
{{#if (or this.canReadSecretMetadata this.canUpdateSecretMetadata)}}
|
||||
<LinkTo
|
||||
@route="vault.cluster.secrets.backend.metadata"
|
||||
@model={{this.key.id}}
|
||||
@tagName="li"
|
||||
@activeClass="is-active"
|
||||
data-test-secret-metadata-tab
|
||||
>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.metadata">
|
||||
Metadata
|
||||
</LinkTo>
|
||||
Metadata
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
{{#unless this.dontShowTab}}
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.secrets.backend.list-root"
|
||||
@query={{hash tab=@tab}}
|
||||
@tagName="li"
|
||||
@activeClass="is-active"
|
||||
data-test-secret-list-tab={{@label}}
|
||||
>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.list-root" @query={{hash tab=@tab}}>
|
||||
{{@label}}
|
||||
</LinkTo>
|
||||
{{@label}}
|
||||
</LinkTo>
|
||||
{{/unless}}
|
||||
@@ -27,19 +27,11 @@
|
||||
</PageHeader>
|
||||
{{#if options.tabs}}
|
||||
<div class="tabs-container box is-bottomless is-marginless is-fullwidth is-paddingless">
|
||||
<nav class="tabs">
|
||||
<nav class="tabs" aria-label="secret tabs">
|
||||
<ul>
|
||||
{{#if options.hasOverview}}
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.secrets.backend.overview"
|
||||
@tagName="li"
|
||||
@activeClass="is-active"
|
||||
data-test-tab="overview"
|
||||
>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.overview">
|
||||
Overview
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.overview" @activeClass="is-active" data-test-tab="overview">
|
||||
Overview
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
{{#each options.tabs as |oTab|}}
|
||||
@@ -61,10 +53,12 @@
|
||||
/>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<LinkTo @route="vault.cluster.secrets.backend.configuration" @tagName="li" @activeClass="is-active">
|
||||
<LinkTo @route="vault.cluster.secrets.backend.configuration" data-test-configuration-tab={{true}}>
|
||||
Configuration
|
||||
</LinkTo>
|
||||
<LinkTo
|
||||
@route="vault.cluster.secrets.backend.configuration"
|
||||
@activeClass="is-active"
|
||||
data-test-configuration-tab={{true}}
|
||||
>
|
||||
Configuration
|
||||
</LinkTo>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -72,24 +66,23 @@
|
||||
{{else}}
|
||||
{{! if there are no tabs in the options, we'll hardcode them here }}
|
||||
<div class="tabs-container box is-bottomless is-marginless is-fullwidth is-paddingless">
|
||||
<nav class="tabs">
|
||||
<nav class="tabs" aria-label="tabs">
|
||||
<ul>
|
||||
{{#if (contains @model.engineType (supported-secret-backends))}}
|
||||
<LinkTo
|
||||
@route="vault.cluster.secrets.backend.list-root"
|
||||
@tagName="li"
|
||||
@activeClass="is-active"
|
||||
@current-when="vault.cluster.secrets.backend.list-root vault.cluster.secrets.backend.list"
|
||||
>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.list-root">
|
||||
{{capitalize (pluralize options.item)}}
|
||||
</LinkTo>
|
||||
{{capitalize (pluralize options.item)}}
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
<LinkTo @route="vault.cluster.secrets.backend.configuration" @tagName="li" @activeClass="is-active">
|
||||
<LinkTo @route="vault.cluster.secrets.backend.configuration" data-test-configuration-tab={{true}}>
|
||||
Configuration
|
||||
</LinkTo>
|
||||
<LinkTo
|
||||
@route="vault.cluster.secrets.backend.configuration"
|
||||
data-test-configuration-tab={{true}}
|
||||
@activeClass="is-active"
|
||||
>
|
||||
Configuration
|
||||
</LinkTo>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -105,17 +105,14 @@
|
||||
</p>
|
||||
</section>
|
||||
<footer class="modal-card-foot modal-card-foot-outlined">
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.secrets.backend.edit"
|
||||
@model={{this.model.id}}
|
||||
@tagName="button"
|
||||
class="button is-primary"
|
||||
data-test-edit-confirm-button={{true}}
|
||||
>
|
||||
Confirm
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
<button type="button" class="button is-secondary" onclick={{action (mut this.isEditModalActive) false}}>
|
||||
Cancel
|
||||
</button>
|
||||
|
||||
@@ -47,17 +47,10 @@
|
||||
this.identityType
|
||||
}} and click "Create Alias" to get started."
|
||||
>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.access.identity.create"
|
||||
@model={{pluralize this.identityType}}
|
||||
@tagName="button"
|
||||
class="link"
|
||||
>
|
||||
<LinkTo @route="vault.cluster.access.identity.create" @model={{pluralize this.identityType}} class="link">
|
||||
Create
|
||||
{{this.identityType}}
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
<LearnLink @path="/vault/identity-access-management/iam-identity">
|
||||
Learn more
|
||||
</LearnLink>
|
||||
|
||||
@@ -21,13 +21,9 @@
|
||||
<nav class="tabs sub-nav">
|
||||
<ul>
|
||||
{{#each (tabs-for-identity-show this.model.identityType) as |tab|}}
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="vault.cluster.access.identity.aliases.show" @models={{array this.model.id tab}} @tagName="li">
|
||||
<LinkTo @route="vault.cluster.access.identity.aliases.show" @models={{array this.model.id tab}}>
|
||||
{{capitalize tab}}
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.access.identity.aliases.show" @models={{array this.model.id tab}}>
|
||||
{{capitalize tab}}
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -107,17 +107,10 @@
|
||||
this.identityType
|
||||
}} in this namespace will be listed here. Create your first {{this.identityType}} to get started."
|
||||
>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.access.identity.create"
|
||||
@model={{pluralize this.identityType}}
|
||||
@tagName="button"
|
||||
class="link"
|
||||
>
|
||||
<LinkTo @route="vault.cluster.access.identity.create" @model={{pluralize this.identityType}} class="link">
|
||||
Create
|
||||
{{this.identityType}}
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
<LearnLink @path="/vault/identity-access-management/iam-identity">
|
||||
Learn more
|
||||
</LearnLink>
|
||||
|
||||
@@ -21,21 +21,13 @@
|
||||
<nav class="tabs sub-nav">
|
||||
<ul>
|
||||
{{#each (tabs-for-identity-show this.model.identityType this.model.type) as |tab|}}
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.access.identity.show"
|
||||
@models={{array (pluralize this.model.identityType) this.model.id tab}}
|
||||
@tagName="li"
|
||||
data-test-tab-subnav={{tab}}
|
||||
>
|
||||
<LinkTo
|
||||
@route="vault.cluster.access.identity.show"
|
||||
@models={{array (pluralize this.model.identityType) this.model.id tab}}
|
||||
>
|
||||
{{capitalize (humanize tab)}}
|
||||
</LinkTo>
|
||||
{{capitalize (humanize tab)}}
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -12,11 +12,9 @@
|
||||
@title="You do not have permissions to edit metadata"
|
||||
@message="Ask your administrator if you think you should have access."
|
||||
>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="vault.cluster.secrets.backend.metadata" @model={{this.model.id}} @tagName="button" class="link">
|
||||
<LinkTo @route="vault.cluster.secrets.backend.metadata" @model={{this.model.id}} class="link">
|
||||
View Metadata
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
<DocLink @path="/api/secret/kv/kv-v2#create-update-metadata">More here</DocLink>
|
||||
</EmptyState>
|
||||
{{/if}}
|
||||
@@ -18,18 +18,12 @@
|
||||
<div class="tabs-container box is-bottomless is-marginless is-fullwidth is-paddingless">
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="vault.cluster.secrets.backend.show" @tagName="li" @activeClass="is-active">
|
||||
<LinkTo @route="vault.cluster.secrets.backend.show" @model={{this.id}} data-test-secret-tab>
|
||||
Secret
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.show" @model={{this.id}} data-test-secret-tab @activeClass="is-active">
|
||||
Secret
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.metadata" @model={{this.id}} @tagName="li" @activeClass="is-active">
|
||||
<LinkTo @route="vault.cluster.secrets.backend.metadata">
|
||||
Metadata
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.metadata" @model={{this.id}} @activeClass="is-active">
|
||||
Metadata
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
<PageHeader as |p|>
|
||||
<p.top>
|
||||
<KeyValueHeader
|
||||
@baseKey={{this.baseKey}}
|
||||
@path="vault.cluster.secrets.backend.list"
|
||||
@mode="show"
|
||||
@root={{this.root}}
|
||||
@showCurrent={{true}}
|
||||
/>
|
||||
</p.top>
|
||||
<p.levelLeft>
|
||||
<h1 class="title is-3" data-test-secret-header="true">
|
||||
{{@model.secret}}
|
||||
</h1>
|
||||
</p.levelLeft>
|
||||
</PageHeader>
|
||||
|
||||
<div class="tabs-container box is-sideless is-fullwidth is-paddingless is-marginless">
|
||||
<nav class="tabs sub-nav">
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="vault.cluster.secrets.backend.roles" @models={{array this.backend @model.secret}} @tagName="li">
|
||||
<LinkTo @route="vault.cluster.secrets.backend.roles" @models={{array this.backend @model.secret}}>
|
||||
Roles
|
||||
</LinkTo>
|
||||
</LinkTo>
|
||||
<LinkTo @route="vault.cluster.secrets.backend.show" @models={{array this.backend @model.secret}} @tagName="li">
|
||||
<LinkTo @route="vault.cluster.secrets.backend.show" @models={{array this.backend @model.secret}}>
|
||||
Configuration
|
||||
</LinkTo>
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
{{#with (options-for-backend this.backendType this.tab) as |options|}}
|
||||
{{#if (or this.model.meta.total (not this.isConfigurableTab))}}
|
||||
<Toolbar>
|
||||
{{#if this.model.meta.total}}
|
||||
<ToolbarFilters>
|
||||
<NavigateInput
|
||||
@enterpriseProduct="vault"
|
||||
@filterFocusDidChange={{action "setFilterFocus"}}
|
||||
@filterDidChange={{action "setFilter"}}
|
||||
@filter={{this.filter}}
|
||||
@filterMatchesKey={{this.filterMatchesKey}}
|
||||
@firstPartialMatch={{this.firstPartialMatch}}
|
||||
@baseKey={{get this.baseKey "id"}}
|
||||
@shouldNavigateTree={{options.navigateTree}}
|
||||
@placeholder={{options.searchPlaceholder}}
|
||||
@mode={{if (eq this.tab "certs") "secrets-cert" "secrets"}}
|
||||
@data-test-nav-input={{true}}
|
||||
/>
|
||||
{{#if this.filterFocused}}
|
||||
{{#if this.filterMatchesKey}}
|
||||
{{#unless this.filterIsFolder}}
|
||||
<p class="input-hint">
|
||||
<kbd>Enter</kbd>
|
||||
to view
|
||||
{{this.filter}}
|
||||
</p>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if this.firstPartialMatch}}
|
||||
<p class="input-hint">
|
||||
<kbd>Tab</kbd>
|
||||
to autocomplete
|
||||
</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</ToolbarFilters>
|
||||
{{/if}}
|
||||
|
||||
<ToolbarActions>
|
||||
<ToolbarSecretLink
|
||||
@secret=""
|
||||
@mode="create"
|
||||
@type="add"
|
||||
@queryParams={{query-params initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
|
||||
@data-test-secret-create={{true}}
|
||||
>
|
||||
{{options.create}}
|
||||
</ToolbarSecretLink>
|
||||
</ToolbarActions>
|
||||
</Toolbar>
|
||||
{{/if}}
|
||||
|
||||
{{#if this.model.meta.total}}
|
||||
{{! template-lint-configure no-partial "warn" }}
|
||||
{{#each this.model as |item|}}
|
||||
{{partial options.listItemPartial}}
|
||||
{{else}}
|
||||
<div class="box is-sideless">
|
||||
{{#if this.filterFocused}}
|
||||
There are no
|
||||
{{pluralize options.item}}
|
||||
matching
|
||||
<code>{{this.filter}}</code>, press
|
||||
<kbd>ENTER</kbd>
|
||||
to add one.
|
||||
{{else}}
|
||||
There are no
|
||||
{{pluralize options.item}}
|
||||
matching
|
||||
<code>{{this.filter}}</code>.
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#if (gt this.model.meta.lastPage 1)}}
|
||||
<ListPagination
|
||||
@page={{this.model.meta.currentPage}}
|
||||
@lastPage={{this.model.meta.lastPage}}
|
||||
@link={{concat "vault.cluster.secrets.backend.list" (unless this.baseKey.id "-root")}}
|
||||
@model={{compact (array this.backend (if this.baseKey.id this.baseKey.id))}}
|
||||
/>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if (eq this.baseKey.id "")}}
|
||||
<EmptyState
|
||||
@title="No {{pluralize options.item}} in this backend"
|
||||
@message="Secrets in this backend will be listed here. Add a secret to get started."
|
||||
>
|
||||
<SecretLink
|
||||
@mode="create"
|
||||
@secret=""
|
||||
@queryParams={{query-params initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
|
||||
@class="link"
|
||||
>
|
||||
{{options.create}}
|
||||
</SecretLink>
|
||||
</EmptyState>
|
||||
{{else}}
|
||||
<EmptyState
|
||||
@title={{if
|
||||
(eq this.filter this.baseKey.id)
|
||||
(concat "No " (pluralize options.item) " under “" this.filter "”")
|
||||
(concat "No folders matching “" this.filter "”")
|
||||
}}
|
||||
/>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
@@ -3,17 +3,14 @@
|
||||
{{#each (tools-actions) as |supportedAction|}}
|
||||
{{#if (has-permission "tools" routeParams=supportedAction)}}
|
||||
<li>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo
|
||||
@route="vault.cluster.tools.tool"
|
||||
@model={{supportedAction}}
|
||||
@refreshModel={{true}}
|
||||
class="(if (eq supportedAction selectedAction) 'is-active')"
|
||||
data-test-tools-action-link={{supportedAction}}
|
||||
>
|
||||
{{capitalize supportedAction}}
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<Input
|
||||
id={{this.safeId}}
|
||||
name={{this.name}}
|
||||
@type="checkbox"
|
||||
@checked={{this.checked}}
|
||||
@change={{action "handleChange" value="target.checked"}}
|
||||
{{on "change" this.handleChange}}
|
||||
class={{this.inputClasses}}
|
||||
disabled={{this.disabled}}
|
||||
data-test-toggle-input={{this.name}}
|
||||
/>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
<label data-test-toggle-label={{this.name}} for={{this.safeId}} class="toggle-label">
|
||||
{{#if (has-block)}}
|
||||
{{yield}}
|
||||
@@ -15,29 +15,36 @@
|
||||
* @param {string} [status='normal'] - Status can be normal or success, which makes the switch have a blue background when checked=true
|
||||
*/
|
||||
|
||||
import Component from '@ember/component';
|
||||
import { computed } from '@ember/object';
|
||||
import layout from '../templates/components/toggle';
|
||||
import Component from '@glimmer/component';
|
||||
import { action } from '@ember/object';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
tagName: '',
|
||||
checked: false,
|
||||
disabled: false,
|
||||
name: '',
|
||||
size: 'normal',
|
||||
status: 'normal',
|
||||
safeId: computed('name', function () {
|
||||
export default class ToggleComponent extends Component {
|
||||
// tracked because the Input mutates the property and therefor cannot be a getter
|
||||
@tracked
|
||||
checked = this.args.checked || false;
|
||||
|
||||
get disabled() {
|
||||
return this.args.disabled || false;
|
||||
}
|
||||
|
||||
get name() {
|
||||
return this.args.name || '';
|
||||
}
|
||||
|
||||
get safeId() {
|
||||
return `toggle-${this.name.replace(/\W/g, '')}`;
|
||||
}),
|
||||
inputClasses: computed('size', 'status', function () {
|
||||
const sizeClass = `is-${this.size}`;
|
||||
const statusClass = `is-${this.status}`;
|
||||
}
|
||||
get inputClasses() {
|
||||
let size = this.args.size || 'normal';
|
||||
let status = this.args.status || 'normal';
|
||||
const sizeClass = `is-${size}`;
|
||||
const statusClass = `is-${status}`;
|
||||
return `toggle ${statusClass} ${sizeClass}`;
|
||||
}),
|
||||
actions: {
|
||||
handleChange(value) {
|
||||
this.onChange(value);
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@action
|
||||
handleChange(e) {
|
||||
this.args.onChange(e.target.checked);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,33 +47,26 @@
|
||||
{{#if this.showTabs}}
|
||||
<div class="tabs-container box is-bottomless is-fullwidth is-paddingless" data-test-tabs>
|
||||
<nav class="tabs">
|
||||
{{#unless this.isSummaryDashboard}}
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="vault.cluster.replication-dr-promote.details" @tagName="li" @activeClass="is-active">
|
||||
<LinkTo @route="vault.cluster.replication-dr-promote.details">
|
||||
Details
|
||||
</LinkTo>
|
||||
</LinkTo>
|
||||
<LinkTo
|
||||
@route="vault.cluster.replication-dr-promote"
|
||||
@tagName="li"
|
||||
@activeClass="is-active"
|
||||
@current-when="vault.cluster.replication-dr-promote.index"
|
||||
>
|
||||
<LinkTo @route="vault.cluster.replication-dr-promote">
|
||||
Manage
|
||||
</LinkTo>
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
{{else}}
|
||||
{{#if this.isSummaryDashboard}}
|
||||
<ul>
|
||||
<li class="is-active">
|
||||
{{link-to-external "Summary" "replication"}}
|
||||
</li>
|
||||
</ul>
|
||||
{{/unless}}
|
||||
{{else}}
|
||||
<ul>
|
||||
<LinkTo @route="vault.cluster.replication-dr-promote.details" @activeClass="is-active">
|
||||
Details
|
||||
</LinkTo>
|
||||
<LinkTo
|
||||
@route="vault.cluster.replication-dr-promote"
|
||||
@activeClass="is-active"
|
||||
@current-when="vault.cluster.replication-dr-promote.index"
|
||||
>
|
||||
Manage
|
||||
</LinkTo>
|
||||
</ul>
|
||||
{{/if}}
|
||||
</nav>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -11,18 +11,12 @@
|
||||
<div class="tabs-container box is-sideless is-fullwidth is-paddingless is-marginless">
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="credentials.index" @models={{array @scope @role}} @tagName="li">
|
||||
<LinkTo @route="credentials.index" @models={{array @scope @role}} data-test-kmip-link-credentials="true">
|
||||
Credentials
|
||||
</LinkTo>
|
||||
<LinkTo @route="credentials.index" @models={{array @scope @role}} data-test-kmip-link-credentials="true">
|
||||
Credentials
|
||||
</LinkTo>
|
||||
<LinkTo @route="role" @models={{array @scope @role}} @tagName="li">
|
||||
<LinkTo @route="role" @models={{array @scope @role}} data-test-kmip-link-role-details="true">
|
||||
Details
|
||||
</LinkTo>
|
||||
<LinkTo @route="role" @models={{array @scope @role}} data-test-kmip-link-role-details="true">
|
||||
Details
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -12,18 +12,12 @@
|
||||
<div class="tabs-container box is-sideless is-fullwidth is-paddingless is-marginless">
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
||||
<LinkTo @route="scopes.index" @tagName="li">
|
||||
<LinkTo @route="scopes.index" data-test-kmip-link-scopes="true">
|
||||
Scopes
|
||||
</LinkTo>
|
||||
<LinkTo @route="scopes.index" data-test-kmip-link-scopes="true">
|
||||
Scopes
|
||||
</LinkTo>
|
||||
<LinkTo @route="configuration" @tagName="li">
|
||||
<LinkTo @route="configuration" data-test-kmip-link-config="true">
|
||||
Configuration
|
||||
</LinkTo>
|
||||
<LinkTo @route="configuration" data-test-kmip-link-config="true">
|
||||
Configuration
|
||||
</LinkTo>
|
||||
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
Reference in New Issue
Block a user