457 lines
32 KiB
HTML
457 lines
32 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="icon" href="data:,">
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Fleet Control Console</title>
|
|
<link rel="manifest" href="/manifest.json">
|
|
<meta name="theme-color" content="#06246f">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<link rel="apple-touch-icon" href="/icon-512.png">
|
|
<meta name="apple-mobile-web-app-title" content="Fleet C2">
|
|
|
|
<!-- Font Blueprint -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet">
|
|
|
|
<!-- Libreria Mappa Leaflet CSS -->
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
|
|
|
<!-- Foglio di Stile Esterno Modularizzato (Cache Buster) -->
|
|
<link rel="stylesheet" href="/static/css/style.css?v=blueprint-header-fix">
|
|
</head>
|
|
<body>
|
|
|
|
<div id="top-bar-container">
|
|
<div id="top-bar">
|
|
<div class="title-brand">SCHEMATIC // FLEET C2</div>
|
|
|
|
<div class="nav-tabs">
|
|
<button class="nav-tab active" onclick="switchView('home')" id="tab-home">HOME</button>
|
|
<button class="nav-tab" onclick="switchView('nodes')" id="tab-nodes">NODES</button>
|
|
<button class="nav-tab" onclick="switchView('map')" id="tab-map">MAP</button>
|
|
<button class="nav-tab" onclick="switchView('aprs')" id="tab-aprs">APRS</button>
|
|
</div>
|
|
|
|
<div class="top-bar-right">
|
|
<span id="mqtt-badge" class="mqtt-badge mqtt-offline">MQTT: CHK</span>
|
|
<button class="theme-switch" id="lang-btn" onclick="toggleLang()" data-i18n-title="ttLang">ITA</button>
|
|
<button class="theme-switch" id="push-btn" onclick="subscribeToPush()">PUSH</button>
|
|
<div id="auth-container" style="display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- VISTA FLEET MAP -->
|
|
<div id="view-map" style="display: none; padding: 0 20px;">
|
|
<div id="map-container"></div>
|
|
</div>
|
|
|
|
<!-- VISTA APRS LOGS -->
|
|
<div id="view-aprs" style="display: none;">
|
|
<div style="max-width: 1400px; margin: 0 auto 30px auto; padding: 0 20px;">
|
|
<div style="display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed var(--border-main); padding-bottom: 5px; margin-bottom: 15px;">
|
|
<h3 style="margin: 0; font-weight: 300; letter-spacing: 2px; color: var(--text-main);">[ APRS_TRAFFIC ]</h3>
|
|
<button class="btn-cmd" onclick="document.getElementById('aprs-body').innerHTML='';" style="width: auto; padding: 4px 12px; flex: none;">[ CLEAR ]</button>
|
|
</div>
|
|
<div class="table-container" style="max-height: calc(100vh - 200px);">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 100px;">TIME</th>
|
|
<th style="width: 120px;">SOURCE</th>
|
|
<th style="width: 120px;">DEST</th>
|
|
<th style="width: 200px;">PATH</th>
|
|
<th>PAYLOAD</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="aprs-body"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- VISTA FOCUS NODO SINGOLO (FULL SCREEN) -->
|
|
<div id="view-focus" style="display: none;">
|
|
<div style="max-width: 1400px; margin: 0 auto; padding: 0 20px;">
|
|
<!-- Header Ritorno e Titolo -->
|
|
<div style="display: flex; justify-content: space-between; align-items: center; border-bottom: 2px dashed var(--border-main); padding-bottom: 15px; margin-bottom: 25px; flex-wrap: wrap; gap: 15px;">
|
|
<button class="btn-cmd" style="width: auto; padding: 12px 25px; font-size: 1.1rem; border-color: var(--accent); color: var(--accent) !important;" onclick="closeNodeFocus()">[ < RETURN TO OVERVIEW ]</button>
|
|
<div style="text-align: right; flex-grow: 1;">
|
|
<h2 id="focus-name" style="margin: 0; color: var(--text-main); font-weight: 300; font-size: 2.5rem; letter-spacing: 2px; display: flex; align-items: center; justify-content: flex-end; gap: 15px;">--</h2>
|
|
<div id="focus-id" style="color: var(--primary); font-family: 'JetBrains Mono', monospace; font-size: 1.2rem; margin-top: 5px;">--</div>
|
|
<div id="focus-status" style="font-family: 'JetBrains Mono', monospace; font-size: 1.2rem; margin-top: 5px; font-weight: bold;">--</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));">
|
|
<!-- COLONNA SX: HARDWARE E RF -->
|
|
<div style="display: flex; flex-direction: column; gap: 20px;">
|
|
<div class="card" style="border-width: 1px !important;">
|
|
<h3 style="margin: 0 0 20px 0; color: var(--accent); font-weight: 300; font-size: 1.3rem; letter-spacing: 2px;">[ HARDWARE_TELEMETRY ]</h3>
|
|
<div style="font-size: 1.2rem; font-family: 'JetBrains Mono', monospace; display: flex; flex-direction: column; gap: 15px;">
|
|
<div style="display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border-light); padding-bottom: 8px;"><span>CPU_LOAD:</span> <span id="focus-cpu">--</span></div>
|
|
<div style="display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border-light); padding-bottom: 8px;"><span>SYS_TEMP:</span> <span id="focus-temp">--</span></div>
|
|
<div style="display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border-light); padding-bottom: 8px;"><span>RAM_USAGE:</span> <span id="focus-ram">--</span></div>
|
|
<div style="display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border-light); padding-bottom: 8px;"><span>DISK_SPACE:</span> <span id="focus-disk">--</span></div>
|
|
<div style="display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border-light); padding-bottom: 8px;"><span>UPTIME:</span> <span id="focus-up">--</span></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="border-width: 1px !important;">
|
|
<h3 style="margin: 0 0 20px 0; color: var(--primary); font-weight: 300; font-size: 1.3rem; letter-spacing: 2px;">[ RF_CONFIGURATION ]</h3>
|
|
<div style="font-size: 1.2rem; font-family: 'JetBrains Mono', monospace; display: flex; flex-direction: column; gap: 15px;">
|
|
<div style="display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border-light); padding-bottom: 8px;"><span>TX_FREQ:</span> <span id="focus-tx" style="color: var(--danger);">--</span></div>
|
|
<div style="display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border-light); padding-bottom: 8px;"><span>RX_FREQ:</span> <span id="focus-rx" style="color: var(--success);">--</span></div>
|
|
<div style="display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border-light); padding-bottom: 8px;"><span>LOCATION:</span> <span id="focus-loc" style="color: var(--text-main);">--</span></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" id="focus-modes-card" style="border-width: 1px !important; display: none;">
|
|
<h3 style="margin: 0 0 15px 0; color: #fff; font-weight: 300; font-size: 1.3rem; letter-spacing: 2px;">[ OPERATING_MODES ]</h3>
|
|
<div id="focus-modes-toggles" style="display: flex; flex-wrap: wrap; gap: 10px; font-family: 'JetBrains Mono', monospace;">
|
|
<span style="color:var(--text-muted); font-size: 0.9rem;">WAITING FOR CONFIG...</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- COLONNA DX: SOFTWARE E LOG -->
|
|
<div style="display: flex; flex-direction: column; gap: 20px;">
|
|
<div class="card" style="border-width: 1px !important; flex: 1;">
|
|
<h3 style="margin: 0 0 20px 0; color: var(--success); font-weight: 300; font-size: 1.3rem; letter-spacing: 2px;">[ ACTIVE_GATEWAYS ]</h3>
|
|
<div id="focus-gw" style="display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; min-height: 40px; font-size: 0.9rem;"></div>
|
|
|
|
<h3 style="margin: 0 0 20px 0; color: var(--primary); font-weight: 300; font-size: 1.3rem; letter-spacing: 2px;">[ TIMESLOTS_MODES ]</h3>
|
|
<div id="focus-ts" style="display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; font-family: 'JetBrains Mono', monospace; font-size: 1.2rem;"></div>
|
|
|
|
<h3 style="margin: 0 0 15px 0; color: var(--border-main); font-weight: 300; font-size: 1.3rem; letter-spacing: 2px;">[ LIVE_TERMINAL ]</h3>
|
|
<div id="focus-log" class="terminal-log" style="height: 320px; max-height: 320px; font-size: 0.95rem; border-color: var(--border-main);">> AWAITING_STREAM...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- FOCUS LASTHEARD -->
|
|
<div style="margin-top: 30px; border-top: 1px dashed var(--border-light); padding-top: 20px;">
|
|
<h3 style="margin: 0 0 15px 0; color: var(--text-main); font-weight: 300; font-size: 1.3rem; letter-spacing: 2px;">[ NODE_LASTHEARD ]</h3>
|
|
<div class="table-container" style="margin: 0; max-height: 400px;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th data-i18n="thTime">TIME</th>
|
|
<th data-i18n="thRep">REPEATER</th>
|
|
<th data-i18n="thMode">MODE</th>
|
|
<th style="text-align: center;">YSF_MODE</th>
|
|
<th style="text-align: center;">SOURCE</th>
|
|
<th style="text-align: center;">REF/SLOT</th>
|
|
<th data-i18n="thCall">CALLSIGN</th>
|
|
<th>TARGET</th>
|
|
<th data-i18n="thDur">DUR</th>
|
|
<th>BER</th>
|
|
<th>RSSI</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="focus-lastheard-body"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- CONTROLLI ADMIN DEL NODO -->
|
|
<div id="focus-controls" style="display: none; margin-top: 30px; border: 1px dashed var(--danger); padding: 30px; background: rgba(6, 36, 111, 0.6); backdrop-filter: blur(2px);">
|
|
<h3 style="margin: 0 0 20px 0; color: var(--danger); font-weight: 300; font-size: 1.5rem; text-align: center; letter-spacing: 2px;">[ ADMIN_CONTROLS ]</h3>
|
|
<div id="focus-admin-btns" style="display: flex; gap: 15px; flex-wrap: wrap; justify-content: center;">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- VISTA NODI IN GRIGLIA -->
|
|
<div id="view-nodes" style="display: none;">
|
|
<div style="max-width: 1400px; margin: 0 auto; padding: 0 20px;">
|
|
<div class="filter-bar">
|
|
<div style="display: flex; gap: 8px; flex-wrap: wrap;" id="node-filters">
|
|
<button class="filter-pill active" onclick="setFilter('all')" data-i18n="filtAll">ALL_NODES</button>
|
|
<button class="filter-pill" onclick="setFilter('online')" data-i18n="filtOnline">ONLINE</button>
|
|
<button class="filter-pill" onclick="setFilter('offline')" data-i18n="filtOffline">OFFLINE</button>
|
|
<button class="filter-pill pill-warn" onclick="setFilter('alerts')" data-i18n="filtAlerts">ALERTS</button>
|
|
<div style="width: 1px; background: var(--border-light); margin: 0 5px;"></div>
|
|
<button class="filter-pill" onclick="setFilter('dmr')">DMR</button>
|
|
<button class="filter-pill" onclick="setFilter('ysf')">YSF</button>
|
|
<button class="filter-pill" onclick="setFilter('d-star')">D-STAR</button>
|
|
<button class="filter-pill" onclick="setFilter('nxdn')">NXDN</button>
|
|
</div>
|
|
<div style="display: flex; gap: 10px; align-items: center; width: auto; flex-grow: 1; justify-content: flex-end;">
|
|
<input type="text" id="node-search" placeholder="SEARCH ID/CALL..." onkeyup="applyFilters()" style="flex-grow: 1; max-width: 200px;">
|
|
<button id="view-toggle-btn" class="btn-cmd" style="flex: 0 0 auto; width: auto;" onclick="toggleViewMode()" title="Toggle Grid/List View">[ GRID ]</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid" id="client-grid"></div>
|
|
</div>
|
|
|
|
<!-- VISTA HOME -->
|
|
<div id="view-home">
|
|
<div style="max-width: 1400px; margin: 0 auto 20px auto; padding: 0 20px;">
|
|
<h3 style="margin: 0 0 15px 0; font-weight: 300; letter-spacing: 2px; color: var(--text-main); border-bottom: 1px dashed var(--border-main); padding-bottom: 5px;">
|
|
[ FLEET_STATUS ]
|
|
</h3>
|
|
<div id="home-mini-nodes" style="display: flex; flex-wrap: wrap; justify-content: center; gap: 15px;"></div>
|
|
</div>
|
|
|
|
<div style="max-width: 1400px; margin: 0 auto 30px auto;">
|
|
<div style="padding: 0 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; border-bottom: 1px dashed var(--border-main); padding-bottom: 5px;">
|
|
<h3 style="margin: 0; font-weight: 300; letter-spacing: 2px; color: var(--text-main);" data-i18n="lastTransits">[ LASTHEARD ]</h3>
|
|
<div style="display: flex; align-items: center; gap: 10px; flex-wrap: wrap;">
|
|
<div style="display: flex; align-items: center; gap: 6px;">
|
|
<label for="log-limit-select" data-i18n="lblLogLimit" style="font-size: 0.8rem; color: var(--text-muted); font-weight: 300;">ROWS:</label>
|
|
<select id="log-limit-select" onchange="changeLogLimit(this.value)" style="font-weight: 400; cursor: pointer;">
|
|
<option value="30">30</option>
|
|
<option value="60">60</option>
|
|
<option value="100">100</option>
|
|
<option value="200">200</option>
|
|
</select>
|
|
</div>
|
|
<select id="stat-node-filter" onchange="refreshStats(); refreshLogs();" style="font-weight: 400; cursor: pointer;">
|
|
<option value="all">ALL_NODES</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="table-container" style="margin-bottom: 0;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th data-i18n="thTime">TIME</th>
|
|
<th data-i18n="thRep">REPEATER</th>
|
|
<th data-i18n="thMode">MODE</th>
|
|
<th style="text-align: center;">YSF_MODE</th>
|
|
<th style="text-align: center;">SOURCE</th>
|
|
<th style="text-align: center;">REF/SLOT</th>
|
|
<th data-i18n="thCall">CALLSIGN</th>
|
|
<th>TARGET</th>
|
|
<th data-i18n="thDur">DUR</th>
|
|
<th>BER</th>
|
|
<th>RSSI</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="log-body"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="max-width: 1400px; margin: 0 auto 30px auto; padding: 0 20px;">
|
|
<h3 style="margin: 0 0 15px 0; font-weight: 300; letter-spacing: 2px; color: var(--text-main); border-bottom: 1px dashed var(--border-main); padding-bottom: 5px;" data-i18n="statTitle">[ DAILY_STATISTICS ]</h3>
|
|
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;">
|
|
<div class="card" style="border-left: 1px solid var(--accent) !important; padding: 15px;">
|
|
<h4 style="margin: 0 0 10px 0; color: var(--accent); font-weight: 300; letter-spacing: 1px;" data-i18n="statTopTG">TOP_TALKGROUPS</h4>
|
|
<div id="stat-tgs" style="font-size: 0.85rem; color: var(--text-muted); line-height: 1.8;" data-i18n="statLoading">LOADING...</div>
|
|
</div>
|
|
|
|
<div class="card" style="border-left: 1px solid var(--success) !important; padding: 15px;">
|
|
<h4 style="margin: 0 0 10px 0; color: var(--success); font-weight: 300; letter-spacing: 1px;" data-i18n="statTopCall">TOP_CALLSIGNS</h4>
|
|
<div id="stat-calls" style="font-size: 0.85rem; color: var(--text-muted); line-height: 1.8;" data-i18n="statLoading">LOADING...</div>
|
|
</div>
|
|
|
|
<div class="card" style="border-left: 1px solid var(--primary) !important; padding: 15px; display: flex; justify-content: space-around; align-items: center; text-align: center; flex-direction: row;">
|
|
<div>
|
|
<div style="font-size: 1.8rem; font-weight: 300; color: var(--text-main); font-family: 'JetBrains Mono', monospace;"><span id="stat-avg">--</span>s</div>
|
|
<div style="font-size: 0.75rem; color: var(--border-main); text-transform: uppercase; font-weight: 300; letter-spacing: 1px;" data-i18n="statAvgDur">AVG_DURATION</div>
|
|
</div>
|
|
<div style="width: 1px; height: 50px; border-left: 1px dashed var(--border-light);"></div>
|
|
<div>
|
|
<div style="font-size: 1.8rem; font-weight: 300; color: var(--text-main); font-family: 'JetBrains Mono', monospace;"><span id="stat-today">--</span></div>
|
|
<div style="font-size: 0.75rem; color: var(--border-main); text-transform: uppercase; font-weight: 300; letter-spacing: 1px;" data-i18n="statTodayTx">TRANSITS_TODAY</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer>
|
|
<div style="text-align: center; padding: 25px; color: var(--border-light); font-size: 0.85rem; font-weight: 300; display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap;">
|
|
<span>SYS_OP: IV3JDV @ ARIFVG</span>
|
|
<span>|</span>
|
|
<a href="https://git.arifvg.it/iv3jdv/fleet-control-server" target="_blank" style="color: inherit; text-decoration: none;">GITEA_REPO</a>
|
|
<span>|</span>
|
|
<span style="color: var(--accent);">REV: {{ git_commit }}</span>
|
|
<span>|</span>
|
|
<span id="last-update">SYNC: --:--</span>
|
|
</div>
|
|
</footer>
|
|
|
|
<!-- MODALI -->
|
|
<div id="login-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:400px;">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px dashed var(--border-main); padding-bottom:10px; margin-bottom:15px;">
|
|
<h2 style="margin:0; color:var(--primary); font-weight:300;" data-i18n="loginTitle">[ SYSTEM_LOGIN ]</h2>
|
|
<button onclick="closeLoginModal()" class="btn-cmd" style="border-color:var(--danger); color:var(--danger) !important; width: 24px; height: 24px; flex: 0 0 24px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;">X</button>
|
|
</div>
|
|
<div style="display:flex; flex-direction:column; gap:15px; margin-top: 20px;">
|
|
<input type="text" id="modal-username" placeholder="USR" onkeypress="handleLoginEnter(event)">
|
|
<input type="password" id="modal-password" placeholder="PWD" onkeypress="handleLoginEnter(event)">
|
|
<button onclick="performLogin()" class="btn-cmd" style="border-color:var(--success); color:var(--success) !important;">EXECUTE_LOGIN</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="admin-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:900px;">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px dashed var(--border-main); padding-bottom:10px; margin-bottom:20px;">
|
|
<h2 style="margin:0; color:var(--text-main); font-weight:300;" data-i18n="adminTitle">[ SYS_ADMIN ]</h2>
|
|
<button onclick="closeAdmin()" class="btn-cmd" style="border-color:var(--danger); color:var(--danger) !important; width: 24px; height: 24px; flex: 0 0 24px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;">X</button>
|
|
</div>
|
|
<div style="display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; background:rgba(0,0,0,0.2); padding:15px; align-items:center; border: 1px solid var(--border-light);">
|
|
<input type="text" id="new-user" placeholder="USR" style="flex:1; min-width:120px;">
|
|
<input type="password" id="new-pass" placeholder="PWD" style="flex:1; min-width:120px;">
|
|
<select id="new-role" style="flex:none; width: 80px;"><option value="operator" data-i18n="roleOp">OP</option><option value="admin">ADM</option></select>
|
|
<input type="text" id="new-nodes" placeholder="NODES (IR3UIC,IR3Q)" style="flex:2; min-width:150px;">
|
|
<button id="btn-user-submit" onclick="submitUser()" class="btn-cmd" style="border-color:var(--success); color:var(--success) !important; flex:none; width: 80px;" data-i18n="btnAdd">ADD</button>
|
|
<button id="btn-user-cancel" onclick="cancelEdit()" class="btn-cmd" style="display:none; width: 24px; height: 24px; flex: 0 0 24px; padding: 0; align-items: center; justify-content: center; font-size: 0.8rem;">X</button>
|
|
</div>
|
|
<div style="margin-bottom:20px; background:rgba(0,0,0,0.2); padding:20px; border: 1px solid var(--border-light);">
|
|
<h4 style="margin:0 0 15px 0; color:var(--primary); font-weight:300;" data-i18n="adminDBSync">[ DB_SYNC_CFG ]</h4>
|
|
<div style="display:grid; grid-template-columns: 1fr 1fr; gap:15px; margin-bottom:15px;">
|
|
<div><label style="font-size:0.8rem; font-weight:300; display:block; margin-bottom:5px; color:var(--text-muted);">URL_DMR (.dat):</label><input type="text" id="url-dmr-input" style="width:100%;"></div>
|
|
<div><label style="font-size:0.8rem; font-weight:300; display:block; margin-bottom:5px; color:var(--text-muted);">URL_NXDN (.csv):</label><input type="text" id="url-nxdn-input" style="width:100%;"></div>
|
|
</div>
|
|
<div style="display:flex; justify-content:space-between; align-items:center; border-top:1px dashed var(--border-light); padding-top:15px;">
|
|
<div style="display:flex; align-items:center; gap:10px;"><label style="font-size:0.8rem; font-weight:300;" data-i18n="adminTime">CRON_TIME:</label><input type="time" id="update-time-input"></div>
|
|
<button onclick="saveSettings()" class="btn-cmd" style="border-color:var(--accent); color:var(--accent) !important; max-width: 250px; flex: none;" data-i18n="adminSave">SAVE_CFG</button>
|
|
</div>
|
|
</div>
|
|
<div style="overflow-x:auto;">
|
|
<table style="width:100%; border-collapse:collapse; text-align:left;">
|
|
<thead style="background: transparent;"><tr><th>ID</th><th data-i18n="thUser">USR</th><th data-i18n="thRole">ROLE</th><th data-i18n="thNodes">NODES</th><th style="text-align:center;" data-i18n="thActs">CMD</th></tr></thead>
|
|
<tbody id="users-table-body"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="services-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:550px;">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px dashed var(--border-main); padding-bottom:10px; margin-bottom:15px;">
|
|
<h2 style="margin:0; color:var(--accent); font-weight:300;">[ <span data-i18n="modSvcTitle">DAEMONS:</span> <span id="svc-modal-title" style="color:var(--text-main);"></span> ]</h2>
|
|
<button onclick="closeServicesModal()" class="btn-cmd" style="border-color:var(--danger); color:var(--danger) !important; width: 24px; height: 24px; flex: 0 0 24px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;">X</button>
|
|
</div>
|
|
<div id="services-list" style="max-height: 400px; overflow-y: auto;"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="configs-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:500px;">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px dashed var(--border-main); padding-bottom:10px; margin-bottom:15px;">
|
|
<h2 style="margin:0; color:var(--primary); font-weight:300;" data-i18n="modFileTitle">[ CFG_FILES ]</h2>
|
|
<button onclick="closeConfigsModal()" class="btn-cmd" style="border-color:var(--danger); color:var(--danger) !important; width: 24px; height: 24px; flex: 0 0 24px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;">X</button>
|
|
</div>
|
|
<div id="configs-list" style="display:flex; flex-direction:column; gap:0;"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="editor-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:900px;">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; border-bottom: 1px dashed var(--border-main); padding-bottom: 10px;">
|
|
<h3 style="margin:0; color:var(--accent); font-weight:300;">[ <span data-i18n="modEditTitle">EDIT:</span> <span id="editor-title" style="color:var(--text-main);"></span> ]</h3>
|
|
<button onclick="closeEditorModal()" class="btn-cmd" style="border-color:var(--danger); color:var(--danger) !important; width: 24px; height: 24px; flex: 0 0 24px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;">X</button>
|
|
</div>
|
|
<textarea id="config-textarea" spellcheck="false" style="width:100%; height:55vh; background:rgba(0,0,0,0.3); color:var(--text-main); font-family:'JetBrains Mono', monospace; font-size:0.85rem; padding:15px; border:1px solid var(--border-light); resize:none; outline:none; margin-top: 15px;"></textarea>
|
|
<div style="display:flex; justify-content:space-between; margin-top:20px; align-items:center;">
|
|
<span id="editor-status" style="font-size:0.9rem; font-weight:300; font-family:'JetBrains Mono',monospace;"></span>
|
|
<button onclick="saveConfig()" class="btn-cmd" style="border-color:var(--danger); color:var(--danger) !important; max-width: 250px; flex: none;" data-i18n="btnSave">WRITE_FILE</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="alert-modal" class="modal-overlay modal-top">
|
|
<div class="modal-content" style="max-width:400px; text-align:center; border: 1px solid var(--primary);" id="alert-box">
|
|
<h2 style="margin-top:0; font-weight:300;" id="alert-title">[ INFO ]</h2>
|
|
<p style="margin-bottom:25px; color:var(--text-main); font-weight: 300;" id="alert-desc">MSG</p>
|
|
<button onclick="document.getElementById('alert-modal').style.display='none'" class="btn-cmd" style="border-color:var(--primary); color:var(--primary) !important; width:100%;">ACK</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="confirm-modal" class="modal-overlay modal-top">
|
|
<div class="modal-content" style="max-width:400px; text-align:center; border: 1px solid var(--danger);" id="confirm-box">
|
|
<h2 style="margin-top:0; font-weight:300;" id="confirm-title">[ WARN ]</h2>
|
|
<p style="margin-bottom:25px; color:var(--text-main); font-weight: 300;" id="confirm-desc">SURE?</p>
|
|
<div style="display:flex; flex-direction:column; gap:10px;">
|
|
<button id="confirm-yes-btn" onclick="executeConfirmAction()" class="btn-cmd" style="border-color:var(--danger); color:var(--danger) !important;">EXECUTE</button>
|
|
<button id="confirm-cancel-btn" onclick="document.getElementById('confirm-modal').style.display='none'" class="btn-cmd">ABORT</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="password-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:400px; text-align:center;">
|
|
<h2 style="margin-top:0; color:var(--accent); border-bottom: 1px dashed var(--border-main); padding-bottom: 10px; font-weight:300;" data-i18n="btnPass">[ CHG_PWD ]</h2>
|
|
<p style="margin-bottom:20px; font-weight: 300;" data-i18n="promptPass">NEW PWD:</p>
|
|
<input type="password" id="new-password-input" style="width:100%; text-align:center; margin-bottom: 20px;">
|
|
<div style="display:flex; flex-direction:column; gap:10px;">
|
|
<button onclick="executePasswordChange()" class="btn-cmd" style="border-color:var(--success); color:var(--success) !important;" data-i18n="titleSave">SAVE</button>
|
|
<button onclick="closePasswordModal()" class="btn-cmd" data-i18n="btnCancel">ABORT</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="override-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:400px; text-align:center; border: 1px solid var(--danger);">
|
|
<h2 style="margin-top:0; color:var(--danger); font-weight:300;" data-i18n="titleGlobal">[ GBL_OVR ]</h2>
|
|
<p style="margin-bottom:25px; font-weight: 300; color:var(--text-muted);" id="override-desc">SELECT PROF:</p>
|
|
<div id="global-btn-container" style="display:flex; flex-direction:column; gap:10px; margin-bottom: 15px;"></div>
|
|
<button onclick="document.getElementById('override-modal').style.display='none'" class="btn-cmd" data-i18n="btnCancel">ABORT</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="reset-hat-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:400px; text-align:center; border: 1px solid var(--danger);">
|
|
<h2 style="margin-top:0; color:var(--danger); font-weight:300;" data-i18n="btnHat">[ RST_HAT ]</h2>
|
|
<p style="margin-bottom:25px; font-weight: 300;" id="reset-hat-desc">PHYSICAL RESET?</p>
|
|
<div style="display:flex; flex-direction:column; gap:10px;">
|
|
<button onclick="executeHatReset()" class="btn-cmd blink" style="border-color:var(--danger); color:var(--danger) !important;" data-i18n="btnConfReset">CONFIRM</button>
|
|
<button onclick="closeHatResetModal()" class="btn-cmd" data-i18n="btnCancel">ABORT</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="update-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:400px; text-align:center;">
|
|
<h2 style="margin-top:0; color:var(--primary); border-bottom: 1px dashed var(--border-main); padding-bottom: 10px; font-weight:300;" data-i18n="modUpdateTitle">[ GBL_UPDATE ]</h2>
|
|
<p style="margin-bottom:25px; font-weight: 300;" data-i18n="confUpdate">REQ DATA?</p>
|
|
<div style="display:flex; flex-direction:column; gap:10px;">
|
|
<button onclick="executeUpdateRequest()" class="btn-cmd" style="border-color:var(--primary); color:var(--primary) !important;" data-i18n="btnReqCfg">EXECUTE</button>
|
|
<button onclick="closeUpdateModal()" class="btn-cmd" data-i18n="btnCancel">ABORT</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="versions-modal" class="modal-overlay">
|
|
<div class="modal-content" style="max-width:450px;">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px dashed var(--border-main); padding-bottom:10px; margin-bottom:15px;">
|
|
<h2 style="margin:0; color:var(--primary); font-weight:300;" data-i18n="modVersions">[ SW_VERSIONS ]</h2>
|
|
<button onclick="closeVersionsModal()" class="btn-cmd" style="border-color:var(--danger); color:var(--danger) !important; width: 24px; height: 24px; flex: 0 0 24px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;">X</button>
|
|
</div>
|
|
<div id="versions-list" style="background: transparent; padding: 15px; border: 1px solid var(--border-light); font-size: 0.85rem; line-height: 1.8;"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- LIBRERIE ESTERNE -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.7.2/socket.io.min.js"></script>
|
|
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
|
|
|
<!-- MOTORE MODULARIZZATO JS (Cache Buster aggiunto per forzare il refresh) -->
|
|
<script src="/static/js/modals.js?v=blueprint4"></script>
|
|
<script src="/static/js/app.js?v=blueprint-modes-admin-only-final"></script>
|
|
|
|
<!-- SERVICE WORKER -->
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
window.addEventListener('load', () => {
|
|
navigator.serviceWorker.register('/sw.js').catch(err => {
|
|
console.log('SW_ERR: ', err);
|
|
});
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|