Remove duplicate service links from Reverse Tunnels in Console 3.1.11
This commit is contained in:
parent
782a317a42
commit
8640409e3d
|
|
@ -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.
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
"version": "1.0.0"
|
||||
},
|
||||
"stage_ui": {
|
||||
"version": "3.1.10"
|
||||
"version": "3.1.11"
|
||||
},
|
||||
"stage_avahi": {
|
||||
"version": "1.0.0"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 @@
|
|||
<button class="actionBtn secondary" type="button" ${restartBusy || configuring ? "disabled" : ""} onclick="window.__restartService('${esc(card.id)}')">
|
||||
${esc(restartBusy ? t("Restarting...") : t("Restart"))}
|
||||
</button>
|
||||
${tunnelLinks.map((link) => {
|
||||
const tunnel = tunnels.find((item) => item.name === link.name);
|
||||
return tunnel && tunnel.active
|
||||
? `<a class="actionBtn" href="${esc(link.href)}">${esc(t(link.label))}</a>`
|
||||
: `<button class="actionBtn" type="button" disabled>${esc(t(link.label))}</button>`;
|
||||
}).join("")}
|
||||
</div>
|
||||
</div>
|
||||
${warnings.length ? `<div class="list"><div class="listTitle">${esc(t("Warnings"))}</div><ul class="msgList">${warnings.map((x) => `<li>${esc(translateUiText(x))}</li>`).join("")}</ul></div>` : ""}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
} catch (error) {}
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="/console.css?v=3.1.10&rev=camera-snapshot-1">
|
||||
<link rel="stylesheet" href="/console.css?v=3.1.11&rev=camera-snapshot-1">
|
||||
</head>
|
||||
<body>
|
||||
<main class="shell">
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
</main>
|
||||
<div id="menuBackdrop" class="menuBackdrop" hidden></div>
|
||||
<div id="toastStack" class="toastStack" aria-live="polite" aria-atomic="true"></div>
|
||||
<script src="/console.i18n.js?v=3.1.10&rev=camera-snapshot-1"></script>
|
||||
<script src="/console.js?v=3.1.10&rev=camera-snapshot-1"></script>
|
||||
<script src="/console.i18n.js?v=3.1.11&rev=camera-snapshot-1"></script>
|
||||
<script src="/console.js?v=3.1.11&rev=camera-snapshot-1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "3.1.10"
|
||||
"version": "3.1.11"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue