panel: agents show unprefixed names; admin table matches the agents columns

- Agent accounts render without the "agent:" prefix, since the section header already
  says Agents. The full alias is still in the payload as `alias`.
- The admin/operator table now carries the same columns as the agents table — Account,
  Type, Spend, Budget — with Type "admin" and Budget "—". Activated and Reset are gone:
  neither applies to an account that is not a member and has no member budget cycle.
This commit is contained in:
inference-bot committed 2026-10-29 21:19:18 +00:00
1 parent b9957e9d68
commit 4687efb369
1 file changed
+5 -7
+5 -7
View File
@@ -415,10 +415,9 @@ PAGE_HTML = """<!DOCTYPE html>
<thead> <thead>
<tr> <tr>
<th>Account</th> <th>Account</th>
<th>Status</th> <th>Type</th>
<th>Activated</th>
<th><span id="spend-mode-label-admin">Spend</span></th> <th><span id="spend-mode-label-admin">Spend</span></th>
<th>Reset</th> <th>Budget</th>
</tr> </tr>
</thead> </thead>
<tbody id="admin-rows"></tbody> <tbody id="admin-rows"></tbody>
@@ -797,7 +796,7 @@ function renderMembers() {
const kind = String(a.alias).split(':')[0]; const kind = String(a.alias).split(':')[0];
const budget = (a.budget === null || a.budget === undefined) ? '—' : fmt(a.budget); const budget = (a.budget === null || a.budget === undefined) ? '—' : fmt(a.budget);
return '<tr>' + return '<tr>' +
'<td><strong>' + esc(a.alias) + '</strong></td>' + '<td><strong>' + esc(a.name || a.alias) + '</strong></td>' +
'<td><span class="pill manual" title="Agent account, not a member">' + esc(kind) + '</span></td>' + '<td><span class="pill manual" title="Agent account, not a member">' + esc(kind) + '</span></td>' +
'<td class="num">' + fmt(a.spend) + '</td>' + '<td class="num">' + fmt(a.spend) + '</td>' +
'<td>' + budget + '</td>' + '<td>' + budget + '</td>' +
@@ -814,10 +813,9 @@ function renderMembers() {
const adminTop = m.username || m.email; const adminTop = m.username || m.email;
return '<tr>' + return '<tr>' +
'<td><strong>' + esc(adminTop) + '</strong>' + (m.username ? '<div style="color:var(--muted);font-size:11px">' + esc(m.email) + '</div>' : '') + '</td>' + '<td><strong>' + esc(adminTop) + '</strong>' + (m.username ? '<div style="color:var(--muted);font-size:11px">' + esc(m.email) + '</div>' : '') + '</td>' +
'<td><span class="pill manual" title="Operator account (SSO owner / bot), not a member">admin</span></td>' + '<td><span class="pill manual" title="Operator account, not a member">admin</span></td>' +
'<td>' + (m.activated ? '<span class="pill active">yes</span>' : '<span class="pill inactive">pending</span>') + '</td>' +
'<td class="num">' + fmt(memberSpend(m)) + '</td>' + '<td class="num">' + fmt(memberSpend(m)) + '</td>' +
'<td>' + esc(reset) + '</td>' + '<td>—</td>' +
'</tr>'; '</tr>';
}).join(''); }).join('');
} }