vatesfr/xen-orchestra

Sort VM lists by `install-time`

ydirson opened this issue · 4 comments

Is your feature request related to a problem? Please describe.

With a large number of powered-off VMs (e.g. VMs used as cache for xcp-ng-tests), it is hard to find out old ones to clean them up. The only time-based sorting is by start-time, but that one is usually 0 for powered-off VMs, so there is no easy way to do that sorting.

Also, that 0 value means that sorting by start-time will always list (uninteresting) powered-off VMs before the (interesting) powered-on ones.

Describe the solution you'd like

Sorting on the install-time field would likely be of general usefulness.

I note there is still ~5% of VMs with a 0 install-time on xolab (not sure yet what that means) so although it would be very useful for my use case, it's not a silver bullet for all use cases.

Describe alternatives you've considered
Only alternative seems to go scripting the API.

For the moment there is no possibility to sort by ascending or descending in the UI, what is your preference about that?
Also, some VMs have a null installTime, what should we do about these?

I don't really have a preference on order. Maybe it will be more useful to sort by descending order, which would also naturally sort nulls at the end?

After testing, when sorting by desc, the nulls are weirdly at the beggining. Should we do something about this?

Functionally speaking it would be better to have the "non interesting values" (ie null) at the end.