CloudMigrations: Implement table sorting in the UI (#103061)

* implement sorting

* swagger gen

* minor fixes

* clean up param reading

* add todo

* add errors only prop

* codegen stuff

* fix copy paste error

* forgot the api gen

* implement sorting on the frontend

* remove unused enums

* cleanup

* remove tests that are obe

* fix merge

* change page length based on checked box

* cleanup

* fix test

* i18n-extract

* var name tweaks

* use switch and conditional rendering instead of checkbox

* i18n-extract

* use initial sort

* fix type

* fix layout

* fix bugs

* make betterer happy

* fix var names
This commit is contained in:
Michael Mandrus
2025-04-08 08:14:17 -04:00
committed by GitHub
parent eff8cf4144
commit 0fd7dfeb2a
7 changed files with 99 additions and 18 deletions
+4
View File
@@ -370,6 +370,10 @@ func (cma *CloudMigrationAPI) GetSnapshot(c *contextmodel.ReqContext) response.R
col := getQueryCol(c.Query("resultSortColumn"), cloudmigration.SortColumnID)
order := getQueryOrder(c.Query("resultSortOrder"), cloudmigration.SortOrderAsc)
errorsOnly := c.QueryBool("errorsOnly")
// Don't allow the user to reverse-sort by ID
if col == cloudmigration.SortColumnID && order == cloudmigration.SortOrderDesc {
order = cloudmigration.SortOrderAsc
}
q := cloudmigration.GetSnapshotsQuery{
SnapshotUID: snapshotUid,