mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-21 08:39:03 +01:00
feat(proxmox): add journalctl endpoint without service; add limit parameter
Added new Proxmox journalctl endpoint `/journalctl/:node/:vmid` for viewing all journalctl output without requiring a service name. Made the service parameter optional across both endpoints. Introduced configurable `limit` query parameter (1-1000, default 100) to both proxmox journalctl and docker logs APIs, replacing hardcoded 100-line tail. Added container status check in LXCCommand to prevent command execution on stopped containers, returning a clear status message instead. Refactored route validation to use pre-fetched IPs and improved References() method for proxmox routes with better alias handling.
This commit is contained in:
@@ -146,6 +146,7 @@ func NewHandler(requireAuth bool) *gin.Engine {
|
||||
|
||||
proxmox := v1.Group("/proxmox")
|
||||
{
|
||||
proxmox.GET("/journalctl/:node/:vmid", proxmoxApi.Journalctl)
|
||||
proxmox.GET("/journalctl/:node/:vmid/:service", proxmoxApi.Journalctl)
|
||||
proxmox.GET("/stats/:node/:vmid", proxmoxApi.Stats)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user