openvibers/openvibe.codes Commits
Limits page: Host's section says it is read from Host's /limits.json instead of linking openvibe.host/limits.json, which the Sites placeholder answers 404 until Host Stage B serves openvibe.host
Changes
@@@ -414,7 +414,8 @@ ${table(['Rule', 'Value'], [// answered; a service not answering shows a problem, never remembered numbers. Public// capabilities whose owner publishes none are listed with their quota class and said so.const LIMIT_SOURCES = [-- { service: 'host', name: 'OpenVibe Host', internal: process.env.OV_HOST_INTERNAL_URL || 'http://127.0.0.1:4910', public: 'https://openvibe.host/limits.json' },++ // public: null until openvibe.host serves Host itself (WS-N task 10, Stage B step 2); read internally meanwhile.++ { service: 'host', name: 'OpenVibe Host', internal: process.env.OV_HOST_INTERNAL_URL || 'http://127.0.0.1:4910', public: null },{ service: 'events', name: 'OpenVibe Events', internal: process.env.OV_EVENTS_INTERNAL_URL || 'http://127.0.0.1:4300', public: 'https://events.openvibe.network/limits.json' },];const limitsCache = new Map();@@@ -464,7 +465,7 @@ ${table(['Rule', 'Value'], [<li><strong>Raising a limit</strong> is a per-project override staff set at the owning service; the numbers here are the defaults every project starts with.</li></ul>${answers.map(({ src, body, problem }) => html`<h2 id="${src.service}">${src.name}</h2>--${problem ? problemBox(problem, { title: `${src.name}'s limits could not be read` }) : html`<p class="muted small">From <a href="${src.public}"><code>${src.public.replace('https://', '')}</code></a>${body.scope ? html`: ${body.scope}` : ''}.</p>++${problem ? problemBox(problem, { title: `${src.name}'s limits could not be read` }) : html`<p class="muted small">${src.public ? html`From <a href="${src.public}"><code>${src.public.replace('https://', '')}</code></a>` : html`From ${src.name}'s <code>/limits.json</code>`}${body.scope ? html`: ${body.scope}` : ''}.</p>${table(['Limit', 'Capability', 'Sandbox', 'Production', 'Past it'], body.limits.map((l) => [l.label, l.capability ? html`<a href="/docs/capabilities/${l.capability}"><code>${l.capability}</code></a>` : '—',amount(l.sandbox, l.unit), amount(l.production, l.unit), l.exceeded ? code(l.exceeded) : '—',@@@ -48,7 +48,7 @@ function serve(body) {const r = await t.get('/docs/limits');assert.strictEqual(r.status, 200, r.text.slice(0, 300));for (const s of ['1 GB', '100 MB', '50 in 24 hours', '120 a minute', '30 a minute', '7 days', 'quota.custom_domains', 'events.quota_exceeded',-- 'openvibe.host/limits.json', 'events.openvibe.network/limits.json', 'per project and environment (ADR-014)']) {++ 'events.openvibe.network/limits.json', 'per project and environment (ADR-014)']) {assert.ok(r.text.includes(s), `the page says ${s}`);}assert.match(r.text, /Custom domains<\/td><td[^>]*>[^<]*<a[^>]*><code>host\.site\.manage<\/code><\/a><\/td><td[^>]*>none<\/td>/, 'sandbox 0 reads "none"');
@@ -414,7 +414,8 @@ ${table(['Rule', 'Value'], [
@@ -414,7 +414,8 @@ ${table(['Rule', 'Value'], [
// answered; a service not answering shows a problem, never remembered numbers. Public
// answered; a service not answering shows a problem, never remembered numbers. Public
// capabilities whose owner publishes none are listed with their quota class and said so.
// capabilities whose owner publishes none are listed with their quota class and said so.
const LIMIT_SOURCES = [
const LIMIT_SOURCES = [
- { service: 'host', name: 'OpenVibe Host', internal: process.env.OV_HOST_INTERNAL_URL || 'http://127.0.0.1:4910', public: 'https://openvibe.host/limits.json' },
+ // public: null until openvibe.host serves Host itself (WS-N task 10, Stage B step 2); read internally meanwhile.
+ { service: 'host', name: 'OpenVibe Host', internal: process.env.OV_HOST_INTERNAL_URL || 'http://127.0.0.1:4910', public: null },
{ service: 'events', name: 'OpenVibe Events', internal: process.env.OV_EVENTS_INTERNAL_URL || 'http://127.0.0.1:4300', public: 'https://events.openvibe.network/limits.json' },
{ service: 'events', name: 'OpenVibe Events', internal: process.env.OV_EVENTS_INTERNAL_URL || 'http://127.0.0.1:4300', public: 'https://events.openvibe.network/limits.json' },
];
];
const limitsCache = new Map();
const limitsCache = new Map();
@@ -464,7 +465,7 @@ ${table(['Rule', 'Value'], [
@@ -464,7 +465,7 @@ ${table(['Rule', 'Value'], [
<li><strong>Raising a limit</strong> is a per-project override staff set at the owning service; the numbers here are the defaults every project starts with.</li>
<li><strong>Raising a limit</strong> is a per-project override staff set at the owning service; the numbers here are the defaults every project starts with.</li>
</ul>
</ul>
${answers.map(({ src, body, problem }) => html`<h2 id="${src.service}">${src.name}</h2>
${answers.map(({ src, body, problem }) => html`<h2 id="${src.service}">${src.name}</h2>
-${problem ? problemBox(problem, { title: `${src.name}'s limits could not be read` }) : html`<p class="muted small">From <a href="${src.public}"><code>${src.public.replace('https://', '')}</code></a>${body.scope ? html`: ${body.scope}` : ''}.</p>
+${problem ? problemBox(problem, { title: `${src.name}'s limits could not be read` }) : html`<p class="muted small">${src.public ? html`From <a href="${src.public}"><code>${src.public.replace('https://', '')}</code></a>` : html`From ${src.name}'s <code>/limits.json</code>`}${body.scope ? html`: ${body.scope}` : ''}.</p>
${table(['Limit', 'Capability', 'Sandbox', 'Production', 'Past it'], body.limits.map((l) => [
${table(['Limit', 'Capability', 'Sandbox', 'Production', 'Past it'], body.limits.map((l) => [
l.label, l.capability ? html`<a href="/docs/capabilities/${l.capability}"><code>${l.capability}</code></a>` : '—',
l.label, l.capability ? html`<a href="/docs/capabilities/${l.capability}"><code>${l.capability}</code></a>` : '—',
amount(l.sandbox, l.unit), amount(l.production, l.unit), l.exceeded ? code(l.exceeded) : '—',
amount(l.sandbox, l.unit), amount(l.production, l.unit), l.exceeded ? code(l.exceeded) : '—',
@@ -48,7 +48,7 @@ function serve(body) {
@@ -48,7 +48,7 @@ function serve(body) {
const r = await t.get('/docs/limits');
const r = await t.get('/docs/limits');
assert.strictEqual(r.status, 200, r.text.slice(0, 300));
assert.strictEqual(r.status, 200, r.text.slice(0, 300));
for (const s of ['1 GB', '100 MB', '50 in 24 hours', '120 a minute', '30 a minute', '7 days', 'quota.custom_domains', 'events.quota_exceeded',
for (const s of ['1 GB', '100 MB', '50 in 24 hours', '120 a minute', '30 a minute', '7 days', 'quota.custom_domains', 'events.quota_exceeded',
- 'openvibe.host/limits.json', 'events.openvibe.network/limits.json', 'per project and environment (ADR-014)']) {
+ 'events.openvibe.network/limits.json', 'per project and environment (ADR-014)']) {
assert.ok(r.text.includes(s), `the page says ${s}`);
assert.ok(r.text.includes(s), `the page says ${s}`);
}
}
assert.match(r.text, /Custom domains<\/td><td[^>]*>[^<]*<a[^>]*><code>host\.site\.manage<\/code><\/a><\/td><td[^>]*>none<\/td>/, 'sandbox 0 reads "none"');
assert.match(r.text, /Custom domains<\/td><td[^>]*>[^<]*<a[^>]*><code>host\.site\.manage<\/code><\/a><\/td><td[^>]*>none<\/td>/, 'sandbox 0 reads "none"');