Refine portal UX and clean local artifacts

This commit is contained in:
Jino Jose 2026-07-07 10:38:27 +05:30
parent ed056e0020
commit 4521a335ae
8 changed files with 14 additions and 20 deletions

BIN
.DS_Store vendored

Binary file not shown.

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.iso *.iso
.DS_Store

BIN
ansible/.DS_Store vendored

Binary file not shown.

View File

@ -521,6 +521,11 @@ async function sendRequest() {
const apiKey = document.getElementById('pg-apikey').value.trim(); const apiKey = document.getElementById('pg-apikey').value.trim();
const bodyText = document.getElementById('pg-body').value.trim(); const bodyText = document.getElementById('pg-body').value.trim();
if (/\{[^}]+\}/.test(rawPath)) {
showResponse(0, 0, `// Replace path placeholders before sending.\n// Current URL: ${rawPath}\n// Example: change {id}, {agent_id}, or {job_id} to a real value from the matching list endpoint.`);
return;
}
// Build query params // Build query params
const paramRows = document.querySelectorAll('#pg-params-body tr'); const paramRows = document.querySelectorAll('#pg-params-body tr');
const params = new URLSearchParams(); const params = new URLSearchParams();

View File

@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard — Nexus One AI</title> <title>Admin Dashboard — Nexus One AI</title>
<link rel="stylesheet" href="style.css?v=10"> <link rel="stylesheet" href="style.css?v=10">
<script src="https://unpkg.com/lucide@latest"></script>
<style> <style>
/* ── Dashboard layout ───────────────────────────────────────────── */ /* ── Dashboard layout ───────────────────────────────────────────── */
.dash-grid { .dash-grid {

View File

@ -418,17 +418,9 @@ async function checkConnectivity() {
const dot = document.getElementById('conn-dot'); const dot = document.getElementById('conn-dot');
const label = document.getElementById('conn-label'); const label = document.getElementById('conn-label');
const hint = document.getElementById('conn-hint'); const hint = document.getElementById('conn-hint');
dot.className = 'mm-conn-dot checking';
try {
await fetch('https://registry.ollama.ai', { method:'HEAD', mode:'no-cors', signal: AbortSignal.timeout(4000) });
dot.className = 'mm-conn-dot online';
label.textContent = 'Internet available';
hint.textContent = 'You can pull models directly or upload a file below';
} catch {
dot.className = 'mm-conn-dot offline'; dot.className = 'mm-conn-dot offline';
label.textContent = 'No internet / Air-gapped'; label.textContent = 'Offline upload ready';
hint.textContent = 'Use the upload below to load models from a local file'; hint.textContent = 'Use a local .gguf file; registry pulls are handled by the appliance when network access is available';
}
} }
function onFileSelected(input) { function onFileSelected(input) {

View File

@ -5,8 +5,6 @@
Icons: Lucide SVG (no emojis). Typography: Inter. Icons: Lucide SVG (no emojis). Typography: Inter.
*/ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
/* ── Design Tokens ─────────────────────────────────────────────── */ /* ── Design Tokens ─────────────────────────────────────────────── */
:root { :root {
/* Brand */ /* Brand */

View File

@ -448,14 +448,13 @@ const TEMPLATES = {
}, },
query_router: { query_router: {
name: 'Query Router', name: 'Query Router',
desc: 'Classify incoming user queries and route them to the appropriate specialised agent.', desc: 'Classify incoming user queries and return the recommended specialised agent.',
status: 'active', status: 'active',
trigger: { type:'api_webhook', config:{ path:'/api/workflow/query-route', method:'POST', authHeader:'X-Cezen-Key' } }, trigger: { type:'api_webhook', config:{ path:'/api/workflows/{workflow_id}/run', method:'POST', authHeader:'Session or API auth' } },
steps: [ steps: [
{ type:'classify', name:'Classify Query', config:{ model:'llama3', categories:'legal,finance,hr,it-support,general', outputVar:'category' } }, { type:'classify', name:'Classify Query', config:{ model:'llama3', categories:'legal,finance,hr,it-support,general', outputVar:'category' } },
{ type:'filter', name:'Legal Check', config:{ condition:'{{category}} == "legal"', trueAction:'continue', falseAction:'continue' } }, { type:'filter', name:'Legal Check', config:{ condition:'{{category}} == "legal"', trueAction:'continue', falseAction:'continue' } },
{ type:'prompt', name:'Route Response', config:{ model:'llama3', prompt:'You are a routing assistant. The query "{{input}}" has been classified as "{{category}}". Respond with a JSON object: { "agent": "<agent-name>", "priority": "high|medium|low", "reason": "<one-sentence reason>" }', outputVar:'routing' } }, { type:'prompt', name:'Route Response', config:{ model:'llama3', prompt:'You are a routing assistant. The query "{{input}}" has been classified as "{{category}}". Respond with a JSON object: { "agent": "<agent-name>", "priority": "high|medium|low", "reason": "<one-sentence reason>" }', outputVar:'routing' } }
{ type:'http', name:'Forward to Agent API', config:{ method:'POST', url:'{{_API}}/agents/run', bodyTemplate:'{"agent": "{{routing.agent}}", "input": "{{input}}", "priority": "{{routing.priority}}"}' } }
] ]
}, },
contract_review: { contract_review: {
@ -680,8 +679,8 @@ function renderTriggerExtra(cfg, type) {
field('fileTypes','File Types', cfg.fileTypes||'pdf,docx', 'pdf,docx,txt', 'Comma-separated extensions'), field('fileTypes','File Types', cfg.fileTypes||'pdf,docx', 'pdf,docx,txt', 'Comma-separated extensions'),
schedule: field('cron','Cron Expression', cfg.cron||'0 8 * * *', '0 8 * * *', 'UTC — e.g. 0 8 * * * = daily at 8 AM') + schedule: field('cron','Cron Expression', cfg.cron||'0 8 * * *', '0 8 * * *', 'UTC — e.g. 0 8 * * * = daily at 8 AM') +
field('timezone','Timezone', cfg.timezone||'UTC', 'Asia/Kolkata'), field('timezone','Timezone', cfg.timezone||'UTC', 'Asia/Kolkata'),
api_webhook: field('path','Webhook Path', cfg.path||'/api/workflow/trigger', '/api/workflow/trigger') + api_webhook: field('path','Webhook Path', cfg.path||'/api/workflows/{workflow_id}/run', '/api/workflows/{workflow_id}/run', 'Replace {workflow_id} with the saved workflow ID') +
field('authHeader','Auth Header', cfg.authHeader||'X-Cezen-Key', 'X-Cezen-Key'), field('authHeader','Auth Header', cfg.authHeader||'Session or API auth', 'Session or API auth'),
chat_message:field('matchKeywords','Match Keywords', cfg.matchKeywords||'', 'urgent,help,error', 'Leave empty to match all messages') + chat_message:field('matchKeywords','Match Keywords', cfg.matchKeywords||'', 'urgent,help,error', 'Leave empty to match all messages') +
field('channel','Channel / Model', cfg.channel||'', 'e.g. general'), field('channel','Channel / Model', cfg.channel||'', 'e.g. general'),
form_submit: field('formId','Form ID', cfg.formId||'', 'contact-form') + form_submit: field('formId','Form ID', cfg.formId||'', 'contact-form') +