fix(ui): move widget and page documentation into headings
Verified with the coordinated workspace changes by devkit full run 2026-09-08T225814-186389-0000-3e3ed7cd (all seven phases passed). This shared UI pass does not mark the individual module reviews complete.
This commit is contained in:
@@ -3,7 +3,6 @@ import { MetricGrid } from "@govoplan/core-webui";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
DismissibleAlert,
|
||||
DocumentationHelpLink,
|
||||
LoadingFrame,
|
||||
MetricCard,
|
||||
StatusBadge,
|
||||
@@ -11,7 +10,6 @@ import {
|
||||
type ApiSettings
|
||||
} from "@govoplan/core-webui";
|
||||
import { fetchOpsStatus, type OpsStatus } from "../../api/ops";
|
||||
import { OPS_DOCUMENTATION } from "./interfacePatterns";
|
||||
import { knownMetric, knownQueueDepthTotal, runtimeWorkTone } from "./runtimeStatus";
|
||||
|
||||
export default function OpsHealthWidget({ settings, refreshKey }: { settings: ApiSettings; refreshKey: number }) {
|
||||
@@ -42,9 +40,6 @@ export default function OpsHealthWidget({ settings, refreshKey }: { settings: Ap
|
||||
return (
|
||||
<LoadingFrame loading={loading} label="Loading operations status">
|
||||
{error && <DismissibleAlert tone="warning" resetKey={error}>{error}</DismissibleAlert>}
|
||||
<div className="button-row compact-actions">
|
||||
<DocumentationHelpLink reference={OPS_DOCUMENTATION} />
|
||||
</div>
|
||||
<MetricGrid columns={3} spacing="none">
|
||||
<MetricCard label="Readiness" value={ready ? "ready" : "blocked"} tone={ready ? "good" : "danger"} detail={status?.readiness.profile ?? "-"} />
|
||||
<MetricCard label="Workers" value={knownMetric(workerMetrics?.workers)} tone={runtimeWorkTone(workerMetrics?.state ?? "unreachable")} detail={workerMetrics?.state ?? "unavailable"} />
|
||||
|
||||
@@ -173,14 +173,14 @@ export default function OpsPage({ settings, auth }: {settings: ApiSettings;auth:
|
||||
return (
|
||||
<PageLayout
|
||||
archetype="overview"
|
||||
title="i18n:govoplan-ops.ops.907a54c2"
|
||||
title="i18n:govoplan-ops.ops.907a54c2" titleHelp={<DocumentationHelpLink reference={OPS_DOCUMENTATION} />}
|
||||
description="i18n:govoplan-ops.runtime_health_deployment_profile_worker_split_a.55340156"
|
||||
error={error}
|
||||
actions={<PageActionBar
|
||||
variant="overview"
|
||||
refreshable
|
||||
reloadAction={{ onReload: () => void load(), loading, disabledReason: loading ? OPS_I18N.loading : undefined }}
|
||||
helpAction={<DocumentationHelpLink reference={OPS_DOCUMENTATION} />}
|
||||
|
||||
primaryActions={<Button variant="primary" onClick={() => void runChecks()} disabled={Boolean(runProbesDisabledReason)} disabledReason={runProbesDisabledReason}>i18n:govoplan-ops.surface.run_probes</Button>}
|
||||
/>}
|
||||
>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { createElement, lazy } from "react";
|
||||
import type { DashboardWidgetsUiCapability, PlatformWebModule } from "@govoplan/core-webui";
|
||||
import OpsHealthWidget from "./features/ops/OpsHealthWidget";
|
||||
import { OPS_DOCUMENTATION } from "./features/ops/interfacePatterns";
|
||||
import { generatedTranslations } from "./i18n/generatedTranslations";
|
||||
|
||||
const OpsPage = lazy(() => import("./features/ops/OpsPage"));
|
||||
@@ -16,6 +17,7 @@ const dashboardWidgets: DashboardWidgetsUiCapability = {
|
||||
id: "ops.health",
|
||||
surfaceId: "ops.widget.health",
|
||||
title: "Operations health",
|
||||
documentation: OPS_DOCUMENTATION,
|
||||
description: "Readiness, worker mode, and current warning count.",
|
||||
moduleId: "ops",
|
||||
category: "Operations",
|
||||
|
||||
Reference in New Issue
Block a user