diff --git a/components/web-console/locales/en.json b/components/web-console/locales/en.json index c7fc8f679..d7e073e8c 100644 --- a/components/web-console/locales/en.json +++ b/components/web-console/locales/en.json @@ -107,14 +107,6 @@ "defaultMessage": "Managed cluster regions chart", "description": "Accessible title for the managed cluster region donut chart." }, - "app.dashboard.managedClusterStatus.ariaDesc": { - "defaultMessage": "Managed cluster count by status", - "description": "Accessible description for the managed cluster status donut chart." - }, - "app.dashboard.managedClusterStatus.chartTitle": { - "defaultMessage": "Managed cluster status chart", - "description": "Accessible title for the managed cluster status donut chart." - }, "app.dashboard.managedDatabaseStatus.ariaDesc": { "defaultMessage": "Managed database count by status", "description": "Accessible description for the managed database status donut chart." @@ -387,22 +379,10 @@ "defaultMessage": "Cluster regions", "description": "Title for the managed cluster region breakdown dashboard widget." }, - "app.dashboard.widget.managedClusterStatus": { - "defaultMessage": "Cluster status", - "description": "Title for the managed cluster status dashboard widget." - }, - "app.dashboard.widget.managedClusters": { - "defaultMessage": "Clusters", - "description": "Title for the managed clusters count dashboard widget." - }, "app.dashboard.widget.managedDatabaseStatus": { "defaultMessage": "Database status", "description": "Title for the managed database status dashboard widget." }, - "app.dashboard.widget.managedDatabases": { - "defaultMessage": "Databases", - "description": "Title for the managed databases count dashboard widget." - }, "app.dashboard.widget.memory": { "defaultMessage": "Memory", "description": "Title for the memory utilization dashboard widget." diff --git a/packages/operational-dashboard-ui/src/dashboard/dashboard-layout-template.ts b/packages/operational-dashboard-ui/src/dashboard/dashboard-layout-template.ts index 4f1c7ae92..1dc04bab4 100644 --- a/packages/operational-dashboard-ui/src/dashboard/dashboard-layout-template.ts +++ b/packages/operational-dashboard-ui/src/dashboard/dashboard-layout-template.ts @@ -57,9 +57,6 @@ const WIDGET_TITLE_MESSAGES = { "registered-users": messages.registeredUsers, "managed-cluster-providers": messages.widgetManagedClusterProviders, "managed-cluster-regions": messages.widgetManagedClusterRegions, - "managed-clusters": messages.widgetManagedClusters, - "managed-cluster-status": messages.widgetManagedClusterStatus, - "managed-databases": messages.widgetManagedDatabases, "managed-database-status": messages.widgetManagedDatabaseStatus, "gateway-status": messages.gatewayStatusWidget, memory: messages.widgetMemory, diff --git a/packages/operational-dashboard-ui/src/messages.ts b/packages/operational-dashboard-ui/src/messages.ts index 6d361f10d..56c4f1ac9 100644 --- a/packages/operational-dashboard-ui/src/messages.ts +++ b/packages/operational-dashboard-ui/src/messages.ts @@ -148,17 +148,6 @@ export const messages = defineMessages({ defaultMessage: "Clusters", description: "Summary label for total managed clusters.", }, - managedClusterStatusAriaDesc: { - id: "app.dashboard.managedClusterStatus.ariaDesc", - defaultMessage: "Managed cluster count by status", - description: - "Accessible description for the managed cluster status donut chart.", - }, - managedClusterStatusChartTitle: { - id: "app.dashboard.managedClusterStatus.chartTitle", - defaultMessage: "Managed cluster status chart", - description: "Accessible title for the managed cluster status donut chart.", - }, managedDatabasesSummary: { id: "app.dashboard.summary.managedDatabases", defaultMessage: "Databases", @@ -524,21 +513,6 @@ export const messages = defineMessages({ description: "Title for the managed cluster region breakdown dashboard widget.", }, - widgetManagedClusters: { - id: "app.dashboard.widget.managedClusters", - defaultMessage: "Clusters", - description: "Title for the managed clusters count dashboard widget.", - }, - widgetManagedClusterStatus: { - id: "app.dashboard.widget.managedClusterStatus", - defaultMessage: "Cluster status", - description: "Title for the managed cluster status dashboard widget.", - }, - widgetManagedDatabases: { - id: "app.dashboard.widget.managedDatabases", - defaultMessage: "Databases", - description: "Title for the managed databases count dashboard widget.", - }, widgetManagedDatabaseStatus: { id: "app.dashboard.widget.managedDatabaseStatus", defaultMessage: "Database status", diff --git a/packages/operational-dashboard-ui/src/pages/dashboard-widget.tsx b/packages/operational-dashboard-ui/src/pages/dashboard-widget.tsx index 371abf90d..122685dc7 100644 --- a/packages/operational-dashboard-ui/src/pages/dashboard-widget.tsx +++ b/packages/operational-dashboard-ui/src/pages/dashboard-widget.tsx @@ -169,22 +169,6 @@ export function ManagedClusterRegionsCard({ ); } -export function ManagedClusterStatusCard({ - metric, -}: Readonly<{ metric: OperationalMetric }>) { - return ( - - - - - - ); -} - export function ManagedDatabaseStatusCard({ metric, }: Readonly<{ metric: OperationalMetric }>) { diff --git a/packages/operational-dashboard-ui/src/pages/operational-dashboard-page.tsx b/packages/operational-dashboard-ui/src/pages/operational-dashboard-page.tsx index 568831599..6080eadd5 100644 --- a/packages/operational-dashboard-ui/src/pages/operational-dashboard-page.tsx +++ b/packages/operational-dashboard-ui/src/pages/operational-dashboard-page.tsx @@ -68,7 +68,6 @@ import { InventorySummaryCard, ManagedClusterProvidersCard, ManagedClusterRegionsCard, - ManagedClusterStatusCard, ManagedDatabaseStatusCard, MetricCard, NodeStatusCard, @@ -82,7 +81,7 @@ import { useGetMetricsData } from "./get-metrics-data"; const baseTemplate = defaultDashboardLayoutTemplate; -const LAYOUT_STORAGE_KEY = "hypershell.operational-dashboard.layout.v28"; +const LAYOUT_STORAGE_KEY = "hypershell.operational-dashboard.layout.v29"; const CUSTOM_COLUMNS: Record = { xl: 4, lg: 4, @@ -225,10 +224,6 @@ function createWidgetMapping( } if (metricType === "inventory-status") { - if (metricId === "managed-clusters") { - return ; - } - return ; } @@ -461,53 +456,6 @@ function createWidgetMapping( "inventory-regions", ), }, - "managed-clusters": { - defaults: METRIC_WIDGET_DEFAULTS, - config: { - icon: , - title: intl.formatMessage(messages.widgetManagedClusters), - }, - renderWidget: () => - renderMetric( - "managed-clusters", - "", - messages.widgetManagedClusters, - "metric", - ), - }, - "managed-cluster-status": { - defaults: { - h: NODE_STATUS_WIDGET_HEIGHT, - maxH: NODE_STATUS_WIDGET_HEIGHT + 2, - minH: METRIC_WIDGET_DEFAULTS.minH, - w: 1, - }, - config: { - icon: , - title: intl.formatMessage(messages.widgetManagedClusterStatus), - }, - renderWidget: () => - renderMetric( - "managed-clusters", - "", - messages.widgetManagedClusterStatus, - "inventory-status", - ), - }, - "managed-databases": { - defaults: METRIC_WIDGET_DEFAULTS, - config: { - icon: , - title: intl.formatMessage(messages.widgetManagedDatabases), - }, - renderWidget: () => - renderMetric( - "managed-databases", - "", - messages.widgetManagedDatabases, - "metric", - ), - }, "managed-database-status": { defaults: { h: NODE_STATUS_WIDGET_HEIGHT, diff --git a/specs/platform/platform-inventory.spec.md b/specs/platform/platform-inventory.spec.md index 818d86ca2..5439419b8 100644 --- a/specs/platform/platform-inventory.spec.md +++ b/specs/platform/platform-inventory.spec.md @@ -234,19 +234,18 @@ The widget catalog SHALL add these types: | --- | --- | --- | --- | | `managed-cluster-providers` | `managed-clusters` | Yes | Provider donut from `inventoryProviders`; legend ordered by descending count (PI-05) | | `managed-cluster-regions` | `managed-clusters` | Yes | Placement donut from `inventoryRegions` (`{region} ({provider})` keys); legend ordered by descending count (PI-05) | -| `managed-clusters` | `managed-clusters` | No | `MetricCard` large number | -| `managed-cluster-status` | `managed-clusters` | No | Status donut when ≤5 non-zero status buckets (PI-04) | -| `managed-databases` | `managed-databases` | No | `MetricCard` large number | | `managed-database-status` | `managed-databases` | Yes | Status donut when ≤5 non-zero status buckets (PI-04) | -Users MAY add optional widgets from the add-widgets drawer. Status and provider donut widgets SHALL omit sparklines. +The widget catalog SHALL NOT register standalone `managed-clusters`, `managed-cluster-status`, or `managed-databases` widget types. Cluster and database totals SHALL be presented through `inventory-summary` (PI-06); status and dimension breakdowns SHALL use the default-layout donut widgets above (`web-console/operational-dashboard.spec.md` OP-DASH-20, OP-DASH-21). + +Users MAY add optional widgets from the add-widgets drawer when not already on the grid. Status and provider donut widgets SHALL omit sparklines. A dedicated **Platform inventory** dashboard route (`/dashboard/inventory`) SHALL NOT be introduced in version 1. Future work MAY add that route when the inventory summary exceeds eight rows or multiple full-width breakdown charts are required. #### Scenario: Status donut is suppressed for many statuses -- GIVEN managed clusters have six distinct non-zero `status` values -- WHEN the `managed-cluster-status` widget renders +- GIVEN managed databases have six distinct non-zero `status` values +- WHEN the `managed-database-status` widget renders - THEN the donut area SHALL render nothing - AND the widget title bar SHALL remain diff --git a/specs/web-console/operational-dashboard.spec.md b/specs/web-console/operational-dashboard.spec.md index 798f08e41..6070b5e22 100644 --- a/specs/web-console/operational-dashboard.spec.md +++ b/specs/web-console/operational-dashboard.spec.md @@ -658,7 +658,7 @@ The inventory summary widget SHALL use the same `DescriptionList` summary presen The `managed-cluster-providers`, `managed-cluster-regions`, and `managed-database-status` widgets SHALL use the shared `StatusDonutChart` stack (OP-DASH-16) with labels from `inventoryProviders`, `inventoryRegions`, and `inventoryStatus` keys respectively. -Adding the two-column region donut to the default layout SHALL bump the layout persistence key to `hypershell.operational-dashboard.layout.v26` (OP-DASH-11). Aligning `gateway-status` height with `usage-summary` SHALL bump the layout persistence key to `hypershell.operational-dashboard.layout.v27`. Adding `managed-database-status` to the default layout SHALL bump the layout persistence key to `hypershell.operational-dashboard.layout.v28`. +Adding the two-column region donut to the default layout SHALL bump the layout persistence key to `hypershell.operational-dashboard.layout.v26` (OP-DASH-11). Aligning `gateway-status` height with `usage-summary` SHALL bump the layout persistence key to `hypershell.operational-dashboard.layout.v27`. Adding `managed-database-status` to the default layout SHALL bump the layout persistence key to `hypershell.operational-dashboard.layout.v28`. Removing `managed-clusters`, `managed-cluster-status`, and `managed-databases` from the widget catalog SHALL bump the layout persistence key to `hypershell.operational-dashboard.layout.v29`. #### Scenario: Default layout includes inventory summary @@ -675,20 +675,12 @@ The widget catalog SHALL register optional inventory detail widgets defined in ` - `managed-cluster-providers` - provider donut driven by `managed-clusters.inventoryProviders` (on default layout; OP-DASH-20) - `managed-cluster-regions` - placement donut driven by `managed-clusters.inventoryRegions` (`{region} ({provider})` keys; on default layout; OP-DASH-20) -- `managed-clusters` - large number tile for total managed clusters -- `managed-cluster-status` - status donut driven by `managed-clusters.inventoryStatus` -- `managed-databases` - large number tile for total managed databases - `managed-database-status` - status donut driven by `managed-databases.inventoryStatus` (on default layout; OP-DASH-20) -These optional widget types SHALL be available in the add-widgets drawer. `managed-cluster-providers`, `managed-cluster-regions`, and `managed-database-status` SHALL also appear in `defaultDashboardLayoutTemplate` (OP-DASH-20). +The widget catalog SHALL NOT register standalone `managed-clusters`, `managed-cluster-status`, or `managed-databases` widget types. Cluster and database totals SHALL be presented through `inventory-summary` (OP-DASH-20); status and dimension breakdowns SHALL use the default-layout donut widgets above. + +These optional widget types SHALL be available in the add-widgets drawer when not already on the grid. `managed-cluster-providers`, `managed-cluster-regions`, and `managed-database-status` SHALL also appear in `defaultDashboardLayoutTemplate` (OP-DASH-20). Status donut widgets SHALL reuse the shared `StatusDonutChart` stack (OP-DASH-16) with inventory-specific bucket labels from `inventoryStatus` keys. They SHALL NOT reuse gateway display-status colors or vocabulary. A separate `/dashboard/inventory` route SHALL NOT be added in version 1. - -#### Scenario: Operator adds managed cluster status donut - -- GIVEN the default layout is active and inventory metrics are connected -- WHEN the operator adds `managed-cluster-status` from the widget drawer -- THEN the grid SHALL render a status donut for managed cluster inventory -- AND the widget SHALL omit a trend sparkline