diff --git a/ops/work/web/app.py b/ops/work/web/app.py
index 2723e26..36668b4 100644
--- a/ops/work/web/app.py
+++ b/ops/work/web/app.py
@@ -1392,6 +1392,23 @@ def staging_items():
return sorted(out, key=lambda z: ((z.get("vendor") or ""), (z.get("model") or "")))
+def staging_edges():
+ out = []
+ for p in sorted(glob.glob("/root/buryan-infra/ops/combine/staging/*/models.yaml")):
+ try:
+ d = yaml.safe_load(open(p, encoding="utf-8")) or {}
+ except Exception:
+ continue
+ for c in d.get("compatibility") or []:
+ if isinstance(c, dict) and c.get("from") and c.get("to"):
+ out.append({"batch": os.path.basename(os.path.dirname(p)),
+ "from": c.get("from"), "to": c.get("to"),
+ "kind": c.get("kind") or "compatible",
+ "condition": c.get("condition"),
+ "source": c.get("source")})
+ return out
+
+
def coverage_report():
mats = load_yaml("materials.yaml").get("materials") or []
mat_by_vendor = {}
@@ -1655,7 +1672,7 @@ class H(BaseHTTPRequestHandler):
if p == "/api/archive":
return self._out({"items": archived_items()})
if p == "/api/staging":
- return self._out({"items": staging_items()})
+ return self._out({"items": staging_items(), "edges": staging_edges()})
if p == "/api/room-roles":
return self._out(room_roles())
if p == "/api/room-needs":
diff --git a/ops/work/web/studio.html b/ops/work/web/studio.html
index 4fa2819..b460b88 100644
--- a/ops/work/web/studio.html
+++ b/ops/work/web/studio.html
@@ -197,9 +197,10 @@ async function loadMaterials(){
}
async function loadInbox(){
$('#inboxbox').innerHTML='загрузка…';
- const r=await api('/api/staging'); const xs=r.items||[];
+ const r=await api('/api/staging'); const xs=r.items||[]; const es=r.edges||[];
if(!xs.length){$('#inboxbox').innerHTML='
Staging пуст. Запустите extraction на ПК и скопируйте results.
';return;}
- $('#inboxbox').innerHTML=`| Партия | Вендор | Модель | Роль | Статус | Источник |
${xs.map(x=>`| ${esc(x.batch||'')} | ${esc(x.vendor||'')} | ${esc(x.model||'')} | ${esc(x.role||'')} | ${x.existing?'существует':'новая'} · ${esc(x.review||'')} | ${x.source_url?`URL`:esc(x.source_file||'local')} |
`).join('')}
Прод не изменяется. Принятие — отдельным шагом после сверки цитаты.
`;
+ const edgeHtml=es.length?`Compatibility (${es.length})
| От | К | Тип | Условие |
${es.slice(0,80).map(e=>`| ${esc(e.from)} | ${esc(e.to)} | ${esc(e.kind)} | ${esc(e.condition||'')} |
`).join('')}
`:'';
+ $('#inboxbox').innerHTML=`| Партия | Вендор | Модель | Роль | Статус | Источник |
${xs.map(x=>`| ${esc(x.batch||'')} | ${esc(x.vendor||'')} | ${esc(x.model||'')} | ${esc(x.role||'')} | ${x.existing?'существует':'новая'} · ${esc(x.review||'')} | ${x.source_url?`URL`:esc(x.source_file||'local')} |
`).join('')}
${edgeHtml}Прод не изменяется. Принятие — отдельным шагом после сверки цитаты.
`;
}
async function loadCoverage(){
$('#coveragebox').innerHTML='загрузка…';