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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user