Skip to content

Commit

Permalink
ui: add client name tooltip when displaying client ID in tables (#11358)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgfa29 committed Oct 21, 2021
1 parent dc49869 commit 6412e77
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/11358.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: Display client name as a tooltip where the client ID is used
```
16 changes: 14 additions & 2 deletions ui/app/templates/components/allocation-row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,23 @@
<span class="color-swatch {{this.allocation.clientStatus}}" /> {{this.allocation.clientStatus}}
</td>
{{#if (eq this.context "volume")}}
<td data-test-client><LinkTo @route="clients.client" @model={{this.allocation.node}}>{{this.allocation.node.shortId}}</LinkTo></td>
<td data-test-client>
<span class="tooltip multiline" aria-label="{{this.allocation.node.name}}">
<LinkTo @route="clients.client" @model={{this.allocation.node}}>
{{this.allocation.node.shortId}}
</LinkTo>
</span>
</td>
{{/if}}
{{#if (or (eq this.context "taskGroup") (eq this.context "job"))}}
<td data-test-job-version>{{this.allocation.jobVersion}}</td>
<td data-test-client><LinkTo @route="clients.client" @model={{this.allocation.node}}>{{this.allocation.node.shortId}}</LinkTo></td>
<td data-test-client>
<span class="tooltip multiline" aria-label="{{this.allocation.node.name}}">
<LinkTo @route="clients.client" @model={{this.allocation.node}}>
{{this.allocation.node.shortId}}
</LinkTo>
</span>
</td>
{{else if (or (eq this.context "node") (eq this.context "volume"))}}
<td>
{{#if (or this.allocation.job.isPending this.allocation.job.isReloading)}}
Expand Down
8 changes: 7 additions & 1 deletion ui/app/templates/components/plugin-allocation-row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@
</span>
</td>

<td data-test-client><LinkTo @route="clients.client" @model={{this.allocation.node}}>{{this.allocation.node.shortId}}</LinkTo></td>
<td data-test-client>
<span class="tooltip multiline" aria-label="{{this.allocation.node.name}}">
<LinkTo @route="clients.client" @model={{this.allocation.node}}>
{{this.allocation.node.shortId}}
</LinkTo>
</span>
</td>
<td>
{{#if (or this.allocation.job.isPending this.allocation.job.isReloading)}}
...
Expand Down

0 comments on commit 6412e77

Please sign in to comment.