feat(xo-web/tasks): filter out short tasks with a default filter (#5941)
See xoa-support#4096
This commit is contained in:
parent
0451aaeb5c
commit
abcabb736b
@ -7,6 +7,8 @@
|
||||
|
||||
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
||||
|
||||
- [Tasks] Filter out short tasks using a default filter (PR [#5921](https://github.com/vatesfr/xen-orchestra/pull/5921))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
@ -30,3 +32,4 @@
|
||||
|
||||
- @xen-orchestra/proxy minor
|
||||
- xo-server patch
|
||||
- xo-web minor
|
||||
|
@ -114,6 +114,7 @@ const messages = {
|
||||
// ----- Filters -----
|
||||
onError: 'On error',
|
||||
successful: 'Successful',
|
||||
filterOutShortTasks: 'Hide short tasks',
|
||||
filterOnlyManaged: 'Managed disks',
|
||||
filterOnlyOrphaned: 'Orphaned disks',
|
||||
filterOnlyRegular: 'Normal disks',
|
||||
|
@ -43,6 +43,11 @@ const TASK_ITEM_STYLE = {
|
||||
// Remove all margin, otherwise it breaks vertical alignment.
|
||||
margin: 0,
|
||||
}
|
||||
|
||||
const FILTERS = {
|
||||
filterOutShortTasks: '!name_label: |(SR.scan host.call_plugin)',
|
||||
}
|
||||
|
||||
@connectStore(() => ({
|
||||
host: createGetObject((_, props) => props.item.$host),
|
||||
}))
|
||||
@ -305,7 +310,9 @@ export default class Tasks extends Component {
|
||||
<SortedTable
|
||||
collection={this._getTasks()}
|
||||
columns={COLUMNS}
|
||||
defaultFilter='filterOutShortTasks'
|
||||
filterContainer={() => this.state.container}
|
||||
filters={FILTERS}
|
||||
itemsPerPageContainer={this._getItemsPerPageContainer}
|
||||
groupedActions={GROUPED_ACTIONS}
|
||||
individualActions={INDIVIDUAL_ACTIONS}
|
||||
@ -320,6 +327,7 @@ export default class Tasks extends Component {
|
||||
<SortedTable
|
||||
collection={this._getFinishedTasks()}
|
||||
columns={FINISHED_TASKS_COLUMNS}
|
||||
filters={FILTERS}
|
||||
stateUrlParam='s_previous'
|
||||
/>
|
||||
</Collapse>
|
||||
|
Loading…
Reference in New Issue
Block a user