Merge pull request #217 from tomerf/sort_node_percent

Added sort node by cpu and mem percentage
mine
Fernand Galiana 2019-06-07 15:43:40 -06:00 committed by GitHub
commit 20259c4d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,8 @@ func newNodeView(t string, app *appView, list resource.List) resourceViewer {
func (v *nodeView) extraActions(aa keyActions) {
aa[KeyShiftC] = newKeyAction("Sort CPU", v.sortColCmd(7, false), true)
aa[KeyShiftM] = newKeyAction("Sort MEM", v.sortColCmd(8, false), true)
aa[KeyAltC] = newKeyAction("Sort CPU%", v.sortColCmd(9, false), true)
aa[KeyAltM] = newKeyAction("Sort MEM%", v.sortColCmd(10, false), true)
}
func (v *nodeView) sortColCmd(col int, asc bool) func(evt *tcell.EventKey) *tcell.EventKey {