fix(dashboard): hide logs path on Windows (no log sink yet)
This commit is contained in:
@@ -1150,10 +1150,16 @@ async function refresh() {
|
|||||||
document.getElementById('footerSrtt').textContent = stats.srtt ? 'on' : 'off';
|
document.getElementById('footerSrtt').textContent = stats.srtt ? 'on' : 'off';
|
||||||
document.getElementById('footerSrtt').style.color = stats.srtt ? 'var(--emerald)' : 'var(--text-dim)';
|
document.getElementById('footerSrtt').style.color = stats.srtt ? 'var(--emerald)' : 'var(--text-dim)';
|
||||||
if (!document.getElementById('footerLogs').textContent) {
|
if (!document.getElementById('footerLogs').textContent) {
|
||||||
|
const isWin = stats.data_dir && stats.data_dir.includes(':\\');
|
||||||
const isMac = stats.data_dir && stats.data_dir.includes('/usr/local/');
|
const isMac = stats.data_dir && stats.data_dir.includes('/usr/local/');
|
||||||
document.getElementById('footerLogs').textContent = isMac
|
const logsEl = document.getElementById('footerLogs');
|
||||||
? '/usr/local/var/log/numa.log'
|
if (isWin) {
|
||||||
: 'journalctl -u numa -f';
|
document.getElementById('footerLogsWrap').style.display = 'none';
|
||||||
|
} else {
|
||||||
|
logsEl.textContent = isMac
|
||||||
|
? '/usr/local/var/log/numa.log'
|
||||||
|
: 'journalctl -u numa -f';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// LAN status indicator
|
// LAN status indicator
|
||||||
@@ -1517,7 +1523,7 @@ setInterval(refresh, 2000);
|
|||||||
<div style="text-align:center;padding:0.8rem 0.8rem 0.4rem;font-family:var(--font-mono);font-size:0.68rem;color:var(--text-dim);line-height:1.8;">
|
<div style="text-align:center;padding:0.8rem 0.8rem 0.4rem;font-family:var(--font-mono);font-size:0.68rem;color:var(--text-dim);line-height:1.8;">
|
||||||
Config: <span id="footerConfig" style="user-select:all;color:var(--emerald);"></span>
|
Config: <span id="footerConfig" style="user-select:all;color:var(--emerald);"></span>
|
||||||
· Data: <span id="footerData" style="user-select:all;color:var(--emerald);"></span>
|
· Data: <span id="footerData" style="user-select:all;color:var(--emerald);"></span>
|
||||||
· Logs: <span id="footerLogs" style="user-select:all;color:var(--emerald);"></span>
|
<span id="footerLogsWrap">· Logs: <span id="footerLogs" style="user-select:all;color:var(--emerald);"></span></span>
|
||||||
<br>
|
<br>
|
||||||
Upstream: <span id="footerUpstream" style="user-select:all;color:var(--emerald);"></span>
|
Upstream: <span id="footerUpstream" style="user-select:all;color:var(--emerald);"></span>
|
||||||
· DNSSEC: <span id="footerDnssec" style="color:var(--text-dim);">—</span>
|
· DNSSEC: <span id="footerDnssec" style="color:var(--text-dim);">—</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user