Report the owner's model and index on a mirror's Monitor card
A mirror was probing an Ollama it does not have and an index it never builds, so the card read "unreachable / not built" about the wrong machine while the model it actually uses was up. The card now names whose figures it is showing.
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
// No GPU, no UPS, no VMs — the corresponding card is absent rather than showing zeros
|
||||
// or an error. The page is built to be correct on hardware lacking any given part. The
|
||||
// AI row is the same rule applied to a subsystem rather than a device: it exists only
|
||||
// where vv_ai_ui_on() is true, which is the AI host with AI_ENABLED set.
|
||||
// where vv_ai_ui_on() is true, which is any node in the mesh with AI_ENABLED set. On a
|
||||
// node that is not the AI owner the figures describe the owner's model and index, and the
|
||||
// card names it — see 'served_by' in vv_ai_monitor_block().
|
||||
//
|
||||
// The assistant here starts on General Chat, where the AI tab starts on Varaverk Assistant.
|
||||
// Different jobs. The tab is where you go to interrogate the installation; this is the
|
||||
@@ -310,10 +312,11 @@ $_vv_doc_vars = array_merge(vv_conf_vars(), ['SCRIPTS_DIR' => SCRIPTS_DIR]);
|
||||
Cards here size to their content instead. -->
|
||||
<div id="vv-monitor-ai">
|
||||
<!-- AI residency | Saved conversations | Assistant -->
|
||||
<!-- Present only on the AI host with AI_ENABLED true, on the same footing as the GPU and UPS
|
||||
<!-- Present on any mesh node with AI_ENABLED true, on the same footing as the GPU and UPS
|
||||
cards above: a subsystem that is not here does not render an empty card explaining that
|
||||
it is not here. api/ai.php refuses every action independently, so this is presentation
|
||||
rather than access control. -->
|
||||
it is not here. On a node that is not the AI owner these figures describe the owner's
|
||||
model and index, and the card names it. api/ai.php gates each action independently, so
|
||||
this is presentation rather than access control. -->
|
||||
|
||||
<!-- Placement for this row lives in css/varaverk.css, not on these cards. It is two rows
|
||||
deep — AI over Tokens in the first column — and a grid-column span here cannot say which
|
||||
@@ -2010,6 +2013,14 @@ function vvRenderAi(ai) {
|
||||
if (ix.stale) h += `<div style="font-size:10px;color:#8a6a3a;margin:-2px 0 7px;">source newer — reindex</div>`;
|
||||
}
|
||||
|
||||
// Only set on a node that is not the AI owner. Everything above then describes that owner's
|
||||
// model and index, not this box's, and the card has to say so — otherwise a mirror looks like
|
||||
// it is running a model it does not have.
|
||||
if (ai.served_by) {
|
||||
h += `<div style="font-size:10px;color:#666;margin-top:6px;border-top:1px solid #1e1e1e;padding-top:5px;">`
|
||||
+ `served by ${vvEscHtml(ai.served_by)}</div>`;
|
||||
}
|
||||
|
||||
box.innerHTML = h;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user