SaaShup / netbox-docker-agent

Agent for Netbox Docker Plugin
https://saashup.com
BSD 3-Clause "New" or "Revised" License
30 stars 1 forks source link

✨ add logs api #96

Closed lvenier closed 2 months ago

lvenier commented 2 months ago

Feature to expose container logs though the api. Needed to implement Plugin issue https://github.com/SaaShup/netbox-docker-plugin/issues/98

[X] Add new endpoint in the API [X] Add Ui fetch logs and display

UI example : image

linkdd commented 2 months ago

I just tested, and I see 2 issues:

Therefore, there is no way of simulating docker logs -f.

I don't see the second point as blocking for now. The plugin could then implement an API view /containers/{id}/logs/ that proxy the request to the agent and returns the data, so that we could load it in the UI with HTMX and have it autoreload every 5s or so.

linkdd commented 2 months ago

Actually, third point. Why is it a PUT request?