update sorters

mine
derailed 2019-12-30 12:49:12 -07:00
parent 3d128d42e0
commit b114de6bf1
4 changed files with 8 additions and 4 deletions

View File

@ -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),
})
}

View File

@ -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),
})
}

View File

@ -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),
})
}

View File

@ -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),
})
}