kube-commander icon indicating copy to clipboard operation
kube-commander copied to clipboard

Feature: sort display by column

Open mozai opened this issue 5 years ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe. When viewing a list of Events, I must hold the "Last Seen" of each Event in my head and mentally rearrange events so I know whether a "FailedMount" happened before or after a "FailedScheduling"

Describe the solution you'd like Sort the lists in the right-hand panel by any single column, choosing ASCII sort unless all values are numbers. Hotkeys to move the sort-by column left or right, as per the '<' and '>' keys in /usr/bin/top.

Describe alternatives you've considered Copy-pasting the text displayed into a temporary text file, and sorting that textfile.

Additional context This may not work well for the "Last Seen" column if they are rendered internally as "4m12s" strings instead of "2020-09-21T04:13:00Z" timestamps or "1600675980" timestamps. kubectl get events -o yaml looks like they use timestamps.

How to determine if all values are numbers? kubernetes API probably ouputs yaml or JSON which would look like strings to us. Match against /^[-+.0-9e]+$/ ?

mozai avatar Sep 21 '20 19:09 mozai