From 427e3cfb348073f248131af833a383a255eb2500 Mon Sep 17 00:00:00 2001 From: NHAS Date: Tue, 30 Apr 2024 22:11:36 +1200 Subject: [PATCH] Add better UI for accepting errors --- ui/src/js/events.js | 2 +- ui/templates/cluster/events.html | 83 +++++++++++++++----------------- 2 files changed, 39 insertions(+), 46 deletions(-) diff --git a/ui/src/js/events.js b/ui/src/js/events.js index 220dcde4..b54552fd 100755 --- a/ui/src/js/events.js +++ b/ui/src/js/events.js @@ -33,7 +33,7 @@ acknowledgementButtons.forEach(el => el.addEventListener('click', event => { response.text().then(txt => { - event.target.parentNode.parentNode.remove() + window.location.reload() Toastify({ text: txt, diff --git a/ui/templates/cluster/events.html b/ui/templates/cluster/events.html index 028603ea..07980ec6 100755 --- a/ui/templates/cluster/events.html +++ b/ui/templates/cluster/events.html @@ -3,68 +3,61 @@
-
+
-
+

Events

-
-

- Cluster events, records the last 40 cluster events -

-
+

Cluster events, records the last 40 cluster events

-
- - - {{range $line := .EventLog}} - - - - {{else}} - - - - {{end}} - -
{{$line}}
No Recent Events
-
+ + {{range $line := .EventLog}} + {{$line}}
+ {{else}} + No Recent Events + {{end}} +
-
+ {{if .Errors}} +
+ {{range .Errors}}
-

Errors

-
-

- Errors reported by cluster members. -

-
+
{{.NodeID}}
+

{{if .Time}}{{.Time.Format "02 Jan 06 15:04 MST"}}{{end}}

-
- - - {{range $line := .Errors}} - - - - - {{else}} - - - - {{end}} - -
{{.NodeID}} {{.FailedEventData}} {{.Error}}
No Errors
+
+
+ Error: +
+
+ {{.Error}} +
+
+
+
+ Event Data: +
+
+ {{.FailedEventData}} +
+
+
+ +
+
+
+ {{end}}
+ {{end}}