You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b657bdd
Browse filesBrowse the repository at this point in the historyBrowse files
feat(admin): a Venues view, and the venue on hosts and runs (#712)
Part 2 of #712.
- Each host's registry row gains `backends`, written as names and fixed
words only: blessed=<venues>;floor=<property:word,...>;os=<engine>:<gateway>.
The first blessed venue is the default, as PI_BACKENDS is read. The
gateway word (local, remote or unknown) is the boot read, never an
address. hostBackendsField and parseHostBackends are shared by the
worker and admin, and the parser checks every element again.
- Admin hostRowOf keeps backends and caps. venuesView builds one model
from the hosts' published facts plus the static BACKENDS table, and
checks nothing live.
- The console's Fleet page has a Venues panel, and the /dispatch panel a
VENUES view (`v` from HOSTS). Each venue shows:
- the hosts that bless it, the default, and any floor;
- every declared property in words, naming the observation it depends
on;
- what it serves, its credential custody, and the openshell engine and
gateway as of the worker's start.
Sentence tables (DECLARATION_TEXT, PROPERTY_LABEL, GATEWAY_TEXT) are
bolted by tests.
- Venue columns on the hosts tables and the runs table (a record with no
venue is local), and a `backend` runs filter that accepts any
venue-shaped name, so a newer worker's venue is filterable.
- The fleet console fixtures and docs/images/dispatch-hosts are
regenerated.
Specs: INT-HOST-REGISTRY-CONTRACT (the backends field, its encoding and
content rule), DES-OPERATOR-CONSOLE (the Venues view) and
REQ-OPERATOR-CONSOLE-SCREENS (b, f) are amended. Deleting host:* still
changes nothing.
Signed-off-by: Rob Boerman <robboerman@live.nl>
returnhtml`${rows.length===0 ? html`<pclass="note">No host has published doctor results yet. Each worker runs doctor a minute after it starts and then every PI_DOCTOR_INTERVAL_HOURS (24 by default), and pi-dispatch doctor publishes too.</p>` : rows.map(block)}${silent.length>0 ? html`<pclass="note">No doctor result published by: ${silent.join(", ")}.</p>` : null}${d.more>0 ? html`<pclass="note">${count(d.more)} more hosts published results; not every one is read.</p>` : null}`;
1208
1227
});
1209
1228
1229
+
/**
1230
+
* The Venues panel (issue #712, `DES-OPERATOR-CONSOLE`): every venue this build's table holds, with which live hosts
1231
+
* bless it and default to it (their registry rows' `backends` field), each declared property in words (its question,
1232
+
* the word and what the word means, the switch or the observation it holds under, and which hosts' floors ask for it),
1233
+
* what it serves and who holds its credentials, and per host the OpenShell engine, modes and gateway word. The hosts'
1234
+
* published facts plus the static table (`venuesView`); nothing is resolved live, so a word is the DECLARED one.
constmeans=(p)=>html`${p.wordText}${p.armedBy ? html`<br><spanclass="note">Only while ${p.armedBy} is on.</span>` : null}${p.observedText ? html`<br><spanclass="note">Holds on a host where ${p.observedText}; elsewhere it counts as asserted.</span>` : null}`;
1241
+
constfloored=(p)=>(p.flooredOn.length===0 ? "-" : p.flooredOn.map((f)=>`${f.want} on ${f.host}`).join(", "));
1242
+
constvenue=(x)=>{
1243
+
constsummary=`${x.name}: ${x.blessedOn.length===0 ? "blessed on no live host" : `blessed on ${x.blessedOn.join(", ")}`}${x.defaultOn.length>0 ? `, the default on ${x.defaultOn.join(", ")}` : ""}`;
returnhtml`<pclass="note">What each venue declares is this build's table; which hosts bless it, their floors and their OpenShell setup are what each host's worker published when it started. Nothing here is read live from a host.</p>${
1259
+
v.unpublished.length>0 ? html`<pclass="note">Not published by ${v.unpublished.join(", ")} (a worker older than this console).</p>` : null
1260
+
}${v.floors.length>0 ? table("Floors",["Host","PI_BACKEND_FLOOR"],v.floors.map((f)=>html`<tr><td>${cell(f.host)}</td><tdclass="mono">${floorText(f.floor)}</td></tr>`),"") : html`<pclass="note">No live host published a floor (PI_BACKEND_FLOOR).</p>`}${v.venues.map(venue)}${
1261
+
v.others.length>0 ? html`<pclass="warn">Blessed by a host and not in this console's table: ${v.others.map((o)=>`${o.name} (${o.blessedOn.join(", ")})`).join("; ")}.</p>` : null
0 commit comments