resolve conflict
commit
013dcaa9ec
|
|
@ -47,7 +47,7 @@ K9s is available on Linux, macOS and Windows platforms.
|
||||||
|
|
||||||
* Binaries for Linux, Windows and Mac are available as tarballs in the [release](https://github.com/derailed/k9s/releases) page.
|
* Binaries for Linux, Windows and Mac are available as tarballs in the [release](https://github.com/derailed/k9s/releases) page.
|
||||||
|
|
||||||
* Via Homebrew for macOS or LinuxBrew for Linux
|
* Via [Homebrew](https://brew.sh/) for macOS or Linux
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
brew install k9s
|
brew install k9s
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ func (l *LogItem) Render(paint string, showTime bool, bb *bytes.Buffer) {
|
||||||
for i := len(l.Bytes[:index]); i < 30; i++ {
|
for i := len(l.Bytes[:index]); i < 30; i++ {
|
||||||
bb.WriteByte(' ')
|
bb.WriteByte(' ')
|
||||||
}
|
}
|
||||||
|
bb.WriteString("[-::]")
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.Pod != "" {
|
if l.Pod != "" {
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ func TestLogItemRender(t *testing.T) {
|
||||||
ShowTimestamp: true,
|
ShowTimestamp: true,
|
||||||
},
|
},
|
||||||
log: fmt.Sprintf("%s %s\n", "2018-12-14T10:36:43.326972-07:00", "Testing 1,2,3..."),
|
log: fmt.Sprintf("%s %s\n", "2018-12-14T10:36:43.326972-07:00", "Testing 1,2,3..."),
|
||||||
e: "[gray::b]2018-12-14T10:36:43.326972-07:00 [yellow::]fred [yellow::b]blee[-::-] Testing 1,2,3...\n",
|
e: "[gray::b]2018-12-14T10:36:43.326972-07:00 [-::][yellow::]fred [yellow::b]blee[-::-] Testing 1,2,3...\n",
|
||||||
},
|
},
|
||||||
"log-level": {
|
"log-level": {
|
||||||
opts: dao.LogOptions{
|
opts: dao.LogOptions{
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ func TestLogItemsRender(t *testing.T) {
|
||||||
Container: "blee",
|
Container: "blee",
|
||||||
ShowTimestamp: true,
|
ShowTimestamp: true,
|
||||||
},
|
},
|
||||||
e: "[gray::b]2018-12-14T10:36:43.326972-07:00 [teal::]fred [teal::b]blee[-::-] Testing 1,2,3...\n",
|
e: "[gray::b]2018-12-14T10:36:43.326972-07:00 [-::][teal::]fred [teal::b]blee[-::-] Testing 1,2,3...\n",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,32 +113,32 @@ func (l *LogIndicator) Refresh() {
|
||||||
|
|
||||||
if l.shouldDisplayAllContainers {
|
if l.shouldDisplayAllContainers {
|
||||||
if l.allContainers {
|
if l.allContainers {
|
||||||
l.indicator = append(l.indicator, "[::b]AllContainers:[limegreen::b]On[-::]"+spacer...)
|
l.indicator = append(l.indicator, "[::b]AllContainers:[limegreen::b]On[-::] "+spacer...)
|
||||||
} else {
|
} else {
|
||||||
l.indicator = append(l.indicator, "[::b]AllContainers:[gray::d]Off[-::]"+spacer...)
|
l.indicator = append(l.indicator, "[::b]AllContainers:[gray::d]Off[-::]"+spacer...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.AutoScroll() {
|
if l.AutoScroll() {
|
||||||
l.indicator = append(l.indicator, "[::b]Autoscroll:[limegreen::b]On[-::]"+spacer...)
|
l.indicator = append(l.indicator, "[::b]Autoscroll:[limegreen::b]On[-::] "+spacer...)
|
||||||
} else {
|
} else {
|
||||||
l.indicator = append(l.indicator, "[::b]Autoscroll:[gray::d]Off[-::]"+spacer...)
|
l.indicator = append(l.indicator, "[::b]Autoscroll:[gray::d]Off[-::]"+spacer...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.FullScreen() {
|
if l.FullScreen() {
|
||||||
l.indicator = append(l.indicator, "[::b]FullScreen:[limegreen::b]On[-::]"+spacer...)
|
l.indicator = append(l.indicator, "[::b]FullScreen:[limegreen::b]On[-::] "+spacer...)
|
||||||
} else {
|
} else {
|
||||||
l.indicator = append(l.indicator, "[::b]FullScreen:[gray::d]Off[-::]"+spacer...)
|
l.indicator = append(l.indicator, "[::b]FullScreen:[gray::d]Off[-::]"+spacer...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.Timestamp() {
|
if l.Timestamp() {
|
||||||
l.indicator = append(l.indicator, "[::b]Timestamps:[limegreen::b]On[-::]"+spacer...)
|
l.indicator = append(l.indicator, "[::b]Timestamps:[limegreen::b]On[-::] "+spacer...)
|
||||||
} else {
|
} else {
|
||||||
l.indicator = append(l.indicator, "[::b]Timestamps:[gray::d]Off[-::]"+spacer...)
|
l.indicator = append(l.indicator, "[::b]Timestamps:[gray::d]Off[-::]"+spacer...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.TextWrap() {
|
if l.TextWrap() {
|
||||||
l.indicator = append(l.indicator, "[::b]Wrap:[limegreen::b]On[-::]"...)
|
l.indicator = append(l.indicator, "[::b]Wrap:[limegreen::b]On[-::] "...)
|
||||||
} else {
|
} else {
|
||||||
l.indicator = append(l.indicator, "[::b]Wrap:[gray::d]Off[-::]"...)
|
l.indicator = append(l.indicator, "[::b]Wrap:[gray::d]Off[-::]"...)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ func TestLogIndicatorRefresh(t *testing.T) {
|
||||||
e string
|
e string
|
||||||
}{
|
}{
|
||||||
"all-containers": {
|
"all-containers": {
|
||||||
view.NewLogIndicator(config.NewConfig(nil), defaults, true), "[::b]AllContainers:[gray::d]Off[-::] [::b]Autoscroll:[limegreen::b]On[-::] [::b]FullScreen:[gray::d]Off[-::] [::b]Timestamps:[gray::d]Off[-::] [::b]Wrap:[gray::d]Off[-::]\n",
|
view.NewLogIndicator(config.NewConfig(nil), defaults, true), "[::b]AllContainers:[gray::d]Off[-::] [::b]Autoscroll:[limegreen::b]On[-::] [::b]FullScreen:[gray::d]Off[-::] [::b]Timestamps:[gray::d]Off[-::] [::b]Wrap:[gray::d]Off[-::]\n",
|
||||||
},
|
},
|
||||||
"plain": {
|
"plain": {
|
||||||
view.NewLogIndicator(config.NewConfig(nil), defaults, false), "[::b]Autoscroll:[limegreen::b]On[-::] [::b]FullScreen:[gray::d]Off[-::] [::b]Timestamps:[gray::d]Off[-::] [::b]Wrap:[gray::d]Off[-::]\n",
|
view.NewLogIndicator(config.NewConfig(nil), defaults, false), "[::b]Autoscroll:[limegreen::b]On[-::] [::b]FullScreen:[gray::d]Off[-::] [::b]Timestamps:[gray::d]Off[-::] [::b]Wrap:[gray::d]Off[-::]\n",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue