Merge pull request #897 from tlipinski/aliases-colorer
Use DefaultColorer for aliases renderingmine
commit
e752cc1433
|
|
@ -5,7 +5,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/gdamore/tcell"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
@ -15,9 +14,7 @@ type Alias struct{}
|
|||
|
||||
// ColorerFunc colors a resource row.
|
||||
func (Alias) ColorerFunc() ColorerFunc {
|
||||
return func(ns string, _ Header, re RowEvent) tcell.Color {
|
||||
return tcell.ColorAliceBlue
|
||||
}
|
||||
return DefaultColorer
|
||||
}
|
||||
|
||||
// Header returns a header row.
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@ func TestAliasColorer(t *testing.T) {
|
|||
"addAll": {
|
||||
ns: client.AllNamespaces,
|
||||
re: render.RowEvent{Kind: render.EventAdd, Row: r},
|
||||
e: tcell.ColorAliceBlue},
|
||||
e: tcell.ColorBlue},
|
||||
"deleteAll": {
|
||||
ns: client.AllNamespaces,
|
||||
re: render.RowEvent{Kind: render.EventDelete, Row: r},
|
||||
e: tcell.ColorAliceBlue},
|
||||
e: tcell.ColorGray},
|
||||
"updateAll": {
|
||||
ns: client.AllNamespaces,
|
||||
re: render.RowEvent{Kind: render.EventUpdate, Row: r},
|
||||
e: tcell.ColorAliceBlue,
|
||||
e: tcell.ColorBlack,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue