feat(xo-web/self): order resource sets by name (#3507)

Fixes support#984.
This commit is contained in:
Julien Fontanet
2018-10-09 16:38:06 +02:00
committed by GitHub
parent 36a5e3c2ab
commit c5aabbadc2
2 changed files with 4 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
### Enhancements
- [Usage Report] Add IOPS read/write/total per VM [#3309](https://github.com/vatesfr/xen-orchestra/issues/3309) (PR [#3455](https://github.com/vatesfr/xen-orchestra/pull/3455))
- [Self service] Sort resource sets by name (PR [#3507](https://github.com/vatesfr/xen-orchestra/pull/3507))
### Bug fixes

View File

@@ -694,6 +694,8 @@ class ResourceSet extends Component {
// ===================================================================
const compareName = (a, b) => (a.name < b.name ? -1 : 1)
export default class Self extends Component {
constructor (props) {
super(props)
@@ -703,7 +705,7 @@ export default class Self extends Component {
componentWillMount () {
this.componentWillUnmount = subscribeResourceSets(resourceSets => {
this.setState({
resourceSets: resolveResourceSets(resourceSets),
resourceSets: resolveResourceSets(resourceSets).sort(compareName),
})
})
}