Power: say why a BMC command failed (CLI, UI); certificate changes are events
Found in the lab test of certificate pinning: the CLI printed only 'ipmitool failed on 1 machine(s)'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9ab081aa5a
commit
d0ea29d2a9
4 files changed
+21
-5
No files matched your search
@@ -786,7 +786,11 @@ func (a *App) handlePower(w http.ResponseWriter, r *http.Request) {
|
||||
if action != "status" {
|
||||
_ = a.store.AddEvent(r.Context(), m.ID, "power "+action, out)
|
||||
}
|
||||
writeJSON(w, 200, obj{"id": m.ID, "action": action, "ok": err == nil, "output": out})
|
||||
res := obj{"id": m.ID, "action": action, "ok": err == nil, "output": out}
|
||||
if err != nil {
|
||||
res["error"] = err.Error()
|
||||
}
|
||||
writeJSON(w, 200, res)
|
||||
}
|
||||
|
||||
func (a *App) handleBootdev(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in new issue
Block a user