From 96d1373b2b3986a92672dcb5e521e638a6f0d3b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jun 2026 07:23:05 +0000 Subject: [PATCH] Version Packages --- .../.changeset/clean-styles-brave-logos.md | 5 - .../fix-pagination-reset-on-search.md | 15 --- .../dcm/.changeset/funny-eagles-drum.md | 5 - .../dcm/.changeset/golden-ships-deploy.md | 14 --- .../dcm/.changeset/kind-ravens-rehydrate.md | 25 ---- workspaces/dcm/.changeset/large-emus-share.md | 6 - .../remove-legacy-env-specs-screens.md | 27 ---- .../dcm/.changeset/slim-lobsters-refactor.md | 41 ------ .../dcm/.changeset/swift-foxes-token.md | 10 -- .../dcm/plugins/dcm-backend/CHANGELOG.md | 69 +++++++++++ .../dcm/plugins/dcm-backend/package.json | 2 +- .../dcm/plugins/dcm-common/CHANGELOG.md | 77 ++++++++++++ .../dcm/plugins/dcm-common/package.json | 2 +- workspaces/dcm/plugins/dcm/CHANGELOG.md | 117 ++++++++++++++++++ workspaces/dcm/plugins/dcm/package.json | 2 +- 15 files changed, 266 insertions(+), 151 deletions(-) delete mode 100644 workspaces/dcm/.changeset/clean-styles-brave-logos.md delete mode 100644 workspaces/dcm/.changeset/fix-pagination-reset-on-search.md delete mode 100644 workspaces/dcm/.changeset/funny-eagles-drum.md delete mode 100644 workspaces/dcm/.changeset/golden-ships-deploy.md delete mode 100644 workspaces/dcm/.changeset/kind-ravens-rehydrate.md delete mode 100644 workspaces/dcm/.changeset/large-emus-share.md delete mode 100644 workspaces/dcm/.changeset/remove-legacy-env-specs-screens.md delete mode 100644 workspaces/dcm/.changeset/slim-lobsters-refactor.md delete mode 100644 workspaces/dcm/.changeset/swift-foxes-token.md create mode 100644 workspaces/dcm/plugins/dcm-backend/CHANGELOG.md create mode 100644 workspaces/dcm/plugins/dcm-common/CHANGELOG.md create mode 100644 workspaces/dcm/plugins/dcm/CHANGELOG.md diff --git a/workspaces/dcm/.changeset/clean-styles-brave-logos.md b/workspaces/dcm/.changeset/clean-styles-brave-logos.md deleted file mode 100644 index 0b21e71958..0000000000 --- a/workspaces/dcm/.changeset/clean-styles-brave-logos.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm': patch ---- - -UI code-quality improvements: replace all inline styles with makeStyles classes, use theme palette tokens (status.ok, error, text) instead of hardcoded colours, merge duplicate style files into a single useDcmStyles hook, add destructive-action styling to delete dialogs, and move RhdhLogoFull/RhdhLogoIcon into the plugin so they can be wired in RHDH without relying on the dev-only app shell. diff --git a/workspaces/dcm/.changeset/fix-pagination-reset-on-search.md b/workspaces/dcm/.changeset/fix-pagination-reset-on-search.md deleted file mode 100644 index ae4919c0d0..0000000000 --- a/workspaces/dcm/.changeset/fix-pagination-reset-on-search.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm': patch ---- - -Fix pagination not resetting to page 1 when a search/filter is applied. - -When a user navigates to a later page and then types in the search field, the -table would appear empty because the page index was left pointing past the end -of the now-smaller filtered result set. - -All table components now reset to page 0 whenever the search or filter value -changes, consistent with the existing behaviour in `DcmEntitiesCard`. - -Affected tabs: Providers, Policies, Catalog Items, Catalog Item Instances, -Resources, Service Types, Service Specs, Environments, and Request History. diff --git a/workspaces/dcm/.changeset/funny-eagles-drum.md b/workspaces/dcm/.changeset/funny-eagles-drum.md deleted file mode 100644 index d8dbdae18d..0000000000 --- a/workspaces/dcm/.changeset/funny-eagles-drum.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm': patch ---- - -Refresh DCM plugin API reports and align UI internals around shared route/tab constants and reusable detail components. diff --git a/workspaces/dcm/.changeset/golden-ships-deploy.md b/workspaces/dcm/.changeset/golden-ships-deploy.md deleted file mode 100644 index 5f8d31cbe8..0000000000 --- a/workspaces/dcm/.changeset/golden-ships-deploy.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm': patch -'@red-hat-developer-hub/backstage-plugin-dcm-backend': patch -'@red-hat-developer-hub/backstage-plugin-dcm-common': patch ---- - -Add Docker/Podman deployment support for the DCM plugin. - -- Added `Dockerfile` (multi-stage build) to produce a standalone Backstage image -- Added `app-config.production.yaml` for container runtime configuration -- Added `scripts/generate-image.sh` (renamed from `dynamic-plugins.sh`) with commands to build and push both the OCI dynamic-plugin artifact and the full Backstage application image -- Added `.dockerignore` to exclude sensitive and dev-only files from the build context -- Configured guest auth (`dangerouslyAllowOutsideDevelopment`) for container environments -- Skip SSO token exchange in the backend proxy when `clientId`/`clientSecret` are not set diff --git a/workspaces/dcm/.changeset/kind-ravens-rehydrate.md b/workspaces/dcm/.changeset/kind-ravens-rehydrate.md deleted file mode 100644 index 3818b4a8fb..0000000000 --- a/workspaces/dcm/.changeset/kind-ravens-rehydrate.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm': minor -'@red-hat-developer-hub/backstage-plugin-dcm-common': minor ---- - -DCM UI and catalog client updates for the example app and published plugins. - -**Example app (`packages/app`) — RBAC navigation** - -- Removed the **RBAC** sidebar entry under Administration and the `/rbac` route. -- Dropped the `@backstage-community/plugin-rbac` frontend dependency. The RBAC backend plugin may remain for permissions; only the menu and page were removed. - -**`@red-hat-developer-hub/backstage-plugin-dcm` — Resources tab** - -- Removed the **Resources** tab from the Data Center page and all **Placement / `resources`** proxy usage from the plugin. -- Removed `placementApiRef`, `resources` route ref, and the `PlacementClient` integration from the plugin surface. - -**`@red-hat-developer-hub/backstage-plugin-dcm-common` — placement API removed; catalog rehydrate** - -- Removed the Placement API client, types, and tests tied to the internal `resources` API. -- Added **`rehydrateCatalogItemInstance`** on `CatalogApi` / `CatalogClient`: `POST .../catalog-item-instances/{id}:rehydrate`. - -**Catalog item instances UI** - -- Added a **Rehydrate** action (outlined button with refresh icon) on each instance row, success and error snackbars, and a unit test for the new client method. diff --git a/workspaces/dcm/.changeset/large-emus-share.md b/workspaces/dcm/.changeset/large-emus-share.md deleted file mode 100644 index b568762148..0000000000 --- a/workspaces/dcm/.changeset/large-emus-share.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm-backend': major -'@red-hat-developer-hub/backstage-plugin-dcm-common': major ---- - -Developing DCM Plugin skeleton diff --git a/workspaces/dcm/.changeset/remove-legacy-env-specs-screens.md b/workspaces/dcm/.changeset/remove-legacy-env-specs-screens.md deleted file mode 100644 index 0709e960cc..0000000000 --- a/workspaces/dcm/.changeset/remove-legacy-env-specs-screens.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm': minor ---- - -Remove legacy Environments and Service Specs screens. - -**Removed routes** - -- `/dcm/environments` — `EnvironmentsTabContent` list page (was already orphaned from active navigation) -- `/dcm/service-specs` — `ServiceSpecsTabContent` list page (was already orphaned from active navigation) -- `/dcm/environments/:id/*` — `EnvironmentDetailsPage` with Overview, Entities, and Request History sub-tabs -- `/dcm/service-specs/:id/*` — `ServiceSpecDetailsPage` with Overview, Entities, and Request History sub-tabs - -**Removed route refs** - -- `serviceSpecsRouteRef` -- `environmentDetailsRouteRef` -- `serviceSpecDetailsRouteRef` -- `DCM_DETAILS_TABS` - -**Removed shared components (legacy-only)** - -- `DcmEntitiesTable`, `DcmRequestHistoryTable`, `DcmDetailsBreadcrumb`, `dataCenterNavigation`, `serviceSpecYaml` - -**Removed mock data layer** - -- `data/environments.ts`, `data/service-specs.ts`, `data/dcm-mock-rows.ts` diff --git a/workspaces/dcm/.changeset/slim-lobsters-refactor.md b/workspaces/dcm/.changeset/slim-lobsters-refactor.md deleted file mode 100644 index 8eb0033160..0000000000 --- a/workspaces/dcm/.changeset/slim-lobsters-refactor.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm': minor -'@red-hat-developer-hub/backstage-plugin-dcm-backend': minor -'@red-hat-developer-hub/backstage-plugin-dcm-common': minor ---- - -Refactor DCM frontend plugin for reusability, maintainability, and test coverage. - -**New shared utilities & hooks** - -- `createYupValidator` – factory that wraps a Yup schema and returns stable `validate` / `isValid` helpers, eliminating per-tab validation boilerplate. -- `useCrudTab` – custom React hook that centralises data loading, client-side search/pagination, and create/edit/delete dialog state for every CRUD tab. Tabs now consist only of feature-specific rendering logic. - -**New shared components** - -- `DcmCrudTabLayout` – generic layout that handles loading spinners, load-error alerts with a Retry button, empty states, and a searchable paginated table inside an `InfoCard`. -- `DcmFormDialogActions` – reusable Save / Cancel button row with loading spinner and disabled states, used by all form dialogs. -- `DcmErrorSnackbar` – transient error snackbar for surfacing delete-operation failures. -- `DcmDeleteDialog` – standalone confirmation dialog component extracted from inline usage. - -**Per-feature file decomposition** - -Each CRUD tab now has dedicated files for form types, Yup schema, field components, and column definitions: - -- `providers/` → `providerFormTypes.ts`, `components/ProviderFormFields.tsx`, `components/ProviderStatus.tsx`, `components/CopyButton.tsx` -- `policies/` → `policyFormTypes.ts`, `components/PolicyFormFields.tsx` -- `catalog-items/` → `catalogItemFormTypes.ts`, `components/CatalogItemFormFields.tsx` -- `catalog-item-instances/` → `instanceFormTypes.ts`, `components/InstanceFormFields.tsx` -- `resources/` → `resourceFormTypes.ts`, `components/ResourceFormFields.tsx` - -**Error handling improvements** - -Load errors and delete errors are now surfaced in the UI via `DcmCrudTabLayout` (inline alert with Retry) and `DcmErrorSnackbar` respectively, replacing silent `.catch(() => {})` handlers. - -**Dead code removal** - -Removed the unused `ExampleComponent` directory and its tests. - -**Test coverage** - -Added unit tests for `extractApiError`, `createYupValidator`, `useCrudTab`, `DcmFormDialogActions`, `DcmDeleteDialog`, and form-type validators for providers, policies, and resources. diff --git a/workspaces/dcm/.changeset/swift-foxes-token.md b/workspaces/dcm/.changeset/swift-foxes-token.md deleted file mode 100644 index 66863bdc44..0000000000 --- a/workspaces/dcm/.changeset/swift-foxes-token.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@red-hat-developer-hub/backstage-plugin-dcm-backend': patch ---- - -Fix 502 error when SSO credentials are not configured. - -The backend proxy now skips the SSO token exchange when `clientId` or -`clientSecret` are absent, forwarding requests to the API gateway without -an Authorization header instead of failing with "Failed to obtain upstream -access token." diff --git a/workspaces/dcm/plugins/dcm-backend/CHANGELOG.md b/workspaces/dcm/plugins/dcm-backend/CHANGELOG.md new file mode 100644 index 0000000000..c93c9704fd --- /dev/null +++ b/workspaces/dcm/plugins/dcm-backend/CHANGELOG.md @@ -0,0 +1,69 @@ +# @red-hat-developer-hub/backstage-plugin-dcm-backend + +## 2.0.0 + +### Major Changes + +- c287a53: Developing DCM Plugin skeleton + +### Minor Changes + +- 4a316f7: Refactor DCM frontend plugin for reusability, maintainability, and test coverage. + + **New shared utilities & hooks** + + - `createYupValidator` – factory that wraps a Yup schema and returns stable `validate` / `isValid` helpers, eliminating per-tab validation boilerplate. + - `useCrudTab` – custom React hook that centralises data loading, client-side search/pagination, and create/edit/delete dialog state for every CRUD tab. Tabs now consist only of feature-specific rendering logic. + + **New shared components** + + - `DcmCrudTabLayout` – generic layout that handles loading spinners, load-error alerts with a Retry button, empty states, and a searchable paginated table inside an `InfoCard`. + - `DcmFormDialogActions` – reusable Save / Cancel button row with loading spinner and disabled states, used by all form dialogs. + - `DcmErrorSnackbar` – transient error snackbar for surfacing delete-operation failures. + - `DcmDeleteDialog` – standalone confirmation dialog component extracted from inline usage. + + **Per-feature file decomposition** + + Each CRUD tab now has dedicated files for form types, Yup schema, field components, and column definitions: + + - `providers/` → `providerFormTypes.ts`, `components/ProviderFormFields.tsx`, `components/ProviderStatus.tsx`, `components/CopyButton.tsx` + - `policies/` → `policyFormTypes.ts`, `components/PolicyFormFields.tsx` + - `catalog-items/` → `catalogItemFormTypes.ts`, `components/CatalogItemFormFields.tsx` + - `catalog-item-instances/` → `instanceFormTypes.ts`, `components/InstanceFormFields.tsx` + - `resources/` → `resourceFormTypes.ts`, `components/ResourceFormFields.tsx` + + **Error handling improvements** + + Load errors and delete errors are now surfaced in the UI via `DcmCrudTabLayout` (inline alert with Retry) and `DcmErrorSnackbar` respectively, replacing silent `.catch(() => {})` handlers. + + **Dead code removal** + + Removed the unused `ExampleComponent` directory and its tests. + + **Test coverage** + + Added unit tests for `extractApiError`, `createYupValidator`, `useCrudTab`, `DcmFormDialogActions`, `DcmDeleteDialog`, and form-type validators for providers, policies, and resources. + +### Patch Changes + +- ba41609: Add Docker/Podman deployment support for the DCM plugin. + + - Added `Dockerfile` (multi-stage build) to produce a standalone Backstage image + - Added `app-config.production.yaml` for container runtime configuration + - Added `scripts/generate-image.sh` (renamed from `dynamic-plugins.sh`) with commands to build and push both the OCI dynamic-plugin artifact and the full Backstage application image + - Added `.dockerignore` to exclude sensitive and dev-only files from the build context + - Configured guest auth (`dangerouslyAllowOutsideDevelopment`) for container environments + - Skip SSO token exchange in the backend proxy when `clientId`/`clientSecret` are not set + +- c9312e8: Fix 502 error when SSO credentials are not configured. + + The backend proxy now skips the SSO token exchange when `clientId` or + `clientSecret` are absent, forwarding requests to the API gateway without + an Authorization header instead of failing with "Failed to obtain upstream + access token." + +- Updated dependencies [ba41609] +- Updated dependencies [e3985a8] +- Updated dependencies [c287a53] +- Updated dependencies [4a316f7] + - @red-hat-developer-hub/backstage-plugin-dcm-common@2.0.0 diff --git a/workspaces/dcm/plugins/dcm-backend/package.json b/workspaces/dcm/plugins/dcm-backend/package.json index 9f62553243..ba80ef6a85 100644 --- a/workspaces/dcm/plugins/dcm-backend/package.json +++ b/workspaces/dcm/plugins/dcm-backend/package.json @@ -1,6 +1,6 @@ { "name": "@red-hat-developer-hub/backstage-plugin-dcm-backend", - "version": "1.0.0", + "version": "2.0.0", "license": "Apache-2.0", "main": "src/index.ts", "types": "src/index.ts", diff --git a/workspaces/dcm/plugins/dcm-common/CHANGELOG.md b/workspaces/dcm/plugins/dcm-common/CHANGELOG.md new file mode 100644 index 0000000000..6a3de255c1 --- /dev/null +++ b/workspaces/dcm/plugins/dcm-common/CHANGELOG.md @@ -0,0 +1,77 @@ +# @red-hat-developer-hub/backstage-plugin-dcm-common + +## 2.0.0 + +### Major Changes + +- c287a53: Developing DCM Plugin skeleton + +### Minor Changes + +- e3985a8: DCM UI and catalog client updates for the example app and published plugins. + + **Example app (`packages/app`) — RBAC navigation** + + - Removed the **RBAC** sidebar entry under Administration and the `/rbac` route. + - Dropped the `@backstage-community/plugin-rbac` frontend dependency. The RBAC backend plugin may remain for permissions; only the menu and page were removed. + + **`@red-hat-developer-hub/backstage-plugin-dcm` — Resources tab** + + - Removed the **Resources** tab from the Data Center page and all **Placement / `resources`** proxy usage from the plugin. + - Removed `placementApiRef`, `resources` route ref, and the `PlacementClient` integration from the plugin surface. + + **`@red-hat-developer-hub/backstage-plugin-dcm-common` — placement API removed; catalog rehydrate** + + - Removed the Placement API client, types, and tests tied to the internal `resources` API. + - Added **`rehydrateCatalogItemInstance`** on `CatalogApi` / `CatalogClient`: `POST .../catalog-item-instances/{id}:rehydrate`. + + **Catalog item instances UI** + + - Added a **Rehydrate** action (outlined button with refresh icon) on each instance row, success and error snackbars, and a unit test for the new client method. + +- 4a316f7: Refactor DCM frontend plugin for reusability, maintainability, and test coverage. + + **New shared utilities & hooks** + + - `createYupValidator` – factory that wraps a Yup schema and returns stable `validate` / `isValid` helpers, eliminating per-tab validation boilerplate. + - `useCrudTab` – custom React hook that centralises data loading, client-side search/pagination, and create/edit/delete dialog state for every CRUD tab. Tabs now consist only of feature-specific rendering logic. + + **New shared components** + + - `DcmCrudTabLayout` – generic layout that handles loading spinners, load-error alerts with a Retry button, empty states, and a searchable paginated table inside an `InfoCard`. + - `DcmFormDialogActions` – reusable Save / Cancel button row with loading spinner and disabled states, used by all form dialogs. + - `DcmErrorSnackbar` – transient error snackbar for surfacing delete-operation failures. + - `DcmDeleteDialog` – standalone confirmation dialog component extracted from inline usage. + + **Per-feature file decomposition** + + Each CRUD tab now has dedicated files for form types, Yup schema, field components, and column definitions: + + - `providers/` → `providerFormTypes.ts`, `components/ProviderFormFields.tsx`, `components/ProviderStatus.tsx`, `components/CopyButton.tsx` + - `policies/` → `policyFormTypes.ts`, `components/PolicyFormFields.tsx` + - `catalog-items/` → `catalogItemFormTypes.ts`, `components/CatalogItemFormFields.tsx` + - `catalog-item-instances/` → `instanceFormTypes.ts`, `components/InstanceFormFields.tsx` + - `resources/` → `resourceFormTypes.ts`, `components/ResourceFormFields.tsx` + + **Error handling improvements** + + Load errors and delete errors are now surfaced in the UI via `DcmCrudTabLayout` (inline alert with Retry) and `DcmErrorSnackbar` respectively, replacing silent `.catch(() => {})` handlers. + + **Dead code removal** + + Removed the unused `ExampleComponent` directory and its tests. + + **Test coverage** + + Added unit tests for `extractApiError`, `createYupValidator`, `useCrudTab`, `DcmFormDialogActions`, `DcmDeleteDialog`, and form-type validators for providers, policies, and resources. + +### Patch Changes + +- ba41609: Add Docker/Podman deployment support for the DCM plugin. + + - Added `Dockerfile` (multi-stage build) to produce a standalone Backstage image + - Added `app-config.production.yaml` for container runtime configuration + - Added `scripts/generate-image.sh` (renamed from `dynamic-plugins.sh`) with commands to build and push both the OCI dynamic-plugin artifact and the full Backstage application image + - Added `.dockerignore` to exclude sensitive and dev-only files from the build context + - Configured guest auth (`dangerouslyAllowOutsideDevelopment`) for container environments + - Skip SSO token exchange in the backend proxy when `clientId`/`clientSecret` are not set diff --git a/workspaces/dcm/plugins/dcm-common/package.json b/workspaces/dcm/plugins/dcm-common/package.json index 208e575873..37c7280959 100644 --- a/workspaces/dcm/plugins/dcm-common/package.json +++ b/workspaces/dcm/plugins/dcm-common/package.json @@ -1,7 +1,7 @@ { "name": "@red-hat-developer-hub/backstage-plugin-dcm-common", "description": "Common functionalities for the dcm plugin", - "version": "1.0.0", + "version": "2.0.0", "backstage": { "pluginId": "dcm", "pluginPackages": [ diff --git a/workspaces/dcm/plugins/dcm/CHANGELOG.md b/workspaces/dcm/plugins/dcm/CHANGELOG.md new file mode 100644 index 0000000000..e62fdd6e72 --- /dev/null +++ b/workspaces/dcm/plugins/dcm/CHANGELOG.md @@ -0,0 +1,117 @@ +# @red-hat-developer-hub/backstage-plugin-dcm + +## 1.1.0 + +### Minor Changes + +- e3985a8: DCM UI and catalog client updates for the example app and published plugins. + + **Example app (`packages/app`) — RBAC navigation** + + - Removed the **RBAC** sidebar entry under Administration and the `/rbac` route. + - Dropped the `@backstage-community/plugin-rbac` frontend dependency. The RBAC backend plugin may remain for permissions; only the menu and page were removed. + + **`@red-hat-developer-hub/backstage-plugin-dcm` — Resources tab** + + - Removed the **Resources** tab from the Data Center page and all **Placement / `resources`** proxy usage from the plugin. + - Removed `placementApiRef`, `resources` route ref, and the `PlacementClient` integration from the plugin surface. + + **`@red-hat-developer-hub/backstage-plugin-dcm-common` — placement API removed; catalog rehydrate** + + - Removed the Placement API client, types, and tests tied to the internal `resources` API. + - Added **`rehydrateCatalogItemInstance`** on `CatalogApi` / `CatalogClient`: `POST .../catalog-item-instances/{id}:rehydrate`. + + **Catalog item instances UI** + + - Added a **Rehydrate** action (outlined button with refresh icon) on each instance row, success and error snackbars, and a unit test for the new client method. + +- 019e9e2: Remove legacy Environments and Service Specs screens. + + **Removed routes** + + - `/dcm/environments` — `EnvironmentsTabContent` list page (was already orphaned from active navigation) + - `/dcm/service-specs` — `ServiceSpecsTabContent` list page (was already orphaned from active navigation) + - `/dcm/environments/:id/*` — `EnvironmentDetailsPage` with Overview, Entities, and Request History sub-tabs + - `/dcm/service-specs/:id/*` — `ServiceSpecDetailsPage` with Overview, Entities, and Request History sub-tabs + + **Removed route refs** + + - `serviceSpecsRouteRef` + - `environmentDetailsRouteRef` + - `serviceSpecDetailsRouteRef` + - `DCM_DETAILS_TABS` + + **Removed shared components (legacy-only)** + + - `DcmEntitiesTable`, `DcmRequestHistoryTable`, `DcmDetailsBreadcrumb`, `dataCenterNavigation`, `serviceSpecYaml` + + **Removed mock data layer** + + - `data/environments.ts`, `data/service-specs.ts`, `data/dcm-mock-rows.ts` + +- 4a316f7: Refactor DCM frontend plugin for reusability, maintainability, and test coverage. + + **New shared utilities & hooks** + + - `createYupValidator` – factory that wraps a Yup schema and returns stable `validate` / `isValid` helpers, eliminating per-tab validation boilerplate. + - `useCrudTab` – custom React hook that centralises data loading, client-side search/pagination, and create/edit/delete dialog state for every CRUD tab. Tabs now consist only of feature-specific rendering logic. + + **New shared components** + + - `DcmCrudTabLayout` – generic layout that handles loading spinners, load-error alerts with a Retry button, empty states, and a searchable paginated table inside an `InfoCard`. + - `DcmFormDialogActions` – reusable Save / Cancel button row with loading spinner and disabled states, used by all form dialogs. + - `DcmErrorSnackbar` – transient error snackbar for surfacing delete-operation failures. + - `DcmDeleteDialog` – standalone confirmation dialog component extracted from inline usage. + + **Per-feature file decomposition** + + Each CRUD tab now has dedicated files for form types, Yup schema, field components, and column definitions: + + - `providers/` → `providerFormTypes.ts`, `components/ProviderFormFields.tsx`, `components/ProviderStatus.tsx`, `components/CopyButton.tsx` + - `policies/` → `policyFormTypes.ts`, `components/PolicyFormFields.tsx` + - `catalog-items/` → `catalogItemFormTypes.ts`, `components/CatalogItemFormFields.tsx` + - `catalog-item-instances/` → `instanceFormTypes.ts`, `components/InstanceFormFields.tsx` + - `resources/` → `resourceFormTypes.ts`, `components/ResourceFormFields.tsx` + + **Error handling improvements** + + Load errors and delete errors are now surfaced in the UI via `DcmCrudTabLayout` (inline alert with Retry) and `DcmErrorSnackbar` respectively, replacing silent `.catch(() => {})` handlers. + + **Dead code removal** + + Removed the unused `ExampleComponent` directory and its tests. + + **Test coverage** + + Added unit tests for `extractApiError`, `createYupValidator`, `useCrudTab`, `DcmFormDialogActions`, `DcmDeleteDialog`, and form-type validators for providers, policies, and resources. + +### Patch Changes + +- 5394da1: UI code-quality improvements: replace all inline styles with makeStyles classes, use theme palette tokens (status.ok, error, text) instead of hardcoded colours, merge duplicate style files into a single useDcmStyles hook, add destructive-action styling to delete dialogs, and move RhdhLogoFull/RhdhLogoIcon into the plugin so they can be wired in RHDH without relying on the dev-only app shell. +- 201cdbe: Fix pagination not resetting to page 1 when a search/filter is applied. + + When a user navigates to a later page and then types in the search field, the + table would appear empty because the page index was left pointing past the end + of the now-smaller filtered result set. + + All table components now reset to page 0 whenever the search or filter value + changes, consistent with the existing behaviour in `DcmEntitiesCard`. + + Affected tabs: Providers, Policies, Catalog Items, Catalog Item Instances, + Resources, Service Types, Service Specs, Environments, and Request History. + +- 5394da1: Refresh DCM plugin API reports and align UI internals around shared route/tab constants and reusable detail components. +- ba41609: Add Docker/Podman deployment support for the DCM plugin. + + - Added `Dockerfile` (multi-stage build) to produce a standalone Backstage image + - Added `app-config.production.yaml` for container runtime configuration + - Added `scripts/generate-image.sh` (renamed from `dynamic-plugins.sh`) with commands to build and push both the OCI dynamic-plugin artifact and the full Backstage application image + - Added `.dockerignore` to exclude sensitive and dev-only files from the build context + - Configured guest auth (`dangerouslyAllowOutsideDevelopment`) for container environments + - Skip SSO token exchange in the backend proxy when `clientId`/`clientSecret` are not set + +- Updated dependencies [ba41609] +- Updated dependencies [e3985a8] +- Updated dependencies [c287a53] +- Updated dependencies [4a316f7] + - @red-hat-developer-hub/backstage-plugin-dcm-common@2.0.0 diff --git a/workspaces/dcm/plugins/dcm/package.json b/workspaces/dcm/plugins/dcm/package.json index 0343a9d24b..8cdf13f236 100644 --- a/workspaces/dcm/plugins/dcm/package.json +++ b/workspaces/dcm/plugins/dcm/package.json @@ -1,6 +1,6 @@ { "name": "@red-hat-developer-hub/backstage-plugin-dcm", - "version": "1.0.0", + "version": "1.1.0", "license": "Apache-2.0", "main": "src/index.ts", "types": "src/index.ts",