feat(xo-web/home/pool): show # of *unique* available patches (#3483)
Fixes #3321
This commit is contained in:
parent
fc1dd3ce09
commit
efdbc18a0a
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
- [Host/Networks] Remove "Add network" button [#3386](https://github.com/vatesfr/xen-orchestra/issues/3386) (PR [#3478](https://github.com/vatesfr/xen-orchestra/pull/3478))
|
- [Host/Networks] Remove "Add network" button [#3386](https://github.com/vatesfr/xen-orchestra/issues/3386) (PR [#3478](https://github.com/vatesfr/xen-orchestra/pull/3478))
|
||||||
- [Host/networks] Private networks table [#3387](https://github.com/vatesfr/xen-orchestra/issues/3387) (PR [#3481](https://github.com/vatesfr/xen-orchestra/pull/3481))
|
- [Host/networks] Private networks table [#3387](https://github.com/vatesfr/xen-orchestra/issues/3387) (PR [#3481](https://github.com/vatesfr/xen-orchestra/pull/3481))
|
||||||
|
- [Home/pool] Patch count pill now shows the number of unique patches in the pool [#3321](https://github.com/vatesfr/xen-orchestra/issues/3321) (PR [#3483](https://github.com/vatesfr/xen-orchestra/pull/3483))
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
import _ from 'intl'
|
import _ from 'intl'
|
||||||
import Component from 'base-component'
|
import Component from 'base-component'
|
||||||
import Ellipsis, { EllipsisContainer } from 'ellipsis'
|
import Ellipsis, { EllipsisContainer } from 'ellipsis'
|
||||||
import flatMap from 'lodash/flatMap'
|
|
||||||
import Icon from 'icon'
|
import Icon from 'icon'
|
||||||
import map from 'lodash/map'
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import SingleLineRow from 'single-line-row'
|
import SingleLineRow from 'single-line-row'
|
||||||
import size from 'lodash/size'
|
|
||||||
import HomeTags from 'home-tags'
|
import HomeTags from 'home-tags'
|
||||||
import Tooltip from 'tooltip'
|
import Tooltip from 'tooltip'
|
||||||
import Link, { BlockLink } from 'link'
|
import Link, { BlockLink } from 'link'
|
||||||
@ -14,6 +11,7 @@ import { Col } from 'grid'
|
|||||||
import { Text } from 'editable'
|
import { Text } from 'editable'
|
||||||
import { addTag, editPool, getHostMissingPatches, removeTag } from 'xo'
|
import { addTag, editPool, getHostMissingPatches, removeTag } from 'xo'
|
||||||
import { connectStore, formatSizeShort } from 'utils'
|
import { connectStore, formatSizeShort } from 'utils'
|
||||||
|
import { flatten, map, size, uniq } from 'lodash'
|
||||||
import {
|
import {
|
||||||
createGetObjectsOfType,
|
createGetObjectsOfType,
|
||||||
createGetHostMetrics,
|
createGetHostMetrics,
|
||||||
@ -32,7 +30,7 @@ import styles from './index.css'
|
|||||||
|
|
||||||
const getMissingPatches = createSelector(getPoolHosts, hosts => {
|
const getMissingPatches = createSelector(getPoolHosts, hosts => {
|
||||||
return Promise.all(map(hosts, host => getHostMissingPatches(host))).then(
|
return Promise.all(map(hosts, host => getHostMissingPatches(host))).then(
|
||||||
patches => flatMap(patches)
|
patches => uniq(map(flatten(patches), 'name'))
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user