fix(cluster): show the error text when a remote node is unreachable

Three call sites passed the error into the details slot and left content
empty, so the notification rendered with a blank body: the UI does
$gettext(item.content) and vue3-gettext returns "" for an empty msgid,
and the external notifier returns Content directly when Details is not a
map. The reason was discarded at every layer.

These are the transport-failure paths, which is exactly when a cluster
operator needs the message. The 17 other notification.Error call sites
already pass err.Error() as content.
This commit is contained in:
VXNCXNX
2026-08-14 16:32:17 +00:00
parent 1833832d75
commit a8a175f841
2 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ func syncReload(nodeIDs []uint64) {
resp, err := client.R().
Post("/api/nginx/reload")
if err != nil {
notification.Error("Reload Remote Nginx Error", "", err.Error())
notification.Error("Reload Remote Nginx Error", err.Error(), nil)
return
}
if resp.StatusCode() != http.StatusOK {
@@ -102,7 +102,7 @@ func syncRestart(nodeIDs []uint64) {
resp, err := client.R().
Post("/api/nginx/restart")
if err != nil {
notification.Error("Restart Remote Nginx Error", "", err.Error())
notification.Error("Restart Remote Nginx Error", err.Error(), nil)
return
}
if resp.StatusCode() != http.StatusOK {

View File

@@ -84,7 +84,7 @@ func syncDisable(name string) {
resp, err := client.R().
Post(fmt.Sprintf("/api/sites/%s/disable", name))
if err != nil {
notification.Error("Disable Remote Site Error", "", err.Error())
notification.Error("Disable Remote Site Error", err.Error(), nil)
return
}
if resp.StatusCode() != http.StatusOK {