Гант: версия в правом верхнем углу (KHB_VERSION из образа, GIT_SHA в сборке); порядок этапов в списке из справочника
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { PROCESS_SETS } from "./model.js";
|
||||
import { esc } from "./svg.js";
|
||||
|
||||
/** Страница просмотра: вкладки Гант / ARIS, параметры, панорамирование и масштаб. SVG подгружается с /gantt.svg и /aris.svg. */
|
||||
export function renderPage(opts: { set: string; stages: string[]; warnings: Array<{ id: string; message: string }>; rows: number; questions: number }): string {
|
||||
export function renderPage(opts: { set: string; stages: string[]; warnings: Array<{ id: string; message: string }>; rows: number; questions: number; version?: string }): string {
|
||||
const sets = PROCESS_SETS.map((s) => `<option value="${s}"${s === opts.set ? " selected" : ""}>${s}_*</option>`).join("");
|
||||
const stages = opts.stages.map((s) => `<label class="chk"><input type="checkbox" class="stage" value="${esc(s)}" checked> ${esc(s)}</label>`).join("");
|
||||
const warn = opts.warnings.length
|
||||
@@ -41,8 +41,10 @@ select,input[type=date]{background:var(--bg);color:var(--fg);border:1px solid va
|
||||
#stage{transform-origin:0 0;position:absolute;left:0;top:0}
|
||||
a.btn{color:var(--acc);text-decoration:none;border:1px solid var(--line);border-radius:6px;padding:4px 10px}
|
||||
#msg{position:absolute;left:16px;top:12px;color:var(--mut)}
|
||||
.ver{position:fixed;top:2px;right:6px;z-index:20;font-size:10px;color:#555;pointer-events:none}
|
||||
.stagebox{position:absolute;z-index:5;background:var(--bg);border:1px solid var(--line);padding:8px;display:flex;flex-direction:column}
|
||||
</style></head><body>
|
||||
<div class="ver">${esc(opts.version ?? "dev")}</div>
|
||||
<header>
|
||||
<h1><a class="back" href="../" title="К списку отчётов">←</a> Процесс khbuild</h1>
|
||||
<div class="tabs"><button id="tG" class="on">Гант</button><button id="tA">ARIS</button></div>
|
||||
|
||||
@@ -60,7 +60,8 @@ export function buildApi(deps: ProcessVizApiDeps): FastifyInstance {
|
||||
return reply.type("text/html; charset=utf-8").send(
|
||||
renderPage({
|
||||
set: model.set,
|
||||
stages: stageOrder(model.rows, sch),
|
||||
stages: stageOrder(model.rows, sch, model.stages),
|
||||
version: process.env.KHB_VERSION,
|
||||
warnings: sch.warnings,
|
||||
rows: model.rows.length,
|
||||
questions:
|
||||
|
||||
Reference in New Issue
Block a user