feat: add D-Star source_ext support in dashboard and database
This commit is contained in:
+13
-2
@@ -795,7 +795,19 @@
|
||||
const res = await fetch('/api/logs'); const logs = await res.json();
|
||||
const tbody = document.getElementById('log-body'); let tableHTML = ""; let networkLogs = {};
|
||||
logs.forEach(row => {
|
||||
const time = row[0] ? row[0].split(' ')[1] : "--:--"; const clientId = row[1]; const protocol = row[2] || "DMR"; const source = row[3] || "---"; const target = row[4] || "---"; const rawSlot = row[5];
|
||||
const time = row[0] ? row[0].split(' ')[1] : "--:--";
|
||||
const clientId = row[1];
|
||||
const protocol = row[2] || "DMR";
|
||||
let source = row[3] || "---";
|
||||
const target = row[4] || "---";
|
||||
const rawSlot = row[5];
|
||||
const source_ext = row[8]; // <--- NUOVO CAMPO DAL BACKEND
|
||||
|
||||
// Formattiamo il source_ext se presente e non vuoto
|
||||
if (source_ext && source_ext.trim() !== "") {
|
||||
source = `${source} <span style="font-size:0.8em; color:#94a3b8; font-family:'JetBrains Mono', monospace;">/${source_ext}</span>`;
|
||||
}
|
||||
|
||||
const slotDisplay = protocol === "DMR" ? `TS${rawSlot}` : "--";
|
||||
let protoColor = "#3b82f6"; if (protocol === "NXDN") protoColor = "#10b981"; else if (protocol === "YSF") protoColor = "#8b5cf6"; else if (protocol === "D-STAR") protoColor = "#06b6d4"; else if (protocol === "P25") protoColor = "#f59e0b";
|
||||
|
||||
@@ -810,7 +822,6 @@
|
||||
clients.forEach(c => { const localDiv = document.getElementById(`sys-log-${c.id}`); if (localDiv && networkLogs[c.id]) { localDiv.innerHTML = networkLogs[c.id]; } });
|
||||
} catch (e) { console.error(e); }
|
||||
}
|
||||
|
||||
// --- USER MANAGEMENT (ADD & EDIT) ---
|
||||
async function openAdmin() { document.getElementById('admin-modal').style.display = 'flex'; loadUsers(); loadSettings(); cancelEdit(); }
|
||||
function closeAdmin() { document.getElementById('admin-modal').style.display = 'none'; cancelEdit(); }
|
||||
|
||||
Reference in New Issue
Block a user