v0.5.1: ссылки на стенды на главной + в Swagger описании

This commit is contained in:
2026-08-01 20:23:01 +04:00
parent edecf13493
commit 06bd9f704e
5 changed files with 99 additions and 2 deletions
+12
View File
@@ -49,6 +49,16 @@ def index():
svc_count = len(_cfg.SERVICES)
inst_count = len(state.instances)
# Список стендов
stands_list = []
for sid in _cfg.list_stands():
svc = _cfg.get_services(sid)
stands_list.append({
"id": sid,
"count": len(svc),
})
current_stand = g.stand_id
# Список сервисов для таблицы: name, id, кол-во операций
svc_list = []
for sid, svc in sorted(_cfg.SERVICES.items(), key=lambda x: x[1].get("name", x[0])):
@@ -69,6 +79,8 @@ def index():
inst_count=inst_count,
delay=_cfg.DELAY,
svc_list=svc_list,
stands_list=stands_list,
current_stand=current_stand,
endpoint=_POLYGON_ENDPOINT,
)