derailed / k9s

🐶 Kubernetes CLI To Manage Your Clusters In Style!
https://k9scli.io
Apache License 2.0
27.53k stars 1.73k forks source link

Some way to switch between multiple views that can display different data #351

Open syvanpera opened 5 years ago

syvanpera commented 5 years ago




Is your feature request related to a problem? Please describe. I quite often have the need to look at two different places at the same time. For example watching the logs of a pod while I trigger a cronjob.

Describe the solution you'd like Ideally it would be great to be able to open in essence multiple tabs, which all can display different views. One could be watching a log and another could be displaying the list of pods etc. Inspiration could be gotten from for example the ranger file manager, which allows you to open multiple tabs, displaying different folders (the shortcut by default is comma- where n is the number of the tab).

Describe alternatives you've considered Another approach could be allowing you to "send a view to the background". This would only allow for example two views. You could be watching a log and then "send it to background" and switch to pod view and then do something and after that switch back to the log you were watching earlier.

Additional context I suppose the tview pages could work with this? Any other suggestions?

syvanpera commented 5 years ago

Hmm, or maybe the breadcrumb at the bottom could be used for this somehow? Looking at a log doesn't currently seem to make a breadcrumb entry, but I guess it could. The breadcrumbs could have a number associated with them and some shortcut (like for example the ranger example above, comma - number) could be used to jump between the views you have in the breadcrumbs.

By the way, what are the breadcrumbs even used for? I haven't found any use for them, they just seem to pile up as you navigate the program and they don't seem to have any function as such.

syvanpera commented 5 years ago

Actually, the absolute best solution for this might be that you could split the view into two views and use two different panes simultaneously. But this would require quite a bit more work to implement.

paivagustavo commented 5 years ago

Hey @syvanpera, thanks for this suggestion. That is an awesome feature request. I see myself doing the same thing as you described.

One of my coworkers just use terminator with multiple sessions of headless k9s to achieve something similar. Although that would be sub-optimal, that actually very well.

To support this inside k9s we would need to think and refactor a lot of the code base. We should probably start to think if this is possible and see how to get there.

syvanpera commented 5 years ago

Yeah, I'm using tmux myself and that works. And yes, I realize that this will be quite a bit of work. Just wanted to get this out there.

kiwi-oss commented 1 year ago

I agree that splitting the view would be most helpful. Alternatively, a command to go to the last view (like Vim's :b#) would already be useful and probably easier to implement.

tshirtman commented 9 months ago

I was also thinking about that, but it might run into the same "issues" as other multiplexers or window managers, in particular, how do you switch the view when you are in a terminal inside a workload (s), vim uses ^W to escape in such case, so you can move around just like gnu-screen and tmux use ^A or ^B, k9s would need to make a similar choice. For now it’s certainly easier not to reinvent the wheel, and just always run it in one of the existing multiplexers.

KevinGimbel commented 3 months ago

My 2ct: Use a terminal with split-screen and multiple k9s instances

Implementing Tabs is a lot of work and may introduce new issues along the way, using two terminals or a terminal with split-views (iTerm2, WezTerm, Konsole, ...) is the better solution IMHO.