feat(clients): adds group affiliation to clients table
Build & Deploy / build (push) Successful in 2m18s

This commit is contained in:
2026-07-17 19:47:32 +02:00
parent 6b18cbca0e
commit a01bbd368a
4 changed files with 93 additions and 4 deletions
+11 -2
View File
@@ -315,7 +315,10 @@ function renderClients() {
}
function clientsTable(clients) {
const rows = clients.map((client) => `
const clientGroups = state.summary?.clientGroups || {};
const rows = clients.map((client) => {
const groups = clientGroups[client.id] || [];
return `
<tr>
<td>
<div class="cell-main">${escapeHtml(client.id)}</div>
@@ -335,6 +338,11 @@ function clientsTable(clients) {
</td>
<td>${modelBadges(client.models)}</td>
<td>${modelBadges(client.activeModels)}</td>
<td>
<div class="badge-row">
${groups.length ? groups.map((g) => `<a class="badge" href="#groups/${encodeURIComponent(g)}">${escapeHtml(g)}</a>`).join("") : `<span class="cell-sub">None</span>`}
</div>
</td>
<td>
<div class="actions">
<button class="button warning" data-action="disable-hour" data-client-id="${escapeAttr(client.id)}" ${client.disabled ? "disabled" : ""}>Disable 1h</button>
@@ -343,7 +351,7 @@ function clientsTable(clients) {
</div>
</td>
</tr>
`).join("");
`}).join("");
return `
<table>
@@ -355,6 +363,7 @@ function clientsTable(clients) {
<th>Requests</th>
<th>Listed models</th>
<th>Active models</th>
<th>Groups</th>
<th>Actions</th>
</tr>
</thead>