feat(xo-web/tasks): remove empty message and let SortedTable handle it (#3305)
This commit is contained in:
parent
ececbaf201
commit
11bd75d2fe
@ -5,6 +5,7 @@
|
||||
### Enhancements
|
||||
|
||||
- [Tables] Filter input now always shows up even if the table is empty [#3295](https://github.com/vatesfr/xen-orchestra/issues/3295) (PR [#3296](https://github.com/vatesfr/xen-orchestra/pull/3296))
|
||||
- [Tasks] The table is now still shown when there are no tasks (PR [#3305](https://github.com/vatesfr/xen-orchestra/pull/3305))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -1271,8 +1271,6 @@ const messages = {
|
||||
vmImportConfigAlert: 'Please check and/or modify the VM configuration.',
|
||||
|
||||
// ---- Tasks ---
|
||||
noTasks: 'No pending tasks',
|
||||
xsTasks: 'Currently, there are not any pending XenServer tasks',
|
||||
cancelTask: 'Cancel',
|
||||
destroyTask: 'Destroy',
|
||||
cancelTasks: 'Cancel selected tasks',
|
||||
|
@ -1,5 +1,4 @@
|
||||
import _, { messages } from 'intl'
|
||||
import CenterPanel from 'center-panel'
|
||||
import Component from 'base-component'
|
||||
import Icon from 'icon'
|
||||
import Link from 'link'
|
||||
@ -8,7 +7,6 @@ import SortedTable from 'sorted-table'
|
||||
import { injectIntl } from 'react-intl'
|
||||
import { SelectPool } from 'select-objects'
|
||||
import { connectStore, resolveIds } from 'utils'
|
||||
import { Card, CardBlock, CardHeader } from 'card'
|
||||
import { Col, Container, Row } from 'grid'
|
||||
import { flatMap, flatten, isEmpty, keys, some, toArray } from 'lodash'
|
||||
import {
|
||||
@ -45,14 +43,15 @@ export class TaskItem extends Component {
|
||||
|
||||
return (
|
||||
<div>
|
||||
{task.name_label} ({task.name_description &&
|
||||
`${task.name_description} `}on{' '}
|
||||
{task.name_label} (
|
||||
{task.name_description && `${task.name_description} `}
|
||||
on{' '}
|
||||
{host ? (
|
||||
<Link to={`/hosts/${host.id}`}>{host.name_label}</Link>
|
||||
) : (
|
||||
`unknown host − ${task.$host}`
|
||||
)})
|
||||
{' ' + Math.round(task.progress * 100)}%
|
||||
)}
|
||||
){' ' + Math.round(task.progress * 100)}%
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -163,27 +162,7 @@ export default class Tasks extends Component {
|
||||
|
||||
render () {
|
||||
const { props } = this
|
||||
const { intl, nTasks, pendingTasksByPool, pools } = props
|
||||
|
||||
if (isEmpty(pendingTasksByPool)) {
|
||||
return (
|
||||
<Page header={HEADER} title='taskPage' formatTitle>
|
||||
<CenterPanel>
|
||||
<Card>
|
||||
<CardHeader>{_('noTasks')}</CardHeader>
|
||||
<CardBlock>
|
||||
<Row>
|
||||
<Col>
|
||||
<p className='text-muted'>{_('xsTasks')}</p>
|
||||
</Col>
|
||||
</Row>
|
||||
</CardBlock>
|
||||
</Card>
|
||||
</CenterPanel>
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
|
||||
const { intl, nTasks, pools } = props
|
||||
const { formatMessage } = intl
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user