astefanutti / kubebox

⎈❏ Terminal and Web console for Kubernetes
http://astefanutti.github.io/kubebox
MIT License
2.14k stars 142 forks source link

add tab/shift tab to toggle between pods/logs and more ... #104

Closed frudolph77 closed 3 years ago

frudolph77 commented 3 years ago

Hello,

based on this pull request #80 i found a solution for my issue #98.

The benefit of this solution is that the screen.key ... function only gets bind once and the code gets only executed once. In #80 I've seen that the code from screen.key... is executed multiple times after switching between dashboard and debug view.

Kind regards Frank

frudolph77 commented 3 years ago

Thanks, for your comments on my code. As I said, I'm not firm with blessed, and JS is not my first programming language, so I'm always happy to get comments

frudolph77 commented 3 years ago

I think now it's nearly perfect, it's no longer needed to un-/rebind the key.

Just two small issue left, but they are not part of this change

  1. when leaving the dashboard and selecting it again the pod_table gets focused by default, it will maybe useful to stay on the last selected element. I've no clue how to solve this.
  2. autofocus the logs when a pod is selected (already on my local working tree, PR will follow)
astefanutti commented 3 years ago

Thanks a lot, that looks great! Let me merge this and iterate on the open points you've listed. Thanks again!