(control) Add a summary table for Actors in the Node overview
This commit is contained in:
parent
56d832d661
commit
98c0972619
@ -14,7 +14,7 @@ public record ActorRunState(String name,
|
||||
|
||||
public String stateIcon() {
|
||||
if (terminal) {
|
||||
return "\uD83D\uDE34";
|
||||
return "\uD83D\uDC80"; // Unicode Skull
|
||||
}
|
||||
else if (state.equals("MONITOR")) {
|
||||
return "\uD83D\uDD26";
|
||||
|
@ -319,12 +319,18 @@ public class ControlNodeService {
|
||||
private Object nodeOverviewModel(Request request, Response response) throws SQLException {
|
||||
int nodeId = Integer.parseInt(request.params("id"));
|
||||
var config = nodeConfigurationService.get(nodeId);
|
||||
|
||||
var actors = executorClient.getActorStates(Context.fromRequest(request), nodeId).states();
|
||||
|
||||
actors.removeIf(actor -> actor.state().equals("MONITOR"));
|
||||
|
||||
return Map.of(
|
||||
"node", new IndexNode(nodeId),
|
||||
"status", getStatus(config),
|
||||
"events", getEvents(nodeId),
|
||||
"processes", heartbeatService.getProcessHeartbeatsForNode(nodeId),
|
||||
"jobs", heartbeatService.getTaskHeartbeatsForNode(nodeId),
|
||||
"actors", actors,
|
||||
"tab", Map.of("overview", true)
|
||||
);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
<div class="mt-2">
|
||||
{{> control/partials/processes-table }}
|
||||
{{> control/partials/actor-summary-table }}
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
{{> control/partials/events-table-summary }}
|
||||
@ -21,7 +22,7 @@
|
||||
{{> control/partials/foot-includes }}
|
||||
<script>
|
||||
window.setInterval(() => {
|
||||
refresh(["processes", "jobs", "events"]);
|
||||
refresh(["processes", "jobs", "events", "actors"]);
|
||||
}, 2000);
|
||||
</script>
|
||||
</html>
|
@ -15,8 +15,14 @@
|
||||
|
||||
{{#if nodes}}
|
||||
<div class="my-3 p-3 border bg-light">
|
||||
Index nodes are processing units. The search engine requires at least one, but more can be added
|
||||
to spread the system load across multiple physical disks or even multiple servers.
|
||||
<p>
|
||||
Index nodes are processing units. The search engine requires at least one, but more can be added
|
||||
to spread the system load across multiple physical disks or even multiple servers.
|
||||
</p>
|
||||
<p>
|
||||
New index nodes register themselves automatically upon start-up. They can't be fully removed,
|
||||
but can be disabled in the settings.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
|
@ -0,0 +1,20 @@
|
||||
<h2>Actor Summary</h2>
|
||||
<small class="text-muted">Idle monitoring actors are hidden. See the <a href="/nodes/{{node.id}}/actors">Actors tab</a>
|
||||
for a complete view.</small>
|
||||
<table id="actors" class="table">
|
||||
<tr>
|
||||
<th>Actor</th>
|
||||
<th>State</th>
|
||||
</tr>
|
||||
{{#each actors}}
|
||||
<tr>
|
||||
<td title="{{actorDescription}}">{{name}}</td>
|
||||
<td title="{{stateDescription}}">{{stateIcon}} {{state}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#unless actors}}
|
||||
<tr>
|
||||
<td colspan="2">No activity</td>
|
||||
</tr>
|
||||
{{/unless}}
|
||||
</table>
|
@ -52,4 +52,4 @@
|
||||
<td colspan="4">No jobs running lately</td>
|
||||
</tr>
|
||||
{{/unless}}
|
||||
</table>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user