From 8640409e3d00d8353f50c7d21c937e19ba6a3e31 Mon Sep 17 00:00:00 2001 From: Andrei Smaliak Date: Sun, 4 Oct 2026 13:08:35 +0200 Subject: [PATCH] Remove duplicate service links from Reverse Tunnels in Console 3.1.11 --- docs/releases/console-3.1.11.md | 7 +++++++ stage-releases.json | 2 +- stage_ui/console_core/backend/app.py | 2 +- .../test_reverse_tunnel_actions_contract.py | 6 ++++-- stage_ui/console_core/frontend/console.js | 14 +------------- stage_ui/console_core/frontend/index.html | 6 +++--- stage_ui/version.json | 2 +- 7 files changed, 18 insertions(+), 21 deletions(-) create mode 100644 docs/releases/console-3.1.11.md diff --git a/docs/releases/console-3.1.11.md b/docs/releases/console-3.1.11.md new file mode 100644 index 0000000..5461524 --- /dev/null +++ b/docs/releases/console-3.1.11.md @@ -0,0 +1,7 @@ +# Console 3.1.11 + +Release date: 2026-10-04. + +- Remove duplicate Cockpit, Zigbee2MQTT and Edge Console navigation buttons from Reverse Tunnels. Keep tunnel configuration/restart controls and the Open buttons in the dedicated Cockpit and Zigbee2MQTT cards. + +Validation: reverse-tunnel contract tests, JavaScript syntax check and browser inspection of the affected cards. diff --git a/stage-releases.json b/stage-releases.json index 1c89069..e0a83e2 100644 --- a/stage-releases.json +++ b/stage-releases.json @@ -14,7 +14,7 @@ "version": "1.0.0" }, "stage_ui": { - "version": "3.1.10" + "version": "3.1.11" }, "stage_avahi": { "version": "1.0.0" diff --git a/stage_ui/console_core/backend/app.py b/stage_ui/console_core/backend/app.py index d5469a4..e48e7c1 100644 --- a/stage_ui/console_core/backend/app.py +++ b/stage_ui/console_core/backend/app.py @@ -54,7 +54,7 @@ APP_DIR = "/opt/iomatex-console" PUBLIC_DIR = os.path.join(APP_DIR, "public") PROVIDERS_DIR = os.path.join(APP_DIR, "providers.d") CONFIG_PATH = "/etc/iomatex/console.json" -UI_VERSION = "V 3.1.10" +UI_VERSION = "V 3.1.11" STORAGE_HEALTH_COMMAND = "/usr/local/sbin/iomatex-storage-health" ZONEINFO_ROOT = "/usr/share/zoneinfo" diff --git a/stage_ui/console_core/backend/test_reverse_tunnel_actions_contract.py b/stage_ui/console_core/backend/test_reverse_tunnel_actions_contract.py index fcb615a..5263799 100644 --- a/stage_ui/console_core/backend/test_reverse_tunnel_actions_contract.py +++ b/stage_ui/console_core/backend/test_reverse_tunnel_actions_contract.py @@ -22,7 +22,7 @@ class ReverseTunnelActionsContractTest(unittest.TestCase): self.assertIn(f'console.js?v={app.UI_VERSION.removeprefix("V ")}', index) self.assertIn(f'console.i18n.js?v={app.UI_VERSION.removeprefix("V ")}', index) - def test_card_restarts_all_units_and_exposes_local_service_links(self): + def test_card_restarts_all_units_without_duplicate_service_links(self): backend = (ROOT / "backend" / "app.py").read_text(encoding="utf-8") frontend = (ROOT / "frontend" / "console.js").read_text(encoding="utf-8") stylesheet = (ROOT / "frontend" / "console.css").read_text(encoding="utf-8") @@ -35,7 +35,9 @@ class ReverseTunnelActionsContractTest(unittest.TestCase): self.assertIn('"iomatex-rt-webui.service"', backend) self.assertIn('href: `https://${host}:9090`', frontend) self.assertIn('href: `http://${host}:8081`', frontend) - self.assertIn('href: `http://${host}:8099`', frontend) + card = frontend.split('function renderReverseTunnelCard(card) {', 1)[1].split('function normalizeItscreenHostCandidate', 1)[0] + self.assertNotIn('tunnelLinks', card) + self.assertNotIn('href:', card) self.assertIn('restartable=installed', provider) self.assertIn('.reverseTunnelCommand{\n margin-top:14px;', stylesheet) self.assertIn('grid-template-columns:minmax(110px,42%) minmax(0,1fr)', stylesheet) diff --git a/stage_ui/console_core/frontend/console.js b/stage_ui/console_core/frontend/console.js index 9e77f37..9fdbf26 100644 --- a/stage_ui/console_core/frontend/console.js +++ b/stage_ui/console_core/frontend/console.js @@ -49,7 +49,7 @@ { mode: "test_by", label: "test.it-screen.by", host: "rest.test.it-screen.by" }, { mode: "custom", label: "Custom", host: "" } ]; - const UI_VERSION = "V 3.1.10"; + const UI_VERSION = "V 3.1.11"; const ITSCREEN_LOG_INITIAL_LINES = 50; const ITSCREEN_LOG_BUFFER_LIMIT = 300; const ITSCREEN_LOG_BATCH_MS = 250; @@ -1487,12 +1487,6 @@ const bootstrapCommand = textValue(card.bootstrap_command, ""); const bootstrapHost = textValue(card.bootstrap_host, ""); const bootstrapOpen = !!state.reverseTunnelUi.bootstrapOpen; - const host = currentAccessHost(); - const tunnelLinks = [ - { name: "cockpit", label: "Cockpit", href: `https://${host}:9090` }, - { name: "z2m", label: "Zigbee2MQTT", href: `http://${host}:8081` }, - { name: "webui", label: "Edge Console", href: `http://${host}:8099` } - ]; const restartBusy = !!state.serviceActions.busyById[card.id]; const configuring = state.reverseTunnelUi.configuring; @@ -1564,12 +1558,6 @@ - ${tunnelLinks.map((link) => { - const tunnel = tunnels.find((item) => item.name === link.name); - return tunnel && tunnel.active - ? `${esc(t(link.label))}` - : ``; - }).join("")} ${warnings.length ? `
${esc(t("Warnings"))}
` : ""} diff --git a/stage_ui/console_core/frontend/index.html b/stage_ui/console_core/frontend/index.html index c6442c9..276b382 100644 --- a/stage_ui/console_core/frontend/index.html +++ b/stage_ui/console_core/frontend/index.html @@ -23,7 +23,7 @@ } catch (error) {} })(); - +
@@ -109,7 +109,7 @@
- - + + diff --git a/stage_ui/version.json b/stage_ui/version.json index 9ed0d7f..6508074 100644 --- a/stage_ui/version.json +++ b/stage_ui/version.json @@ -1,3 +1,3 @@ { - "version": "3.1.10" + "version": "3.1.11" }