Complete rewrite: full-featured network monitoring dashboard
- Two-service architecture: Flask web app (gandalf.service) + background polling daemon (gandalf-monitor.service) - Monitor polls Prometheus node_network_up for physical NIC states on all 6 hypervisors (added storage-01 at 10.10.10.11:9100) - UniFi API monitoring for switches, APs, and gateway device status - Ping reachability for hosts without node_exporter (pbs only now) - Smart baseline: interfaces first seen as down are never alerted on; only UP→DOWN regressions trigger tickets - Cluster-wide P1 ticket when 3+ hosts have genuine simultaneous interface regressions (guards against false positives on startup) - Tinker Tickets integration with 24-hour hash-based deduplication - Alert suppression: manual toggle or timed windows (30m/1h/4h/8h) - Authelia SSO via forward-auth headers, admin group required - Network topology: Internet → UDM-Pro → Agg Switch (10G DAC) → PoE Switch (10G DAC) → Hosts - MariaDB schema, suppression management UI, host/interface cards Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
373
static/app.js
373
static/app.js
@@ -1,147 +1,272 @@
|
||||
// Initialization
|
||||
const UPDATE_INTERVALS = {
|
||||
deviceStatus: 30000,
|
||||
diagnostics: 60000
|
||||
};
|
||||
'use strict';
|
||||
|
||||
// Core update functions
|
||||
function updateDeviceStatus() {
|
||||
console.log('Fetching device status...');
|
||||
fetch('/api/status')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log('Received status data:', data);
|
||||
Object.entries(data).forEach(([deviceName, status]) => {
|
||||
const deviceElement = document.querySelector(`.device-status[data-device-name="${deviceName}"]`);
|
||||
if (deviceElement) {
|
||||
const indicator = deviceElement.querySelector('.status-indicator');
|
||||
indicator.className = `status-indicator status-${status ? 'up' : 'down'}`;
|
||||
}
|
||||
});
|
||||
});
|
||||
// ── Toast notifications ───────────────────────────────────────────────
|
||||
function showToast(msg, type = 'success') {
|
||||
let container = document.querySelector('.toast-container');
|
||||
if (!container) {
|
||||
container = document.createElement('div');
|
||||
container.className = 'toast-container';
|
||||
document.body.appendChild(container);
|
||||
}
|
||||
const toast = document.createElement('div');
|
||||
toast.className = `toast toast-${type}`;
|
||||
toast.textContent = msg;
|
||||
container.appendChild(toast);
|
||||
setTimeout(() => toast.remove(), 3500);
|
||||
}
|
||||
|
||||
function toggleInterfaces(header) {
|
||||
const list = header.nextElementSibling;
|
||||
const icon = header.querySelector('.expand-icon');
|
||||
list.classList.toggle('collapsed');
|
||||
icon.style.transform = list.classList.contains('collapsed') ? 'rotate(-90deg)' : 'rotate(0deg)';
|
||||
// ── Dashboard auto-refresh ────────────────────────────────────────────
|
||||
async function refreshAll() {
|
||||
try {
|
||||
const [netResp, statusResp] = await Promise.all([
|
||||
fetch('/api/network'),
|
||||
fetch('/api/status'),
|
||||
]);
|
||||
if (!netResp.ok || !statusResp.ok) return;
|
||||
|
||||
const net = await netResp.json();
|
||||
const status = await statusResp.json();
|
||||
|
||||
updateHostGrid(net.hosts || {});
|
||||
updateUnifiTable(net.unifi || []);
|
||||
updateEventsTable(status.events || []);
|
||||
updateStatusBar(status.summary || {}, status.last_check || '');
|
||||
updateTopology(net.hosts || {});
|
||||
|
||||
} catch (e) {
|
||||
console.warn('Refresh failed:', e);
|
||||
}
|
||||
}
|
||||
|
||||
function updateInterfaceStatus(deviceName, interfaces) {
|
||||
const interfaceList = document.querySelector(`.interface-group[data-device-name="${deviceName}"] .interface-list`);
|
||||
if (interfaceList && interfaces) {
|
||||
interfaceList.innerHTML = '';
|
||||
Object.entries(interfaces.ports || {}).forEach(([portName, port]) => {
|
||||
interfaceList.innerHTML += `
|
||||
<div class="interface-item">
|
||||
<span class="port-name">${portName}</span>
|
||||
<span class="port-speed">${port.speed.current}/${port.speed.max} Mbps</span>
|
||||
<span class="port-status ${port.state}">${port.state}</span>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
function updateStatusBar(summary, lastCheck) {
|
||||
const bar = document.querySelector('.status-chips');
|
||||
if (!bar) return;
|
||||
const chips = [];
|
||||
if (summary.critical) chips.push(`<span class="chip chip-critical">⬤ ${summary.critical} Critical</span>`);
|
||||
if (summary.warning) chips.push(`<span class="chip chip-warning">⬤ ${summary.warning} Warning</span>`);
|
||||
if (!summary.critical && !summary.warning) chips.push('<span class="chip chip-ok">✔ All systems nominal</span>');
|
||||
bar.innerHTML = chips.join('');
|
||||
|
||||
const lc = document.getElementById('last-check');
|
||||
if (lc && lastCheck) lc.textContent = `Last check: ${lastCheck}`;
|
||||
}
|
||||
|
||||
function updateHostGrid(hosts) {
|
||||
for (const [name, host] of Object.entries(hosts)) {
|
||||
const card = document.querySelector(`.host-card[data-host="${CSS.escape(name)}"]`);
|
||||
if (!card) continue;
|
||||
|
||||
// Update card border class
|
||||
card.className = card.className.replace(/host-card-(up|down|degraded|unknown)/g, '');
|
||||
card.classList.add(`host-card-${host.status}`);
|
||||
|
||||
// Update status dot in header
|
||||
const dot = card.querySelector('.host-status-dot');
|
||||
if (dot) dot.className = `host-status-dot dot-${host.status}`;
|
||||
|
||||
// Update interface rows
|
||||
const ifaceList = card.querySelector('.iface-list');
|
||||
if (ifaceList && host.interfaces && Object.keys(host.interfaces).length > 0) {
|
||||
ifaceList.innerHTML = Object.entries(host.interfaces)
|
||||
.sort(([a], [b]) => a.localeCompare(b))
|
||||
.map(([iface, state]) => `
|
||||
<div class="iface-row">
|
||||
<span class="iface-dot dot-${state}"></span>
|
||||
<span class="iface-name">${escHtml(iface)}</span>
|
||||
<span class="iface-state state-${state}">${state}</span>
|
||||
</div>
|
||||
`).join('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateSystemHealth(deviceName, diagnostics) {
|
||||
const metricsContainer = document.querySelector(`.health-metrics[data-device-name="${deviceName}"] .metrics-list`);
|
||||
if (metricsContainer && diagnostics) {
|
||||
const cpu = metricsContainer.querySelector('.cpu');
|
||||
const memory = metricsContainer.querySelector('.memory');
|
||||
const temperature = metricsContainer.querySelector('.temperature');
|
||||
|
||||
cpu.innerHTML = `CPU: ${diagnostics.system?.cpu || 'N/A'}%`;
|
||||
memory.innerHTML = `Memory: ${diagnostics.system?.memory || 'N/A'}%`;
|
||||
temperature.innerHTML = `Temp: ${diagnostics.system?.temperature || 'N/A'}°C`;
|
||||
function updateTopology(hosts) {
|
||||
document.querySelectorAll('.topo-host').forEach(node => {
|
||||
const name = node.dataset.host;
|
||||
const host = hosts[name];
|
||||
if (!host) return;
|
||||
node.className = node.className.replace(/topo-status-(up|down|degraded|unknown)/g, '');
|
||||
node.classList.add(`topo-status-${host.status}`);
|
||||
const badge = node.querySelector('.topo-badge');
|
||||
if (badge) {
|
||||
badge.className = `topo-badge topo-badge-${host.status}`;
|
||||
badge.textContent = host.status;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateSystemMetrics() {
|
||||
fetch('/api/metrics')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
updateInterfaceStatus(data.interfaces);
|
||||
updatePowerMetrics(data.power);
|
||||
updateSystemHealth(data.health);
|
||||
});
|
||||
function updateUnifiTable(devices) {
|
||||
const tbody = document.querySelector('#unifi-table tbody');
|
||||
if (!tbody || !devices.length) return;
|
||||
|
||||
tbody.innerHTML = devices.map(d => {
|
||||
const statusClass = d.connected ? '' : 'row-critical';
|
||||
const dotClass = d.connected ? 'dot-up' : 'dot-down';
|
||||
const statusText = d.connected ? 'Online' : 'Offline';
|
||||
const suppressBtn = !d.connected
|
||||
? `<button class="btn-sm btn-suppress"
|
||||
onclick="openSuppressModal('unifi_device','${escHtml(d.name)}','')">🔕 Suppress</button>`
|
||||
: '';
|
||||
return `
|
||||
<tr class="${statusClass}">
|
||||
<td><span class="${dotClass}"></span> ${statusText}</td>
|
||||
<td><strong>${escHtml(d.name)}</strong></td>
|
||||
<td>${escHtml(d.type)}</td>
|
||||
<td>${escHtml(d.model)}</td>
|
||||
<td>${escHtml(d.ip)}</td>
|
||||
<td>${suppressBtn}</td>
|
||||
</tr>`;
|
||||
}).join('');
|
||||
}
|
||||
|
||||
//Metric updates like interfaces, power, and health
|
||||
function updateEventsTable(events) {
|
||||
const wrap = document.getElementById('events-table-wrap');
|
||||
if (!wrap) return;
|
||||
|
||||
function updateDiagnostics() {
|
||||
fetch('/api/diagnostics')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
Object.entries(data).forEach(([deviceName, diagnostics]) => {
|
||||
updateInterfaceStatus(deviceName, diagnostics.interfaces);
|
||||
updateSystemHealth(deviceName, diagnostics);
|
||||
});
|
||||
});
|
||||
const active = events.filter(e => e.severity !== 'info');
|
||||
if (!active.length) {
|
||||
wrap.innerHTML = '<p class="empty-state">No active alerts ✔</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
const rows = active.map(e => {
|
||||
const supType = e.event_type === 'unifi_device_offline' ? 'unifi_device'
|
||||
: e.event_type === 'interface_down' ? 'interface'
|
||||
: 'host';
|
||||
const ticket = e.ticket_id
|
||||
? `<a href="http://t.lotusguild.org/ticket/${e.ticket_id}" target="_blank"
|
||||
class="ticket-link">#${e.ticket_id}</a>`
|
||||
: '–';
|
||||
return `
|
||||
<tr class="row-${e.severity}">
|
||||
<td><span class="badge badge-${e.severity}">${e.severity}</span></td>
|
||||
<td>${escHtml(e.event_type.replace(/_/g,' '))}</td>
|
||||
<td><strong>${escHtml(e.target_name)}</strong></td>
|
||||
<td>${escHtml(e.target_detail || '–')}</td>
|
||||
<td class="desc-cell" title="${escHtml(e.description || '')}">${escHtml((e.description||'').substring(0,60))}${(e.description||'').length>60?'…':''}</td>
|
||||
<td class="ts-cell">${escHtml(e.first_seen||'')}</td>
|
||||
<td>${e.consecutive_failures}</td>
|
||||
<td>${ticket}</td>
|
||||
<td>
|
||||
<button class="btn-sm btn-suppress"
|
||||
onclick="openSuppressModal('${supType}','${escHtml(e.target_name)}','${escHtml(e.target_detail||'')}')">
|
||||
🔕
|
||||
</button>
|
||||
</td>
|
||||
</tr>`;
|
||||
}).join('');
|
||||
|
||||
wrap.innerHTML = `
|
||||
<table class="data-table" id="events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Severity</th><th>Type</th><th>Target</th><th>Detail</th>
|
||||
<th>Description</th><th>First Seen</th><th>Failures</th><th>Ticket</th><th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>${rows}</tbody>
|
||||
</table>`;
|
||||
}
|
||||
|
||||
// Element creation functions
|
||||
function createDiagnosticElement(device, diagnostics) {
|
||||
const element = document.createElement('div');
|
||||
element.className = `diagnostic-item ${diagnostics.connection_type}-diagnostic`;
|
||||
|
||||
const content = `
|
||||
<h3>${device}</h3>
|
||||
<div class="diagnostic-details">
|
||||
<div class="status-group">
|
||||
<span class="label">Status:</span>
|
||||
<span class="value ${diagnostics.state.toLowerCase()}">${diagnostics.state}</span>
|
||||
</div>
|
||||
<div class="firmware-group">
|
||||
<span class="label">Firmware:</span>
|
||||
<span class="value">${diagnostics.firmware.version}</span>
|
||||
</div>
|
||||
${createInterfaceHTML(diagnostics.interfaces)}
|
||||
</div>
|
||||
`;
|
||||
|
||||
element.innerHTML = content;
|
||||
return element;
|
||||
// ── Suppression modal (dashboard) ────────────────────────────────────
|
||||
function openSuppressModal(type, name, detail) {
|
||||
const modal = document.getElementById('suppress-modal');
|
||||
if (!modal) return;
|
||||
|
||||
document.getElementById('sup-type').value = type;
|
||||
document.getElementById('sup-name').value = name;
|
||||
document.getElementById('sup-detail').value = detail;
|
||||
document.getElementById('sup-reason').value = '';
|
||||
document.getElementById('sup-expires').value = '';
|
||||
|
||||
updateSuppressForm();
|
||||
modal.style.display = 'flex';
|
||||
|
||||
document.querySelectorAll('#suppress-modal .pill').forEach(p => p.classList.remove('active'));
|
||||
const manualPill = document.querySelector('#suppress-modal .pill-manual');
|
||||
if (manualPill) manualPill.classList.add('active');
|
||||
const hint = document.getElementById('duration-hint');
|
||||
if (hint) hint.textContent = 'Suppression will persist until manually removed.';
|
||||
}
|
||||
|
||||
function createInterfaceHTML(interfaces) {
|
||||
let html = '<div class="interfaces-group">';
|
||||
|
||||
// Add port information
|
||||
Object.entries(interfaces.ports || {}).forEach(([portName, port]) => {
|
||||
html += `
|
||||
<div class="interface-item">
|
||||
<span class="label">${portName}:</span>
|
||||
<span class="value">${port.speed.current}/${port.speed.max} Mbps</span>
|
||||
<span class="state ${port.state.toLowerCase()}">${port.state}</span>
|
||||
</div>
|
||||
`;
|
||||
function closeSuppressModal() {
|
||||
const modal = document.getElementById('suppress-modal');
|
||||
if (modal) modal.style.display = 'none';
|
||||
}
|
||||
|
||||
function updateSuppressForm() {
|
||||
const type = document.getElementById('sup-type').value;
|
||||
const nameGrp = document.getElementById('sup-name-group');
|
||||
const detailGrp = document.getElementById('sup-detail-group');
|
||||
if (nameGrp) nameGrp.style.display = (type === 'all') ? 'none' : '';
|
||||
if (detailGrp) detailGrp.style.display = (type === 'interface') ? '' : 'none';
|
||||
}
|
||||
|
||||
function setDuration(mins) {
|
||||
document.getElementById('sup-expires').value = mins || '';
|
||||
|
||||
document.querySelectorAll('#suppress-modal .pill').forEach(p => p.classList.remove('active'));
|
||||
event.currentTarget.classList.add('active');
|
||||
|
||||
const hint = document.getElementById('duration-hint');
|
||||
if (hint) {
|
||||
if (mins) {
|
||||
const h = Math.floor(mins / 60), m = mins % 60;
|
||||
hint.textContent = `Expires in ${h ? h + 'h ' : ''}${m ? m + 'm' : ''}.`;
|
||||
} else {
|
||||
hint.textContent = 'Suppression will persist until manually removed.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function submitSuppress(e) {
|
||||
e.preventDefault();
|
||||
const type = document.getElementById('sup-type').value;
|
||||
const name = document.getElementById('sup-name').value;
|
||||
const detail = document.getElementById('sup-detail').value;
|
||||
const reason = document.getElementById('sup-reason').value;
|
||||
const expires = document.getElementById('sup-expires').value;
|
||||
|
||||
if (!reason.trim()) { showToast('Reason is required', 'error'); return; }
|
||||
if (type !== 'all' && !name.trim()) { showToast('Target name is required', 'error'); return; }
|
||||
|
||||
try {
|
||||
const resp = await fetch('/api/suppressions', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
target_type: type,
|
||||
target_name: name,
|
||||
target_detail: detail,
|
||||
reason: reason,
|
||||
expires_minutes: expires ? parseInt(expires) : null,
|
||||
}),
|
||||
});
|
||||
|
||||
// Add radio information
|
||||
Object.entries(interfaces.radios || {}).forEach(([radioName, radio]) => {
|
||||
html += `
|
||||
<div class="interface-item">
|
||||
<span class="label">${radioName}:</span>
|
||||
<span class="value">${radio.standard} - Ch${radio.channel} (${radio.width})</span>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
|
||||
html += '</div>';
|
||||
return html;
|
||||
const data = await resp.json();
|
||||
if (data.success) {
|
||||
closeSuppressModal();
|
||||
showToast('Suppression applied ✔', 'success');
|
||||
setTimeout(refreshAll, 500);
|
||||
} else {
|
||||
showToast(data.error || 'Failed to apply suppression', 'error');
|
||||
}
|
||||
} catch (err) {
|
||||
showToast('Network error', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize updates
|
||||
function initializeUpdates() {
|
||||
// Set update intervals
|
||||
setInterval(updateDeviceStatus, UPDATE_INTERVALS.deviceStatus);
|
||||
setInterval(updateDiagnostics, UPDATE_INTERVALS.diagnostics);
|
||||
// ── Close modal on backdrop click ─────────────────────────────────────
|
||||
document.addEventListener('click', e => {
|
||||
const modal = document.getElementById('suppress-modal');
|
||||
if (modal && e.target === modal) closeSuppressModal();
|
||||
});
|
||||
|
||||
// Initial updates
|
||||
updateDeviceStatus();
|
||||
updateDiagnostics();
|
||||
// ── Utility ───────────────────────────────────────────────────────────
|
||||
function escHtml(str) {
|
||||
if (str === null || str === undefined) return '';
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"');
|
||||
}
|
||||
|
||||
// Start the application
|
||||
initializeUpdates();
|
||||
823
static/style.css
823
static/style.css
@@ -1,222 +1,747 @@
|
||||
/* ── Variables ──────────────────────────────────────────────────────── */
|
||||
:root {
|
||||
--primary-color: #006FFF;
|
||||
--secondary-color: #00439C;
|
||||
--background-color: #f8f9fa;
|
||||
--card-background: #ffffff;
|
||||
--text-color: #2c3e50;
|
||||
--border-radius: 12px;
|
||||
--blue: #006FFF;
|
||||
--blue-dark: #00439C;
|
||||
--blue-dim: rgba(0,111,255,.1);
|
||||
--green: #10B981;
|
||||
--red: #EF4444;
|
||||
--orange: #F59E0B;
|
||||
--yellow: #FBBF24;
|
||||
--grey: #6B7280;
|
||||
--grey-lt: #F3F4F6;
|
||||
--border: #E5E7EB;
|
||||
--text: #111827;
|
||||
--text-sub: #6B7280;
|
||||
--card-bg: #FFFFFF;
|
||||
--bg: #F8FAFC;
|
||||
--radius: 10px;
|
||||
--shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
|
||||
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
--mono: 'SF Mono', 'Fira Code', Consolas, monospace;
|
||||
}
|
||||
|
||||
/* ── Reset ──────────────────────────────────────────────────────────── */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
font-family: 'Inter', -apple-system, sans-serif;
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: var(--font);
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
a { color: var(--blue); text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
|
||||
/* ── Navbar ─────────────────────────────────────────────────────────── */
|
||||
.navbar {
|
||||
background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
padding: 0 24px;
|
||||
height: 56px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
||||
color: white;
|
||||
padding: 20px;
|
||||
border-radius: var(--border-radius);
|
||||
margin-bottom: 30px;
|
||||
.nav-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.metrics-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||||
gap: 25px;
|
||||
margin-top: 20px;
|
||||
.nav-logo { font-size: 20px; }
|
||||
|
||||
.nav-title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
letter-spacing: .05em;
|
||||
}
|
||||
|
||||
.metric-card {
|
||||
background: var(--card-background);
|
||||
padding: 25px;
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: 0 4px 6px rgba(0,0,0,0.07);
|
||||
transition: transform 0.2s ease;
|
||||
.nav-sub {
|
||||
font-size: 11px;
|
||||
opacity: .7;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.metric-card:hover {
|
||||
transform: translateY(-5px);
|
||||
.nav-links {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.device-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin: 10px 0;
|
||||
.nav-link {
|
||||
color: rgba(255,255,255,.8);
|
||||
padding: 6px 14px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
transition: background .15s, color .15s;
|
||||
}
|
||||
|
||||
.status-indicator {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
.nav-link:hover, .nav-link.active {
|
||||
background: rgba(255,255,255,.15);
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.status-up {
|
||||
background-color: #10B981;
|
||||
.nav-user {
|
||||
font-size: 12px;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.status-down {
|
||||
background-color: #EF4444;
|
||||
/* ── Main layout ─────────────────────────────────────────────────────── */
|
||||
.main { max-width: 1400px; margin: 0 auto; padding: 24px 20px; }
|
||||
|
||||
.page-header { margin-bottom: 24px; }
|
||||
.page-title { font-size: 22px; font-weight: 700; }
|
||||
.page-sub { color: var(--text-sub); margin-top: 4px; }
|
||||
|
||||
/* ── Status bar ──────────────────────────────────────────────────────── */
|
||||
.status-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px 20px;
|
||||
margin-bottom: 24px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.diagnostics-panel {
|
||||
margin-top: 15px;
|
||||
.status-chips { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
|
||||
.chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 5px 12px;
|
||||
border-radius: 20px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.diagnostic-item {
|
||||
padding: 10px;
|
||||
border-left: 4px solid var(--primary-color);
|
||||
margin: 10px 0;
|
||||
background: rgba(0,111,255,0.1);
|
||||
.chip-critical { background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
|
||||
.chip-warning { background: rgba(245,158,11,.12); color: var(--orange); border: 1px solid rgba(245,158,11,.3); }
|
||||
.chip-ok { background: rgba(16,185,129,.12); color: var(--green); border: 1px solid rgba(16,185,129,.3); }
|
||||
|
||||
.status-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fiber-diagnostic {
|
||||
border-color: #10B981;
|
||||
.last-check { font-size: 12px; color: var(--text-sub); }
|
||||
|
||||
.btn-refresh {
|
||||
background: var(--blue-dim);
|
||||
border: 1px solid rgba(0,111,255,.3);
|
||||
color: var(--blue);
|
||||
border-radius: 6px;
|
||||
padding: 4px 12px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition: background .15s;
|
||||
}
|
||||
.btn-refresh:hover { background: rgba(0,111,255,.2); }
|
||||
|
||||
/* ── Sections ────────────────────────────────────────────────────────── */
|
||||
.section { margin-bottom: 32px; }
|
||||
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.copper-diagnostic {
|
||||
border-color: #F59E0B;
|
||||
.section-badge {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
background: var(--red);
|
||||
color: white;
|
||||
padding: 2px 7px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.device-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
.section-badge:not(.badge-critical) {
|
||||
background: var(--grey);
|
||||
}
|
||||
|
||||
.device-details {
|
||||
font-size: 0.8em;
|
||||
color: #666;
|
||||
/* ── Topology diagram ────────────────────────────────────────────────── */
|
||||
.topology {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 20px 16px 16px;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
box-shadow: var(--shadow);
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.diagnostic-details {
|
||||
display: grid;
|
||||
gap: 15px;
|
||||
padding: 10px;
|
||||
.topo-row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.status-group, .firmware-group, .interfaces-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
.topo-row-internet { margin-bottom: 4px; }
|
||||
.topo-hosts-row { flex-wrap: wrap; gap: 12px; }
|
||||
|
||||
.topo-connectors {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 80px;
|
||||
height: 20px;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.interface-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
.topo-connectors.single { gap: 0; }
|
||||
.topo-connectors.wide { gap: 60px; }
|
||||
|
||||
.topo-line {
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
.topo-line-labeled {
|
||||
position: relative;
|
||||
}
|
||||
.topo-line-labeled::after {
|
||||
content: attr(data-link-label);
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 10px;
|
||||
color: var(--text-dim);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-family: monospace;
|
||||
}
|
||||
.interface-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
background: rgba(0,111,255,0.05);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 5px;
|
||||
.topo-node {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 8px 14px;
|
||||
border-radius: 8px;
|
||||
border: 1.5px solid var(--border);
|
||||
background: var(--grey-lt);
|
||||
min-width: 100px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
transition: border-color .2s;
|
||||
}
|
||||
|
||||
.interface-header:hover {
|
||||
background: rgba(0,111,255,0.1);
|
||||
.topo-internet {
|
||||
border-color: var(--blue);
|
||||
background: var(--blue-dim);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.interface-list {
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
transition: max-height 0.3s ease-out;
|
||||
.topo-switch {
|
||||
border-color: var(--blue);
|
||||
background: var(--blue-dim);
|
||||
}
|
||||
|
||||
.interface-list.collapsed {
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
.topo-host { cursor: default; }
|
||||
|
||||
.topo-icon { font-size: 16px; }
|
||||
|
||||
.topo-label {
|
||||
font-weight: 500;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.interface-item {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr auto;
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #eee;
|
||||
align-items: center;
|
||||
.topo-badge {
|
||||
font-size: 10px;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.port-status {
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.8em;
|
||||
font-weight: 500;
|
||||
.topo-badge-up { background: rgba(16,185,129,.15); color: var(--green); }
|
||||
.topo-badge-down { background: rgba(239,68,68,.15); color: var(--red); }
|
||||
.topo-badge-degraded { background: rgba(245,158,11,.15); color: var(--orange); }
|
||||
|
||||
.topo-status-{{ 'up' }} { border-color: var(--green); }
|
||||
.topo-status-down { border-color: var(--red); }
|
||||
.topo-status-degraded { border-color: var(--orange); }
|
||||
|
||||
.topo-status-up { border-color: var(--green); }
|
||||
.topo-status-dot {
|
||||
width: 8px; height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--grey);
|
||||
position: absolute;
|
||||
top: 6px; right: 6px;
|
||||
}
|
||||
|
||||
.port-status.up {
|
||||
background-color: #10B981;
|
||||
color: white;
|
||||
/* ── Host cards ──────────────────────────────────────────────────────── */
|
||||
.host-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.port-status.down {
|
||||
background-color: #EF4444;
|
||||
color: white;
|
||||
.host-card {
|
||||
background: var(--card-bg);
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 14px;
|
||||
box-shadow: var(--shadow);
|
||||
transition: border-color .2s, box-shadow .2s;
|
||||
}
|
||||
|
||||
.expand-icon {
|
||||
transition: transform 0.3s ease;
|
||||
.host-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
|
||||
|
||||
.host-card-up { border-left: 4px solid var(--green); }
|
||||
.host-card-down { border-left: 4px solid var(--red); }
|
||||
.host-card-degraded { border-left: 4px solid var(--orange); }
|
||||
|
||||
.host-card-header { margin-bottom: 10px; }
|
||||
|
||||
.host-name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.collapsed + .expand-icon {
|
||||
transform: rotate(-90deg);
|
||||
.host-name {
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.port-speed {
|
||||
font-family: monospace;
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
.metrics-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 15px;
|
||||
margin-top: 10px;
|
||||
.host-meta {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.metric-item {
|
||||
background: rgba(0,111,255,0.1);
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.online {
|
||||
color: #10B981;
|
||||
.host-ip {
|
||||
font-family: var(--mono);
|
||||
font-size: 11px;
|
||||
color: var(--text-sub);
|
||||
}
|
||||
|
||||
.offline {
|
||||
color: #EF4444;
|
||||
.host-source {
|
||||
font-size: 10px;
|
||||
padding: 1px 6px;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
background: var(--grey-lt);
|
||||
color: var(--text-sub);
|
||||
}
|
||||
|
||||
.interface-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 15px;
|
||||
.source-prometheus { color: #E6522C; background: rgba(230,82,44,.1); }
|
||||
.source-ping { color: var(--blue); background: var(--blue-dim); }
|
||||
|
||||
.iface-list {
|
||||
border-top: 1px solid var(--border);
|
||||
padding-top: 8px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.metric-value {
|
||||
font-family: monospace;
|
||||
font-size: 1.2em;
|
||||
color: var(--primary-color);
|
||||
.iface-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
.iface-name {
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
flex: 1;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.iface-state {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.state-up { color: var(--green); }
|
||||
.state-down { color: var(--red); }
|
||||
|
||||
.host-ping-note {
|
||||
font-size: 11px;
|
||||
color: var(--text-sub);
|
||||
font-style: italic;
|
||||
margin-bottom: 10px;
|
||||
padding-top: 6px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.host-actions {
|
||||
border-top: 1px solid var(--border);
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
/* ── Status dots ─────────────────────────────────────────────────────── */
|
||||
.host-status-dot, .iface-dot, .dot-up, .dot-down, .dot-degraded, .dot-unknown {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dot-up, .host-status-dot.dot-up { background: var(--green); box-shadow: 0 0 0 2px rgba(16,185,129,.2); }
|
||||
.dot-down, .host-status-dot.dot-down { background: var(--red); box-shadow: 0 0 0 2px rgba(239,68,68,.2); animation: pulse-red 2s infinite; }
|
||||
.dot-degraded { background: var(--orange); box-shadow: 0 0 0 2px rgba(245,158,11,.2); }
|
||||
.dot-unknown { background: var(--grey); }
|
||||
|
||||
@keyframes pulse-red {
|
||||
0%,100% { box-shadow: 0 0 0 2px rgba(239,68,68,.2); }
|
||||
50% { box-shadow: 0 0 0 5px rgba(239,68,68,.4); }
|
||||
}
|
||||
|
||||
/* ── Badges ──────────────────────────────────────────────────────────── */
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .04em;
|
||||
}
|
||||
|
||||
.badge-critical { background: rgba(239,68,68,.12); color: var(--red); }
|
||||
.badge-warning { background: rgba(245,158,11,.12); color: var(--orange); }
|
||||
.badge-info { background: rgba(0,111,255,.1); color: var(--blue); }
|
||||
.badge-ok { background: rgba(16,185,129,.12); color: var(--green); }
|
||||
.badge-neutral { background: var(--grey-lt); color: var(--grey); }
|
||||
.badge-suppressed { background: rgba(107,114,128,.12); color: var(--grey); font-size: 14px; padding: 0; }
|
||||
|
||||
/* ── Tables ──────────────────────────────────────────────────────────── */
|
||||
.table-wrap {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
background: var(--grey-lt);
|
||||
padding: 10px 14px;
|
||||
text-align: left;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: var(--text-sub);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .06em;
|
||||
border-bottom: 1px solid var(--border);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.data-table tr:last-child td { border-bottom: none; }
|
||||
|
||||
.data-table tr:hover td { background: rgba(0,111,255,.03); }
|
||||
|
||||
.row-critical td { background: rgba(239,68,68,.04); }
|
||||
.row-critical td:first-child { border-left: 3px solid var(--red); }
|
||||
|
||||
.row-warning td { background: rgba(245,158,11,.04); }
|
||||
.row-warning td:first-child { border-left: 3px solid var(--orange); }
|
||||
|
||||
.row-resolved td { opacity: .6; }
|
||||
|
||||
.data-table-sm td, .data-table-sm th { padding: 7px 12px; font-size: 12px; }
|
||||
|
||||
.ts-cell { font-family: var(--mono); font-size: 11px; color: var(--text-sub); }
|
||||
.desc-cell { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.ticket-link { font-family: var(--mono); font-weight: 600; }
|
||||
|
||||
.empty-state { padding: 32px; text-align: center; color: var(--text-sub); }
|
||||
.empty-row td { text-align: center; color: var(--text-sub); }
|
||||
|
||||
/* ── Buttons ─────────────────────────────────────────────────────────── */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 16px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
transition: opacity .15s, background .15s;
|
||||
}
|
||||
|
||||
.btn:hover { opacity: .88; }
|
||||
.btn:active { opacity: .75; }
|
||||
|
||||
.btn-primary { background: var(--blue); color: white; }
|
||||
.btn-secondary { background: var(--grey-lt); color: var(--text); border: 1px solid var(--border); }
|
||||
.btn-danger { background: rgba(239,68,68,.1); color: var(--red); border: 1px solid rgba(239,68,68,.2); }
|
||||
.btn-lg { padding: 10px 20px; font-size: 14px; }
|
||||
|
||||
.btn-sm {
|
||||
padding: 3px 8px;
|
||||
font-size: 11px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
font-weight: 600;
|
||||
transition: opacity .15s;
|
||||
}
|
||||
|
||||
.btn-suppress {
|
||||
background: rgba(107,114,128,.1);
|
||||
color: var(--grey);
|
||||
border: 1px solid var(--border) !important;
|
||||
}
|
||||
|
||||
.btn-suppress:hover { background: rgba(107,114,128,.2); }
|
||||
|
||||
.btn-danger.btn-sm {
|
||||
background: rgba(239,68,68,.1);
|
||||
color: var(--red);
|
||||
border: 1px solid rgba(239,68,68,.2) !important;
|
||||
}
|
||||
|
||||
/* ── Modal ───────────────────────────────────────────────────────────── */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,.45);
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
.modal {
|
||||
background: var(--card-bg);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,.2);
|
||||
width: 480px;
|
||||
max-width: 95vw;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.modal-header h3 { font-size: 17px; font-weight: 700; }
|
||||
|
||||
.modal-close {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
color: var(--text-sub);
|
||||
line-height: 1;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
transition: background .15s;
|
||||
}
|
||||
|
||||
.modal-close:hover { background: var(--grey-lt); }
|
||||
|
||||
.modal-actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: flex-end;
|
||||
margin-top: 20px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
/* ── Forms ───────────────────────────────────────────────────────────── */
|
||||
.form-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 20px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.form-row-align { align-items: flex-end; }
|
||||
|
||||
.form-group { display: flex; flex-direction: column; gap: 5px; min-width: 180px; flex: 1; }
|
||||
.form-group-wide { flex: 3; }
|
||||
.form-group-submit { flex: 0 0 auto; min-width: unset; }
|
||||
|
||||
.form-group label {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-sub);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .05em;
|
||||
}
|
||||
|
||||
.form-group input,
|
||||
.form-group select {
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
background: white;
|
||||
color: var(--text);
|
||||
transition: border-color .15s, box-shadow .15s;
|
||||
}
|
||||
|
||||
.form-group input:focus,
|
||||
.form-group select:focus {
|
||||
outline: none;
|
||||
border-color: var(--blue);
|
||||
box-shadow: 0 0 0 3px var(--blue-dim);
|
||||
}
|
||||
|
||||
.form-hint { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
|
||||
.required { color: var(--red); }
|
||||
|
||||
/* ── Duration pills ──────────────────────────────────────────────────── */
|
||||
.duration-pills {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.pill {
|
||||
padding: 5px 12px;
|
||||
border-radius: 20px;
|
||||
border: 1.5px solid var(--border);
|
||||
background: white;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
color: var(--text-sub);
|
||||
transition: all .15s;
|
||||
}
|
||||
|
||||
.pill:hover { border-color: var(--blue); color: var(--blue); }
|
||||
|
||||
.pill.active,
|
||||
.pill-manual.active {
|
||||
background: var(--blue);
|
||||
border-color: var(--blue);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* ── Targets grid (suppressions page) ───────────────────────────────── */
|
||||
.targets-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.target-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.target-name {
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.target-type {
|
||||
font-size: 11px;
|
||||
color: var(--text-sub);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.target-ifaces {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.iface-chip {
|
||||
font-family: var(--mono);
|
||||
font-size: 10px;
|
||||
background: var(--grey-lt);
|
||||
border-radius: 4px;
|
||||
padding: 1px 6px;
|
||||
color: var(--text-sub);
|
||||
}
|
||||
|
||||
/* ── Card (generic) ──────────────────────────────────────────────────── */
|
||||
.card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 20px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
/* ── Toast notifications ─────────────────────────────────────────────── */
|
||||
.toast-container {
|
||||
position: fixed;
|
||||
bottom: 24px;
|
||||
right: 24px;
|
||||
z-index: 200;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.toast {
|
||||
padding: 12px 20px;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 4px 16px rgba(0,0,0,.15);
|
||||
animation: slide-in .2s ease;
|
||||
}
|
||||
|
||||
.toast-success { background: #065f46; color: white; }
|
||||
.toast-error { background: #7f1d1d; color: white; }
|
||||
|
||||
@keyframes slide-in {
|
||||
from { transform: translateX(120%); opacity: 0; }
|
||||
to { transform: translateX(0); opacity: 1; }
|
||||
}
|
||||
|
||||
/* ── Responsive ──────────────────────────────────────────────────────── */
|
||||
@media (max-width: 768px) {
|
||||
.host-grid { grid-template-columns: 1fr; }
|
||||
.topology { display: none; }
|
||||
.form-row { flex-direction: column; }
|
||||
.status-bar { flex-direction: column; align-items: flex-start; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user