cleanup and bug fixes

mine
derailed 2019-04-18 19:12:06 -06:00
parent 3965b2d449
commit 242d97956b
5 changed files with 54 additions and 5 deletions

View File

@ -80,4 +80,11 @@ snapcraft:
confinement: strict confinement: strict
apps: apps:
k9s: k9s:
plugs: ["home", "network"] plugs: ["home", "network", "personal-files"]
plugs:
personal-files:
read:
- $HOME/.k9s
- $HOME/.kube
write:
- $HOME/.k9s

View File

@ -0,0 +1,29 @@
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s_small.png" align="right" width="200" height="auto"/>
# Release v0.5.1
## Notes
Thank you to all that contributed with flushing out issues with K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes!
If you've filed an issue please help me verify and close.
Thank you so much for your support and awesome suggestions to make K9s better!!
Also if you dig this tool, please make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer)
---
## Change Logs
Minor code cleanup and some display bug fixes.
---
## Resolved Bugs
+ [Issue #168](https://github.com/derailed/k9s/issues/168)
---
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2019 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

View File

@ -46,6 +46,11 @@ func newPodView(t string, app *appView, list resource.List) resourceViewer {
} }
func (v *podView) listContainers(app *appView, _, res, sel string) { func (v *podView) listContainers(app *appView, _, res, sel string) {
if !v.rowSelected() {
return
}
log.Debug().Msgf("Selected %s", sel)
ns, n := namespaced(sel) ns, n := namespaced(sel)
po, err := app.conn().DialOrDie().CoreV1().Pods(ns).Get(n, metav1.GetOptions{}) po, err := app.conn().DialOrDie().CoreV1().Pods(ns).Get(n, metav1.GetOptions{})
if err != nil { if err != nil {

View File

@ -149,7 +149,12 @@ func (v *resourceView) setDecorateFn(f decorateFn) {
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Actions... // Actions...
func (v *resourceView) enterCmd(*tcell.EventKey) *tcell.EventKey { func (v *resourceView) enterCmd(evt *tcell.EventKey) *tcell.EventKey {
// If in command mode run filter otherwise enter function.
if v.getTV().filterCmd(evt) == nil {
return nil
}
if v.enterFn != nil { if v.enterFn != nil {
v.enterFn(v.app, v.list.GetNamespace(), v.list.GetName(), v.selectedItem) v.enterFn(v.app, v.list.GetNamespace(), v.list.GetName(), v.selectedItem)
} else { } else {

View File

@ -136,10 +136,13 @@ func (v *tableView) pageDownCmd(evt *tcell.EventKey) *tcell.EventKey {
} }
func (v *tableView) filterCmd(evt *tcell.EventKey) *tcell.EventKey { func (v *tableView) filterCmd(evt *tcell.EventKey) *tcell.EventKey {
if v.cmdBuff.isActive() {
v.cmdBuff.setActive(false) v.cmdBuff.setActive(false)
v.refresh() v.refresh()
return nil return nil
}
return evt
} }
func (v *tableView) eraseCmd(evt *tcell.EventKey) *tcell.EventKey { func (v *tableView) eraseCmd(evt *tcell.EventKey) *tcell.EventKey {