openvibers/openvibe.network Commits

Status page: an internal service reads 'internal (loopback only)' and a planned origin 'reserved', not 'no public site yet' / 'not this service yet' (some services are internal by design, like Sources) (#282)

OP OpenVibers committed 26 days ago · f38c6f3c3b · 4 files, +5 −5

Changes

ddiff --git a/server/registry/ecosystem.js b/server/registry/ecosystem.js
iindex ccfc9cc2..caa4e775 100644
---- a/server/registry/ecosystem.js
++++ b/server/registry/ecosystem.js
@@@ -198,7 +198,7 @@ function createEcosystemRegistry({ issuer, internalOverrides = {}, fetchImpl = g
}
// Polled on loopback: a running internal service is up there, not at its public domain.
entry.scope = exp.state === 'live' ? 'public' : 'loopback';
-- if (exp.state === 'internal') entry.reason = ['loopback only, no public site yet', entry.reason].filter(Boolean).join('; ');
++ if (exp.state === 'internal') entry.reason = ['loopback only', entry.reason].filter(Boolean).join('; ');
entry.release = await releaseP;
entry.checked_at = at();
health.set(m.id, entry);
ddiff --git a/server/registry/exposure.js b/server/registry/exposure.js
iindex 52af46ab..f744893b 100644
---- a/server/registry/exposure.js
++++ b/server/registry/exposure.js
@@@ -15,7 +15,7 @@
* Every manifest id has exactly one state here (test/registry-exposure.test.js pins them):
*
* live live (public) its public domain serves the service itself
-- * internal internal runs on loopback only; no public site yet (the domain, if any,
++ * internal internal runs on loopback only, by design or for now (the domain, if any,
* still serves a placeholder page)
* library library (released) a package other code installs; nothing to run
* repository repository code with CI, neither released nor run (examples)
@@@ -33,7 +33,7 @@ const contracts = require('openvibe-contracts');
const STATES = ['live', 'internal', 'library', 'repository', 'placeholder', 'retired'];
const LABEL = {
live: 'live (public)',
-- internal: 'internal (loopback only, no public site yet)',
++ internal: 'internal (loopback only)',
library: 'library (released)',
repository: 'repository (code with CI, nothing released or running)',
placeholder: 'placeholder (planned)',
ddiff --git a/server/status/routes.js b/server/status/routes.js
iindex 5af4a466..f17a3f28 100644
---- a/server/status/routes.js
++++ b/server/status/routes.js
@@@ -129,7 +129,7 @@ function exposureSummary(list) {
function exposureCell(r) {
const e = r.exposure;
const where = r.origin ? `<small><a href="${esc(r.origin)}" rel="noopener">${esc(r.origin.replace(/^https:\/\//, ''))}</a></small>`
-- : r.planned_origin ? `<small>${esc(r.planned_origin.replace(/^https:\/\//, ''))}: not this service yet</small>` : '';
++ : r.planned_origin ? `<small>${esc(r.planned_origin.replace(/^https:\/\//, ''))} reserved</small>` : '';
return `${esc(e.label)}${e.release ? ` <code>${esc(e.release)}</code>` : ''}${where}${e.note ? `<small>${esc(e.note)}</small>` : ''}`;
}
ddiff --git a/test/registry-exposure.test.js b/test/registry-exposure.test.js
iindex e058bf7b..84c3fd09 100644
---- a/test/registry-exposure.test.js
++++ b/test/registry-exposure.test.js
@@@ -129,7 +129,7 @@ const ready = [200, { ready: true, status: 'ready', failed: [], degraded: [], ch
const row = html.match(new RegExp(`<tr id="svc-${id}">[\\s\\S]*?</tr>`))[0];
assert.ok(!/>Up<\/span>/.test(row), `${id} row must not read a bare Up`);
assert.ok(row.includes('Up · loopback only'), `${id} row says loopback only`);
-- assert.ok(row.includes('internal (loopback only, no public site yet)'), `${id} row names its exposure`);
++ assert.ok(row.includes('internal (loopback only)'), `${id} row names its exposure`);
}
assert.ok(/<tr id="svc-tips">[\s\S]*?>Up<\/span>/.test(html), 'Tips serves openvibe.tips since contracts 0.200.0');
assert.ok(/<tr id="svc-live">[\s\S]*?>Up<\/span>/.test(html), 'a public service still reads Up');