Shows the client/node name alongside alloc short ID if the job is sys/sysbatch (#19051)

This commit is contained in:
Phil Renaud
2023-11-15 10:05:12 -05:00
committed by GitHub
parent 26746a4093
commit bb6c86d2a4
3 changed files with 23 additions and 2 deletions

3
.changelog/19051.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:improvement
ui: for system and sysbatch jobs, now show client name on hover in job panel
```

View File

@@ -2,8 +2,9 @@
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
<Hds::TooltipButton @text="{{get @allocation "shortId"}}" aria-label="Allocation" @extraTippyOptions={{hash trigger=(if (eq @status "unplaced") "manual")}}>
<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")}}>
<ConditionalLinkTo
@condition={{not (eq @status "unplaced")}}
@route="allocations.allocation"

View File

@@ -0,0 +1,17 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
// @ts-check
import Component from '@glimmer/component';
import { alias } from '@ember/object/computed';
export default class JobStatusIndividualAllocationComponent extends Component {
@alias('args.allocation.job.type') jobType;
@alias('args.allocation.node.name') nodeName;
get showClient() {
return this.jobType === 'system' || this.jobType === 'sysbatch';
}
}