From 971f076e16132f2f9e29f4524e67bca2db8fa8e4 Mon Sep 17 00:00:00 2001 From: Nurit Izrailov Date: Fri, 2 Aug 2024 14:20:32 -0400 Subject: [PATCH 1/3] Add FE system support for the argocd plugin --- .changeset/famous-swans-smile.md | 5 +++ .../backstage-plugin-argo-cd/package.json | 25 ++++++++++- .../backstage-plugin-argo-cd/src/alpha.ts | 2 + .../src/alpha/apis.tsx | 33 ++++++++++++++ .../src/alpha/entityCards.test.tsx | 41 ++++++++++++++++++ .../src/alpha/entityCards.tsx | 25 +++++++++++ .../src/alpha/index.ts | 1 + .../src/alpha/pages.tsx | 22 ++++++++++ .../src/alpha/plugin.tsx | 26 +++++++++++ .../src/components/ArgoCDDetailsCard.tsx | 6 ++- .../src/components/ArgoCDHistoryCard.tsx | 9 ++-- yarn.lock | 43 ++++++------------- 12 files changed, 201 insertions(+), 37 deletions(-) create mode 100644 .changeset/famous-swans-smile.md create mode 100644 plugins/frontend/backstage-plugin-argo-cd/src/alpha.ts create mode 100644 plugins/frontend/backstage-plugin-argo-cd/src/alpha/apis.tsx create mode 100644 plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.test.tsx create mode 100644 plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx create mode 100644 plugins/frontend/backstage-plugin-argo-cd/src/alpha/index.ts create mode 100644 plugins/frontend/backstage-plugin-argo-cd/src/alpha/pages.tsx create mode 100644 plugins/frontend/backstage-plugin-argo-cd/src/alpha/plugin.tsx diff --git a/.changeset/famous-swans-smile.md b/.changeset/famous-swans-smile.md new file mode 100644 index 000000000..1a75f5f7d --- /dev/null +++ b/.changeset/famous-swans-smile.md @@ -0,0 +1,5 @@ +--- +'@roadiehq/backstage-plugin-argo-cd': minor +--- + +Adds support for Backstage's new frontend system, available via the `/alpha` sub-path export. diff --git a/plugins/frontend/backstage-plugin-argo-cd/package.json b/plugins/frontend/backstage-plugin-argo-cd/package.json index fe2d16b97..cc7ba590b 100644 --- a/plugins/frontend/backstage-plugin-argo-cd/package.json +++ b/plugins/frontend/backstage-plugin-argo-cd/package.json @@ -20,7 +20,27 @@ "types": "dist/index.d.ts" }, "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "pluginId": "argocd", + "pluginPackages": [ + "@roadiehq/backstage-plugin-argo-cd", + "@roadiehq/backstage-plugin-argo-cd-backend" + ] + }, + "exports": { + ".": "./src/index.ts", + "./alpha": "./src/alpha.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "alpha": [ + "src/alpha.ts" + ], + "package.json": [ + "package.json" + ] + } }, "scripts": { "build": "backstage-cli package build", @@ -34,8 +54,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.4.5", + "@backstage/core-compat-api": "^0.2.7", "@backstage/core-components": "^0.14.6", "@backstage/core-plugin-api": "^1.9.2", + "@backstage/frontend-plugin-api": "^0.6.7", "@backstage/plugin-catalog-react": "^1.11.3", "@backstage/theme": "^0.5.3", "@material-ui/core": "^4.12.2", @@ -66,6 +88,7 @@ "@rollup/plugin-node-resolve": "^15.0.1", "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^14.0.0", + "@backstage/frontend-test-utils": "^0.1.10", "esbuild": "^0.11.13", "jest-environment-jsdom": "^29.2.1", "msw": "^1.0.1", diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/alpha.ts b/plugins/frontend/backstage-plugin-argo-cd/src/alpha.ts new file mode 100644 index 000000000..de7705b2d --- /dev/null +++ b/plugins/frontend/backstage-plugin-argo-cd/src/alpha.ts @@ -0,0 +1,2 @@ +export * from './alpha/index'; +export { default } from './alpha/index'; diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/alpha/apis.tsx b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/apis.tsx new file mode 100644 index 000000000..9490f30f7 --- /dev/null +++ b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/apis.tsx @@ -0,0 +1,33 @@ +import { + createApiExtension, + createApiFactory, + discoveryApiRef, +} from '@backstage/frontend-plugin-api'; +import { ArgoCDApiClient, argoCDApiRef } from '../api'; +import { configApiRef, identityApiRef } from '@backstage/core-plugin-api'; + +/** + * @alpha + */ +export const argoCDApiExtension = createApiExtension({ + factory: createApiFactory({ + api: argoCDApiRef, + deps: { + discoveryApi: discoveryApiRef, + identityApi: identityApiRef, + configApi: configApiRef, + }, + factory: ({ discoveryApi, identityApi, configApi }) => + new ArgoCDApiClient({ + discoveryApi, + identityApi, + backendBaseUrl: configApi.getString('backend.baseUrl'), + useNamespacedApps: Boolean( + configApi.getOptionalBoolean('argocd.namespacedApps'), + ), + searchInstances: Boolean( + configApi.getOptionalConfigArray('argocd.appLocatorMethods')?.length, + ), + }), + }), +}); diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.test.tsx b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.test.tsx new file mode 100644 index 000000000..967899d18 --- /dev/null +++ b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.test.tsx @@ -0,0 +1,41 @@ +import { screen, waitFor } from '@testing-library/react'; +import { createExtensionTester } from '@backstage/frontend-test-utils'; +import { + entityArgoCDOverviewCard, + entityArgoCDHistoryCard, +} from './entityCards'; +import { + createApiExtension, + createApiFactory, +} from '@backstage/frontend-plugin-api'; +import { ArgoCDApiClient, argoCDApiRef } from '../api'; +import { getEntityStub } from '../mocks/mocks'; + +jest.mock('@backstage/plugin-catalog-react', () => ({ + ...jest.requireActual('@backstage/plugin-catalog-react'), + useEntity: () => ({ entity: getEntityStub }), +})); + +describe('Entity cards extensions', () => { + const mockArgocdApi = createApiExtension({ + factory: createApiFactory({ + api: argoCDApiRef, + deps: {}, + factory: () => ({} as unknown as ArgoCDApiClient), + }), + }); + + it('should render the overview card on an entity', async () => { + createExtensionTester(entityArgoCDOverviewCard).add(mockArgocdApi).render(); + await waitFor(() => { + expect(screen.getByText('ArgoCD overview')).toBeInTheDocument(); + }); + }); + + it('should render the history card on an entity', async () => { + createExtensionTester(entityArgoCDHistoryCard).add(mockArgocdApi).render(); + await waitFor(() => { + expect(screen.getByText('ArgoCD history')).toBeInTheDocument(); + }); + }); +}); diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx new file mode 100644 index 000000000..193e3a41c --- /dev/null +++ b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx @@ -0,0 +1,25 @@ +import { compatWrapper } from '@backstage/core-compat-api'; +import { createEntityCardExtension } from '@backstage/plugin-catalog-react/alpha'; +import React from 'react'; + +/** + * @alpha + */ +export const entityArgoCDOverviewCard: any = createEntityCardExtension({ + name: 'overviewCard', + loader: () => + import('../components/ArgoCDDetailsCard').then(m => + compatWrapper(), + ), +}); + +/** + * @alpha + */ +export const entityArgoCDHistoryCard: any = createEntityCardExtension({ + name: 'historyCard', + loader: () => + import('../components/ArgoCDHistoryCard').then(m => + compatWrapper(), + ), +}); diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/alpha/index.ts b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/index.ts new file mode 100644 index 000000000..b68aea57f --- /dev/null +++ b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/index.ts @@ -0,0 +1 @@ +export { default } from './plugin'; diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/alpha/pages.tsx b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/pages.tsx new file mode 100644 index 000000000..e87f6060c --- /dev/null +++ b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/pages.tsx @@ -0,0 +1,22 @@ +import React from 'react'; // Add this line to import React + +import { createPageExtension } from '@backstage/frontend-plugin-api'; +import { + compatWrapper, + convertLegacyRouteRef, +} from '@backstage/core-compat-api'; +import { entityContentRouteRef } from '../plugin'; + +/** + * @alpha + */ +export const argoCdPage = createPageExtension({ + name: 'ArgoCdPage', + namespace: 'argocd', + defaultPath: '/', + // you can reuse the existing routeRef + // by wrapping into the convertLegacyRouteRef. + routeRef: convertLegacyRouteRef(entityContentRouteRef), + // these inputs usually match the props required by the component. + loader: () => import('../Router').then(m => compatWrapper()), +}); diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/alpha/plugin.tsx b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/plugin.tsx new file mode 100644 index 000000000..f1cb46706 --- /dev/null +++ b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/plugin.tsx @@ -0,0 +1,26 @@ +import { convertLegacyRouteRefs } from '@backstage/core-compat-api'; +import { createPlugin, BackstagePlugin } from '@backstage/frontend-plugin-api'; +import { + entityArgoCDOverviewCard, + entityArgoCDHistoryCard, +} from './entityCards'; +import { argoCDApiExtension } from './apis'; + +import { entityContentRouteRef } from '../plugin'; +import { argoCdPage } from './pages'; + +/** + * @alpha + */ +const plugin: BackstagePlugin = createPlugin({ + id: 'argocd', + extensions: [ + argoCdPage, + entityArgoCDOverviewCard, + entityArgoCDHistoryCard, + argoCDApiExtension, + ], + routes: convertLegacyRouteRefs({ argocd: entityContentRouteRef }), +}); + +export default plugin; diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/components/ArgoCDDetailsCard.tsx b/plugins/frontend/backstage-plugin-argo-cd/src/components/ArgoCDDetailsCard.tsx index 3d0db4269..31b344eb2 100644 --- a/plugins/frontend/backstage-plugin-argo-cd/src/components/ArgoCDDetailsCard.tsx +++ b/plugins/frontend/backstage-plugin-argo-cd/src/components/ArgoCDDetailsCard.tsx @@ -32,7 +32,6 @@ import { import { ErrorBoundary, InfoCard, - MissingAnnotationEmptyState, Table, TableColumn, } from '@backstage/core-components'; @@ -41,7 +40,10 @@ import { isArgocdAvailable } from '../conditions'; import { ArgoCDAppDetails, ArgoCDAppList } from '../types'; import { useAppDetails } from './useAppDetails'; import SyncIcon from '@material-ui/icons/Sync'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + MissingAnnotationEmptyState, + useEntity, +} from '@backstage/plugin-catalog-react'; import { DetailsDrawerComponent as detailsDrawerComponent } from './DetailsDrawer'; interface Condition { diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/components/ArgoCDHistoryCard.tsx b/plugins/frontend/backstage-plugin-argo-cd/src/components/ArgoCDHistoryCard.tsx index f819e1843..a484d109b 100644 --- a/plugins/frontend/backstage-plugin-argo-cd/src/components/ArgoCDHistoryCard.tsx +++ b/plugins/frontend/backstage-plugin-argo-cd/src/components/ArgoCDHistoryCard.tsx @@ -15,13 +15,12 @@ */ import { Entity } from '@backstage/catalog-model'; +import { ErrorBoundary, InfoCard } from '@backstage/core-components'; +import { configApiRef, useApi } from '@backstage/core-plugin-api'; import { - ErrorBoundary, - InfoCard, MissingAnnotationEmptyState, -} from '@backstage/core-components'; -import { configApiRef, useApi } from '@backstage/core-plugin-api'; -import { useEntity } from '@backstage/plugin-catalog-react'; + useEntity, +} from '@backstage/plugin-catalog-react'; import { LinearProgress } from '@material-ui/core'; import React, { useEffect, useState } from 'react'; import { isArgocdAvailable } from '../conditions'; diff --git a/yarn.lock b/yarn.lock index b419f703d..ebbfdbdc4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5098,6 +5098,16 @@ "@backstage/version-bridge" "^1.0.8" "@types/react" "^16.13.1 || ^17.0.0" +"@backstage/core-compat-api@^0.2.7": + version "0.2.7" + resolved "https://registry.yarnpkg.com/@backstage/core-compat-api/-/core-compat-api-0.2.7.tgz#5b58f5984e2d54489dc6389fb48296afc2586149" + integrity sha512-At+mkjrIUrvAPK2bLVtdCFhCGY4VK9i2cKvaOeFRyVJuHU8f7WEKaHjDV8afLVddllUjq6j1uDeFRfiMMPtXqw== + dependencies: + "@backstage/core-plugin-api" "^1.9.3" + "@backstage/frontend-plugin-api" "^0.6.7" + "@backstage/version-bridge" "^1.0.8" + "@types/react" "^16.13.1 || ^17.0.0" + "@backstage/core-components@^0.14.4", "@backstage/core-components@^0.14.5", "@backstage/core-components@^0.14.6": version "0.14.6" resolved "https://registry.yarnpkg.com/@backstage/core-components/-/core-components-0.14.6.tgz#50bfc6a418b45885cd353d5ecf49710eca661345" @@ -5293,7 +5303,7 @@ zod "^3.22.4" zod-to-json-schema "^3.21.4" -"@backstage/frontend-test-utils@^0.1.6": +"@backstage/frontend-test-utils@^0.1.10", "@backstage/frontend-test-utils@^0.1.6": version "0.1.11" resolved "https://registry.yarnpkg.com/@backstage/frontend-test-utils/-/frontend-test-utils-0.1.11.tgz#81276fd7377b68bb8f52c1d7c93cdd1a9333f205" integrity sha512-MyWf7Sou/80BCDiEz4rPwwnqwlM7b3FkU6jWM52mJK+/e49TL/qrx4lU3RjaM04vEYVZM3RmJfbquMsVw/RENA== @@ -30092,16 +30102,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -30175,7 +30176,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -30189,13 +30190,6 @@ strip-ansi@5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -32311,7 +32305,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -32329,15 +32323,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From b1f22e1d2774c69dcf00aa21a75cc2e41e3a957d Mon Sep 17 00:00:00 2001 From: Nurit Izrailov Date: Mon, 26 Aug 2024 11:43:19 -0400 Subject: [PATCH 2/3] downgrade some deps to fit the their version in backstage OSS --- plugins/frontend/backstage-plugin-argo-cd/package.json | 4 ++-- yarn.lock | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/plugins/frontend/backstage-plugin-argo-cd/package.json b/plugins/frontend/backstage-plugin-argo-cd/package.json index cc7ba590b..1e432c1ed 100644 --- a/plugins/frontend/backstage-plugin-argo-cd/package.json +++ b/plugins/frontend/backstage-plugin-argo-cd/package.json @@ -54,10 +54,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.4.5", - "@backstage/core-compat-api": "^0.2.7", + "@backstage/core-compat-api": "^0.2.4", "@backstage/core-components": "^0.14.6", "@backstage/core-plugin-api": "^1.9.2", - "@backstage/frontend-plugin-api": "^0.6.7", + "@backstage/frontend-plugin-api": "^0.6.4", "@backstage/plugin-catalog-react": "^1.11.3", "@backstage/theme": "^0.5.3", "@material-ui/core": "^4.12.2", diff --git a/yarn.lock b/yarn.lock index ebbfdbdc4..df26dbe09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5098,16 +5098,6 @@ "@backstage/version-bridge" "^1.0.8" "@types/react" "^16.13.1 || ^17.0.0" -"@backstage/core-compat-api@^0.2.7": - version "0.2.7" - resolved "https://registry.yarnpkg.com/@backstage/core-compat-api/-/core-compat-api-0.2.7.tgz#5b58f5984e2d54489dc6389fb48296afc2586149" - integrity sha512-At+mkjrIUrvAPK2bLVtdCFhCGY4VK9i2cKvaOeFRyVJuHU8f7WEKaHjDV8afLVddllUjq6j1uDeFRfiMMPtXqw== - dependencies: - "@backstage/core-plugin-api" "^1.9.3" - "@backstage/frontend-plugin-api" "^0.6.7" - "@backstage/version-bridge" "^1.0.8" - "@types/react" "^16.13.1 || ^17.0.0" - "@backstage/core-components@^0.14.4", "@backstage/core-components@^0.14.5", "@backstage/core-components@^0.14.6": version "0.14.6" resolved "https://registry.yarnpkg.com/@backstage/core-components/-/core-components-0.14.6.tgz#50bfc6a418b45885cd353d5ecf49710eca661345" From 6dece540fd87bc03020cbafe3f9351de1bfe56d5 Mon Sep 17 00:00:00 2001 From: Nurit Izrailov Date: Tue, 27 Aug 2024 09:14:19 -0400 Subject: [PATCH 3/3] extensions by default in the new frontend system --- .../frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx index 193e3a41c..f315ea415 100644 --- a/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx +++ b/plugins/frontend/backstage-plugin-argo-cd/src/alpha/entityCards.tsx @@ -7,6 +7,7 @@ import React from 'react'; */ export const entityArgoCDOverviewCard: any = createEntityCardExtension({ name: 'overviewCard', + filter: 'kind:component', loader: () => import('../components/ArgoCDDetailsCard').then(m => compatWrapper(), @@ -18,6 +19,7 @@ export const entityArgoCDOverviewCard: any = createEntityCardExtension({ */ export const entityArgoCDHistoryCard: any = createEntityCardExtension({ name: 'historyCard', + filter: 'kind:component', loader: () => import('../components/ArgoCDHistoryCard').then(m => compatWrapper(),