feat(xo-web/self): order resource sets by name (#3507)
Fixes support#984.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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),
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user