system: show the hardware model on the System page

machine.machine_name is already reported in /information.json as hw_ver;
surface it read-only on the System Settings page so the exact build
target is visible in the UI, without adding a redundant JSON field.
This commit is contained in:
d00f
2026-07-25 13:21:13 +02:00
parent f21b3a32bd
commit e6cd362a1e
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -138,6 +138,7 @@ var LANG = {
sys_tab_console: 'Console', sys_tab_console: 'Console',
sys_heading: 'System Settings', sys_heading: 'System Settings',
sys_ip: 'IP address:', sys_ip: 'IP address:',
sys_model: 'Model:',
sys_hostname: 'Hostname:', sys_hostname: 'Hostname:',
sys_apply: 'Apply', sys_apply: 'Apply',
sys_netmask: 'Netmask:', sys_netmask: 'Netmask:',
@@ -319,6 +320,7 @@ var LANG = {
sys_tab_console: 'コンソール', sys_tab_console: 'コンソール',
sys_heading: 'システム設定', sys_heading: 'システム設定',
sys_ip: 'IP アドレス:', sys_ip: 'IP アドレス:',
sys_model: 'モデル:',
sys_hostname: 'ホスト名:', sys_hostname: 'ホスト名:',
sys_apply: '適用', sys_apply: '適用',
sys_netmask: 'ネットマスク:', sys_netmask: 'ネットマスク:',
@@ -500,6 +502,7 @@ var LANG = {
sys_tab_console: '控制台', sys_tab_console: '控制台',
sys_heading: '系统设置', sys_heading: '系统设置',
sys_ip: 'IP 地址:', sys_ip: 'IP 地址:',
sys_model: '型号:',
sys_hostname: '主机名:', sys_hostname: '主机名:',
sys_apply: '应用', sys_apply: '应用',
sys_netmask: '子网掩码:', sys_netmask: '子网掩码:',
+4
View File
@@ -30,6 +30,10 @@
<div class="rcol"> <input id="hostname" type="text" maxlength="23" size="20"/> <div class="rcol"> <input id="hostname" type="text" maxlength="23" size="20"/>
<button onclick="hostSub()" data-i18n="sys_apply">Apply</button></div> <button onclick="hostSub()" data-i18n="sys_apply">Apply</button></div>
</div> </div>
<div class="row">
<div class="lcol"> <label data-i18n="sys_model">Model:</label></div>
<div class="rcol"><span id="model"></span></div>
</div>
<div class="row"> <div class="row">
<div class="lcol"> <label for="ip" data-i18n="sys_ip">IP address:</label></div> <div class="lcol"> <label for="ip" data-i18n="sys_ip">IP address:</label></div>
<div class="rcol"> <input id="ip" class="ip" type="text" minlength="7" maxlength="15" size="15"/></div> <div class="rcol"> <input id="ip" class="ip" type="text" minlength="7" maxlength="15" size="15"/></div>
+1
View File
@@ -132,6 +132,7 @@ function fetchIP() {
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 || ""; if (document.getElementById("hostname")) document.getElementById("hostname").value = s.hostname || "";
if (document.getElementById("model")) 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) => {