Network: status reports mask/gw/dns; UI shows the DHCP lease in the static fields
With DHCP on, the greyed-out IP/netmask/gateway/DNS fields show the addresses in use. Unticking DHCP keeps them as the starting point for a static setup. (Static addressing itself is not applied yet.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -341,6 +341,13 @@ function read() {
|
||||
return out;
|
||||
}
|
||||
|
||||
// With DHCP on, the greyed-out static fields show what DHCP gave us. Unticking DHCP leaves the values
|
||||
// there (a starting point for static addressing) until they are edited.
|
||||
function netLive() {
|
||||
if (!f['net.dhcp'].checked || !st.ip) return;
|
||||
for (const k of ['ip','mask','gw','dns']) f['net.' + k].value = st[k] ?? '';
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
PROJECT.toggle?.(f);
|
||||
const role = f['ptp.role'].value;
|
||||
@@ -354,6 +361,7 @@ function toggle() {
|
||||
}
|
||||
// VLAN split: default route lives on the internet VLAN, so the AES67 side gets no gateway/DNS.
|
||||
if (vlan) f['net.gw'].disabled = f['net.dns'].disabled = true;
|
||||
netLive();
|
||||
// RTP multicast must be 224.0.2.0 – 239.255.255.255 (same range Riedel Director enforces).
|
||||
const m = f['aes67.mcast'], o = m.value.split('.').map(Number);
|
||||
const ok = o.length === 4 && o.every(x => Number.isInteger(x) && x >= 0 && x <= 255) &&
|
||||
@@ -497,6 +505,7 @@ async function poll() {
|
||||
...temps(st.temps)
|
||||
});
|
||||
showPtp(st.ptp);
|
||||
netLive();
|
||||
sdp();
|
||||
} catch { table($('status'), {'Device': 'offline'}); showPtp(null); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user