Skip to content

Commit

Permalink
removes remaining instances of builtin components using unknown argum…
Browse files Browse the repository at this point in the history
…ents (#14747)
  • Loading branch information
zofskeez authored Mar 29, 2022
1 parent 8e0f267 commit 7c00b18
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 39 deletions.
5 changes: 1 addition & 4 deletions ui/app/templates/components/auth-info.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,15 @@
{{/if}}
{{/if}}
<li class="action">
{{! invokeAction is provided by ember-link-action addon -- should consider removing in favor of on modifier }}
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo
@route="vault.cluster.logout"
@model={{@activeClusterName}}
id="logout"
class="is-destroy"
@invokeAction={{@onLinkClick}}
{{on "click" @onLinkClick}}
>
Sign out
</LinkTo>
{{! template-lint-enable }}
</li>
</ul>
</nav>
Expand Down
39 changes: 11 additions & 28 deletions ui/app/templates/components/cluster-info.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
{{#if (and this.activeCluster.unsealed this.auth.currentToken)}}
{{#if @cluster.dr.isSecondary}}
{{#if (has-permission "status" routeParams="replication")}}
<nav class="menu">
<nav class="menu" aria-label="replication secondary menu">
<p class="menu-label">Replication</p>
<ul>
{{#if @cluster.anyReplicationEnabled}}
<li>
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo
@route="vault.cluster.replication-dr-promote.details"
disabled={{not this.auth.currentToken}}
@invokeAction={{@onLinkClick}}
{{on "click" @onLinkClick}}
>
<ReplicationModeSummary @mode="dr" @display="menu" @cluster={{@cluster}} />
</LinkTo>
{{! template-lint-enable }}
</li>
{{/if}}
</ul>
Expand All @@ -26,49 +24,42 @@
{{/if}}
{{else}}
{{#if (has-permission "status" routeParams="replication")}}
<nav class="menu">
<nav class="menu" aria-label="replication menu">
<p class="menu-label">Replication</p>
<ul>
{{#if @cluster.anyReplicationEnabled}}
<li>
{{! invokeAction is provided by ember-link-action addon -- should consider removing in favor of on modifier }}
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo
@route="vault.cluster.replication.mode.index"
@model="dr"
disabled={{not this.auth.currentToken}}
@invokeAction={{@onLinkClick}}
{{on "click" @onLinkClick}}
>
<ReplicationModeSummary @mode="dr" @display="menu" @cluster={{@cluster}} />
</LinkTo>
{{! template-lint-enable }}
</li>
<li>
{{#if (has-feature "Performance Replication")}}
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo
@route="vault.cluster.replication.mode.index"
@model="performance"
disabled={{not this.auth.currentToken}}
@invokeAction={{@onLinkClick}}
{{on "click" @onLinkClick}}
>
<ReplicationModeSummary @mode="performance" @display="menu" @cluster={{@cluster}} @tagName="span" />
</LinkTo>
{{! template-lint-enable }}
{{else}}
<ReplicationModeSummary @mode="performance" @display="menu" @cluster={{@cluster}} @class="menu-item" />
{{/if}}
</li>
{{else}}
<li>
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo @route="vault.cluster.replication" @invokeAction={{@onLinkClick}}>
<LinkTo @route="vault.cluster.replication" {{on "click" @onLinkClick}}>
<div class="level is-mobile">
<span class="level-left">Enable</span>
<Icon @name="plus-circle" class="has-text-grey-light level-right" />
</div>
</LinkTo>
{{! template-lint-enable }}
</li>
{{/if}}
</ul>
Expand All @@ -78,22 +69,20 @@
{{/if}}
{{/if}}
{{/unless}}
<nav class="menu">
<nav class="menu" aria-label="server menu">
<div class="menu-label">
Server
</div>
<ul class="menu-list">
<li class="action">
{{#if this.activeCluster.unsealed}}
{{#if (and (has-permission "status" routeParams="seal") (not @cluster.dr.isSecondary))}}
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo @route="vault.cluster.settings.seal" @model={{@cluster.name}} @invokeAction={{@onLinkClick}}>
<LinkTo @route="vault.cluster.settings.seal" @model={{@cluster.name}} {{on "click" @onLinkClick}}>
<div class="level is-mobile">
<span class="level-left">Unsealed</span>
<Icon @name="check-circle" class="has-text-success level-right" />
</div>
</LinkTo>
{{! template-lint-enable }}
{{else}}
<span class="menu-item">
<div class="level is-mobile">
Expand Down Expand Up @@ -124,41 +113,35 @@
<ul class="menu-list">
{{#if (and this.version.features (has-permission "status" routeParams="license") (not @cluster.dr.isSecondary))}}
<li class="action">
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo @route="vault.cluster.license" @model={{this.activeCluster.name}} @invokeAction={{@onLinkClick}}>
<LinkTo @route="vault.cluster.license" @model={{this.activeCluster.name}} {{on "click" @onLinkClick}}>
<div class="level is-mobile">
<span class="level-left">License</span>
<Chevron class="has-text-grey-light level-right" />
</div>
</LinkTo>
{{! template-lint-enable }}
</li>
{{/if}}
{{#if (and @cluster.usingRaft (has-permission "status" routeParams="raft"))}}
<li class="action">
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo @route="vault.cluster.storage" @model={{this.activeCluster.name}} @invokeAction={{@onLinkClick}}>
<LinkTo @route="vault.cluster.storage" @model={{this.activeCluster.name}} {{on "click" @onLinkClick}}>
<div class="level is-mobile">
<span class="level-left">Raft Storage</span>
<Chevron class="has-text-grey-light level-right" />
</div>
</LinkTo>
{{! template-lint-enable }}
</li>
{{/if}}
</ul>
{{/if}}
{{#if (and (has-permission "clients" routeParams="activity") (not @cluster.dr.isSecondary) this.auth.currentToken)}}
<ul class="menu-list">
<li class="action">
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo @route="vault.cluster.clients.current" @invokeAction={{@onLinkClick}}>
<LinkTo @route="vault.cluster.clients.current" {{on "click" @onLinkClick}}>
<div class="level is-mobile">
<span class="level-left">Client count</span>
<Chevron class="has-text-grey-light level-right" />
</div>
</LinkTo>
{{! template-lint-enable }}
</li>
</ul>
{{/if}}
Expand Down
8 changes: 1 addition & 7 deletions ui/app/templates/components/secret-version-menu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
{{#each (reverse @model.versions) as |secretVersion|}}
<li class="action">
{{! invokeAction is provided by ember-link-action addon -- should consider removing in favor of on modifier }}
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
<LinkTo
class="link"
@params={{array (query-params version=secretVersion.version)}}
@invokeAction={{action D.actions.close}}
>
<LinkTo class="link" @query={{hash version=secretVersion.version}} {{on "click" D.actions.close}}>
Version
{{secretVersion.version}}
{{#if
Expand All @@ -37,7 +32,6 @@
<Icon @name="x-square-fill" class="has-text-grey is-pulled-right" />
{{/if}}
</LinkTo>
{{! template-lint-enable }}
</li>
{{/each}}
<li class="action">
Expand Down

0 comments on commit 7c00b18

Please sign in to comment.