Refine portal UX and clean local artifacts
This commit is contained in:
parent
ed056e0020
commit
4521a335ae
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
*.iso
|
||||
.DS_Store
|
||||
|
||||
BIN
ansible/.DS_Store
vendored
BIN
ansible/.DS_Store
vendored
Binary file not shown.
@ -521,6 +521,11 @@ async function sendRequest() {
|
||||
const apiKey = document.getElementById('pg-apikey').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
|
||||
const paramRows = document.querySelectorAll('#pg-params-body tr');
|
||||
const params = new URLSearchParams();
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin Dashboard — Nexus One AI</title>
|
||||
<link rel="stylesheet" href="style.css?v=10">
|
||||
<script src="https://unpkg.com/lucide@latest"></script>
|
||||
<style>
|
||||
/* ── Dashboard layout ───────────────────────────────────────────── */
|
||||
.dash-grid {
|
||||
|
||||
@ -418,17 +418,9 @@ async function checkConnectivity() {
|
||||
const dot = document.getElementById('conn-dot');
|
||||
const label = document.getElementById('conn-label');
|
||||
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';
|
||||
label.textContent = 'No internet / Air-gapped';
|
||||
hint.textContent = 'Use the upload below to load models from a local file';
|
||||
}
|
||||
label.textContent = 'Offline upload ready';
|
||||
hint.textContent = 'Use a local .gguf file; registry pulls are handled by the appliance when network access is available';
|
||||
}
|
||||
|
||||
function onFileSelected(input) {
|
||||
|
||||
@ -5,8 +5,6 @@
|
||||
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 ─────────────────────────────────────────────── */
|
||||
:root {
|
||||
/* Brand */
|
||||
|
||||
@ -448,14 +448,13 @@ const TEMPLATES = {
|
||||
},
|
||||
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',
|
||||
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: [
|
||||
{ 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:'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}}"}' } }
|
||||
{ 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' } }
|
||||
]
|
||||
},
|
||||
contract_review: {
|
||||
@ -680,8 +679,8 @@ function renderTriggerExtra(cfg, type) {
|
||||
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') +
|
||||
field('timezone','Timezone', cfg.timezone||'UTC', 'Asia/Kolkata'),
|
||||
api_webhook: field('path','Webhook Path', cfg.path||'/api/workflow/trigger', '/api/workflow/trigger') +
|
||||
field('authHeader','Auth Header', cfg.authHeader||'X-Cezen-Key', 'X-Cezen-Key'),
|
||||
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||'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') +
|
||||
field('channel','Channel / Model', cfg.channel||'', 'e.g. general'),
|
||||
form_submit: field('formId','Form ID', cfg.formId||'', 'contact-form') +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user