Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions components/web-console/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
26 changes: 0 additions & 26 deletions packages/operational-dashboard-ui/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
16 changes: 0 additions & 16 deletions packages/operational-dashboard-ui/src/pages/dashboard-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,6 @@ export function ManagedClusterRegionsCard({
);
}

export function ManagedClusterStatusCard({
metric,
}: Readonly<{ metric: OperationalMetric }>) {
return (
<WidgetContent bodyClassName="hypershell-dashboard-status-donut-card--compact">
<Content className="hypershell-dashboard-status-donut-card">
<InventoryStatusChart
ariaDescMessage={messages.managedClusterStatusAriaDesc}
ariaTitleMessage={messages.managedClusterStatusChartTitle}
metric={metric}
/>
</Content>
</WidgetContent>
);
}

export function ManagedDatabaseStatusCard({
metric,
}: Readonly<{ metric: OperationalMetric }>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ import {
InventorySummaryCard,
ManagedClusterProvidersCard,
ManagedClusterRegionsCard,
ManagedClusterStatusCard,
ManagedDatabaseStatusCard,
MetricCard,
NodeStatusCard,
Expand All @@ -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";
Comment thread
kdoberst marked this conversation as resolved.
const CUSTOM_COLUMNS: Record<Variants, number> = {
xl: 4,
lg: 4,
Expand Down Expand Up @@ -225,10 +224,6 @@ function createWidgetMapping(
}

if (metricType === "inventory-status") {
if (metricId === "managed-clusters") {
return <ManagedClusterStatusCard metric={metric} />;
}

return <ManagedDatabaseStatusCard metric={metric} />;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spec consistency: this simplification (and the catalog deletions in this hunk and below) removes the managed-clusters, managed-cluster-status, and managed-databases widgets, but specs/web-console/operational-dashboard.spec.md OP-DASH-21 (lines 672-695) still says the catalog SHALL register those three and that they SHALL be available in the add-widgets drawer, and it still carries the Operator adds managed cluster status donut scenario. Since the spec is the authoritative desired state, please update OP-DASH-21 (remove/deprecate the three entries and the scenario) and record the v29 key bump in the version-history line (661); otherwise the code and spec disagree and a future /reconcile would re-add these widgets.

}

Expand Down Expand Up @@ -461,53 +456,6 @@ function createWidgetMapping(
"inventory-regions",
),
},
"managed-clusters": {
defaults: METRIC_WIDGET_DEFAULTS,
config: {
icon: <ClusterIcon />,
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: <ClusterIcon />,
title: intl.formatMessage(messages.widgetManagedClusterStatus),
},
renderWidget: () =>
renderMetric(
"managed-clusters",
"",
messages.widgetManagedClusterStatus,
"inventory-status",
),
},
"managed-databases": {
defaults: METRIC_WIDGET_DEFAULTS,
config: {
icon: <DatabaseIcon />,
title: intl.formatMessage(messages.widgetManagedDatabases),
},
renderWidget: () =>
renderMetric(
"managed-databases",
"",
messages.widgetManagedDatabases,
"metric",
),
},
"managed-database-status": {
defaults: {
h: NODE_STATUS_WIDGET_HEIGHT,
Expand Down
11 changes: 5 additions & 6 deletions specs/platform/platform-inventory.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 4 additions & 12 deletions specs/web-console/operational-dashboard.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Loading