ui: add client links to topo viz (#15867)

* ui: add client links to topo viz

* test: add node name for a11y violation
This commit is contained in:
Jai 2023-01-26 10:14:13 -05:00 committed by GitHub
parent 7375fd40fc
commit 033bb7346a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@
{{else if (not @node.node.isEligible)}}
<span data-test-status-icon class="tooltip" aria-label="Client is ineligible">{{x-icon "lock-closed" class="is-warning"}}</span>
{{/if}}
<strong>{{@node.node.name}}</strong>
<strong><LinkTo @route="clients.client" @model={{@node.node.id}}>{{@node.node.name}}</LinkTo></strong>
<span class="bumper-left">{{this.count}} Allocs</span>
<span class="bumper-left is-faded">{{format-scheduled-bytes @node.memory start="MiB"}}, {{format-scheduled-hertz @node.cpu}}</span>
<span class="bumper-left is-faded">{{@node.node.status}}</span>

View File

@ -8,6 +8,7 @@ import { setupMirage } from 'ember-cli-mirage/test-support';
import sinon from 'sinon';
import faker from 'nomad-ui/mirage/faker';
import topoVizPageObject from 'nomad-ui/tests/pages/components/topo-viz';
import { HOSTS } from '../../../mirage/common';
const TopoViz = create(topoVizPageObject());
@ -28,6 +29,7 @@ const alloc = (nodeId, jobId, taskGroupName, memory, cpu, props = {}) => ({
const node = (datacenter, id, memory, cpu) => ({
datacenter,
id,
name: `nomad@${HOSTS[Math.floor(Math.random() * 10) % HOSTS.length]}`,
resources: { memory, cpu },
});