mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
system: drop the defensive checks around the System page fields
The hostname and model fields were populated through element-existence checks and empty-string fallbacks that the other fields on the page do without. Assign them the same way. Suggested-by: vDorst
This commit is contained in:
+2
-2
@@ -131,8 +131,8 @@ function fetchIP() {
|
|||||||
document.getElementById("ip").value=s.ip_address;
|
document.getElementById("ip").value=s.ip_address;
|
||||||
document.getElementById("netmask").value=s.ip_netmask;
|
document.getElementById("netmask").value=s.ip_netmask;
|
||||||
document.getElementById("gw").value=s.ip_gateway;
|
document.getElementById("gw").value=s.ip_gateway;
|
||||||
if (document.getElementById("hostname")) document.getElementById("hostname").value = s.hostname || "";
|
document.getElementById("hostname").value=s.hostname;
|
||||||
if (document.getElementById("model")) document.getElementById("model").textContent = s.hw_ver || "";
|
document.getElementById("model").textContent=s.hw_ver;
|
||||||
clearInterval(systemInterval);
|
clearInterval(systemInterval);
|
||||||
// Fetch and populate the config textbox
|
// Fetch and populate the config textbox
|
||||||
fetchConfig().then((configText) => {
|
fetchConfig().then((configText) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user