From d3c815a4c875c42d52222b77469da8ab200e74ce Mon Sep 17 00:00:00 2001 From: Andrei Smaliak Date: Mon, 2 Nov 2026 07:34:30 +0100 Subject: [PATCH] Use the wide screen for Health service cards --- docs/releases/console-3.1.35.md | 12 ++++++++++++ stage-releases.json | 2 +- stage_ui/console_core/backend/app.py | 2 +- .../console_core/backend/test_health_layout_ui.js | 14 ++++++++++++++ stage_ui/console_core/frontend/console.css | 10 +++++++++- stage_ui/console_core/frontend/console.js | 4 ++-- stage_ui/console_core/frontend/index.html | 6 +++--- stage_ui/version.json | 2 +- 8 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 docs/releases/console-3.1.35.md create mode 100644 stage_ui/console_core/backend/test_health_layout_ui.js diff --git a/docs/releases/console-3.1.35.md b/docs/releases/console-3.1.35.md new file mode 100644 index 0000000..d52ff44 --- /dev/null +++ b/docs/releases/console-3.1.35.md @@ -0,0 +1,12 @@ +# Console 3.1.35 — wide-screen service layout + +- Increase the Console shell ceiling from 1180 px to 1600 px so wide screens + use their available horizontal space instead of leaving large empty margins. +- Give the Health service list one explicit responsive owner: three wide + columns on desktop, two columns at 1100 px and below, and one column at + 720 px and below. +- Preserve all existing service-card content, actions and status semantics. + Other Console card families keep their current layout contracts. +- Browser verification at 360, 768, 1024, 1440 and 1920 px confirmed 1/2/2/3/3 + columns, no horizontal overflow, a 1600 px shell and approximately 511 px + service cards at 1920 px. diff --git a/stage-releases.json b/stage-releases.json index 41c73b8..55b4117 100644 --- a/stage-releases.json +++ b/stage-releases.json @@ -14,7 +14,7 @@ "version": "1.0.1" }, "stage_ui": { - "version": "3.1.34" + "version": "3.1.35" }, "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 bcf1362..89f509b 100644 --- a/stage_ui/console_core/backend/app.py +++ b/stage_ui/console_core/backend/app.py @@ -61,7 +61,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.34" +UI_VERSION = "V 3.1.35" STORAGE_HEALTH_COMMAND = "/usr/local/sbin/iomatex-storage-health" ZONEINFO_ROOT = "/usr/share/zoneinfo" diff --git a/stage_ui/console_core/backend/test_health_layout_ui.js b/stage_ui/console_core/backend/test_health_layout_ui.js new file mode 100644 index 0000000..f11a5f3 --- /dev/null +++ b/stage_ui/console_core/backend/test_health_layout_ui.js @@ -0,0 +1,14 @@ +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); + +const js = fs.readFileSync(path.join(__dirname, '../frontend/console.js'), 'utf8'); +const css = fs.readFileSync(path.join(__dirname, '../frontend/console.css'), 'utf8'); + +assert.match(js, /class="cards healthServiceGrid"/); +assert.match(css, /\.shell\{max-width:1600px/); +assert.match(css, /\.healthServiceGrid\{\s*grid-template-columns:repeat\(3,minmax\(0,1fr\)\)/); +assert.match(css, /@media \(max-width:1100px\)[\s\S]*?\.healthServiceGrid\{grid-template-columns:repeat\(2,minmax\(0,1fr\)\)\}/); +assert.match(css, /@media \(max-width:720px\)[\s\S]*?\.healthServiceGrid\{grid-template-columns:1fr\}/); + +console.log('Health layout owner: 1600px shell and 3/2/1 service columns passed'); diff --git a/stage_ui/console_core/frontend/console.css b/stage_ui/console_core/frontend/console.css index 9da732a..6203833 100644 --- a/stage_ui/console_core/frontend/console.css +++ b/stage_ui/console_core/frontend/console.css @@ -75,7 +75,7 @@ html[dir="rtl"] .emptyInline, html[dir="rtl"] .banner{ text-align:right; } -.shell{max-width:1180px;margin:0 auto;padding:28px 18px 40px} +.shell{max-width:1600px;margin:0 auto;padding:28px 18px 40px} .hero{ display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:16px;align-items:center; margin-bottom:18px; @@ -378,6 +378,10 @@ h1{margin:0;font-size:34px;line-height:1.02;font-weight:650;letter-spacing:-.03e .cards{ display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px; } +.healthServiceGrid{ + grid-template-columns:repeat(3,minmax(0,1fr)); + align-items:start; +} .itscreenCards{ grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; @@ -1626,6 +1630,9 @@ html[dir="rtl"] .timezoneOption{text-align:right} 0%,100%{opacity:.35;transform:scale(.9)} 50%{opacity:1;transform:scale(1)} } +@media (max-width:1100px){ + .healthServiceGrid{grid-template-columns:repeat(2,minmax(0,1fr))} +} @media (max-width:940px){ .hero{grid-template-columns:1fr} .identityPanel{min-width:0} @@ -1652,6 +1659,7 @@ html[dir="rtl"] .timezoneOption{text-align:right} } .displayHeroText{font-size:18px} .itscreenCards{grid-template-columns:1fr} + .healthServiceGrid{grid-template-columns:1fr} .itscreenLogsToolbar{grid-template-columns:1fr} .itscreenLogsActions{justify-content:flex-start} .modbusLayout{grid-template-columns:1fr} diff --git a/stage_ui/console_core/frontend/console.js b/stage_ui/console_core/frontend/console.js index 65198ec..2c98323 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.34"; + const UI_VERSION = "V 3.1.35"; const ITSCREEN_LOG_INITIAL_LINES = 50; const ITSCREEN_LOG_BUFFER_LIMIT = 300; const ITSCREEN_LOG_BATCH_MS = 250; @@ -2805,7 +2805,7 @@ ${updates.error ? `` : ""} ${updateJob.state ? `` : ""} -
${serviceCards.map(renderServiceCard).join("") || `
${esc(t("No service cards available."))}
`}
+
${serviceCards.map(renderServiceCard).join("") || `
${esc(t("No service cards available."))}
`}
`; } diff --git a/stage_ui/console_core/frontend/index.html b/stage_ui/console_core/frontend/index.html index 039b9c1..3354a5d 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 d04a70a..7b85e47 100644 --- a/stage_ui/version.json +++ b/stage_ui/version.json @@ -1,3 +1,3 @@ { - "version": "3.1.34" + "version": "3.1.35" }