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”
|
> 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
|
### Bug fixes
|
||||||
|
|
||||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||||
@ -30,3 +32,4 @@
|
|||||||
|
|
||||||
- @xen-orchestra/proxy minor
|
- @xen-orchestra/proxy minor
|
||||||
- xo-server patch
|
- xo-server patch
|
||||||
|
- xo-web minor
|
||||||
|
@ -114,6 +114,7 @@ const messages = {
|
|||||||
// ----- Filters -----
|
// ----- Filters -----
|
||||||
onError: 'On error',
|
onError: 'On error',
|
||||||
successful: 'Successful',
|
successful: 'Successful',
|
||||||
|
filterOutShortTasks: 'Hide short tasks',
|
||||||
filterOnlyManaged: 'Managed disks',
|
filterOnlyManaged: 'Managed disks',
|
||||||
filterOnlyOrphaned: 'Orphaned disks',
|
filterOnlyOrphaned: 'Orphaned disks',
|
||||||
filterOnlyRegular: 'Normal disks',
|
filterOnlyRegular: 'Normal disks',
|
||||||
|
@ -43,6 +43,11 @@ const TASK_ITEM_STYLE = {
|
|||||||
// Remove all margin, otherwise it breaks vertical alignment.
|
// Remove all margin, otherwise it breaks vertical alignment.
|
||||||
margin: 0,
|
margin: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const FILTERS = {
|
||||||
|
filterOutShortTasks: '!name_label: |(SR.scan host.call_plugin)',
|
||||||
|
}
|
||||||
|
|
||||||
@connectStore(() => ({
|
@connectStore(() => ({
|
||||||
host: createGetObject((_, props) => props.item.$host),
|
host: createGetObject((_, props) => props.item.$host),
|
||||||
}))
|
}))
|
||||||
@ -305,7 +310,9 @@ export default class Tasks extends Component {
|
|||||||
<SortedTable
|
<SortedTable
|
||||||
collection={this._getTasks()}
|
collection={this._getTasks()}
|
||||||
columns={COLUMNS}
|
columns={COLUMNS}
|
||||||
|
defaultFilter='filterOutShortTasks'
|
||||||
filterContainer={() => this.state.container}
|
filterContainer={() => this.state.container}
|
||||||
|
filters={FILTERS}
|
||||||
itemsPerPageContainer={this._getItemsPerPageContainer}
|
itemsPerPageContainer={this._getItemsPerPageContainer}
|
||||||
groupedActions={GROUPED_ACTIONS}
|
groupedActions={GROUPED_ACTIONS}
|
||||||
individualActions={INDIVIDUAL_ACTIONS}
|
individualActions={INDIVIDUAL_ACTIONS}
|
||||||
@ -320,6 +327,7 @@ export default class Tasks extends Component {
|
|||||||
<SortedTable
|
<SortedTable
|
||||||
collection={this._getFinishedTasks()}
|
collection={this._getFinishedTasks()}
|
||||||
columns={FINISHED_TASKS_COLUMNS}
|
columns={FINISHED_TASKS_COLUMNS}
|
||||||
|
filters={FILTERS}
|
||||||
stateUrlParam='s_previous'
|
stateUrlParam='s_previous'
|
||||||
/>
|
/>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
Loading…
Reference in New Issue
Block a user