netbox-docker-plugin icon indicating copy to clipboard operation
netbox-docker-plugin copied to clipboard

:children_crossing: Add xtermjs terminal to `Exec` tab in container view

Open linkdd opened this issue 1 year ago • 1 comments

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.

linkdd avatar Oct 04 '24 09:10 linkdd

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

fanshan avatar Oct 04 '24 09:10 fanshan