Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Adds group-name tooltips to deploying and steady-state job panels #19601

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/19601.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: Added group name to allocation tooltips on job status panel
```
7 changes: 7 additions & 0 deletions ui/app/components/job-status/allocation-status-block.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
SPDX-License-Identifier: BUSL-1.1
~}}

{{!--
Exists as a "middleman" between AllocationStatusRow and IndividualAllocation
only when showSummaries in AllocationStatusRow is true (i.e. when the math of how
many allocations to show in each block is done x minWidth of each alloc exceeds
available space)
--}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side-effect: I should've left this comment during the original job-panel redesign, but figured I'd add it now.

<div
class="allocation-status-block {{unless this.countToShow "rest-only"}}"
style={{html-safe (concat "width: " @width "px")}}
Expand Down
6 changes: 4 additions & 2 deletions ui/app/components/job-status/individual-allocation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
SPDX-License-Identifier: BUSL-1.1
~}}
<Hds::TooltipButton
@text="{{if this.showClient (concat this.nodeName " - " (get @allocation "shortId")) (get @allocation "shortId")}}"
aria-label="Allocation" @extraTippyOptions={{hash trigger=(if (eq @status "unplaced") "manual")}}>
@text={{or this.tooltipText ""}}
aria-label="Allocation"
@extraTippyOptions={{hash trigger=(if (eq @status "unplaced") "manual")}}
>
<ConditionalLinkTo
@condition={{not (eq @status "unplaced")}}
@route="allocations.allocation"
Expand Down
13 changes: 13 additions & 0 deletions ui/app/components/job-status/individual-allocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ import { alias } from '@ember/object/computed';
export default class JobStatusIndividualAllocationComponent extends Component {
@alias('args.allocation.job.type') jobType;
@alias('args.allocation.node.name') nodeName;
@alias('args.allocation.taskGroup.name') groupName;
@alias('args.allocation.job.taskGroups') taskGroups;
@alias('args.allocation.shortId') shortId;

get showClient() {
return this.jobType === 'system' || this.jobType === 'sysbatch';
}

get tooltipText() {
if (this.showClient) {
return `${this.nodeName} - ${this.shortId}`;
} else if (this.groupName && this.taskGroups?.length > 1) {
return `${this.groupName} - ${this.shortId}`;
} else {
return this.shortId;
}
}
}
Loading