(control) Remove broken pagination from events and message queue; new "light" events table for some views

This commit is contained in:
Viktor Lofgren 2023-08-12 14:57:55 +02:00
parent 998f239ed9
commit 99e031c529
7 changed files with 44 additions and 22 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -10,8 +10,8 @@
<section>
{{> 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 }}
</section>
</body>
<script src="/refresh.js"></script>

View File

@ -0,0 +1,23 @@
<h1>Event Summary</h1>
<table id="events">
<tr>
<th>Service Name</th>
<th>Instance</th>
<th>Event Time</th>
<th>Type</th>
<th>Message</th>
</tr>
{{#each events}}
<tr>
<td>{{serviceName}}</td>
<td title="{{instanceFull}}">
<span style="background-color: {{instanceColor}}" class="uuidPip">&nbsp;</span><span style="background-color: {{instanceColor2}}" class="uuidPip">&nbsp;</span>
{{instance}}
</td>
<td title="{{eventDateTime}}">{{eventTime}}</td>
<td>{{eventType}}</td>
<td>{{eventMessage}}</td>
</tr>
{{/each}}
</table>

View File

@ -9,17 +9,24 @@
<th>Message</th>
</tr>
<tr>
<td colspan="6" style="padding: 0.5ch">
<form method="GET" action="/events">
<select name="service" id="service">
{{#each services}}<option value="{{value}}" {{#if current}}selected{{/if}} >{{name}}</option>{{/each}}
</select>
<select name="type" id="type">
{{#each types}}<option value="{{value}}" {{#if current}}selected{{/if}} >{{name}}</option>{{/each}}
</select>
<input type="submit" value="Filter Results">
</form>
</td>
<form method="GET" action="/events">
<td>
<select name="service" id="service">
{{#each services}}<option value="{{value}}" {{#if current}}selected{{/if}} >{{name}}</option>{{/each}}
</select>
</td>
<td colspan="2"></td>
<td>
<select name="type" id="type">
{{#each types}}<option value="{{value}}" {{#if current}}selected{{/if}} >{{name}}</option>{{/each}}
</select>
</td>
<td>
<input type="submit" value="Filter Results">
</td>
</form>
</tr>
{{#each events}}
<tr>
@ -36,7 +43,6 @@
<tfoot>
<tr>
<td colspan="6" style="padding: 0.5ch">
{{#if prev}}<a href="/events?after={{prev}}&{{elFilter}}">Prev</a>{{/if}}
{{#if next}}<a href="/events?after={{next}}&{{elFilter}}" style="float:right">Next</a>{{/if}}
</td>
</tr>

View File

@ -45,7 +45,6 @@
<tfoot>
<tr>
<td colspan="6" style="padding: 0.5ch">
{{#if prev}}<a href="?after={{prev}}&{{mqFilter}}">Prev</a>{{/if}}
{{#if next}}<a href="?after={{next}}&{{mqFilter}}" style="float:right">Next</a>{{/if}}
</td>
</tr>

View File

@ -9,7 +9,7 @@
{{> control/partials/nav}}
<section>
<h1>Services/{{id}}</h1>
{{> control/partials/events-table }}
{{> control/partials/events-table-summary }}
{{> control/partials/message-queue-table }}
</section>
</body>