Skip to content

Add responsive frontend dashboard and updated README - #7

Merged
bonk18 merged 1 commit into
mainfrom
final-submission
Jul 22, 2026
Merged

Add responsive frontend dashboard and updated README#7
bonk18 merged 1 commit into
mainfrom
final-submission

Conversation

@bonk18

@bonk18 bonk18 commented Jul 22, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 22, 2026 17:38
@bonk18
bonk18 merged commit 09ae59e into main Jul 22, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a static, responsive operations dashboard UI (plus a shift-handover page) intended to be served by the FastAPI backend, updates the README with new “live dashboard” run instructions, and introduces a convenience training pipeline script to generate simulator data and train the anomaly detector.

Changes:

  • Added new static frontend pages (frontend/index.html, frontend/handover.html) with polling-based live telemetry rendering and intervention actions.
  • Updated README.md to reflect the integrated live dashboard launch flow via Uvicorn.
  • Added train_pipeline.py to run simulation → feature extraction → anomaly model training end-to-end.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 11 comments.

File Description
train_pipeline.py Adds an end-to-end local pipeline script to generate data and train the anomaly detector.
README.md Updates project status bullets and documents how to run the integrated dashboard.
frontend/index.html Introduces the main operations dashboard UI with live polling and incident/action rendering.
frontend/handover.html Adds a shift handover/logs UI that polls simulation state and renders shift logs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/index.html
Comment on lines +9 to +10
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&amp;display=swap" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&amp;display=swap" rel="stylesheet"/>
Comment thread frontend/index.html
Comment on lines +491 to +494
<lineargradient id="grad2" x1="0%" x2="100%" y1="0%" y2="0%">
<stop offset="0%" style="stop-color:#0566d9;stop-opacity:1"></stop>
<stop offset="100%" style="stop-color:#adc6ff;stop-opacity:1"></stop>
</lineargradient>
Comment thread frontend/index.html
}

