netbox-docker-plugin
netbox-docker-plugin copied to clipboard
:children_crossing: Add xtermjs terminal to `Exec` tab in container view
| Netbox version | Plugin Version | Agent version | Docker API Version |
|---|---|---|---|
| 3.6.* & 4.* | 1.* & 2.* | 0.35.* | * |
Actual Behavior
The Exec tab is built around a text input which sends the command to the agent and then display the logs in a div bellow.
The user experience is not that great.
Desired Behavior
Using https://xtermjs.org, we could improve the user experience by providing a fake terminal. For a first iteration, we could have a fake prompt that sends the command to the agent just like now, for a future update (when the agent supports forwarding the pty), we could attach a real shell to the fake terminal.
There is initiative around Docker and Websocket that can be usefull to consult about the subjet of this issue:
- Attach a container via WS https://docs.docker.com/reference/api/engine/version/v1.46/#tag/Container/operation/ContainerAttach
- some lib for implementation example (server (obsolete) and client)
- https://github.com/taskcluster/docker-exec-websocket-server
- https://github.com/taskcluster/docker-exec-websocket-client