From 99e031c52977434d9c18dda2cef49913b0f950e1 Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Sat, 12 Aug 2023 14:57:55 +0200 Subject: [PATCH] (control) Remove broken pagination from events and message queue; new "light" events table for some views --- .../control/svc/EventLogService.java | 3 -- .../control/svc/MessageQueueService.java | 3 -- .../resources/templates/control/index.hdb | 4 +-- .../control/partials/events-table-summary.hdb | 23 ++++++++++++++ .../control/partials/events-table.hdb | 30 +++++++++++-------- .../control/partials/message-queue-table.hdb | 1 - .../templates/control/service-by-id.hdb | 2 +- 7 files changed, 44 insertions(+), 22 deletions(-) create mode 100644 code/services-core/control-service/src/main/resources/templates/control/partials/events-table-summary.hdb diff --git a/code/services-core/control-service/src/main/java/nu/marginalia/control/svc/EventLogService.java b/code/services-core/control-service/src/main/java/nu/marginalia/control/svc/EventLogService.java index 1b4729ee..ddbc1974 100644 --- a/code/services-core/control-service/src/main/java/nu/marginalia/control/svc/EventLogService.java +++ b/code/services-core/control-service/src/main/java/nu/marginalia/control/svc/EventLogService.java @@ -79,14 +79,11 @@ public class EventLogService { else next = ""; - Object prev = afterParam == null ? "" : afterParam; - return Map.of( "events", entries, "types", typeFilterList, "services", serviceFilterList, "next", next, - "prev", prev, "elFilter", elFilter); } diff --git a/code/services-core/control-service/src/main/java/nu/marginalia/control/svc/MessageQueueService.java b/code/services-core/control-service/src/main/java/nu/marginalia/control/svc/MessageQueueService.java index 1d74a5bf..b045cd48 100644 --- a/code/services-core/control-service/src/main/java/nu/marginalia/control/svc/MessageQueueService.java +++ b/code/services-core/control-service/src/main/java/nu/marginalia/control/svc/MessageQueueService.java @@ -64,11 +64,8 @@ public class MessageQueueService { else next = ""; - Object prev = afterParam == null ? "" : afterParam; - return Map.of("messages", entries, "next", next, - "prev", prev, "mqFilter", mqFilter); } diff --git a/code/services-core/control-service/src/main/resources/templates/control/index.hdb b/code/services-core/control-service/src/main/resources/templates/control/index.hdb index 43c189fd..46f39140 100644 --- a/code/services-core/control-service/src/main/resources/templates/control/index.hdb +++ b/code/services-core/control-service/src/main/resources/templates/control/index.hdb @@ -10,8 +10,8 @@
{{> control/partials/services-table }} {{> control/partials/processes-table}} - {{> control/partials/actors-table}} - {{> control/partials/events-table }} + {{> control/partials/actors-table }} + {{> control/partials/events-table-summary }}
diff --git a/code/services-core/control-service/src/main/resources/templates/control/partials/events-table-summary.hdb b/code/services-core/control-service/src/main/resources/templates/control/partials/events-table-summary.hdb new file mode 100644 index 00000000..68d66568 --- /dev/null +++ b/code/services-core/control-service/src/main/resources/templates/control/partials/events-table-summary.hdb @@ -0,0 +1,23 @@ +

Event Summary

+ + + + + + + + + + {{#each events}} + + + + + + + + {{/each}} +
Service NameInstanceEvent TimeTypeMessage
{{serviceName}} +    + {{instance}} + {{eventTime}}{{eventType}}{{eventMessage}}
\ No newline at end of file diff --git a/code/services-core/control-service/src/main/resources/templates/control/partials/events-table.hdb b/code/services-core/control-service/src/main/resources/templates/control/partials/events-table.hdb index d5b7604a..82a62de6 100644 --- a/code/services-core/control-service/src/main/resources/templates/control/partials/events-table.hdb +++ b/code/services-core/control-service/src/main/resources/templates/control/partials/events-table.hdb @@ -9,17 +9,24 @@ Message - -
- - - -
- + +
+ + + + + + + + + + +
+ {{#each events}} @@ -36,7 +43,6 @@ - {{#if prev}}Prev{{/if}} {{#if next}}Next{{/if}} diff --git a/code/services-core/control-service/src/main/resources/templates/control/partials/message-queue-table.hdb b/code/services-core/control-service/src/main/resources/templates/control/partials/message-queue-table.hdb index d71d0941..926d1670 100644 --- a/code/services-core/control-service/src/main/resources/templates/control/partials/message-queue-table.hdb +++ b/code/services-core/control-service/src/main/resources/templates/control/partials/message-queue-table.hdb @@ -45,7 +45,6 @@ - {{#if prev}}Prev{{/if}} {{#if next}}Next{{/if}} diff --git a/code/services-core/control-service/src/main/resources/templates/control/service-by-id.hdb b/code/services-core/control-service/src/main/resources/templates/control/service-by-id.hdb index f350ac5a..73cbb6d9 100644 --- a/code/services-core/control-service/src/main/resources/templates/control/service-by-id.hdb +++ b/code/services-core/control-service/src/main/resources/templates/control/service-by-id.hdb @@ -9,7 +9,7 @@ {{> control/partials/nav}}

Services/{{id}}

- {{> control/partials/events-table }} + {{> control/partials/events-table-summary }} {{> control/partials/message-queue-table }}