document.getElementById('ai-explanation-text').textContent = fusion.explanation || 'Sensors reporting normal operations. No hazard indicators detected.';
document.getElementById('ai-confidence-value').textContent = fusion.confidence ? (fusion.confidence * 100).toFixed(1) + '%' : '100.0%';
Comment thread frontend/index.html
<!-- Schematic Image (Background-ish) -->
<div class="mt-lg h-40 w-full rounded-lg bg-surface-container/30 relative overflow-hidden border border-outline-variant/10">
<div class="absolute inset-0 opacity-20 pointer-events-none bg-[linear-gradient(rgba(255,255,255,0.05)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.05)_1px,transparent_1px)] bg-[size:20px_20px]"></div>
<img class="w-full h-full object-contain opacity-60" data-alt="Technical schematic diagram of a CDU-100 distillation unit refinery system with pipes, heat exchangers, and tanks. The style is blue-print aesthetic with glowing industrial green accents and thin technical lines on a dark obsidian background. Cinematic lighting highlights the distillation column in the center." src="https://lh3.googleusercontent.com/aida-public/AB6AXuDxca4FD_3HVlL8WWW1TmA2FTyjvyx3slgA--sM4RS1u2dD-IqOfmEW8G4_q9-1meG2gT8WM5mZIv7V3mBlogwHyl_owmXJQDUOnUBIwBtPjij3zvjTE4gt5n_NxbiaNNH5GBr-76FULZGgWe9k9ZsHLU5saoNld-bCXlB7-sROLSmGq8qF-70hiuqQMbyF1HmmoonwORDYwuSVoHD0GPbj6h6As9ZDnokJP-ayy2vOhDYLe30p70boov2TTqZfRQ4MyBbQXcSe5lv3"/>
Comment thread frontend/index.html
</div>
</div>
<div class="flex-1 relative bg-black">
<img class="w-full h-full object-cover opacity-80" data-alt="High-contrast surveillance camera footage of an industrial distillation column base inside a refinery. Deep shadows, glowing green and orange status lights on machinery, and three workers in bright orange safety jumpsuits moving around the base. Grainy digital filter with technical data overlays in the corners (timestamps, thermal heat map signatures in yellow)." src="https://lh3.googleusercontent.com/aida-public/AB6AXuDBtbm7k87ZN9ou_KgN2Wk6cp1--eWf4sq-gLu_C49t3gV4xwdj23oBxNlzbm1dIW1Z7b9nNYa_e6GbqPAOGzGpaLsV9jba0RerMi0I8s_bQupljWDN1Y_D6LCCpyZR9U36L_639EZ3itQAg3k5jS6BtITXbW8rYYCdo92Yyy4F4QLmNoiEs22U4jb66AtclNrZWgzp2yjsrJLdKKkSS2pHlbpG-H4ar5n3OSpJwgRmdVY0fH46oUa-_46cmsGwoCnLJFC5ImVslsyU"/>
Comment thread frontend/handover.html
<a class="flex items-center gap-md p-md text-on-surface-variant hover:text-on-surface hover:bg-surface-variant/40 transition-all rounded-lg font-label-md text-label-md" href="/">
<span class="material-symbols-outlined">dashboard</span> Overview Dashboard
</a>
<a class="flex items-center gap-md p-md bg-secondary-container text-on-secondary-container rounded-lg font-bold shadow-[0_0_15px_rgba(5,102,217,0.3)] transition-all scale-98 font-label-md text-label-md" href="/handover">
Comment thread frontend/handover.html
<div class="flex gap-gutter">
<div class="glass-panel p-md rounded-lg flex items-center gap-md border-primary/20">
<div class="w-10 h-10 rounded-full border-2 border-primary-container overflow-hidden">
<img class="w-full h-full object-cover" data-alt="Mark Chen Outgoing Supervisor" src="https://lh3.googleusercontent.com/aida-public/AB6AXuA0poxk30n9omXfYjplwAyCJuY98pztXYF795IpUa3v0jKMsCwBAkCTzNVUCTdVUkiRWygjRtHb591bbicKS4QIIBntjbqdtmgd48VO5x2sPg3csrrFs9CPusCumTvLx0-CqW5W3uLLm7r5BXKBIwqxgxqabdpvBL7wLLFfJci87eev1RlEPueGiM71zVhkVKzrPFfNnYYNvf0JcEdltZmzurH1u0QVGY7Mu8XKtyyFVn_7HyfZo5hhoFGLMX7vC0eh4Y0MYaxIXxl9"/>
Comment thread frontend/handover.html
</div>
<div class="glass-panel p-md rounded-lg flex items-center gap-md border-secondary/20">
<div class="w-10 h-10 rounded-full border-2 border-secondary-container overflow-hidden">
<img class="w-full h-full object-cover" data-alt="Sarah Jenkins Incoming Supervisor" src="https://lh3.googleusercontent.com/aida-public/AB6AXuDuKrLEzeOnlA0t1Q7FwyI5yojipZnsHzCMxtLtxi4EmCJnoWFrYjHQLS35n0b5uE77J9UlCu82YPJsdBOa-BQEEaEwsMukJF8QxixhRtxzMwrLxSR6Jn550xxT2221NhbDD_5rjgT5r39Qc7eVbnASvFg3sUbkw1YhKrCEKmI0_sy20BN7RVUzn25GgttPjGLlFKzFWlhFK6s8mHckXNGKhddJmKRXu2NF3K6Ff8bc0AkOrNazL58W6XaJ_5KP1GEOEmsGhHXUc9Pf"/>
Comment thread frontend/handover.html
Comment on lines +393 to +411
// Render shift logs
let logsHtml = "";
if (data.shift_logs && data.shift_logs.length > 0) {
data.shift_logs.slice().reverse().forEach(log => {
let severityClass = "text-on-surface-variant";
if (log.severity === "CRITICAL") severityClass = "text-error font-bold";
else if (log.severity === "WARNING") severityClass = "text-tertiary font-bold";

logsHtml += `
<div class="flex items-start gap-md p-sm hover:bg-surface-variant/20 rounded-md border-b border-outline-variant/10 text-sm">
<span class="text-primary font-code-data">${log.timestamp}</span>
<span class="font-bold text-secondary">[${log.operator}]</span>
<span class="flex-1 ${severityClass}">${log.message}</span>
</div>`;
});
} else {
logsHtml = `<p class="text-xs text-on-surface-variant text-center my-auto">Waiting for simulator log messages...</p>`;
}
document.getElementById('handover-logs').innerHTML = logsHtml;
Comment thread frontend/index.html
Comment on lines +844 to +861
// CCTV log lines
let cLogs = "";
if (details.cctv && details.cctv.length > 0) {
details.cctv.slice(-3).forEach(c => {
const timePart = c.timestamp.split('T')[1].substring(0,8);
cLogs += `
<div class="flex items-center gap-md text-[10px] font-code-data text-on-surface-variant">
<span class="text-primary">${timePart}</span>
<span>${c.event_type} (Conf: ${(c.confidence * 100).toFixed(0)}%)</span>
</div>`;
});
} else {
cLogs += `
<div class="flex items-center gap-md text-[10px] font-code-data text-on-surface-variant">
<span>No active events on feed</span>
</div>`;
}
document.getElementById('cctv-logs-container').innerHTML = cLogs;
@bonk18
bonk18 deleted the final-submission branch July 22, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants