You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interactive table sorting, trimming, and filtering (#152)
* implemented filtering
* styled filter text input
* fixed bug with filtering and then going to verbose view
* fixed bug with expanding with no rows selected
* working trim feature
* fixed trim while filtering bug
* moved sorting shorthands to sorter.go
* created sorting view (Non fuctional)
* fixed row selection toggle
* added sorting by json path
* added sorting by shorthand values
* added sort direction toggle
* updated third party licenses
* moved all sorting constants to sorter.go
* removed unecessary print in sortingView view()
* renamed initSortingView to initSortingModel
* use 'esc' instead of 'e' to exit verbose view
* Added interactive output demo to readme
Co-authored-by: Rodrigo Okamoto <rodocp@amazon.com>
cli.ConfigStringOptionsFlag(sortDirection, nil, cli.StringMe(sortAscending), fmt.Sprintf("Specify the direction to sort in (%s)", strings.Join(cliSortDirections, ", ")), cliSortDirections)
226
+
cli.ConfigStringOptionsFlag(sortDirection, nil, cli.StringMe(sorter.SortAscending), fmt.Sprintf("Specify the direction to sort in (%s)", strings.Join(cliSortDirections, ", ")), cliSortDirections)
267
227
cli.ConfigStringFlag(sortBy, nil, cli.StringMe(instanceNamePath), "Specify the field to sort by. Quantity flags present in this CLI (memory, gpus, etc.) or a JSON path to the appropriate instance type field (Ex: \".MemoryInfo.SizeInMiB\") is acceptable.", nil)
268
228
269
229
// Parses the user input with the registered flags and runs type specific validation on the user input
@@ -419,11 +379,6 @@ Full docs can be found at github.com/aws/amazon-` + binName
419
379
}
420
380
}
421
381
422
-
// determine if user used a shorthand for sorting flag
423
-
ifsortFieldShorthandPath, ok:=sortingKeysMap[*sortField]; ok {
424
-
sortField=&sortFieldShorthandPath
425
-
}
426
-
427
382
// fetch instance types without truncating results
0 commit comments