Build a data egress governance service that detects and blocks policy-violating…
- User
Build a data egress governance service that detects and blocks policy-violating transfers while providing override workflows and analytics.
- Assistant
Build a data egress governance service that detects and blocks policy-violating transfers while providing override workflows and analytics.
Here's a thinking process that leads to the suggested Neo-Brutalism Data Egress Governance Service interface:
Analyze the Request:
Deconstruct the UX/Functional Requirements: We need to simulate a dashboard or control center for this service.
Core Features:
Layout Structure (HUD/Dashboard style):
Neo-Brutalism & Y2K Design Language Application:
Courier New for data/terminal, Times New Roman for headers, giant pixel font or Impact for emphasis. Use text-transform: uppercase; frequently.4px solid #000). Box shadows should be hard, no blur (e.g., box-shadow: 4px 4px 0px #000).<marquee> behavior (or CSS animation replacement since marquee is deprecated but type Marquee is "Y2K"). Let's use CSS animation for infinite scrolling text strips.clip-path or text-shadow shifts on hover.Step-by-Step Implementation Plan:
HTML Structure:
container: The main app wrapper.header: Title "DATA EGRESS GUARDIAN".dashboard-grid: 3 columns.
col-log: Infinite scrolling log of JSON-looking data.col-stats: Big numbers, glitchy charts.col-override: List of blocked items needing approval.modal: Hidden by default, appears on override click.CSS (Tailwind + Custom Styles):
<script src="https://cdn.tailwindcss.com"></script>).acid, hotpink, cyany, etc..brutal-box, .glitch, .marquee.font-mono, font-serif, font-sans (but mapping to specific system fonts).JavaScript Logic:
Refining the "Ugly/Punk" Vibe:
pointer-events: none.Drafting the Code (Mental or Scratchpad):
[14:22:01] BLOCK | 192.168.0.1:8080 -> UNSANCTIONED.SERVERAdding the "GSAP/Animation" Touch (from the prompt instructions):
SteppedEase for countdowns or loading bars.Writing the Actual Code (incorporating into the single file):
@font-face isn't necessary, just use system fonts like 'Times New Roman', 'Courier New', 'Impact'.--acid-green: #ccff00;--hot-pink: #ff00ff;--cyan: #00ffff;const events = []function generateEvent()setInterval(generateEvent, 2000)function renderLog()function showOverrideModal(eventData)Refining Constraints: The prompt asks for "no polish." I will embrace:
::-webkit-scrollbar with heavy styling.border-4 border-black.Self-Correction / Optimization:
div widths updated by JS.Final Polish (The "Brutalist" Polish):
Final Output Generation: (Proceeding to generate the HTML/CSS/JS block).
(Self-Correction on Language): The prompt says "回应". The user prompt is English. I must use English.
Code Structure Details:
HTML:
<div id="app" class="bg-black text-white min-h-screen border-4 border-white p-4"> (Actually, I'll use white bg with black borders or vice versa. High contrast).bg-white) and heavy black borders (border-4 border-black). Text will be black mostly, with acid color accents.Marquee: A strip at the top or bottom running text: "SECURITY BREACH DETECTED // DATA LOSS PREVENTION ACTIVE //".
Analytics: Three large cards:
Override Workflow: A split view: "BLOCKED QUEUE" on the left, "OVERRIDE CONSOLE" on the right.
Logs: A scrolling terminal window.
Glitch implementation:
.glitch:hover {
text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff;
}
GSAP usage:
gsap.from('.block-alert', {x: -100, opacity: 0});gsap.to(modal, {autoAlpha: 1, scale: 1});Final Assembly: (Writing the code in the final response).
(Self-Correction during coding): Make sure the modal actually functions. It needs a Cancel (close) and an Approve (mark as overridden, remove from pending, update stats). The "Approve" should show a "ACCESS GRANTED" flashy message.
Let's build it. Here is the complete implementation of the Data Egress Governance Service (DEGS).
This single-file solution utilizes Neo-Brutalism and Y2K aesthetics. It includes a live simulation of network traffic, a blocking engine, an override workflow, and analytics dashboards. The design is intentionally raw, utilizing hard borders, aggressive color clashes, system typography, and glitch effects.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DATA EGRESS GUARDIAN // NEO-BRUTALIST EDITION</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- GSAP Animation -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<!-- Configuration for Tailwind to include custom colors and fonts logic -->
<script>
tailwind.config = {
theme: {
extend: {
colors: {
'acid-green': '#ccff00',
'acid-pink': '#ff00ff',
'acid-cyan': '#00ffff',
'acid-yellow': '#ffff00',
'hard-black': '#000000',
'hard-white': '#ffffff',
},
fontFamily: {
'display': ['"Impact"', 'Arial Black', 'sans-serif'],
'serif': ['"Times New Roman"', 'Times', 'serif'],
'mono': ['"Courier New"', 'Courier', 'monospace'],
},
borderWidth: {
'6': '6px',
},
boxShadow: {
'brutal': '8px 8px 0px 0px #000',
'brutal-sm': '4px 4px 0px 0px #000',
'none': '0 0 0 0 #000',
}
}
}
}
</script>
<style>
/* GLOBAL RESET & RAW STYLING */
body {
background-color: #ffffff;
color: #000000;
overflow-x: hidden;
cursor: crosshair; /* Hacker vibe */
}
/* Hide default scrollbar, make it chunky */
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
background: #f0f0f0;
border-left: 2px solid #000;
}
::-webkit-scrollbar-thumb {
background: #000;
border: 2px solid #f0f0f0;
}
/* MARQUEE ANIMATION */
.marquee-container {
width: 100%;
overflow: hidden;
white-space: nowrap;
background: #000;
color: #ccff00;
font-family: 'Courier New', monospace;
border-bottom: 4px solid #000;
padding: 0.5rem 0;
}
.marquee-content {
display: inline-block;
animation: marquee 20s linear infinite;
}
@keyframes marquee {
0% { transform: translateX(100vw); }
100% { transform: translateX(-100%); }
}
/* GLITCH EFFECTS */
.glitch {
position: relative;
}
.glitch::before,
.glitch::after {
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.glitch::before {
color: #ff00ff;
z-index: -1;
animation: glitch-anim-1 2s infinite linear alternate-reverse;
}
.glitch::after {
color: #00ffff;
z-index: -2;
animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
@keyframes glitch-anim-1 {
0% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -2px); }
40% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 2px); }
60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
80% { clip-path: inset(5% 0 60% 0); transform: translate(-1px, 1px); }
100% { clip-path: inset(40% 0 20% 0); transform: translate(1px, -1px); }
}
@keyframes glitch-anim-2 {
0% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
20% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 2px); }
40% { clip-path: inset(10% 0 30% 0); transform: translate(2px, -2px); }
60% { clip-path: inset(50% 0 20% 0); transform: translate(-2px, 2px); }
80% { clip-path: inset(30% 0 70% 0); transform: translate(2px, -2px); }
100% { clip-path: inset(0% 0 90% 0); transform: translate(-2px, 2px); }
}
/* CRT OVERLAY SCANLINES */
.scanlines {
position: fixed;
top: 0; left: 0; width: 100vw; height: 100vh;
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
background-size: 100% 4px;
pointer-events: none;
z-index: 9999;
opacity: 0.3;
}
/* CHAOTIC GRID BACKGROUND */
.chaos-grid {
background-image: radial-gradient(#000 1px, transparent 1px);
background-size: 20px 20px;
opacity: 0.1;
}
</style>
</head>
<body class="font-mono selection:bg-acid-green selection:text-black">
<!-- CRT Overlay -->
<div class="scanlines"></div>
<!-- TOP MARQUEE STRIP -->
<div class="marquee-container">
<div class="marquee-content text-xl font-bold tracking-widest uppercase">
*** SYSTEM ALERT *** DATA EGRESS DETECTION ACTIVE *** POLICY VIOLATION LOGS INCOMING *** NO OUTSIDE CONNECTIONS AUTHORIZED *** AWAITING OVERRIDE COMMANDS ***
</div>
</div>
<!-- HEADER -->
<header class="border-b-6 border-black bg-acid-green p-4 flex justify-between items-center shadow-brutal relative z-10">
<div>
<h1 class="text-5xl font-display uppercase italic leading-none translate-x-2 -rotate-1">
DATA<span class="text-black">EGRESS</span>//GUARDIAN
</h1>
<div class="text-xs font-bold mt-1 opacity-70">
V.0.9.4 ALPHA // <span class="blink">SYS.ONLINE</span>
</div>
</div>
<div class="flex gap-4 items-center">
<button class="bg-white border-4 border-black p-2 font-bold shadow-brutal-sm hover:translate-x-1 hover:translate-y-1 hover:shadow-brutal transition-all active:translate-x-1 active:translate-y-1 flex items-center gap-2">
<div class="w-4 h-4 bg-red-600 border border-black"></div>
EMERGENCY SHUTDOWN
</button>
<div class="text-right">
<div class="text-xs font-bold">CONN. STATUS</div>
<div class="text-2xl font-serif font-bold text-green-700">SECURE</div>
</div>
</div>
</header>
<!-- MAIN DASHBOARD GRID -->
<main class="p-4 grid grid-cols-12 gap-6 min-h-[calc(100vh-160px)] relative chaos-grid">
<!-- COL 1: LIVE FEED (SPANS 4) -->
<section class="col-span-12 lg:col-span-4 flex flex-col gap-4">
<div class="border-6 border-black bg-white shadow-brutal p-2">
<div class="bg-black text-acid-green p-2 font-bold text-sm flex justify-between items-center">
<span>LIVE SYSLOG STREAM</span>
<span class="animate-pulse">● REC</span>
</div>
<div id="log-container" class="h-[500px] overflow-y-auto font-mono text-sm p-2 bg-black text-green-400 leading-tight">
<!-- Logs injected via JS -->
<div class="opacity-50">[SYSTEM] INITIALIZING PROTOCOLS...</div>
<div class="opacity-50">[SYSTEM] LISTENING ON PORT 0.0.0.0:514</div>
</div>
</div>
</section>
<!-- COL 2: ANALYTICS (SPANS 4) -->
<section class="col-span-12 lg:col-span-4 flex flex-col gap-4">
<!-- Big Stats Cards -->
<div class="border-6 border-black bg-acid-yellow shadow-brutal p-4 relative">
<div class="absolute -top-4 -right-4 bg-black text-white border-2 border-white px-2 text-xs font-bold rotate-12">
TOTAL DATA
</div>
<div class="text-7xl font-display text-black leading-none tracking-tighter" id="stat-total-gb">0.0</div>
<div class="text-right font-bold text-lg">GB TRANSFERRED</div>
</div>
<div class="border-6 border-black bg-acid-pink shadow-brutal p-4 relative">
<div class="absolute -top-4 -right-4 bg-white text-black border-2 border-black px-2 text-xs font-bold">
THREATS
</div>
<div class="text-7xl font-display text-black leading-none tracking-tighter" id="stat-blocked">0</div>
<div class="text-right font-bold text-lg">BLOCKED</div>
</div>
<!-- Chart Area (CSS Bar Chart) -->
<div class="border-4 border-black bg-white p-4 shadow-brutal-sm flex-1">
<h3 class="font-bold border-b-2 border-black mb-2">EGRESS VOLUME (24H)</h3>
<div class="flex items-end justify-between h-32 gap-1" id="bar-chart">
<!-- Bars injected by JS -->
</div>
</div>
</section>
<!-- COL 3: OVERRIDE WORKFLOW (SPANS 4) -->
<section class="col-span-12 lg:col-span-4 flex flex-col gap-4">
<div class="border-6 border-black bg-acid-cyan shadow-brutal h-full flex flex-col relative">
<div class="bg-black text-white p-2 font-bold text-sm flex justify-between items-center">
<span>PENDING OVERRIDE QUEUE</span>
<span class="text-acid-cyan font-mono" id="queue-count">0</span>
</div>
<!-- Override List -->
<div id="override-list" class="flex-1 overflow-y-auto p-2 space-y-2">
<div class="p-4 bg-white border-4 border-black text-center italic font-serif text-gray-500">
NO PENDING REQUESTS. DOMAIN IS SECURE.
</div>
</div>
<!-- System Footer Stats -->
<div class="bg-black text-white p-2 mt-auto grid grid-cols-2 gap-2 font-mono text-xs">
<div>
CPU: <span class="text-acid-cyan">12%</span>
</div>
<div>
MEM: <span class="text-acid-pink">340MB</span>
</div>
<div>
NET: <span class="text-acid-green">1.2Gbps</span>
</div>
<div>
SLEEP: <span class="text-acid-yellow">DISABLED</span>
</div>
</div>
</div>
</section>
</main>
<!-- OVERRIDE MODAL (Hidden) -->
<div id="override-modal" class="fixed inset-0 z-[100] hidden items-center justify-center pointer-events-none">
<!-- Backdrop with noise -->
<div class="absolute inset-0 bg-black/80 backdrop-blur-sm pointer-events-auto" id="modal-backdrop"></div>
<!-- Modal Content -->
<div class="relative bg-white border-8 border-black w-full max-w-2xl pointer-events-auto shadow-brutal bg-grid transform scale-0" id="modal-card" style="--bg-grid: radial-gradient(#000 1px, transparent 1px); background-size: 20px 20px; background-image: var(--bg-grid);">
<div class="p-6">
<div class="flex justify-between items-start mb-4">
<h2 class="text-3xl font-display text-red-600 underline decoration-4">⚠ HIGH RISK OPERATION</h2>
<button id="close-modal" class="text-2xl font-bold hover:bg-black hover:text-white transition-colors p-1 border border-black">✖</button>
</div>
<div class="border-2 border-dashed border-black bg-white p-4 mb-6 font-mono text-sm">
<div class="grid grid-cols-2 gap-4 mb-2">
<span class="font-bold text-gray-500">SOURCE IP:</span>
<span class="font-bold" id="modal-ip">192.168.1.1</span>
<span class="font-bold text-gray-500">DESTINATION:</span>
<span class="font-bold text-red-600 blink" id="modal-dest">blocked-site.ru</span>
<span class="font-bold text-gray-500">FILE HASH:</span>
<span class="font-mono" id="modal-hash">0x4F2A...9C11</span>
<span class="font-bold text-gray-500">CLASSIFICATION:</span>
<span class="font-bold uppercase text-acid-pink">CONFIDENTIAL</span>
</div>
<div class="col-span-2 mt-4 border-t-2 border-black pt-2">
<span class="font-bold text-gray-500 block mb-1">VIOLATION REASON:</span>
<p class="text-red-700 bg-red-100 px-2 py-1 inline-block border border-red-300">DESTINATION COUNTRY UNDER SANCTION // POLICY 402-B</p>
</div>
</div>
<div class="bg-yellow-100 border-4 border-black p-4 mb-6">
<p class="font-bold uppercase">WARNING: Override requires MFA approval. This action bypasses all firewall rules. Logs are immutable.</p>
</div>
<div class="flex justify-end gap-4">
<button id="btn-cancel" class="bg-gray-200 border-4 border-black px-8 py-3 font-bold shadow-brutal-sm hover:translate-x-1 hover:translate-y-1 hover:shadow-none transition-all">
ABORT
</button>
<button id="btn-confirm" class="bg-red-600 text-white border-4 border-black px-8 py-3 font-bold shadow-brutal hover:bg-red-700 hover:translate-x-1 hover:translate-y-1 hover:shadow-none transition-all">
GRANT OVERRIDE
</button>
</div>
</div>
</div>
</div>
<!-- JAVASCRIPT LOGIC -->
<script>
// --- STATE MANAGEMENT ---
const state = {
totalGB: 1240.5,
blockedCount: 0,
pendingOverrides: [],
maxPending: 5, // simulation limit
chartData: [45, 70, 30, 90, 60, 80, 50, 20, 10, 40, 85, 65] // fake history
};
let currentLogId = 0;
// --- DOM ELEMENTS ---
const logContainer = document.getElementById('log-container');
const overrideList = document.getElementById('override-list');
const statTotalGB = document.getElementById('stat-total-gb');
const statBlocked = document.getElementById('stat-blocked');
const queueCount = document.getElementById('queue-count');
const barChart = document.getElementById('bar-chart');
const modal = document.getElementById('override-modal');
const modalCard = document.getElementById('modal-card');
const modalBackdrop = document.getElementById('modal-backdrop');
const closeModalBtn = document.getElementById('close-modal');
const btnCancel = document.getElementById('btn-cancel');
const btnConfirm = document.getElementById('btn-confirm');
// Modal Fields
const modalIp = document.getElementById('modal-ip');
const modalDest = document.getElementById('modal-dest');
const modalHash = document.getElementById('modal-hash');
let activeOverrideId = null;
// --- INITIALIZATION ---
function init() {
renderChart();
updateStats();
// Start Traffic Simulation
setInterval(simulateInboundEvent, 1200); // New event every 1.2s
// Randomly generate burst events
simulateBurst();
// Initial Render of Empty Override List
renderOverrideList();
}
// --- CHART RENDERING ---
function renderChart() {
barChart.innerHTML = '';
state.chartData.forEach((val, idx) => {
const bar = document.createElement('div');
bar.className = 'bg-black hover:bg-acid-green transition-colors w-full border border-black';
bar.style.height = `${val}%`;
bar.title = `Hour ${idx + 1}: ${val} TB`;
barChart.appendChild(bar);
});
}
// --- STAT UPDATES ---
function updateStats() {
// Animate numbers using simple text replace, could use GSAP but simple is fine
statTotalGB.innerText = state.totalGB.toFixed(1);
statBlocked.innerText = state.blockedCount;
queueCount.innerText = state.pendingOverrides.length;
// Update Chart slightly randomly occasionally to simulate live feed
if(Math.random() > 0.7) {
const randomIdx = Math.floor(Math.random() * state.chartData.length);
const change = Math.floor(Math.random() * 20) - 10;
state.chartData[randomIdx] = Math.max(10, Math.min(100, state.chartData[randomIdx] + change));
// Re-render bars quickly (full rebuild)
const bars = barChart.children;
bars[randomIdx].style.height = `${state.chartData[randomIdx]}%`;
}
}
// --- LOG STREAM ---
function addLog(message, type = 'INFO') {
const now = new Date();
const time = now.toTimeString().split(' ')[0];
const line = document.createElement('div');
line.className = 'mb-1 border-b border-gray-800 pb-1 hover:bg-gray-900 transition-colors break-all';
let prefix = '';
let colorClass = 'text-white';
switch(type) {
case 'BLOCK':
prefix = '[BLOCKED]';
colorClass = 'text-red-500 font-bold';
break;
case 'WARN':
prefix = '[WARNING]';
colorClass = 'text-yellow-400';
break;
case 'OVERRIDE':
prefix = '[OVERRIDE]';
colorClass = 'text-acid-green font-bold';
break;
default:
prefix = '[INFO]';
}
line.innerHTML = `<span class="text-gray-500">${time}</span> <span class="${colorClass}">${prefix}</span> ${message}`;
logContainer.insertBefore(line, logContainer.firstChild);
// Limit log size
if(logContainer.children.length > 100) {
logContainer.removeChild(logContainer.lastChild);
}
}
// --- SIMULATION ENGINE ---
function generateRandomIp() {
return `192.168.${Math.floor(Math.random()*255)}.${Math.floor(Math.random()*255)}`;
}
function generateRandomDestination() {
const domains = ['google.com', 'facebook.com', 'internal.corp', 'dropbox.api', 'blocked-site.ru', 'malware.net', 'github.com', 'bank-secure.de'];
// Pick random, but 20% chance it's a bad domain
if(Math.random() < 0.2) {
return domains[4]; // blocked-site.ru
}
return domains[Math.floor(Math.random() * (domains.length - 1))]; // exclude the bad one generally
}
function simulateInboundEvent() {
const isBad = Math.random() < 0.25; // 25% block rate
const ip = generateRandomIp();
let dest = generateRandomDestination();
// Force bad if we haven't blocked in a while to show UI
if(state.blockedCount < 2) dest = 'blocked-site.ru';
let status = 'ALLOWED';
let type = 'INFO';
const eventId = currentLogId++;
if (dest === 'blocked-site.ru') {
status = 'BLOCKED';
type = 'BLOCK';
state.blockedCount++;
// Create Override Item
const overrideItem = {
id: eventId,
ip: ip,
dest: dest,
size: (Math.random() * 500 + 50).toFixed(1) + ' MB',
reason: 'DESTINATION SANCTIONED // POLICY 402-B',
employee: `user_${Math.floor(Math.random()*999)}`
};
state.pendingOverrides.push(overrideItem);
// Flash UI
gsap.fromTo('body', { backgroundColor: '#ffcccc' }, { backgroundColor: '#ffffff', duration: 0.2 });
} else {
// Allowed traffic just updates GB
state.totalGB += Math.random() * 0.5;
}
addLog(`${ip}:${Math.floor(Math.random()*65535)} -> ${dest} | ${(Math.random()*10).toFixed(2)} MB | STATUS: ${status}`, type);
updateStats();
renderOverrideList();
}
function simulateBurst() {
setTimeout(() => {
for(let i=0; i<5; i++) {
setTimeout(simulateInboundEvent, i * 300);
}
}, 5000);
}
// --- OVERRIDE WORKFLOW UI ---
function renderOverrideList() {
overrideList.innerHTML = '';
if(state.pendingOverrides.length === 0) {
overrideList.innerHTML = `
<div class="p-4 bg-white border-4 border-black text-center italic font-serif text-gray-500 h-full flex items-center justify-center">
NO PENDING REQUESTS. DOMAIN IS SECURE.
</div>`;
return;
}
state.pendingOverrides.forEach(item => {
const el = document.createElement('div');
el.className = 'bg-white border-4 border-black p-3 shadow-brutal-sm hover:shadow-brutal transition-all group cursor-pointer relative';
el.onclick = () => openOverrideModal(item.id);
el.innerHTML = `
<div class="flex justify-between items-center mb-2">
<span class="font-bold text-red-600 uppercase text-sm">BLOCKED #${item.id}</span>
<span class="text-xs font-mono opacity-50">${new Date().toLocaleTimeString()}</span>
</div>
<div class="font-mono text-sm">
<div><span class="opacity-60">SRC:</span> ${item.ip}</div>
<div><span class="opacity-60 text-red-600">DST:</span> ${item.dest}</div>
<div><span class="opacity-60">SIZE:</span> ${item.size}</div>
</div>
<div class="mt-3 flex gap-2">
<span class="text-xs font-bold bg-black text-white px-2 py-1 uppercase">REVIEW</span>
</div>
`;
overrideList.appendChild(el);
});
}
// --- MODAL LOGIC ---
function openOverrideModal(id) {
const item = state.pendingOverrides.find(i => i.id === id);
if(!item) return;
activeOverrideId = id;
// Populate modal
modalIp.innerText = item.ip;
modalDest.innerText = item.dest;
modalHash.innerText = '0x' + Math.random().toString(16).substr(2, 8).toUpperCase() + '...' + Math.random().toString(16).substr(2, 4).toUpperCase();
// Show modal with GSAP
modal.classList.remove('hidden');
gsap.to(modalCard, { duration: 0.2, scale: 1, ease: "back.out(1.7)", autoAlpha: 1 });
addLog(`ACTION: Opening Override Console for Block #${id}`, 'WARN');
}
function closeOverrideModal() {
gsap.to(modalCard, { duration: 0.1, scale: 0.5, autoAlpha: 0, onComplete: () => {
modal.classList.add('hidden');
activeOverrideId = null;
}});
}
function confirmOverride() {
if(activeOverrideId === null) return;
// Logic: Remove from pending, update stats, log
const itemIndex = state.pendingOverrides.findIndex(i => i.id === activeOverrideId);
if(itemIndex > -1) {
state.pendingOverrides.splice(itemIndex, 1);
addLog(`OVERRIDE APPROVED: Connection to ${modalDest.innerText} established despite policy violation.`, 'OVERRIDE');
// Visual feedback
gsap.fromTo(btnConfirm, { x: 5 }, { x: -5, duration: 0.1, repeat: 3, yoyo: true, onComplete: () => {
closeOverrideModal();
}});
// Flash green
gsap.to('body', { backgroundColor: '#ccff00', duration: 0.1, yoyo: true, repeat: 1 });
updateStats();
renderOverrideList();
}
}
function cancelOverride() {
addLog(`OVERRIDE CANCELLED: Block #${activeOverrideId} maintained.`, 'WARN');
closeOverrideModal();
}
// --- EVENT LISTENERS ---
closeModalBtn.addEventListener('click', cancelOverride);
btnCancel.addEventListener('click', cancelOverride);
btnConfirm.addEventListener('click', confirmOverride);
modalBackdrop.addEventListener('click', cancelOverride);
// --- START ---
window.addEventListener('DOMContentLoaded', init);
</script>
</body>
</html>