Widen installation logs and align output to the right

This commit is contained in:
Andrei Smaliak 2026-10-06 06:06:25 +02:00
parent 079a55ba12
commit 147eaa55e2
8 changed files with 27 additions and 9 deletions

View File

@ -0,0 +1,9 @@
# Console 3.1.16
Release date: 2026-10-06.
- Extend the shared platform dialog with a details variant: installation logs use a 1000px maximum width, constrained by the existing viewport padding.
- Right-align the log text as requested, preserving monospace formatting, line breaks, escaping and left-to-right command/path direction.
- Focus the Close action without scrolling the dialog to its bottom on opening.
Style ownership remains in the existing Console platform dialog and diagnostic block; no new modal implementation or breakpoint. Browser checks at 360, 768, 1024 and 1440 pixels cover width, right alignment, initial scroll position, viewport insets and Escape closure.

View File

@ -14,7 +14,7 @@
"version": "1.0.0" "version": "1.0.0"
}, },
"stage_ui": { "stage_ui": {
"version": "3.1.15" "version": "3.1.16"
}, },
"stage_avahi": { "stage_avahi": {
"version": "1.0.0" "version": "1.0.0"

View File

@ -54,7 +54,7 @@ APP_DIR = "/opt/iomatex-console"
PUBLIC_DIR = os.path.join(APP_DIR, "public") PUBLIC_DIR = os.path.join(APP_DIR, "public")
PROVIDERS_DIR = os.path.join(APP_DIR, "providers.d") PROVIDERS_DIR = os.path.join(APP_DIR, "providers.d")
CONFIG_PATH = "/etc/iomatex/console.json" CONFIG_PATH = "/etc/iomatex/console.json"
UI_VERSION = "V 3.1.15" UI_VERSION = "V 3.1.16"
STORAGE_HEALTH_COMMAND = "/usr/local/sbin/iomatex-storage-health" STORAGE_HEALTH_COMMAND = "/usr/local/sbin/iomatex-storage-health"
ZONEINFO_ROOT = "/usr/share/zoneinfo" ZONEINFO_ROOT = "/usr/share/zoneinfo"

View File

@ -0,0 +1,2 @@
const {chromium}=require('playwright');
(async()=>{const b=await chromium.launch();const c=await b.newContext();const base='http://192.168.0.109';await c.request.post(base+'/api/auth/login',{data:{username:'iomatex',password:process.env.EDGE_PASSWORD}});const p=await c.newPage();if(process.env.LOCAL_JS)for(const name of ['console.js','console.css'])await p.route('**/'+name+'*',r=>r.fulfill({path:'/repo/stage_ui/console_core/frontend/'+name}));await p.goto(base,{waitUntil:'networkidle'});for(const width of [360,768,1024,1440]){await p.setViewportSize({width,height:900});await p.evaluate(()=>{void window.__stageInstallLog('stage_ui','')});const dialog=p.locator('.platformDialog--details');await dialog.waitFor();const result=await dialog.evaluate(e=>{const r=e.getBoundingClientRect();return {x:r.x,y:r.y,width:r.width,bottom:r.bottom,scroll:e.scrollTop,align:getComputedStyle(e.querySelector('pre')).textAlign}});if(result.align!=='right'||result.scroll!==0||result.x<19||result.y<19||result.bottom>881||result.width>width-39)throw Error(JSON.stringify(result));if(width===1440&&result.width<990)throw Error('Dialog not widened');await p.keyboard.press('Escape');await dialog.waitFor({state:'detached'});console.log(width,result);}await c.request.post(base+'/api/auth/logout',{data:{}});await b.close()})().catch(e=>{console.error(e);process.exit(1)});

View File

@ -1590,6 +1590,13 @@ html[dir="rtl"] .timezoneOption{text-align:right}
text-align:center; text-align:center;
padding:28px; padding:28px;
} }
.platformDialog--details{
width:min(1000px,100%);
}
.platformDialog--details .diagBlock{
text-align:right;
direction:ltr;
}
.platformDialogIcon{ .platformDialogIcon{
display:grid; display:grid;
place-items:center; place-items:center;

View File

@ -49,7 +49,7 @@
{ mode: "test_by", label: "test.it-screen.by", host: "rest.test.it-screen.by" }, { mode: "test_by", label: "test.it-screen.by", host: "rest.test.it-screen.by" },
{ mode: "custom", label: "Custom", host: "" } { mode: "custom", label: "Custom", host: "" }
]; ];
const UI_VERSION = "V 3.1.15"; const UI_VERSION = "V 3.1.16";
const ITSCREEN_LOG_INITIAL_LINES = 50; const ITSCREEN_LOG_INITIAL_LINES = 50;
const ITSCREEN_LOG_BUFFER_LIMIT = 300; const ITSCREEN_LOG_BUFFER_LIMIT = 300;
const ITSCREEN_LOG_BATCH_MS = 250; const ITSCREEN_LOG_BATCH_MS = 250;
@ -1211,7 +1211,7 @@
const backdrop = document.createElement("div"); const backdrop = document.createElement("div");
backdrop.className = "modalBackdrop"; backdrop.className = "modalBackdrop";
backdrop.innerHTML = ` backdrop.innerHTML = `
<div class="modalCard platformDialog ${esc(tone)}" role="dialog" aria-modal="true" aria-label="${esc(title)}"> <div class="modalCard platformDialog ${details ? "platformDialog--details" : ""} ${esc(tone)}" role="dialog" aria-modal="true" aria-label="${esc(title)}">
<div class="platformDialogIcon" aria-hidden="true">${tone === "success" ? "✓" : "!"}</div> <div class="platformDialogIcon" aria-hidden="true">${tone === "success" ? "✓" : "!"}</div>
<h3>${esc(title)}</h3> <h3>${esc(title)}</h3>
<p>${esc(message)}</p> <p>${esc(message)}</p>
@ -1249,7 +1249,7 @@
backdrop.querySelector("[data-dialog-primary]").addEventListener("click", () => finish(true)); backdrop.querySelector("[data-dialog-primary]").addEventListener("click", () => finish(true));
document.addEventListener("keydown", onKeydown); document.addEventListener("keydown", onKeydown);
document.body.appendChild(backdrop); document.body.appendChild(backdrop);
backdrop.querySelector("[data-dialog-primary]").focus(); backdrop.querySelector("[data-dialog-primary]").focus({ preventScroll: true });
}); });
} }

