oxidecomputer / console

Oxide Web Console
https://console-preview.oxide.computer
Mozilla Public License 2.0
137 stars 10 forks source link

Sort tables in descending date order #1209

Open benjaminleonard opened 2 years ago

benjaminleonard commented 2 years ago

Currently disks are returned in ascending date order, we might want to consider reversing this so most recent resources are listed first. Not sure if this behaviour is currently the same across all resources.

image
leftwo commented 2 years ago

I would think being able to sort by any of the columns as a requirement. The "most recent" is probably a reasonable default.

Even, sort by A then by B. :)

benjaminleonard commented 2 years ago

Sounds good. We have designs for table sorting:

image

@david-crespo @zephraph I see sort_by in the API, do we have what we need to implement this?

zephraph commented 2 years ago

I believe so? Will have to play with it.

david-crespo commented 2 years ago

We can only sort by name ascending or descending or ID ascending (descending ID isn't meaningful) right now. Oddly for things with NameSortMode (as opposed to NameOrIdSortMode) you can only sort by name ascending. Will look into that.

https://github.com/oxidecomputer/omicron/blob/74f3ca89af11b0ce6d9f9bd4b5bdcbeb04d1ba3e/openapi/nexus.json#L12137-L12174

leftwo commented 11 months ago

Came across this again.. I had 50 disks created and it took me a while to find the one I wanted. It would be great if one could sort by both created or recently updated, as I suspect someone who had more than 10 instances would want to see the instance they just updated being first on the list.

benjaminleonard commented 11 months ago

Blocked by #2343

elaine-oxide commented 3 months ago

Under Projects, I wish I could sort by "Created" date. It currently defaults to alphabetical by Name. image