openvibers/openvibe.tools Commits

Guide the Tools network diagnostic run (#303)

OP OpenVibers committed 2 days ago · 1c3471b5d2 · 2 files, +2 −1

Changes

ddiff --git a/apps/gateway/public/net.html b/apps/gateway/public/net.html
iindex b8563fa..3b1a224 100644
---- a/apps/gateway/public/net.html
++++ b/apps/gateway/public/net.html
@@@ -562,7 +562,7 @@
<div class="shell">
<div class="search-bar" id="search-bar">
<input type="text" id="search-input" placeholder="Enter a domain, IP, or URL…" autocomplete="off" spellcheck="false">
-- <button class="btn-go" id="btn-go" onclick="runTool()"><i class="fa-solid fa-magnifying-glass"></i> Lookup</button>
++ <button class="btn-go" id="btn-go" data-ov-guide="tools.job" onclick="runTool()"><i class="fa-solid fa-magnifying-glass"></i> Lookup</button>
</div>
<!-- Showcase Section (hub only) -->
ddiff --git a/apps/gateway/test/net-page-input.test.js b/apps/gateway/test/net-page-input.test.js
iindex 5a49ce8..8902829 100644
---- a/apps/gateway/test/net-page-input.test.js
++++ b/apps/gateway/test/net-page-input.test.js
@@@ -13,6 +13,7 @@ const { schemaDoc } = require('../../_shared/tools/descriptor');
const { ajvFrom, createInputValidator } = require('../../_shared/tools/run');
const html = fs.readFileSync(path.join(__dirname, '..', 'public', 'net.html'), 'utf8');
++assert.match(html, /id="btn-go" data-ov-guide="tools.job"/, 'the network diagnostic run control has a stable quest hook');
const slice = (from, to) => { const a = html.indexOf(from), b = html.indexOf(to, a); assert.ok(a >= 0 && b > a, `net.html: ${from}`); return html.slice(a, b); };
const TOOLS = new Function(`${slice('const TOOLS = {', 'const CATS = {')}; return TOOLS;`)();
const { runFields, runInput } = new Function(`${slice('function runFields(', '// ── Run the active tool')}; return { runFields, runInput };`)();