View File

@ -23,7 +23,7 @@
} catch (error) {} } catch (error) {}
})(); })();
</script> </script>
<link rel="stylesheet" href="/console.css?v=3.1.15&amp;rev=camera-snapshot-1"> <link rel="stylesheet" href="/console.css?v=3.1.16&amp;rev=camera-snapshot-1">
</head> </head>
<body> <body>
<main class="shell"> <main class="shell">
@ -109,7 +109,7 @@
</main> </main>
<div id="menuBackdrop" class="menuBackdrop" hidden></div> <div id="menuBackdrop" class="menuBackdrop" hidden></div>
<div id="toastStack" class="toastStack" aria-live="polite" aria-atomic="true"></div> <div id="toastStack" class="toastStack" aria-live="polite" aria-atomic="true"></div>
<script src="/console.i18n.js?v=3.1.15&amp;rev=camera-snapshot-1"></script> <script src="/console.i18n.js?v=3.1.16&amp;rev=camera-snapshot-1"></script>
<script src="/console.js?v=3.1.15&amp;rev=camera-snapshot-1"></script> <script src="/console.js?v=3.1.16&amp;rev=camera-snapshot-1"></script>
</body> </body>
</html> </html>

View File

@ -1,3 +1,3 @@
{ {
"version": "3.1.15" "version": "3.1.16"
} }