From a55963606b0e50cf3387c735da3647f51916fa02 Mon Sep 17 00:00:00 2001 From: derailed Date: Wed, 23 Oct 2019 13:15:22 -0400 Subject: [PATCH] Fix issues #380 #381 --- README.md | 6 ++++++ internal/views/dp.go | 4 ++-- internal/views/ds.go | 4 ++-- internal/views/rs.go | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7a29f0cc..a0711733 100644 --- a/README.md +++ b/README.md @@ -378,6 +378,12 @@ roleRef: You can style K9s based on your own sense of style and look. This is very much an experimental feature at this time, more will be added/modified if this feature has legs so thread accordingly! +By default a K9s view displays resource information using the following coloring scheme: + +1. Blue - All good. +1. Orange/Red - Represents a potential issue with the resource ie a pod is not in a running state. +1. Green - Indicates a row has changed. A change delta indicator indicates which column changed. + Skins are YAML files, that enable a user to change K9s presentation layer. K9s skins are loaded from `$HOME/.k9s/skin.yml`. If a skin file is detected then the skin would be loaded if not the current stock skin remains in effect. Below is a sample skin file, more skins would be available in the skins directory, just simply copy any of these in your user's home dir as `skin.yml`. diff --git a/internal/views/dp.go b/internal/views/dp.go index 8c5c50f8..51448c8d 100644 --- a/internal/views/dp.go +++ b/internal/views/dp.go @@ -33,8 +33,8 @@ func (v *deployView) extraActions(aa ui.KeyActions) { v.logResourceView.extraActions(aa) v.scalableResourceView.extraActions(aa) v.restartableResourceView.extraActions(aa) - aa[ui.KeyShiftD] = ui.NewKeyAction("Sort Desired", v.sortColCmd(2, false), false) - aa[ui.KeyShiftC] = ui.NewKeyAction("Sort Current", v.sortColCmd(3, false), false) + aa[ui.KeyShiftD] = ui.NewKeyAction("Sort Desired", v.sortColCmd(1, false), false) + aa[ui.KeyShiftC] = ui.NewKeyAction("Sort Current", v.sortColCmd(2, false), false) } func (v *deployView) showPods(app *appView, _, res, sel string) { diff --git a/internal/views/ds.go b/internal/views/ds.go index b77c5338..76263250 100644 --- a/internal/views/ds.go +++ b/internal/views/ds.go @@ -28,8 +28,8 @@ func newDaemonSetView(title, gvr string, app *appView, list resource.List) resou func (v *daemonSetView) extraActions(aa ui.KeyActions) { v.logResourceView.extraActions(aa) v.restartableResourceView.extraActions(aa) - aa[ui.KeyShiftD] = ui.NewKeyAction("Sort Desired", v.sortColCmd(2, false), false) - aa[ui.KeyShiftC] = ui.NewKeyAction("Sort Current", v.sortColCmd(3, false), false) + aa[ui.KeyShiftD] = ui.NewKeyAction("Sort Desired", v.sortColCmd(1, false), false) + aa[ui.KeyShiftC] = ui.NewKeyAction("Sort Current", v.sortColCmd(2, false), false) } func (v *daemonSetView) showPods(app *appView, _, res, sel string) { diff --git a/internal/views/rs.go b/internal/views/rs.go index 40565dea..fbca0e24 100644 --- a/internal/views/rs.go +++ b/internal/views/rs.go @@ -32,8 +32,8 @@ func newReplicaSetView(title, gvr string, app *appView, list resource.List) reso } func (v *replicaSetView) extraActions(aa ui.KeyActions) { - aa[ui.KeyShiftD] = ui.NewKeyAction("Sort Desired", v.sortColCmd(2, false), false) - aa[ui.KeyShiftC] = ui.NewKeyAction("Sort Current", v.sortColCmd(3, false), false) + aa[ui.KeyShiftD] = ui.NewKeyAction("Sort Desired", v.sortColCmd(1, false), false) + aa[ui.KeyShiftC] = ui.NewKeyAction("Sort Current", v.sortColCmd(2, false), false) aa[tcell.KeyCtrlB] = ui.NewKeyAction("Rollback", v.rollbackCmd, true) }