Гант: версия в правом верхнем углу (KHB_VERSION из образа, GIT_SHA в сборке); порядок этапов в списке из справочника
All checks were successful
ci / test (push) Successful in 21s
ci / deploy (push) Successful in 1m29s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 13:37:01 +03:00
parent c1e2e709e3
commit b4cf3d8c9a
4 changed files with 8 additions and 3 deletions

View File

@@ -32,6 +32,6 @@ jobs:
run: |
TAG=$(git rev-parse --short=12 HEAD)
echo "$TAG" > .image_tag
sudo -n docker build -t "khb-microservices:${TAG}" .
sudo -n docker build --build-arg GIT_SHA="${TAG}" -t "khb-microservices:${TAG}" .
- name: deploy
run: sudo -n /y/services/khb-deploy/deploy.sh "$(cat .image_tag)"

View File

@@ -22,7 +22,9 @@ RUN apt-get update \
&& unzip -j /tmp/rclone.zip '*/rclone' -d /usr/local/bin && chmod +x /usr/local/bin/rclone && rm /tmp/rclone.zip \
&& npm install -g pnpm@10.13.1 @anthropic-ai/claude-code@2.1.296
COPY --from=build /app /app
ARG GIT_SHA=dev
ENV NODE_ENV=production \
KHB_VERSION=${GIT_SHA} \
KHB_SETTINGS=/config/settings.json5
USER node
CMD ["node", "packages/scheduler/dist/main.js"]

View File

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

View File

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