New /api/v1/infra/stack/status probes all stack apps/APIs/SW; Infra UI groups proc-cards by VM; wire vm123 router; menu INFRA COD and Serviços IaaS · Infra as Code labels. Co-authored-by: Cursor <cursoragent@cursor.com>
140 lines
3.9 KiB
Python
140 lines
3.9 KiB
Python
"""Registry de módulos do Ligbox Ops Desk (Spec 015)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class ModuleDef:
|
|
id: str
|
|
label: str
|
|
description: str
|
|
locked: bool = False
|
|
nav_views: tuple[str, ...] = ()
|
|
default_enabled: bool = True
|
|
|
|
|
|
MODULES: tuple[ModuleDef, ...] = (
|
|
ModuleDef(
|
|
id="core",
|
|
label="Núcleo",
|
|
description="Dashboard, tickets, autenticação e conta.",
|
|
locked=True,
|
|
nav_views=("dashboard", "tickets", "account"),
|
|
),
|
|
ModuleDef(
|
|
id="overview",
|
|
label="Audit Overview",
|
|
description="Visão clássica por tenant e domínio.",
|
|
nav_views=("overview",),
|
|
),
|
|
ModuleDef(
|
|
id="overview-home",
|
|
label="Serviços IaaS",
|
|
description="Orquestração de serviços — clientes, catálogo cPanel e purge OPS (Spec 018) · Infra as Code.",
|
|
nav_views=("overview-home",),
|
|
),
|
|
ModuleDef(
|
|
id="infra",
|
|
label="INFRA COD",
|
|
description="Stack completo VMs 112/114/122/123/130 — apps, APIs e integrações (Spec 033).",
|
|
nav_views=("infra",),
|
|
),
|
|
ModuleDef(
|
|
id="infra2-soc",
|
|
label="Infra 2 SOC",
|
|
description="Painel visual SOC VM112→VM122.",
|
|
nav_views=("infra2",),
|
|
),
|
|
ModuleDef(
|
|
id="funnel-timing",
|
|
label="Relógio por fase",
|
|
description="Duração entre etapas do onboarding VM112.",
|
|
nav_views=(),
|
|
),
|
|
ModuleDef(
|
|
id="wizard-security",
|
|
label="Segurança Wizard",
|
|
description="CSP, auditoria de inputs e telemetria cibersegurança VM112 (Spec 021).",
|
|
nav_views=(),
|
|
default_enabled=True,
|
|
),
|
|
ModuleDef(
|
|
id="carbonio-release",
|
|
label="Bloqueios Carbonio",
|
|
description="Libertar e-mail ACCOUNT_EXISTS — zmprov da via VM112 (Spec 022).",
|
|
nav_views=(),
|
|
default_enabled=True,
|
|
),
|
|
ModuleDef(
|
|
id="vm112-domains",
|
|
label="Domínios VM112",
|
|
description="Account Home — domínios orquestrados e purge (testes).",
|
|
nav_views=(),
|
|
default_enabled=True,
|
|
),
|
|
ModuleDef(
|
|
id="billing-recurrence",
|
|
label="Cobrança recorrente",
|
|
description="KPI billing, conta cliente e links financeiro (Spec 023).",
|
|
nav_views=(),
|
|
default_enabled=True,
|
|
),
|
|
ModuleDef(
|
|
id="email-migration",
|
|
label="Migração E-mail",
|
|
description="Jobs imapsync legado → Carbonio + gate DNS (Spec 019).",
|
|
nav_views=("email-migration",),
|
|
default_enabled=True,
|
|
),
|
|
ModuleDef(
|
|
id="wazuh-soc",
|
|
label="Wazuh SOC Overview",
|
|
description="Card e modal de alertas VM104 no Overview.",
|
|
nav_views=(),
|
|
),
|
|
ModuleDef(
|
|
id="leads",
|
|
label="Leads abandonados",
|
|
description="CRM de sessões stale do funil.",
|
|
nav_views=("leads",),
|
|
),
|
|
ModuleDef(
|
|
id="events",
|
|
label="Eventos webhook",
|
|
description="Feed bruto de webhooks VM112 e Wazuh.",
|
|
nav_views=("events",),
|
|
),
|
|
ModuleDef(
|
|
id="tenants",
|
|
label="Tenants",
|
|
description="Registo de nós Ligbox.",
|
|
nav_views=("tenants",),
|
|
),
|
|
ModuleDef(
|
|
id="messages",
|
|
label="Mensagens",
|
|
description="Pedidos de cadastro de administradores.",
|
|
nav_views=("messages",),
|
|
),
|
|
ModuleDef(
|
|
id="admin-users",
|
|
label="Administradores",
|
|
description="Gestão de utilizadores Desk.",
|
|
nav_views=("admin",),
|
|
),
|
|
ModuleDef(
|
|
id="modules-admin",
|
|
label="Módulos",
|
|
description="Activar/desactivar módulos do Desk.",
|
|
locked=True,
|
|
nav_views=("modules",),
|
|
),
|
|
)
|
|
|
|
MODULE_BY_ID = {m.id: m for m in MODULES}
|
|
|
|
|
|
def all_module_ids() -> list[str]:
|
|
return [m.id for m in MODULES]
|