Skip to content

Commit

Permalink
feat(xo-web): add a link to SR in garbage collecting (coalescing) task
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Nov 28, 2023
1 parent 830c0b9 commit 3a5dd39
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [Netbox] Ability to synchronize XO users as Netbox tenants (PR [#7158](https://github.com/vatesfr/xen-orchestra/pull/7158))
- [Task] Show the related SR on the Garbage Collector Task ( vdi coalescing) (PR [#7189](https://github.com/vatesfr/xen-orchestra/pull/7189))

### Bug fixes

Expand Down Expand Up @@ -38,6 +39,6 @@
- @xen-orchestra/vmware-explorer patch
- xo-server-netbox minor
- xo-vmdk-to-vhd patch
- xo-web patch
- xo-web minor

<!--packages-end-->
13 changes: 10 additions & 3 deletions packages/xo-web/src/xo-app/tasks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,22 @@ const FILTERS = {

@connectStore(() => ({
host: createGetObject((_, props) => props.item.$host),
appliesTo: createGetObject((_, props) => props.item.applies_to),
}))
export class TaskItem extends Component {
render() {
const { host, item: task } = this.props

const { appliesTo, host, item: task } = this.props
// garbage collection task has an uuid in the desc
const showDesc = task.name_description && task.name_label !== 'Garbage Collection'
return (
<div>
{task.name_label} ({task.name_description && `${task.name_description} `}
{task.name_label} ({showDesc && `${task.name_description} `}
on {host ? <Link to={`/hosts/${host.id}`}>{host.name_label}</Link> : `unknown host − ${task.$host}`})
{appliesTo && (
<span>
, applies to <Link to={`/srs/${appliesTo.id}`}>{appliesTo.name_label}</Link>
</span>
)}
{task.disappeared === undefined && ` ${Math.round(task.progress * 100)}%`}
</div>
)
Expand Down

0 comments on commit 3a5dd39

Please sign in to comment.