Use the wide screen for Health service cards

This commit is contained in:
Andrei Smaliak 2026-11-02 07:34:30 +01:00
parent 9491a45864
commit d3c815a4c8
8 changed files with 43 additions and 9 deletions

View File

@ -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.

View File

@ -14,7 +14,7 @@
"version": "1.0.1"
},
"stage_ui": {
"version": "3.1.34"
"version": "3.1.35"
},
"stage_avahi": {
"version": "1.0.0"

View File

@ -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"

View File

@ -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');

View File

@ -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}

View File

@ -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 ? `<div class="banner warn">${esc(t(updates.error))}</div>` : ""}
${updateJob.state ? `<div class="banner ${["failed", "interrupted"].includes(updateJob.state) ? "warn" : ""}" role="status">${esc(t(jobLabels[updateJob.state] || updateJob.state))} · ${esc(updateJob.current_stage || updateJob.stage)} ${esc(updateJob.stages ? `${(updateJob.completed || []).length}/${updateJob.stages.length}` : (updateJob.version || ""))}${["failed", "interrupted"].includes(updateJob.state) ? ` · ${esc(t(updateJob.reason || "Installation did not complete. Open the installation log for details."))}` : ""}</div>` : ""}
</div>
<div class="cards">${serviceCards.map(renderServiceCard).join("") || `<div class="empty">${esc(t("No service cards available."))}</div>`}</div>
<div class="cards healthServiceGrid">${serviceCards.map(renderServiceCard).join("") || `<div class="empty">${esc(t("No service cards available."))}</div>`}</div>
</section>
`;
}

View File

@ -23,7 +23,7 @@
} catch (error) {}
})();
</script>
<link rel="stylesheet" href="/console.css?v=3.1.34&amp;rev=edge-runtime-profile-1">
<link rel="stylesheet" href="/console.css?v=3.1.35&amp;rev=edge-runtime-profile-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.34&amp;rev=edge-runtime-profile-1"></script>
<script src="/console.js?v=3.1.34&amp;rev=edge-runtime-profile-1"></script>
<script src="/console.i18n.js?v=3.1.35&amp;rev=edge-runtime-profile-1"></script>
<script src="/console.js?v=3.1.35&amp;rev=edge-runtime-profile-1"></script>
</body>
</html>

View File

@ -1,3 +1,3 @@
{
"version": "3.1.34"
"version": "3.1.35"
}