Wire all dashboard buttons: auth downloads, get_log feedback, action tests.
This commit is contained in:
@@ -254,6 +254,11 @@ func (c *AgentClient) handleCommand(action string, tailLines int, command, path,
|
||||
"lines": tailLines,
|
||||
})
|
||||
_ = c.write(Message{Type: "log_tail", Payload: payload})
|
||||
preview := content
|
||||
if len(preview) > 12000 {
|
||||
preview = preview[len(preview)-12000:]
|
||||
}
|
||||
c.sendCommandResult(action, true, preview)
|
||||
case "exec":
|
||||
if command == "" {
|
||||
c.sendCommandResult(action, false, "no command provided")
|
||||
|
||||
Reference in New Issue
Block a user