backport of commit 8834e4d16bb08972d4e0561e22dfde4d4536cf1d (#21868)

Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
This commit is contained in:
hc-github-team-secure-vault-core 2023-07-14 14:18:36 -04:00 committed by GitHub
parent 6655be126a
commit 7f6d4dc70b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 45 additions and 38 deletions

View File

@ -60,47 +60,54 @@
</Toolbar> </Toolbar>
{{#if (eq this.tab "targets")}} {{#if (eq this.tab "targets")}}
{{#each @model.targets as |target|}} {{#if @model.targets}}
<LinkedBlock {{#each @model.targets as |target|}}
class="list-item-row" <LinkedBlock
@disabled={{not target.link}} class="list-item-row"
@params={{union (array target.link) target.linkModels}} @disabled={{not target.link}}
data-test-target={{target.title}} @params={{union (array target.link) target.linkModels}}
> data-test-target={{target.title}}
<div class="level is-mobile"> >
<div class="level-left"> <div class="level is-mobile">
<div> <div class="level-left">
<Icon @name={{target.icon}} /> <div>
<span class="has-text-weight-semibold has-text-black"> <Icon @name={{target.icon}} />
{{target.title}} <span class="has-text-weight-semibold has-text-black">
</span> {{target.title}}
<div class="has-text-grey is-size-8"> </span>
<code> <div class="has-text-grey is-size-8">
{{target.subTitle}} <code>
</code> {{target.subTitle}}
</code>
</div>
</div> </div>
</div> </div>
{{#if target.link}}
<div class="level-right is-flex is-paddingless is-marginless">
<div class="level-item">
<PopupMenu>
<nav class="menu" aria-label="Enforcement target more menu">
<ul class="menu-list">
<li>
<LinkTo @route={{target.link}} @models={{target.linkModels}} data-test-target-link={{target.title}}>
Details
</LinkTo>
</li>
</ul>
</nav>
</PopupMenu>
</div>
</div>
{{/if}}
</div> </div>
{{#if target.link}} </LinkedBlock>
<div class="level-right is-flex is-paddingless is-marginless"> {{/each}}
<div class="level-item"> {{else}}
<PopupMenu> <EmptyState
<nav class="menu" aria-label="Enforcement target more menu"> @title="No target exists for this enforcement"
<ul class="menu-list"> @message="A target might have been deleted after the enforcement was created."
<li> />
<LinkTo @route={{target.link}} @models={{target.linkModels}} data-test-target-link={{target.title}}> {{/if}}
Details
</LinkTo>
</li>
</ul>
</nav>
</PopupMenu>
</div>
</div>
{{/if}}
</div>
</LinkedBlock>
{{/each}}
{{else if (eq this.tab "methods")}} {{else if (eq this.tab "methods")}}
{{#each this.model.mfa_methods as |method|}} {{#each this.model.mfa_methods as |method|}}
<Mfa::MethodListItem @model={{method}} /> <Mfa::MethodListItem @model={{method}} />