Show the partner's API key and whether it is answering on the remote card
This commit is contained in:
@@ -1023,7 +1023,22 @@ function _nodeCard(node) {
|
||||
style="font-size:9px;padding:1px 8px;background:#1a3a1a;color:#6fcf97;border:1px solid #2e6b2e;
|
||||
border-radius:2px;cursor:pointer;margin-left:6px;white-space:nowrap;">+ Create</button>
|
||||
</div>`)
|
||||
: '';
|
||||
// Remotes get the same row, minus the buttons — the key belongs to that host and is renewed
|
||||
// there. Two facts, kept apart: the key is configured (read from the partner's conf in the
|
||||
// RAM cache) and the key is answering (that host's API served this page's stats). A key that
|
||||
// is set but no longer authenticates is the interesting case, and merging them would hide it.
|
||||
: (node.api_key_set
|
||||
? `<div style="font-size:10px;margin-bottom:6px;padding:2px 6px;background:#0a1a0a;
|
||||
border:1px solid #1a3a1a;border-radius:3px;display:flex;justify-content:space-between;
|
||||
align-items:center;gap:8px;flex-wrap:wrap;">
|
||||
<span style="color:#3a7a3a;">🔑 API key: <span style="color:#4caf50;">${node.api_key_preview}</span></span>
|
||||
<span style="color:${node.api_live ? '#4caf50' : '#ff9800'};font-size:9px;white-space:nowrap;">
|
||||
${node.api_live ? '● live' : '○ set, not answering'}</span>
|
||||
</div>`
|
||||
: `<div style="font-size:10px;color:#8a6a2a;margin-bottom:6px;padding:2px 6px;background:#1a1200;
|
||||
border:1px solid #3a2800;border-radius:3px;">
|
||||
⚡ No API key on this host — create it there, then Save Conf to share it
|
||||
</div>`);
|
||||
|
||||
// ── Metrics strip ────────────────────────────────────────────────────────────
|
||||
const m = node.metrics || {};
|
||||
|
||||
Reference in New Issue
Block a user