diff --git a/src/govoplan_ops/backend/manifest.py b/src/govoplan_ops/backend/manifest.py index b65e245..d79e922 100644 --- a/src/govoplan_ops/backend/manifest.py +++ b/src/govoplan_ops/backend/manifest.py @@ -2,6 +2,7 @@ from __future__ import annotations from govoplan_core.core.access import CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER from govoplan_core.core.modules import FrontendModule, FrontendRoute, ModuleContext, ModuleManifest, NavItem, PermissionDefinition, RoleTemplate +from govoplan_core.core.views import ViewSurface OPS_READ_SCOPE = "ops:operations:read" OPS_READ_SCOPES = (OPS_READ_SCOPE, "system:settings:read", "admin:settings:read") @@ -57,6 +58,9 @@ manifest = ModuleManifest( package_name="@govoplan/ops-webui", routes=(FrontendRoute(path="/ops", component="OpsPage", required_any=OPS_READ_SCOPES, order=890),), nav_items=(NavItem(path="/ops", label="Ops", icon="activity", required_any=OPS_READ_SCOPES, order=890),), + view_surfaces=( + ViewSurface(id="ops.widget.health", module_id="ops", kind="section", label="Operations health widget", order=100), + ), ), ) diff --git a/webui/src/module.ts b/webui/src/module.ts index d15b87f..0953da7 100644 --- a/webui/src/module.ts +++ b/webui/src/module.ts @@ -14,6 +14,7 @@ const dashboardWidgets: DashboardWidgetsUiCapability = { widgets: [ { id: "ops.health", + surfaceId: "ops.widget.health", title: "Operations health", description: "Readiness, worker mode, and current warning count.", moduleId: "ops", @@ -34,6 +35,9 @@ export const opsModule: PlatformWebModule = { dependencies: ["access"], optionalDependencies: ["audit", "docs", "notifications"], translations, + viewSurfaces: [ + { id: "ops.widget.health", moduleId: "ops", kind: "section", label: "Operations health widget", order: 100 } + ], navItems: [{ to: "/ops", label: "i18n:govoplan-ops.ops.907a54c2", iconName: "activity", anyOf: opsReadScopes, order: 890 }], routes: [ { path: "/ops", anyOf: opsReadScopes, order: 890, render: ({ settings }) => createElement(OpsPage, { settings }) }],