From b114de6bf193653cd6a63b8bfcc45c4f15588682 Mon Sep 17 00:00:00 2001 From: derailed Date: Mon, 30 Dec 2019 12:49:12 -0700 Subject: [PATCH] update sorters --- internal/view/dp.go | 5 +++-- internal/view/ds.go | 3 +++ internal/view/rs.go | 1 + internal/view/sts.go | 3 +-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/internal/view/dp.go b/internal/view/dp.go index ec6f169f..8f523474 100644 --- a/internal/view/dp.go +++ b/internal/view/dp.go @@ -36,8 +36,9 @@ func NewDeploy(gvr client.GVR) ResourceViewer { func (d *Deploy) bindKeys(aa ui.KeyActions) { aa.Add(ui.KeyActions{ - ui.KeyShiftD: ui.NewKeyAction("Sort Desired", d.GetTable().SortColCmd(1, true), false), - ui.KeyShiftC: ui.NewKeyAction("Sort Current", d.GetTable().SortColCmd(2, true), false), + ui.KeyShiftR: ui.NewKeyAction("Sort Ready", d.GetTable().SortColCmd(1, true), false), + ui.KeyShiftU: ui.NewKeyAction("Sort UpToDate", d.GetTable().SortColCmd(2, true), false), + ui.KeyShiftV: ui.NewKeyAction("Sort Available", d.GetTable().SortColCmd(3, true), false), }) } diff --git a/internal/view/ds.go b/internal/view/ds.go index ad48890e..a251babc 100644 --- a/internal/view/ds.go +++ b/internal/view/ds.go @@ -33,6 +33,9 @@ func (d *DaemonSet) bindKeys(aa ui.KeyActions) { aa.Add(ui.KeyActions{ ui.KeyShiftD: ui.NewKeyAction("Sort Desired", d.GetTable().SortColCmd(1, true), false), ui.KeyShiftC: ui.NewKeyAction("Sort Current", d.GetTable().SortColCmd(2, true), false), + ui.KeyShiftR: ui.NewKeyAction("Sort Ready", d.GetTable().SortColCmd(3, true), false), + ui.KeyShiftU: ui.NewKeyAction("Sort UpToDate", d.GetTable().SortColCmd(4, true), false), + ui.KeyShiftV: ui.NewKeyAction("Sort Available", d.GetTable().SortColCmd(5, true), false), }) } diff --git a/internal/view/rs.go b/internal/view/rs.go index 5273a659..7b2582d7 100644 --- a/internal/view/rs.go +++ b/internal/view/rs.go @@ -43,6 +43,7 @@ func (r *ReplicaSet) bindKeys() { r.Actions().Add(ui.KeyActions{ ui.KeyShiftD: ui.NewKeyAction("Sort Desired", r.GetTable().SortColCmd(1, true), false), ui.KeyShiftC: ui.NewKeyAction("Sort Current", r.GetTable().SortColCmd(2, true), false), + ui.KeyShiftR: ui.NewKeyAction("Sort Ready", r.GetTable().SortColCmd(3, true), false), tcell.KeyCtrlB: ui.NewKeyAction("Rollback", r.rollbackCmd, true), }) } diff --git a/internal/view/sts.go b/internal/view/sts.go index 13842ade..43540586 100644 --- a/internal/view/sts.go +++ b/internal/view/sts.go @@ -35,8 +35,7 @@ func NewStatefulSet(gvr client.GVR) ResourceViewer { func (s *StatefulSet) bindKeys(aa ui.KeyActions) { aa.Add(ui.KeyActions{ - ui.KeyShiftD: ui.NewKeyAction("Sort Desired", s.GetTable().SortColCmd(1, true), false), - ui.KeyShiftC: ui.NewKeyAction("Sort Current", s.GetTable().SortColCmd(2, true), false), + ui.KeyShiftR: ui.NewKeyAction("Sort Ready", s.GetTable().SortColCmd(1, true), false), }) }