diff --git a/stage_ui/console_core/backend/app.py b/stage_ui/console_core/backend/app.py index 2c302f7..c428073 100644 --- a/stage_ui/console_core/backend/app.py +++ b/stage_ui/console_core/backend/app.py @@ -549,6 +549,59 @@ def ip_addresses_for_iface(iface): return {"ipv4": ipv4, "ipv6": ipv6} +def iface_exists(iface): + return os.path.exists(f"/sys/class/net/{iface}") + + +def read_sysfs_value(path): + return read_text(path).strip() + + +def mac_address_for_iface(iface): + if not iface_exists(iface): + return "" + return read_sysfs_value(f"/sys/class/net/{iface}/address") + + +def carrier_state_for_iface(iface): + if not iface_exists(iface): + return None + raw = read_sysfs_value(f"/sys/class/net/{iface}/carrier") + if raw == "1": + return True + if raw == "0": + return False + return None + + +def operstate_for_iface(iface): + if not iface_exists(iface): + return "" + return read_sysfs_value(f"/sys/class/net/{iface}/operstate") + + +def link_speed_for_iface(iface): + if not iface_exists(iface): + return "" + raw = read_sysfs_value(f"/sys/class/net/{iface}/speed") + if raw.isdigit(): + speed = int(raw) + if speed >= 1000 and speed % 1000 == 0: + return f"{speed // 1000} Gbps" + if speed > 0: + return f"{speed} Mbps" + if shutil.which("ethtool"): + rc, stdout, _ = run(["ethtool", iface], timeout=8) + if rc == 0: + for line in stdout.splitlines(): + text = line.strip() + if text.startswith("Speed:"): + value = text.split(":", 1)[1].strip() + if value and value.lower() != "unknown!": + return value.replace("Mb/s", " Mbps").replace("Gb/s", " Gbps") + return "" + + def gateway_for_iface(iface): rc, stdout, _ = run(["ip", "route", "show", "default", "dev", iface], timeout=8) if rc != 0: @@ -561,6 +614,19 @@ def gateway_for_iface(iface): return "" +def default_route_iface(): + rc, stdout, _ = run(["ip", "route", "show", "default"], timeout=8) + if rc != 0: + return "" + for raw in stdout.splitlines(): + parts = raw.split() + if "dev" in parts: + index = parts.index("dev") + if index + 1 < len(parts): + return parts[index + 1] + return "" + + def dns_servers_for_iface(iface): if nmcli_available(): rc, stdout, _ = run(["nmcli", "-g", "IP4.DNS", "dev", "show", iface], timeout=8) @@ -629,16 +695,72 @@ def get_network_activity(iface): } +def summarize_interface(iface, kind="ethernet"): + present = iface_exists(iface) + addresses = ip_addresses_for_iface(iface) if present else {"ipv4": [], "ipv6": []} + gateway = gateway_for_iface(iface) if present else "" + dns = dns_servers_for_iface(iface) if present else [] + activity = get_network_activity(iface) if present else {"rx_bytes_per_sec": None, "tx_bytes_per_sec": None} + nm_state = nmcli_device_state(iface) if present and nmcli_available() else {} + mac_address = mac_address_for_iface(iface) if present else "" + oper_state = operstate_for_iface(iface) if present else "" + carrier = carrier_state_for_iface(iface) if kind == "ethernet" and present else None + link_speed = link_speed_for_iface(iface) if kind == "ethernet" and present else "" + default_iface = default_route_iface() + is_default_route = bool(present and iface == default_iface) + + if not present: + status = "not available" + status_text = "Ethernet interface not available" if kind == "ethernet" else "Wi-Fi interface not available" + elif kind == "ethernet": + if carrier is False: + status = "disconnected" + status_text = "Ethernet cable not connected" + elif nm_state.get("state") == "connected" or gateway or addresses["ipv4"] or addresses["ipv6"]: + status = "connected" + status_text = "Connected" + else: + status = "disconnected" + status_text = "Disconnected" + else: + if nm_state.get("state") == "connected" or gateway or addresses["ipv4"] or addresses["ipv6"]: + status = "connected" + status_text = "Connected" + elif nm_state.get("state"): + status = nm_state.get("state") + status_text = nm_state.get("state").replace("-", " ").capitalize() + else: + status = "disconnected" + status_text = "Disconnected" + + return { + "interface": iface, + "kind": kind, + "present": present, + "status": status, + "status_text": status_text, + "connected": status == "connected", + "connection": nm_state.get("connection", ""), + "state": nm_state.get("state", "") or oper_state or status, + "addresses": addresses, + "gateway": gateway, + "dns": dns, + "activity": activity, + "mac_address": mac_address, + "link_speed": link_speed, + "carrier": carrier, + "is_default_route": is_default_route, + } + + def get_network_summary(): iface = get_primary_interface() profile = read_wifi_profile_state() script_status = parse_wifi_status_script() - nm_state = nmcli_device_state(iface) - addresses = ip_addresses_for_iface(iface) - gateway = gateway_for_iface(iface) - dns = dns_servers_for_iface(iface) current_ssid = get_active_ssid(iface) - activity = get_network_activity(iface) + wifi_summary = summarize_interface(iface, "wifi") + wifi_summary["ssid"] = current_ssid or profile["ssid"] + eth_summary = summarize_interface("eth0", "ethernet") try: ap_status = public_ap_status() except Exception: @@ -656,15 +778,20 @@ def get_network_summary(): "desired_profile": profile, "ap_status": ap_status, "wifi": { - "connected": nm_state.get("state") == "connected", - "state": nm_state.get("state") or script_status.get("NM_STATE", "unknown"), - "connection": nm_state.get("connection") or script_status.get("NM_CONNECTION", ""), + "connected": wifi_summary["connected"], + "state": wifi_summary["state"] or script_status.get("NM_STATE", "unknown"), + "connection": wifi_summary["connection"] or script_status.get("NM_CONNECTION", ""), "ssid": current_ssid or profile["ssid"], }, - "addresses": addresses, - "gateway": gateway, - "dns": dns, - "activity": activity, + "addresses": wifi_summary["addresses"], + "gateway": wifi_summary["gateway"], + "dns": wifi_summary["dns"], + "activity": wifi_summary["activity"], + "interfaces": { + "wifi": wifi_summary, + "ethernet": eth_summary, + }, + "active_uplink": "eth0" if eth_summary["is_default_route"] else iface if wifi_summary["is_default_route"] else "", "script_status": script_status, } @@ -1042,6 +1169,13 @@ class Handler(BaseHTTPRequestHandler): if parsed.path == "/logo.png": self.send_file(os.path.join(PUBLIC_DIR, "logo.png"), "image/png") return + if parsed.path == "/g-box.png": + gbox_path = os.path.join(PUBLIC_DIR, "g-box.png") + if os.path.exists(gbox_path): + self.send_file(gbox_path, "image/png") + else: + self.send_file(os.path.join(PUBLIC_DIR, "logo.png"), "image/png") + return if parsed.path == "/favicon.png": self.send_file(os.path.join(PUBLIC_DIR, "favicon.png"), "image/png") return diff --git a/stage_ui/console_core/frontend/console.css b/stage_ui/console_core/frontend/console.css index 067a291..d634249 100644 --- a/stage_ui/console_core/frontend/console.css +++ b/stage_ui/console_core/frontend/console.css @@ -25,15 +25,29 @@ body{ } .brand{display:flex;align-items:center;gap:16px;min-width:0} .brandCopy{display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0} -.brandLogo{ - width:68px;height:68px;object-fit:contain;display:block;flex:0 0 auto; - border-radius:18px;background:rgba(255,255,255,.9);border:1px solid rgba(215,224,219,.9);padding:7px; - box-shadow:0 10px 24px rgba(16,24,20,.06); +.brandDevice{ + width:min(26vw, 280px); + max-height:190px; + object-fit:contain; + display:block; + flex:0 0 auto; + filter:drop-shadow(0 12px 20px rgba(16,24,20,.12)); } .eyebrow{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--accent);font-weight:600} h1{margin:0;font-size:34px;line-height:1.02;font-weight:650;letter-spacing:-.03em} .sub{margin:0;color:var(--muted);font-weight:300} -.osLabel{font-size:14px;color:var(--ink);font-weight:400} +.osLabel,.brandSupport{font-size:14px;color:var(--ink);font-weight:400} +.capabilityBadge{ + display:inline-flex; + align-items:center; + align-self:flex-start; + border-radius:999px; + padding:7px 12px; + background:rgba(14,122,83,.10); + color:var(--accent); + font-size:12px; + font-weight:700; +} .identityPanel{ display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:14px 16px;min-width:300px; } @@ -152,9 +166,90 @@ h1{margin:0;font-size:34px;line-height:1.02;font-weight:650;letter-spacing:-.03e } .displayHero.is-connected,.apHero.is-enabled{background:rgba(14,122,83,.08)} .displayHero.is-empty,.apHero.is-disabled{background:#f7f8f7} +.apExplanation{ + margin-top:14px; + padding:14px 16px; + border:1px solid var(--line); + border-radius:14px; + background:#fbfcfb; +} +.apExplanation p{ + margin:8px 0 0; + color:var(--muted); + font-size:13px; + line-height:1.55; +} .displayHeroLabel{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:6px} .displayHeroText{font-size:20px;font-weight:700} .displayHeroMeta{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:13px} +.networkOverviewGrid{ + display:grid; + grid-template-columns:repeat(2,minmax(0,1fr)); + gap:16px; + margin-top:16px; +} +.networkInterfaceBlock{ + border:1px solid var(--line); + border-radius:14px; + background:#fbfcfb; + padding:14px; +} +.networkInterfaceHead{ + display:flex; + justify-content:space-between; + gap:10px; + align-items:flex-start; + flex-wrap:wrap; +} +.networkInterfaceHead h3{ + margin:0 0 8px; + font-size:18px; +} +.gboxHero{ + display:grid; + grid-template-columns:minmax(220px, 340px) minmax(0,1fr); + gap:24px; + align-items:center; +} +.gboxHeroImage{ + width:100%; + max-height:320px; + object-fit:contain; +} +.gboxHeroCopy{ + display:grid; + gap:10px; +} +.specTable{ + display:grid; + grid-template-columns:180px minmax(0,1fr); + gap:10px 14px; + margin-top:16px; + font-size:14px; +} +.specTable .key{ + color:var(--muted); + font-weight:600; +} +.manualGrid{ + display:grid; + grid-template-columns:repeat(2,minmax(0,1fr)); + gap:14px; + margin-top:16px; +} +.manualGroup{ + border:1px solid var(--line); + border-radius:14px; + padding:14px; + background:#fbfcfb; +} +.manualSteps{ + margin:10px 0 0; + padding-left:20px; + color:var(--ink); +} +.manualSteps li + li{margin-top:8px} +.manualNotes{margin-top:10px} .connectorList{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px} .connectorCard{border:1px solid var(--line);border-radius:14px;padding:14px;background:#fbfcfb} .connectorHead{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:12px} @@ -202,6 +297,11 @@ h1{margin:0;font-size:34px;line-height:1.02;font-weight:650;letter-spacing:-.03e .banner.success{background:rgba(14,122,83,.10);color:var(--accent)} .banner.error{background:rgba(185,52,52,.10);color:var(--error)} .scanList{display:grid;gap:10px} +.scanCollapsedHint{ + margin-top:14px; + color:var(--muted); + font-size:13px; +} .scanRow{ display:flex;justify-content:space-between;gap:12px;align-items:center; border:1px solid var(--line);border-radius:12px;background:#fbfcfb;padding:12px 14px; @@ -241,12 +341,15 @@ h1{margin:0;font-size:34px;line-height:1.02;font-weight:650;letter-spacing:-.03e @media (max-width:940px){ .hero{grid-template-columns:1fr} .identityPanel{min-width:0} + .gboxHero{grid-template-columns:1fr} } @media (max-width:720px){ - .summaryGrid{grid-template-columns:1fr} .meta{grid-template-columns:1fr 1fr} .splitMeta{grid-template-columns:1fr} - .brandLogo{width:58px;height:58px} + .networkOverviewGrid{grid-template-columns:1fr} + .manualGrid{grid-template-columns:1fr} + .specTable{grid-template-columns:1fr} + .brandDevice{width:min(70vw, 260px);max-height:180px} .wideCard,.displayCard,.accessPointCard{grid-column:auto} .displayHeroText{font-size:18px} } diff --git a/stage_ui/console_core/frontend/console.js b/stage_ui/console_core/frontend/console.js index 858a8e9..2b42965 100644 --- a/stage_ui/console_core/frontend/console.js +++ b/stage_ui/console_core/frontend/console.js @@ -16,7 +16,7 @@ status: null, health: null, network: null, - scan: { ok: true, networks: [], error: "", warning: "", message: "", loading: false, scannedAt: "" }, + scan: { ok: true, networks: [], error: "", warning: "", message: "", loading: false, scannedAt: "", expanded: false }, networkForm: { ssid: "", password: "", @@ -307,6 +307,12 @@ +
+
Local maintenance Wi-Fi
+

Access Point creates a local Wi-Fi network on the device. It is used for first-time setup, maintenance, and recovery when the device cannot connect to the configured network.

+

It usually turns on when the device has no working uplink or when an engineer enables AP mode for service access. In normal operation it may remain disabled.

+
+
${renderKeyValueRows(details)}
@@ -592,12 +598,83 @@ `; } + function interfaceTone(summary) { + if (!summary || !summary.present) return "warn"; + return summary.connected ? "ok" : "warn"; + } + + function renderInterfaceOverview(title, summary, options = {}) { + const fallbackText = options.fallbackText || "Not available"; + const stateText = summary && summary.present ? textValue(summary.status_text, fallbackText) : fallbackText; + const name = summary && summary.kind === "wifi" + ? textValue(summary.ssid || summary.connection, "Not available") + : textValue(summary && summary.connection, "Not available"); + const rows = [ + { label: "State", value: stateText }, + { label: summary && summary.kind === "wifi" ? "Active connection" : "Connection", value: name }, + { label: "Interface", value: summary && summary.interface ? summary.interface : fallbackText }, + { label: "IPv4", value: summary && summary.addresses ? (summary.addresses.ipv4 || []).join(", ") || fallbackText : fallbackText }, + { label: "IPv6", value: summary && summary.addresses ? (summary.addresses.ipv6 || []).join(", ") || fallbackText : fallbackText }, + { label: "Gateway", value: summary ? textValue(summary.gateway, fallbackText) : fallbackText }, + { label: "DNS", value: summary ? (summary.dns || []).join(", ") || fallbackText : fallbackText }, + { label: "Incoming", value: summary ? formatRate(summary.activity && summary.activity.rx_bytes_per_sec) : fallbackText }, + { label: "Outgoing", value: summary ? formatRate(summary.activity && summary.activity.tx_bytes_per_sec) : fallbackText }, + ]; + if (summary && summary.kind === "wifi") { + rows.push({ label: "Desired network", value: textValue(options.desiredProfile, "Not available") }); + } + if (summary && summary.kind === "ethernet") { + rows.splice(3, 0, + { label: "Link speed", value: textValue(summary.link_speed, summary.present ? "Not available" : fallbackText) }, + { label: "MAC address", value: textValue(summary.mac_address, summary.present ? "Not available" : fallbackText) } + ); + } + return ` +
+
+
+

${esc(title)}

+
${esc(stateText)}
+
+ ${summary && summary.is_default_route ? `Active uplink` : ""} +
+
${renderKeyValueRows(rows)}
+
+ `; + } + function renderNetworkTab() { const network = state.network || {}; const desired = network.desired_profile || {}; - const wifi = network.wifi || {}; - const addresses = network.addresses || { ipv4: [], ipv6: [] }; - const activity = network.activity || {}; + const interfaces = network.interfaces || {}; + const wifi = interfaces.wifi || { + interface: network.iface || "wlan0", + kind: "wifi", + present: true, + connected: !!(network.wifi && network.wifi.connected), + status_text: network.wifi && network.wifi.connected ? "Connected" : "Disconnected", + state: network.wifi && network.wifi.state || "unknown", + connection: network.wifi && network.wifi.connection || "", + ssid: network.wifi && network.wifi.ssid || desired.ssid || "", + addresses: network.addresses || { ipv4: [], ipv6: [] }, + gateway: network.gateway || "", + dns: network.dns || [], + activity: network.activity || { rx_bytes_per_sec: null, tx_bytes_per_sec: null }, + is_default_route: network.active_uplink === (network.iface || "wlan0") + }; + const ethernet = interfaces.ethernet || { + interface: "eth0", + kind: "ethernet", + present: false, + connected: false, + status_text: "Ethernet interface not available", + addresses: { ipv4: [], ipv6: [] }, + dns: [], + activity: { rx_bytes_per_sec: null, tx_bytes_per_sec: null }, + mac_address: "", + link_speed: "", + is_default_route: network.active_uplink === "eth0" + }; const accessPointCard = (state.status && state.status.services || []).find((item) => item.id === "access_point"); return ` @@ -636,29 +713,30 @@

Available Networks

${state.scan.loading ? "Scan in progress" : esc(`${(state.scan.networks || []).length} networks found`)}
- +
+ + +
- ${state.scan.warning ? `` : ""} - ${renderScanRows()} + ${state.scan.expanded ? ` + ${state.scan.warning ? `` : ""} + ${renderScanRows()} + ` : `
Available networks list is collapsed.
`} - ${renderSimplePanel("Current Network Status", [ - { label: "State", value: wifi.state || "unknown" }, - { label: "Current SSID", value: wifi.ssid || desired.ssid || "Not available" }, - { label: "Connection", value: wifi.connection || "Not available" }, - { label: "Interface", value: network.iface || "wlan0" }, - { label: "Gateway", value: network.gateway || "Not available" }, - { label: "DNS", value: (network.dns || []).join(", ") || "Not available" } - ], "wideCard")} - - ${renderSimplePanel("Addresses and Throughput", [ - { label: "IPv4", value: (addresses.ipv4 || []).join(", ") || "Not available" }, - { label: "IPv6", value: (addresses.ipv6 || []).join(", ") || "Not available" }, - { label: "Incoming", value: formatRate(activity.rx_bytes_per_sec) }, - { label: "Outgoing", value: formatRate(activity.tx_bytes_per_sec) }, - { label: "Desired profile", value: desired.profile || "Not available" } - ], "wideCard")} +
+
+
+

Network Overview

+
${esc(network.active_uplink ? `Active uplink: ${network.active_uplink}` : "No active uplink")}
+
+
+
+ ${renderInterfaceOverview("Wi-Fi", wifi, { desiredProfile: desired.profile || desired.ssid || "" })} + ${renderInterfaceOverview("Ethernet", ethernet, { fallbackText: "Interface not available" })} +
+
${accessPointCard ? `
${renderAccessPointCard(accessPointCard)}
` : ""} @@ -691,6 +769,101 @@ `; } + function renderSpecRows(rows) { + return rows.map((item) => ` +
${esc(item.label)}
+
${esc(item.value)}
+ `).join(""); + } + + function renderGboxManualTab() { + const specs = [ + { label: "CPU", value: "RK3566 Quad-core, 1.8 GHz" }, + { label: "GPU", value: "Mali-G52-2EE (OpenGL ES 1.1/2.0/3.2, OpenCL 2.0, Vulkan 1.1)" }, + { label: "Network", value: "Wi-Fi, 10/100 Mbps Ethernet" }, + { label: "Video", value: "HDMI 2.0" }, + { label: "Resolution", value: "up to 1920x1080" }, + { label: "Audio", value: "3.5 mm TRRS" }, + { label: "Interfaces", value: "Ethernet, SD, USB2.0, USB3.0, RS232, RS485" }, + { label: "Power", value: "12V / 2A" }, + { label: "Power consumption", value: "22 W" }, + { label: "Operation", value: "24/7" }, + { label: "Size", value: "166 x 105 x 30 mm" }, + { label: "Weight", value: "350 g" } + ]; + const interfaceGroups = [ + { title: "Network", items: ["Ethernet (RJ45)", "Wi-Fi antenna"] }, + { title: "Media", items: ["HDMI", "3.5 mm audio"] }, + { title: "USB / Storage", items: ["USB 2.0", "USB 3.0", "SD card", "internal USB"] }, + { title: "Serial", items: ["RS232", "RS485"] }, + { title: "Power", items: ["DC 12V"] }, + { title: "Indicators", items: ["Red - standby", "Green - active", "Blue - run status"] } + ]; + const quickStart = [ + "Connect power (12V / 2A)", + "Connect HDMI (optional)", + "Connect Ethernet or configure Wi-Fi", + "Connect peripherals if needed", + "Power on", + "Check LED indicators", + "Open Web UI" + ]; + const notes = [ + "Use a stable power supply", + "Ensure proper ventilation", + "Verify RS232 / RS485 wiring before energizing the line", + "Designed for 24/7 operation" + ]; + + return ` +
+
+ IOMATEX G-Box +
+
IOMATEX G-Box
+

G-Box Instructions and Manual

+

Compact edge gateway for automation workloads, local service access, commissioning, and resilient field maintenance.

+
Digital DNA ready
+
+
+ +
+
+

Technical Specifications

+
${renderSpecRows(specs)}
+
+ +
+

Gateway Interfaces

+
+ ${interfaceGroups.map((group) => ` +
+
${esc(group.title)}
+
    ${group.items.map((item) => `
  • ${esc(item)}
  • `).join("")}
+
+ `).join("")} +
+
+ +
+

Installation Guide

+
Quick Start
+
    + ${quickStart.map((item) => `
  1. ${esc(item)}
  2. `).join("")} +
+
+ +
+

Notes

+
    + ${notes.map((item) => `
  • ${esc(item)}
  • `).join("")} +
+
+
+
+ `; + } + function renderActiveTab() { nodes.tabs.forEach((button) => { button.classList.toggle("is-active", button.dataset.tab === state.activeTab); @@ -705,6 +878,10 @@ nodes.content.innerHTML = renderTscreenTab(); return; } + if (state.activeTab === "gbox") { + nodes.content.innerHTML = renderGboxManualTab(); + return; + } nodes.content.innerHTML = renderHealthTab(); } @@ -712,7 +889,7 @@ const safe = identity || {}; nodes.edgeId.textContent = safe.edge_id || "-"; nodes.hostName.textContent = safe.hostname || "-"; - nodes.osLabel.textContent = safe.os_label || "IOMATEX Edge OS"; + nodes.osLabel.textContent = "Unified diagnostics, network operations and gateway commissioning."; } function updateHeaderMeta(payload) { @@ -918,12 +1095,18 @@ window.__scanNetworks = async function () { if (state.scan.loading) return; + state.scan.expanded = true; state.scan.loading = true; renderActiveTab(); await loadScan(); if (state.activeTab === "network") renderActiveTab(); }; + window.__toggleScanPanel = function () { + state.scan.expanded = !state.scan.expanded; + if (state.activeTab === "network") renderActiveTab(); + }; + window.__applyWifiProfile = async function () { const validationError = networkValidationError(); if (validationError) { diff --git a/stage_ui/console_core/frontend/index.html b/stage_ui/console_core/frontend/index.html index 8ce9cf8..1656b25 100644 --- a/stage_ui/console_core/frontend/index.html +++ b/stage_ui/console_core/frontend/index.html @@ -11,12 +11,12 @@
- + IOMATEX G-Box
-
IOMATEX
-

Edge Console

-

IOMATEX Edge OS

-

Unified diagnostics, network operations and It-Screen foundation.

+
IOMATEX G-Box
+

Edge Automation Gateway

+
Digital DNA ready
+

Unified diagnostics, network operations and gateway commissioning.

@@ -42,6 +42,7 @@ +
diff --git a/stage_ui/g-box.png b/stage_ui/g-box.png new file mode 100644 index 0000000..8ad3677 Binary files /dev/null and b/stage_ui/g-box.png differ diff --git a/stage_ui/ui_installer.sh b/stage_ui/ui_installer.sh index f6a2f4d..624f11a 100644 --- a/stage_ui/ui_installer.sh +++ b/stage_ui/ui_installer.sh @@ -32,6 +32,7 @@ SERVICE_NAME="iomatex-console.service" LEGACY_SERVICE_NAME="iomatex-webipc.service" CFG_PATH="/etc/iomatex/console.json" SRC_LOGO="${LOGO_SOURCE:-$SCRIPT_DIR/iomatex_logo_source.png}" +SRC_GBOX="${GBOX_SOURCE:-$SCRIPT_DIR/g-box.png}" APP_BIND="${CONSOLE_BIND:-0.0.0.0}" APP_PORT="${CONSOLE_PORT:-80}" ts="$(date +%s)" @@ -311,6 +312,7 @@ require_file "$STAGE_FRONTEND_DIR/index.html" require_file "$STAGE_FRONTEND_DIR/console.js" require_file "$STAGE_FRONTEND_DIR/console.css" require_file "$STAGE_PROVIDERS_DIR/00_core_services.py" +require_file "$SRC_GBOX" echo "[5/8] Install Wi-Fi helper scripts" cat > /usr/local/sbin/iomatex-ap-sync-config <<'EOF' @@ -793,6 +795,7 @@ if [ ! -f "$SRC_LOGO" ]; then echo "ERROR: logo source image not found: $SRC_LOGO" >&2 exit 1 fi +install -m 0644 "$SRC_GBOX" "$STAGE_PUBLIC_DIR/g-box.png" python3 - "$SRC_LOGO" "$STAGE_PUBLIC_DIR/logo.png" "$STAGE_PUBLIC_DIR/favicon.png" <<'PY' import sys from PIL import Image