Show only infrastructure services in left panel

This commit is contained in:
2026-07-23 18:09:26 +04:00
parent aa738474e4
commit 29473da97f
+4 -4
View File
@@ -54,17 +54,17 @@ def index():
org = get_organization(client)
raw_svc = get_services(client)
services = sorted(raw_svc, key=lambda s: (s.get("svcId", 0), s.get("svc", "")))
# инфраструктурные сервисы (платформа/среда)
infra_ids = {2, 12, 21, 22, 25, 26, 27, 28, 29, 110, 111, 112, 150}
raw_inst = get_instances(client)
instances = [i for i in raw_inst
if i.get("explainedStatus") not in ("deleted", "not created")
and i.get("serviceId") not in (109, 110, 111)]
and i.get("serviceId") in infra_ids]
instances.sort(key=lambda i: (0 if i.get("serviceId") == 19 else 1, i.get("displayName", "")))
# group non-org instances by service type
# group by service type
instance_groups = {}
for i in instances:
if i.get("serviceId") == 19:
continue
svc_name = i.get("svc", "Прочее")
instance_groups.setdefault(svc_name, []).append(i)
config = load_config()