@backstage/plugin-catalog-unprocessed-entities 0.2.33 → 0.2.34-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/alpha/plugin.esm.js +7 -6
  3. package/dist/alpha/plugin.esm.js.map +1 -1
  4. package/dist/api/index.esm.js +2 -4
  5. package/dist/api/index.esm.js.map +1 -1
  6. package/dist/components/DeleteEntityConfirmationDialog.esm.js +28 -20
  7. package/dist/components/DeleteEntityConfirmationDialog.esm.js.map +1 -1
  8. package/dist/components/EntityDialog.esm.js +20 -54
  9. package/dist/components/EntityDialog.esm.js.map +1 -1
  10. package/dist/components/EntityDialog.module.css.esm.js +8 -0
  11. package/dist/components/EntityDialog.module.css.esm.js.map +1 -0
  12. package/dist/components/FailedEntities.esm.js +59 -64
  13. package/dist/components/FailedEntities.esm.js.map +1 -1
  14. package/dist/components/FailedEntities.module.css.esm.js +8 -0
  15. package/dist/components/FailedEntities.module.css.esm.js.map +1 -0
  16. package/dist/components/PendingEntities.esm.js +14 -19
  17. package/dist/components/PendingEntities.esm.js.map +1 -1
  18. package/dist/components/UnprocessedEntities.esm.js +8 -25
  19. package/dist/components/UnprocessedEntities.esm.js.map +1 -1
  20. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +29 -0
  21. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -0
  22. package/dist/plugin.esm.js +3 -2
  23. package/dist/plugin.esm.js.map +1 -1
  24. package/dist/{package.json.esm.js → plugins/catalog-unprocessed-entities/package.json.esm.js} +7 -4
  25. package/dist/{package.json.esm.js.map → plugins/catalog-unprocessed-entities/package.json.esm.js.map} +1 -1
  26. package/package.json +16 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @backstage/plugin-catalog-unprocessed-entities
2
2
 
3
+ ## 0.2.34-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 531495a: Migrated the Unprocessed Entities UI to the Backstage UI component library. The page, dialogs, and action buttons now use the new design system, and the raw entity definition and delete confirmation dialogs have an updated look and feel. The pending entities tab now also has a search box, matching the failed entities tab.
8
+ - Updated dependencies
9
+ - @backstage/frontend-plugin-api@0.18.0-next.0
10
+ - @backstage/core-compat-api@0.5.14-next.1
11
+ - @backstage/core-plugin-api@1.12.9-next.0
12
+ - @backstage/core-components@0.18.13-next.2
13
+
14
+ ## 0.2.34-next.0
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+ - @backstage/core-components@0.18.13-next.0
20
+ - @backstage/ui@0.17.1-next.0
21
+ - @backstage/core-compat-api@0.5.14-next.0
22
+
3
23
  ## 0.2.33
4
24
 
5
25
  ### Patch Changes
@@ -1,9 +1,10 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { ApiBlueprint, fetchApiRef, discoveryApiRef, PageBlueprint, SubPageBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
- import { CatalogUnprocessedEntitiesClient, catalogUnprocessedEntitiesApiRef } from '../api/index.esm.js';
4
- import QueueIcon from '@material-ui/icons/Queue';
3
+ import { catalogUnprocessedEntitiesApiRef } from '../api/index.esm.js';
4
+ import { RiStackLine } from '@remixicon/react';
5
5
  import { rootRouteRef } from '../routes.esm.js';
6
6
  import { Container } from '@backstage/ui';
7
+ import { CatalogUnprocessedEntitiesClient as CatalogUnprocessedEntitiesClient$1 } from '@backstage/plugin-catalog-unprocessed-entities-common';
7
8
 
8
9
  const catalogUnprocessedEntitiesApi = ApiBlueprint.make({
9
10
  params: (defineParams) => defineParams({
@@ -12,7 +13,7 @@ const catalogUnprocessedEntitiesApi = ApiBlueprint.make({
12
13
  discoveryApi: discoveryApiRef,
13
14
  fetchApi: fetchApiRef
14
15
  },
15
- factory: ({ discoveryApi, fetchApi }) => new CatalogUnprocessedEntitiesClient(discoveryApi, fetchApi)
16
+ factory: ({ discoveryApi, fetchApi }) => new CatalogUnprocessedEntitiesClient$1(discoveryApi, fetchApi)
16
17
  })
17
18
  });
18
19
  const catalogUnprocessedEntitiesPage = PageBlueprint.make({
@@ -21,7 +22,7 @@ const catalogUnprocessedEntitiesPage = PageBlueprint.make({
21
22
  path: "/catalog-unprocessed-entities",
22
23
  routeRef: rootRouteRef,
23
24
  title: "Unprocessed Entities",
24
- icon: /* @__PURE__ */ jsx(QueueIcon, { fontSize: "inherit" }),
25
+ icon: /* @__PURE__ */ jsx(RiStackLine, {}),
25
26
  loader: () => import('../components/UnprocessedEntities.esm.js').then((m) => /* @__PURE__ */ jsx(m.NfsUnprocessedEntities, {}))
26
27
  }
27
28
  });
@@ -36,8 +37,8 @@ const unprocessedEntitiesDevToolsContent = SubPageBlueprint.make({
36
37
  var plugin = createFrontendPlugin({
37
38
  pluginId: "catalog-unprocessed-entities",
38
39
  title: "Unprocessed Entities",
39
- icon: /* @__PURE__ */ jsx(QueueIcon, { fontSize: "inherit" }),
40
- info: { packageJson: () => import('../package.json.esm.js') },
40
+ icon: /* @__PURE__ */ jsx(RiStackLine, {}),
41
+ info: { packageJson: () => import('../plugins/catalog-unprocessed-entities/package.json.esm.js') },
41
42
  routes: {
42
43
  root: rootRouteRef
43
44
  },
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n ApiBlueprint,\n PageBlueprint,\n SubPageBlueprint,\n} from '@backstage/frontend-plugin-api';\n\nimport {\n catalogUnprocessedEntitiesApiRef,\n CatalogUnprocessedEntitiesClient,\n} from '../api';\nimport QueueIcon from '@material-ui/icons/Queue';\nimport { rootRouteRef } from '../routes';\nimport { Container } from '@backstage/ui';\n\n/** @alpha */\nexport const catalogUnprocessedEntitiesApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: catalogUnprocessedEntitiesApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogUnprocessedEntitiesClient(discoveryApi, fetchApi),\n }),\n});\n\n/** @alpha */\nexport const catalogUnprocessedEntitiesPage = PageBlueprint.make({\n disabled: true,\n params: {\n path: '/catalog-unprocessed-entities',\n routeRef: rootRouteRef,\n title: 'Unprocessed Entities',\n icon: <QueueIcon fontSize=\"inherit\" />,\n loader: () =>\n import('../components/UnprocessedEntities').then(m => (\n <m.NfsUnprocessedEntities />\n )),\n },\n});\n\n/**\n * DevTools content for catalog unprocessed entities.\n *\n * @alpha\n */\nexport const unprocessedEntitiesDevToolsContent = SubPageBlueprint.make({\n attachTo: { id: 'page:devtools', input: 'pages' },\n params: {\n path: 'unprocessed-entities',\n title: 'Unprocessed Entities',\n loader: () =>\n import('../components/UnprocessedEntities').then(m => (\n <Container>\n <m.UnprocessedEntitiesContent />\n </Container>\n )),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'catalog-unprocessed-entities',\n title: 'Unprocessed Entities',\n icon: <QueueIcon fontSize=\"inherit\" />,\n info: { packageJson: () => import('../../package.json') },\n routes: {\n root: rootRouteRef,\n },\n extensions: [\n catalogUnprocessedEntitiesApi,\n catalogUnprocessedEntitiesPage,\n unprocessedEntitiesDevToolsContent,\n ],\n});\n"],"names":[],"mappings":";;;;;;;AAkCO,MAAM,6BAAA,GAAgC,aAAa,IAAA,CAAK;AAAA,EAC7D,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA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;AAAA,EACpC,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,wBAAoB,CAAA,EAAE;AAAA,EACxD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAA,EAAY;AAAA,IACV,6BAAA;AAAA,IACA,8BAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n ApiBlueprint,\n PageBlueprint,\n SubPageBlueprint,\n} from '@backstage/frontend-plugin-api';\n\nimport { catalogUnprocessedEntitiesApiRef } from '../api';\nimport { RiStackLine } from '@remixicon/react';\nimport { rootRouteRef } from '../routes';\nimport { Container } from '@backstage/ui';\nimport { CatalogUnprocessedEntitiesClient } from '@backstage/plugin-catalog-unprocessed-entities-common';\n\n/** @alpha */\nexport const catalogUnprocessedEntitiesApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: catalogUnprocessedEntitiesApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogUnprocessedEntitiesClient(discoveryApi, fetchApi),\n }),\n});\n\n/** @alpha */\nexport const catalogUnprocessedEntitiesPage = PageBlueprint.make({\n disabled: true,\n params: {\n path: '/catalog-unprocessed-entities',\n routeRef: rootRouteRef,\n title: 'Unprocessed Entities',\n icon: <RiStackLine />,\n loader: () =>\n import('../components/UnprocessedEntities').then(m => (\n <m.NfsUnprocessedEntities />\n )),\n },\n});\n\n/**\n * DevTools content for catalog unprocessed entities.\n *\n * @alpha\n */\nexport const unprocessedEntitiesDevToolsContent = SubPageBlueprint.make({\n attachTo: { id: 'page:devtools', input: 'pages' },\n params: {\n path: 'unprocessed-entities',\n title: 'Unprocessed Entities',\n loader: () =>\n import('../components/UnprocessedEntities').then(m => (\n <Container>\n <m.UnprocessedEntitiesContent />\n </Container>\n )),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'catalog-unprocessed-entities',\n title: 'Unprocessed Entities',\n icon: <RiStackLine />,\n info: { packageJson: () => import('../../package.json') },\n routes: {\n root: rootRouteRef,\n },\n extensions: [\n catalogUnprocessedEntitiesApi,\n catalogUnprocessedEntitiesPage,\n unprocessedEntitiesDevToolsContent,\n ],\n});\n"],"names":["CatalogUnprocessedEntitiesClient"],"mappings":";;;;;;;;AAgCO,MAAM,6BAAA,GAAgC,aAAa,IAAA,CAAK;AAAA,EAC7D,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,gCAAA;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,YAAA,EAAc,eAAA;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,UAAS,KACjC,IAAIA,kCAAA,CAAiC,YAAA,EAAc,QAAQ;AAAA,GAC9D;AACL,CAAC;AAGM,MAAM,8BAAA,GAAiC,cAAc,IAAA,CAAK;AAAA,EAC/D,QAAA,EAAU,IAAA;AAAA,EACV,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,+BAAA;AAAA,IACN,QAAA,EAAU,YAAA;AAAA,IACV,KAAA,EAAO,sBAAA;AAAA,IACP,IAAA,sBAAO,WAAA,EAAA,EAAY,CAAA;AAAA,IACnB,MAAA,EAAQ,MACN,OAAO,0CAAmC,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAC/C,GAAA,CAAC,CAAA,CAAE,sBAAA,EAAF,EAAyB,CAC3B;AAAA;AAEP,CAAC;AAOM,MAAM,kCAAA,GAAqC,iBAAiB,IAAA,CAAK;AAAA,EACtE,QAAA,EAAU,EAAE,EAAA,EAAI,eAAA,EAAiB,OAAO,OAAA,EAAQ;AAAA,EAChD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,sBAAA;AAAA,IACN,KAAA,EAAO,sBAAA;AAAA,IACP,MAAA,EAAQ,MACN,OAAO,0CAAmC,EAAE,IAAA,CAAK,CAAA,CAAA,qBAC/C,GAAA,CAAC,SAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,CAAA,CAAE,0BAAA,EAAF,EAA6B,GAChC,CACD;AAAA;AAEP,CAAC;AAGD,aAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,8BAAA;AAAA,EACV,KAAA,EAAO,sBAAA;AAAA,EACP,IAAA,sBAAO,WAAA,EAAA,EAAY,CAAA;AAAA,EACnB,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,6DAAoB,CAAA,EAAE;AAAA,EACxD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAA,EAAY;AAAA,IACV,6BAAA;AAAA,IACA,8BAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
@@ -1,11 +1,9 @@
1
1
  import { createApiRef } from '@backstage/core-plugin-api';
2
- import { CatalogUnprocessedEntitiesClient as CatalogUnprocessedEntitiesClient$1 } from '@backstage/plugin-catalog-unprocessed-entities-common';
2
+ import '@backstage/plugin-catalog-unprocessed-entities-common';
3
3
 
4
4
  const catalogUnprocessedEntitiesApiRef = createApiRef({
5
5
  id: "plugin.catalog-unprocessed-entities.service"
6
6
  });
7
- class CatalogUnprocessedEntitiesClient extends CatalogUnprocessedEntitiesClient$1 {
8
- }
9
7
 
10
- export { CatalogUnprocessedEntitiesClient, catalogUnprocessedEntitiesApiRef };
8
+ export { catalogUnprocessedEntitiesApiRef };
11
9
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../src/api/index.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n CatalogUnprocessedEntitiesApiResponse as CommonCatalogUnprocessedEntitiesApiResponse,\n CatalogUnprocessedEntitiesApi as CommonCatalogUnprocessedEntitiesApi,\n CatalogUnprocessedEntitiesClient as CommonCatalogUnprocessedEntitiesClient,\n} from '@backstage/plugin-catalog-unprocessed-entities-common';\n\n/**\n * {@link @backstage/core-plugin-api#ApiRef} for the {@link CatalogUnprocessedEntitiesApi}\n *\n * @public\n */\nexport const catalogUnprocessedEntitiesApiRef =\n createApiRef<CatalogUnprocessedEntitiesApi>({\n id: 'plugin.catalog-unprocessed-entities.service',\n });\n\n/**\n * Response expected by the {@link CatalogUnprocessedEntitiesApi}\n *\n * @public\n * @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport type CatalogUnprocessedEntitiesApiResponse =\n CommonCatalogUnprocessedEntitiesApiResponse;\n\n/**\n * Interface for the CatalogUnprocessedEntitiesApi.\n *\n * @public\n * @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport interface CatalogUnprocessedEntitiesApi\n extends CommonCatalogUnprocessedEntitiesApi {}\n\n/**\n * Default API implementation for the Catalog Unprocessed Entities plugin\n *\n * @public\n * @deprecated Use the client imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport class CatalogUnprocessedEntitiesClient extends CommonCatalogUnprocessedEntitiesClient {}\n"],"names":["CommonCatalogUnprocessedEntitiesClient"],"mappings":";;;AA2BO,MAAM,mCACX,YAAA,CAA4C;AAAA,EAC1C,EAAA,EAAI;AACN,CAAC;AA0BI,MAAM,yCAAyCA,kCAAA,CAAuC;AAAC;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../src/api/index.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n CatalogUnprocessedEntitiesApiResponse as CommonCatalogUnprocessedEntitiesApiResponse,\n CatalogUnprocessedEntitiesApi as CommonCatalogUnprocessedEntitiesApi,\n CatalogUnprocessedEntitiesClient as CommonCatalogUnprocessedEntitiesClient,\n} from '@backstage/plugin-catalog-unprocessed-entities-common';\n\n/**\n * {@link @backstage/core-plugin-api#ApiRef} for the {@link CatalogUnprocessedEntitiesApi}\n *\n * @public\n */\nexport const catalogUnprocessedEntitiesApiRef =\n createApiRef<CatalogUnprocessedEntitiesApi>({\n id: 'plugin.catalog-unprocessed-entities.service',\n });\n\n/**\n * Response expected by the {@link CatalogUnprocessedEntitiesApi}\n *\n * @public\n * @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport type CatalogUnprocessedEntitiesApiResponse =\n CommonCatalogUnprocessedEntitiesApiResponse;\n\n/**\n * Interface for the CatalogUnprocessedEntitiesApi.\n *\n * @public\n * @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport interface CatalogUnprocessedEntitiesApi\n extends CommonCatalogUnprocessedEntitiesApi {}\n\n/**\n * Default API implementation for the Catalog Unprocessed Entities plugin\n *\n * @public\n * @deprecated Use the client imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport class CatalogUnprocessedEntitiesClient extends CommonCatalogUnprocessedEntitiesClient {}\n"],"names":[],"mappings":";;;AA2BO,MAAM,mCACX,YAAA,CAA4C;AAAA,EAC1C,EAAA,EAAI;AACN,CAAC;;;;"}
@@ -1,8 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import Button from '@material-ui/core/Button';
3
- import Dialog from '@material-ui/core/Dialog';
4
- import DialogActions from '@material-ui/core/DialogActions';
5
- import DialogTitle from '@material-ui/core/DialogTitle';
2
+ import { Dialog, DialogHeader, DialogFooter, Button } from '@backstage/ui';
6
3
  import { useState } from 'react';
7
4
 
8
5
  function DeleteEntityConfirmationDialog(props) {
@@ -11,28 +8,39 @@ function DeleteEntityConfirmationDialog(props) {
11
8
  const onDelete = async () => {
12
9
  setBusy(true);
13
10
  try {
14
- onConfirm();
11
+ await onConfirm();
15
12
  } catch {
16
13
  } finally {
17
14
  setBusy(false);
18
15
  }
19
16
  };
20
- return /* @__PURE__ */ jsxs(Dialog, { open, onClose, children: [
21
- /* @__PURE__ */ jsx(DialogTitle, { id: "responsive-dialog-title", children: "Are you sure you want to delete this entity?" }),
22
- /* @__PURE__ */ jsxs(DialogActions, { children: [
23
- /* @__PURE__ */ jsx(
24
- Button,
25
- {
26
- variant: "contained",
27
- color: "secondary",
28
- disabled: busy,
29
- onClick: onDelete,
30
- children: "Delete"
17
+ return /* @__PURE__ */ jsxs(
18
+ Dialog,
19
+ {
20
+ isOpen: open,
21
+ onOpenChange: (isOpen) => {
22
+ if (!isOpen && !busy) {
23
+ onClose();
31
24
  }
32
- ),
33
- /* @__PURE__ */ jsx(Button, { onClick: onClose, color: "primary", children: "Cancel" })
34
- ] })
35
- ] });
25
+ },
26
+ children: [
27
+ /* @__PURE__ */ jsx(DialogHeader, { children: "Are you sure you want to delete this entity?" }),
28
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
29
+ /* @__PURE__ */ jsx(
30
+ Button,
31
+ {
32
+ variant: "primary",
33
+ destructive: true,
34
+ isDisabled: busy,
35
+ onPress: onDelete,
36
+ children: "Delete"
37
+ }
38
+ ),
39
+ /* @__PURE__ */ jsx(Button, { variant: "secondary", isDisabled: busy, onPress: onClose, children: "Cancel" })
40
+ ] })
41
+ ]
42
+ }
43
+ );
36
44
  }
37
45
 
38
46
  export { DeleteEntityConfirmationDialog };
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteEntityConfirmationDialog.esm.js","sources":["../../src/components/DeleteEntityConfirmationDialog.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { useState } from 'react';\n\ninterface DeleteEntityConfirmationProps {\n open: boolean;\n onClose: () => any;\n onConfirm: () => any;\n}\n\nexport function DeleteEntityConfirmationDialog(\n props: DeleteEntityConfirmationProps,\n) {\n const { open, onClose, onConfirm } = props;\n const [busy, setBusy] = useState(false);\n const onDelete = async () => {\n setBusy(true);\n try {\n onConfirm();\n } catch {\n // ignored\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <Dialog open={open} onClose={onClose}>\n <DialogTitle id=\"responsive-dialog-title\">\n Are you sure you want to delete this entity?\n </DialogTitle>\n <DialogActions>\n <Button\n variant=\"contained\"\n color=\"secondary\"\n disabled={busy}\n onClick={onDelete}\n >\n Delete\n </Button>\n <Button onClick={onClose} color=\"primary\">\n Cancel\n </Button>\n </DialogActions>\n </Dialog>\n );\n}\n"],"names":[],"mappings":";;;;;;;AA4BO,SAAS,+BACd,KAAA,EACA;AACA,EAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAS,SAAA,EAAU,GAAI,KAAA;AACrC,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AACtC,EAAA,MAAM,WAAW,YAAY;AAC3B,IAAA,OAAA,CAAQ,IAAI,CAAA;AACZ,IAAA,IAAI;AACF,MAAA,SAAA,EAAU;AAAA,IACZ,CAAA,CAAA,MAAQ;AAAA,IAER,CAAA,SAAE;AACA,MAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,IACf;AAAA,EACF,CAAA;AAEA,EAAA,uBACE,IAAA,CAAC,MAAA,EAAA,EAAO,IAAA,EAAY,OAAA,EAClB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,WAAA,EAAA,EAAY,EAAA,EAAG,yBAAA,EAA0B,QAAA,EAAA,8CAAA,EAE1C,CAAA;AAAA,yBACC,aAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,WAAA;AAAA,UACR,KAAA,EAAM,WAAA;AAAA,UACN,QAAA,EAAU,IAAA;AAAA,UACV,OAAA,EAAS,QAAA;AAAA,UACV,QAAA,EAAA;AAAA;AAAA,OAED;AAAA,0BACC,MAAA,EAAA,EAAO,OAAA,EAAS,OAAA,EAAS,KAAA,EAAM,WAAU,QAAA,EAAA,QAAA,EAE1C;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"DeleteEntityConfirmationDialog.esm.js","sources":["../../src/components/DeleteEntityConfirmationDialog.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button, Dialog, DialogHeader, DialogFooter } from '@backstage/ui';\nimport { useState } from 'react';\n\ninterface DeleteEntityConfirmationProps {\n open: boolean;\n onClose: () => void | Promise<void>;\n onConfirm: () => void | Promise<void>;\n}\n\nexport function DeleteEntityConfirmationDialog(\n props: DeleteEntityConfirmationProps,\n) {\n const { open, onClose, onConfirm } = props;\n const [busy, setBusy] = useState(false);\n const onDelete = async () => {\n setBusy(true);\n try {\n await onConfirm();\n } catch {\n // ignored\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <Dialog\n isOpen={open}\n onOpenChange={isOpen => {\n if (!isOpen && !busy) {\n onClose();\n }\n }}\n >\n <DialogHeader>Are you sure you want to delete this entity?</DialogHeader>\n <DialogFooter>\n <Button\n variant=\"primary\"\n destructive\n isDisabled={busy}\n onPress={onDelete}\n >\n Delete\n </Button>\n <Button variant=\"secondary\" isDisabled={busy} onPress={onClose}>\n Cancel\n </Button>\n </DialogFooter>\n </Dialog>\n );\n}\n"],"names":[],"mappings":";;;;AAyBO,SAAS,+BACd,KAAA,EACA;AACA,EAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAS,SAAA,EAAU,GAAI,KAAA;AACrC,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AACtC,EAAA,MAAM,WAAW,YAAY;AAC3B,IAAA,OAAA,CAAQ,IAAI,CAAA;AACZ,IAAA,IAAI;AACF,MAAA,MAAM,SAAA,EAAU;AAAA,IAClB,CAAA,CAAA,MAAQ;AAAA,IAER,CAAA,SAAE;AACA,MAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,IACf;AAAA,EACF,CAAA;AAEA,EAAA,uBACE,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,IAAA;AAAA,MACR,cAAc,CAAA,MAAA,KAAU;AACtB,QAAA,IAAI,CAAC,MAAA,IAAU,CAAC,IAAA,EAAM;AACpB,UAAA,OAAA,EAAQ;AAAA,QACV;AAAA,MACF,CAAA;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,gBAAa,QAAA,EAAA,8CAAA,EAA4C,CAAA;AAAA,6BACzD,YAAA,EAAA,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAQ,SAAA;AAAA,cACR,WAAA,EAAW,IAAA;AAAA,cACX,UAAA,EAAY,IAAA;AAAA,cACZ,OAAA,EAAS,QAAA;AAAA,cACV,QAAA,EAAA;AAAA;AAAA,WAED;AAAA,0BACA,GAAA,CAAC,UAAO,OAAA,EAAQ,WAAA,EAAY,YAAY,IAAA,EAAM,OAAA,EAAS,SAAS,QAAA,EAAA,QAAA,EAEhE;AAAA,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1,64 +1,30 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { useState } from 'react';
3
- import Dialog from '@material-ui/core/Dialog';
4
- import DialogContent from '@material-ui/core/DialogContent';
5
- import DialogTitle from '@material-ui/core/DialogTitle';
6
- import IconButton from '@material-ui/core/IconButton';
7
- import { makeStyles, createStyles } from '@material-ui/core/styles';
8
- import CloseIcon from '@material-ui/icons/Close';
9
- import DescriptionIcon from '@material-ui/icons/Description';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
10
2
  import { CodeSnippet } from '@backstage/core-components';
3
+ import { DialogTrigger, ButtonIcon, Dialog, DialogHeader, DialogBody } from '@backstage/ui';
4
+ import { RiFileTextLine } from '@remixicon/react';
5
+ import styles from './EntityDialog.module.css.esm.js';
11
6
 
12
- const useStyles = makeStyles(
13
- (theme) => createStyles({
14
- closeButton: {
15
- position: "absolute",
16
- right: theme.spacing(1),
17
- top: theme.spacing(1),
18
- color: theme.palette.grey[500]
19
- },
20
- entity: {
21
- overflow: "scroll",
22
- width: "100%"
23
- },
24
- codeBox: {
25
- border: "1px solid black",
26
- padding: "1em"
27
- }
28
- })
29
- );
30
7
  const EntityDialog = ({ entity }) => {
31
- const [open, setOpen] = useState(false);
32
- const classes = useStyles();
33
- const openDialog = () => {
34
- setOpen(true);
35
- };
36
- const closeDialog = () => {
37
- setOpen(false);
38
- };
39
- const dialogContent = () => {
40
- return /* @__PURE__ */ jsx(
41
- CodeSnippet,
8
+ return /* @__PURE__ */ jsxs(DialogTrigger, { children: [
9
+ /* @__PURE__ */ jsx(
10
+ ButtonIcon,
42
11
  {
43
- language: "json",
44
- showLineNumbers: true,
45
- text: JSON.stringify(entity, null, 4)
12
+ variant: "tertiary",
13
+ "aria-label": `Show raw entity definition of ${entity.entity_ref ?? "unknown"}`,
14
+ icon: /* @__PURE__ */ jsx(RiFileTextLine, {})
46
15
  }
47
- );
48
- };
49
- return /* @__PURE__ */ jsxs(Fragment, { children: [
50
- /* @__PURE__ */ jsx(IconButton, { color: "primary", onClick: openDialog, children: /* @__PURE__ */ jsx(DescriptionIcon, {}) }),
51
- /* @__PURE__ */ jsxs(Dialog, { fullWidth: true, open, onClose: closeDialog, children: [
52
- /* @__PURE__ */ jsx(DialogTitle, { id: "dialog-title", children: /* @__PURE__ */ jsx(
53
- IconButton,
16
+ ),
17
+ /* @__PURE__ */ jsxs(Dialog, { className: styles.dialog, children: [
18
+ /* @__PURE__ */ jsx(DialogHeader, { children: "Raw entity definition" }),
19
+ /* @__PURE__ */ jsx(DialogBody, { children: /* @__PURE__ */ jsx(
20
+ CodeSnippet,
54
21
  {
55
- "aria-label": "close",
56
- className: classes.closeButton,
57
- onClick: closeDialog,
58
- children: /* @__PURE__ */ jsx(CloseIcon, {})
22
+ language: "json",
23
+ showLineNumbers: true,
24
+ showCopyCodeButton: true,
25
+ text: JSON.stringify(entity, null, 4)
59
26
  }
60
- ) }),
61
- /* @__PURE__ */ jsx(DialogContent, { children: dialogContent() })
27
+ ) })
62
28
  ] })
63
29
  ] });
64
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EntityDialog.esm.js","sources":["../../src/components/EntityDialog.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\n\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport IconButton from '@material-ui/core/IconButton';\nimport { makeStyles, createStyles, Theme } from '@material-ui/core/styles';\nimport CloseIcon from '@material-ui/icons/Close';\nimport DescriptionIcon from '@material-ui/icons/Description';\n\nimport { UnprocessedEntity } from './../types';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n entity: {\n overflow: 'scroll',\n width: '100%',\n },\n codeBox: {\n border: '1px solid black',\n padding: '1em',\n },\n }),\n);\n\nexport const EntityDialog = ({ entity }: { entity: UnprocessedEntity }) => {\n const [open, setOpen] = useState(false);\n const classes = useStyles();\n\n const openDialog = () => {\n setOpen(true);\n };\n\n const closeDialog = () => {\n setOpen(false);\n };\n\n const dialogContent = () => {\n return (\n <CodeSnippet\n language=\"json\"\n showLineNumbers\n text={JSON.stringify(entity, null, 4)}\n />\n );\n };\n\n return (\n <>\n <IconButton color=\"primary\" onClick={openDialog}>\n <DescriptionIcon />\n </IconButton>\n <Dialog fullWidth open={open} onClose={closeDialog}>\n <DialogTitle id=\"dialog-title\">\n <IconButton\n aria-label=\"close\"\n className={classes.closeButton}\n onClick={closeDialog}\n >\n <CloseIcon />\n </IconButton>\n </DialogTitle>\n <DialogContent>{dialogContent()}</DialogContent>\n </Dialog>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA4BA,MAAM,SAAA,GAAY,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAA,CAAa;AAAA,IACX,WAAA,EAAa;AAAA,MACX,QAAA,EAAU,UAAA;AAAA,MACV,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MACtB,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MACpB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,GAAG;AAAA,KAC/B;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,QAAA,EAAU,QAAA;AAAA,MACV,KAAA,EAAO;AAAA,KACT;AAAA,IACA,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,iBAAA;AAAA,MACR,OAAA,EAAS;AAAA;AACX,GACD;AACH,CAAA;AAEO,MAAM,YAAA,GAAe,CAAC,EAAE,MAAA,EAAO,KAAqC;AACzE,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AACtC,EAAA,MAAM,UAAU,SAAA,EAAU;AAE1B,EAAA,MAAM,aAAa,MAAM;AACvB,IAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,EACd,CAAA;AAEA,EAAA,MAAM,cAAc,MAAM;AACxB,IAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,EACf,CAAA;AAEA,EAAA,MAAM,gBAAgB,MAAM;AAC1B,IAAA,uBACE,GAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,QAAA,EAAS,MAAA;AAAA,QACT,eAAA,EAAe,IAAA;AAAA,QACf,IAAA,EAAM,IAAA,CAAK,SAAA,CAAU,MAAA,EAAQ,MAAM,CAAC;AAAA;AAAA,KACtC;AAAA,EAEJ,CAAA;AAEA,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAW,KAAA,EAAM,SAAA,EAAU,SAAS,UAAA,EACnC,QAAA,kBAAA,GAAA,CAAC,mBAAgB,CAAA,EACnB,CAAA;AAAA,yBACC,MAAA,EAAA,EAAO,SAAA,EAAS,IAAA,EAAC,IAAA,EAAY,SAAS,WAAA,EACrC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,WAAA,EAAA,EAAY,IAAG,cAAA,EACd,QAAA,kBAAA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,YAAA,EAAW,OAAA;AAAA,UACX,WAAW,OAAA,CAAQ,WAAA;AAAA,UACnB,OAAA,EAAS,WAAA;AAAA,UAET,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA,OACb,EACF,CAAA;AAAA,sBACA,GAAA,CAAC,aAAA,EAAA,EAAe,QAAA,EAAA,aAAA,EAAc,EAAE;AAAA,KAAA,EAClC;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityDialog.esm.js","sources":["../../src/components/EntityDialog.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CodeSnippet } from '@backstage/core-components';\nimport { UnprocessedEntity } from '@backstage/plugin-catalog-unprocessed-entities-common';\nimport {\n ButtonIcon,\n Dialog,\n DialogBody,\n DialogHeader,\n DialogTrigger,\n} from '@backstage/ui';\nimport { RiFileTextLine } from '@remixicon/react';\nimport styles from './EntityDialog.module.css';\n\nexport const EntityDialog = ({ entity }: { entity: UnprocessedEntity }) => {\n return (\n <DialogTrigger>\n <ButtonIcon\n variant=\"tertiary\"\n aria-label={`Show raw entity definition of ${\n entity.entity_ref ?? 'unknown'\n }`}\n icon={<RiFileTextLine />}\n />\n <Dialog className={styles.dialog}>\n <DialogHeader>Raw entity definition</DialogHeader>\n <DialogBody>\n <CodeSnippet\n language=\"json\"\n showLineNumbers\n showCopyCodeButton\n text={JSON.stringify(entity, null, 4)}\n />\n </DialogBody>\n </Dialog>\n </DialogTrigger>\n );\n};\n"],"names":[],"mappings":";;;;;;AA2BO,MAAM,YAAA,GAAe,CAAC,EAAE,MAAA,EAAO,KAAqC;AACzE,EAAA,4BACG,aAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,UAAA;AAAA,QACR,YAAA,EAAY,CAAA,8BAAA,EACV,MAAA,CAAO,UAAA,IAAc,SACvB,CAAA,CAAA;AAAA,QACA,IAAA,sBAAO,cAAA,EAAA,EAAe;AAAA;AAAA,KACxB;AAAA,oBACA,IAAA,CAAC,MAAA,EAAA,EAAO,SAAA,EAAW,MAAA,CAAO,MAAA,EACxB,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,gBAAa,QAAA,EAAA,uBAAA,EAAqB,CAAA;AAAA,0BAClC,UAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,QAAC,WAAA;AAAA,QAAA;AAAA,UACC,QAAA,EAAS,MAAA;AAAA,UACT,eAAA,EAAe,IAAA;AAAA,UACf,kBAAA,EAAkB,IAAA;AAAA,UAClB,IAAA,EAAM,IAAA,CAAK,SAAA,CAAU,MAAA,EAAQ,MAAM,CAAC;AAAA;AAAA,OACtC,EACF;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -0,0 +1,8 @@
1
+ import styleInject from '../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
+
3
+ var css_248z = "@media (min-width: 640px) {\n .EntityDialog_dialog__d6e2cb310b {\n width: 400px;\n }\n}\n\n@media (min-width: 768px) {\n .EntityDialog_dialog__d6e2cb310b {\n width: 600px;\n }\n}\n\n@media (min-width: 1024px) {\n .EntityDialog_dialog__d6e2cb310b {\n width: 800px;\n }\n}\n\n@media (min-width: 1536px) {\n .EntityDialog_dialog__d6e2cb310b {\n width: 60%;\n }\n}\n";
4
+ var styles = {"dialog":"EntityDialog_dialog__d6e2cb310b"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=EntityDialog.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityDialog.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -2,49 +2,30 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { DateTime } from 'luxon';
4
4
  import { Progress, ErrorPanel, Table, MarkdownContent } from '@backstage/core-components';
5
- import Box from '@material-ui/core/Box';
6
- import Typography from '@material-ui/core/Typography';
7
- import IconButton from '@material-ui/core/IconButton';
8
- import { makeStyles } from '@material-ui/core/styles';
9
- import { useApi, alertApiRef } from '@backstage/core-plugin-api';
5
+ import { Box, Text, Alert, ButtonIcon } from '@backstage/ui';
6
+ import { RiDeleteBinLine } from '@remixicon/react';
7
+ import { useApi } from '@backstage/core-plugin-api';
10
8
  import { EntityDialog } from './EntityDialog.esm.js';
11
9
  import { catalogUnprocessedEntitiesApiRef } from '../api/index.esm.js';
12
10
  import useAsync from 'react-use/esm/useAsync';
13
- import DeleteIcon from '@material-ui/icons/Delete';
14
11
  import { DeleteEntityConfirmationDialog } from './DeleteEntityConfirmationDialog.esm.js';
12
+ import { toastApiRef } from '@backstage/frontend-plugin-api';
13
+ import styles from './FailedEntities.module.css.esm.js';
15
14
 
16
- const useStyles = makeStyles((theme) => ({
17
- errorBox: {
18
- color: theme.palette.status.error,
19
- backgroundColor: theme.palette.errorBackground,
20
- padding: "1em",
21
- margin: "1em",
22
- border: `1px solid ${theme.palette.status.error}`
23
- },
24
- errorTitle: {
25
- width: "100%",
26
- fontWeight: "bold"
27
- },
28
- successMessage: {
29
- background: theme.palette.infoBackground,
30
- color: theme.palette.infoText,
31
- padding: theme.spacing(2)
32
- }
33
- }));
34
15
  const RenderErrorContext = ({
35
16
  error,
36
17
  rowData
37
18
  }) => {
38
19
  if (error.message.includes("tags.")) {
39
20
  return /* @__PURE__ */ jsxs(Fragment, { children: [
40
- /* @__PURE__ */ jsx(Typography, { children: "Tags" }),
41
- /* @__PURE__ */ jsx("ul", { children: rowData.unprocessed_entity.metadata.tags?.map((t) => /* @__PURE__ */ jsx("li", { children: t })) })
21
+ /* @__PURE__ */ jsx(Text, { className: styles.errorText, children: "Tags" }),
22
+ /* @__PURE__ */ jsx("ul", { children: rowData.unprocessed_entity.metadata.tags?.map((t) => /* @__PURE__ */ jsx("li", { children: t }, t)) })
42
23
  ] });
43
24
  }
44
25
  if (error.message.includes("metadata.name")) {
45
26
  return /* @__PURE__ */ jsxs(Fragment, { children: [
46
- /* @__PURE__ */ jsx(Typography, { children: "Name" }),
47
- /* @__PURE__ */ jsx(Typography, { variant: "caption", children: rowData.unprocessed_entity.metadata.name })
27
+ /* @__PURE__ */ jsx(Text, { className: styles.errorText, children: "Name" }),
28
+ /* @__PURE__ */ jsx(Text, { className: styles.errorText, variant: "body-small", children: rowData.unprocessed_entity.metadata.name })
48
29
  ] });
49
30
  }
50
31
  return null;
@@ -57,16 +38,13 @@ const convertTimeToLocalTimezone = (dateTime) => {
57
38
  return strDateTime.toFormat("yyyy-MM-dd hh:mm:ss ZZZZ");
58
39
  };
59
40
  const FailedEntities = () => {
60
- const classes = useStyles();
61
41
  const unprocessedApi = useApi(catalogUnprocessedEntitiesApiRef);
62
42
  const {
63
43
  loading,
64
44
  error,
65
45
  value: data
66
46
  } = useAsync(async () => await unprocessedApi.failed());
67
- const [, setSelectedSearchTerm] = useState("");
68
- const unprocessedEntityApi = useApi(catalogUnprocessedEntitiesApiRef);
69
- const alertApi = useApi(alertApiRef);
47
+ const toastApi = useApi(toastApiRef);
70
48
  const [selectedEntityId, setSelectedEntityId] = useState(
71
49
  void 0
72
50
  );
@@ -89,48 +67,48 @@ const FailedEntities = () => {
89
67
  const cleanUpAfterRemoval = async () => {
90
68
  try {
91
69
  if (selectedEntityId) {
92
- await unprocessedEntityApi.delete(selectedEntityId);
93
- alertApi.post({
94
- message: `Entity ${selectedEntityRef} has been deleted`,
95
- severity: "success"
70
+ await unprocessedApi.delete(selectedEntityId);
71
+ toastApi.post({
72
+ title: `Entity ${selectedEntityRef} has been deleted`,
73
+ status: "success"
96
74
  });
97
75
  }
98
76
  } catch (e) {
99
- alertApi.post({
100
- message: `Ran into an issue when deleting ${selectedEntityRef}. Please try again later.`,
101
- severity: "error"
77
+ toastApi.post({
78
+ title: `Failed to delete entity ${selectedEntityRef}`,
79
+ status: "danger"
102
80
  });
103
81
  }
104
82
  setConfirmationDialogOpen(false);
105
83
  };
106
84
  const columns = [
107
85
  {
108
- title: /* @__PURE__ */ jsx(Typography, { children: "entityRef" }),
86
+ title: /* @__PURE__ */ jsx(Text, { children: "entityRef" }),
109
87
  sorting: true,
110
88
  field: "entity_ref",
111
89
  customFilterAndSearch: (query, row) => row.entity_ref.toLocaleUpperCase("en-US").includes(query.toLocaleUpperCase("en-US")),
112
90
  render: (rowData) => rowData.entity_ref
113
91
  },
114
92
  {
115
- title: /* @__PURE__ */ jsx(Typography, { children: "Location Path" }),
93
+ title: /* @__PURE__ */ jsx(Text, { children: "Location Path" }),
116
94
  sorting: true,
117
95
  field: "location_key",
118
96
  render: (rowData) => rowData.location_key
119
97
  },
120
98
  {
121
- title: /* @__PURE__ */ jsx(Typography, { children: "Kind" }),
99
+ title: /* @__PURE__ */ jsx(Text, { children: "Kind" }),
122
100
  sorting: true,
123
101
  field: "kind",
124
102
  render: (rowData) => rowData.unprocessed_entity.kind
125
103
  },
126
104
  {
127
- title: /* @__PURE__ */ jsx(Typography, { children: "Owner" }),
105
+ title: /* @__PURE__ */ jsx(Text, { children: "Owner" }),
128
106
  sorting: true,
129
107
  field: "unprocessed_entity.spec.owner",
130
108
  render: (rowData) => rowData.unprocessed_entity.spec?.owner || "unknown"
131
109
  },
132
110
  {
133
- title: /* @__PURE__ */ jsx(Typography, { children: "Last Discovery At" }),
111
+ title: /* @__PURE__ */ jsx(Text, { children: "Last Discovery At" }),
134
112
  sorting: true,
135
113
  field: "last_discovery_at",
136
114
  render: (rowData) => convertTimeToLocalTimezone(
@@ -138,7 +116,7 @@ const FailedEntities = () => {
138
116
  ) || "unknown"
139
117
  },
140
118
  {
141
- title: /* @__PURE__ */ jsx(Typography, { children: "Next Refresh At" }),
119
+ title: /* @__PURE__ */ jsx(Text, { children: "Next Refresh At" }),
142
120
  sorting: true,
143
121
  field: "next_update_at",
144
122
  render: (rowData) => convertTimeToLocalTimezone(
@@ -146,23 +124,24 @@ const FailedEntities = () => {
146
124
  ) || "unknown"
147
125
  },
148
126
  {
149
- title: /* @__PURE__ */ jsx(Typography, { children: "Raw Entity Definition" }),
127
+ title: /* @__PURE__ */ jsx(Text, { children: "Raw Entity Definition" }),
150
128
  sorting: false,
151
129
  render: (rowData) => /* @__PURE__ */ jsx(EntityDialog, { entity: rowData })
152
130
  },
153
131
  {
154
- title: /* @__PURE__ */ jsx(Typography, { children: "Actions" }),
132
+ title: /* @__PURE__ */ jsx(Text, { children: "Actions" }),
155
133
  render: (rowData) => {
156
134
  const { entity_id, entity_ref } = rowData;
157
135
  return /* @__PURE__ */ jsx(
158
- IconButton,
136
+ ButtonIcon,
159
137
  {
138
+ variant: "tertiary",
160
139
  "aria-label": "delete",
161
- onClick: () => handleDelete({
140
+ icon: /* @__PURE__ */ jsx(RiDeleteBinLine, {}),
141
+ onPress: () => handleDelete({
162
142
  entityId: entity_id,
163
143
  entityRef: entity_ref
164
- }),
165
- children: /* @__PURE__ */ jsx(DeleteIcon, { fontSize: "small", "data-testid": "delete-icon" })
144
+ })
166
145
  }
167
146
  );
168
147
  }
@@ -175,22 +154,38 @@ const FailedEntities = () => {
175
154
  options: { pageSize: 20, search: true },
176
155
  columns,
177
156
  data: data?.entities ?? [],
178
- emptyContent: /* @__PURE__ */ jsx(Typography, { className: classes.successMessage, children: "No failed entities found" }),
179
- onSearchChange: (searchTerm) => setSelectedSearchTerm(searchTerm),
157
+ emptyContent: /* @__PURE__ */ jsx(
158
+ Alert,
159
+ {
160
+ status: "info",
161
+ title: "No failed entities found",
162
+ style: { placeSelf: "center", margin: "var(--bui-space-4)" }
163
+ }
164
+ ),
180
165
  detailPanel: ({ rowData }) => {
181
166
  const errors = rowData.errors;
182
167
  return /* @__PURE__ */ jsx(Fragment, { children: errors?.map((e, idx) => {
183
- return /* @__PURE__ */ jsxs(Box, { className: classes.errorBox, children: [
184
- /* @__PURE__ */ jsx(Typography, { className: classes.errorTitle, children: e.name }),
185
- /* @__PURE__ */ jsx(MarkdownContent, { content: e.message }),
186
- /* @__PURE__ */ jsx(
187
- RenderErrorContext,
188
- {
189
- error: e,
190
- rowData
191
- }
192
- )
193
- ] }, idx);
168
+ return /* @__PURE__ */ jsxs(
169
+ Box,
170
+ {
171
+ bg: "danger",
172
+ p: "4",
173
+ m: "4",
174
+ className: styles.errorBox,
175
+ children: [
176
+ /* @__PURE__ */ jsx(Text, { as: "p", weight: "bold", className: styles.errorText, children: e.name }),
177
+ /* @__PURE__ */ jsx(MarkdownContent, { content: e.message }),
178
+ /* @__PURE__ */ jsx(
179
+ RenderErrorContext,
180
+ {
181
+ error: e,
182
+ rowData
183
+ }
184
+ )
185
+ ]
186
+ },
187
+ idx
188
+ );
194
189
  }) });
195
190
  }
196
191
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FailedEntities.esm.js","sources":["../../src/components/FailedEntities.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\nimport { DateTime } from 'luxon';\nimport {\n ErrorPanel,\n MarkdownContent,\n Progress,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport IconButton from '@material-ui/core/IconButton';\nimport { Theme, makeStyles } from '@material-ui/core/styles';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { UnprocessedEntity } from '../types';\nimport { EntityDialog } from './EntityDialog';\nimport { catalogUnprocessedEntitiesApiRef } from '../api';\nimport useAsync from 'react-use/esm/useAsync';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { DeleteEntityConfirmationDialog } from './DeleteEntityConfirmationDialog';\n\nconst useStyles = makeStyles((theme: Theme) => ({\n errorBox: {\n color: theme.palette.status.error,\n backgroundColor: theme.palette.errorBackground,\n padding: '1em',\n margin: '1em',\n border: `1px solid ${theme.palette.status.error}`,\n },\n errorTitle: {\n width: '100%',\n fontWeight: 'bold',\n },\n successMessage: {\n background: theme.palette.infoBackground,\n color: theme.palette.infoText,\n padding: theme.spacing(2),\n },\n}));\n\nconst RenderErrorContext = ({\n error,\n rowData,\n}: {\n error: { message: string };\n rowData: UnprocessedEntity;\n}) => {\n if (error.message.includes('tags.')) {\n return (\n <>\n <Typography>Tags</Typography>\n <ul>\n {rowData.unprocessed_entity.metadata.tags?.map(t => (\n <li>{t}</li>\n ))}\n </ul>\n </>\n );\n }\n\n if (error.message.includes('metadata.name')) {\n return (\n <>\n <Typography>Name</Typography>\n <Typography variant=\"caption\">\n {rowData.unprocessed_entity.metadata.name}\n </Typography>\n </>\n );\n }\n\n return null;\n};\n\n/**\n * Converts input datetime which lacks timezone info into user's local time so that they can\n * easily understand the times.\n */\nexport const convertTimeToLocalTimezone = (dateTime: string | Date) => {\n const isoDateTime =\n typeof dateTime === 'string' ? dateTime : dateTime.toISOString();\n\n const strDateTime = DateTime.fromISO(isoDateTime, {\n zone: DateTime.local().zoneName,\n });\n\n return strDateTime.toFormat('yyyy-MM-dd hh:mm:ss ZZZZ');\n};\n\nexport const FailedEntities = () => {\n const classes = useStyles();\n const unprocessedApi = useApi(catalogUnprocessedEntitiesApiRef);\n const {\n loading,\n error,\n value: data,\n } = useAsync(async () => await unprocessedApi.failed());\n const [, setSelectedSearchTerm] = useState<string>('');\n const unprocessedEntityApi = useApi(catalogUnprocessedEntitiesApiRef);\n const alertApi = useApi(alertApiRef);\n const [selectedEntityId, setSelectedEntityId] = useState<string | undefined>(\n undefined,\n );\n const [selectedEntityRef, setSelectedEntityRef] = useState<\n string | undefined\n >(undefined);\n const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false);\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel error={error} />;\n }\n\n const handleDelete = ({\n entityId,\n entityRef,\n }: {\n entityId: string;\n entityRef: string;\n }) => {\n setSelectedEntityId(entityId);\n setSelectedEntityRef(entityRef);\n setConfirmationDialogOpen(true);\n };\n\n const cleanUpAfterRemoval = async () => {\n try {\n if (selectedEntityId) {\n await unprocessedEntityApi.delete(selectedEntityId);\n alertApi.post({\n message: `Entity ${selectedEntityRef} has been deleted`,\n severity: 'success',\n });\n }\n } catch (e) {\n alertApi.post({\n message: `Ran into an issue when deleting ${selectedEntityRef}. Please try again later.`,\n severity: 'error',\n });\n }\n setConfirmationDialogOpen(false);\n };\n\n const columns: TableColumn[] = [\n {\n title: <Typography>entityRef</Typography>,\n sorting: true,\n field: 'entity_ref',\n customFilterAndSearch: (query, row: any) =>\n row.entity_ref\n .toLocaleUpperCase('en-US')\n .includes(query.toLocaleUpperCase('en-US')),\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).entity_ref,\n },\n {\n title: <Typography>Location Path</Typography>,\n sorting: true,\n field: 'location_key',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).location_key,\n },\n {\n title: <Typography>Kind</Typography>,\n sorting: true,\n field: 'kind',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).unprocessed_entity.kind,\n },\n {\n title: <Typography>Owner</Typography>,\n sorting: true,\n field: 'unprocessed_entity.spec.owner',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).unprocessed_entity.spec?.owner ||\n 'unknown',\n },\n {\n title: <Typography>Last Discovery At</Typography>,\n sorting: true,\n field: 'last_discovery_at',\n render: (rowData: UnprocessedEntity | {}) =>\n convertTimeToLocalTimezone(\n (rowData as UnprocessedEntity).last_discovery_at,\n ) || 'unknown',\n },\n {\n title: <Typography>Next Refresh At</Typography>,\n sorting: true,\n field: 'next_update_at',\n render: (rowData: UnprocessedEntity | {}) =>\n convertTimeToLocalTimezone(\n (rowData as UnprocessedEntity).next_update_at,\n ) || 'unknown',\n },\n {\n title: <Typography>Raw Entity Definition</Typography>,\n sorting: false,\n render: (rowData: UnprocessedEntity | {}) => (\n <EntityDialog entity={rowData as UnprocessedEntity} />\n ),\n },\n {\n title: <Typography>Actions</Typography>,\n render: (rowData: UnprocessedEntity | {}) => {\n const { entity_id, entity_ref } = rowData as UnprocessedEntity;\n\n return (\n <IconButton\n aria-label=\"delete\"\n onClick={() =>\n handleDelete({\n entityId: entity_id,\n entityRef: entity_ref,\n })\n }\n >\n <DeleteIcon fontSize=\"small\" data-testid=\"delete-icon\" />\n </IconButton>\n );\n },\n },\n ];\n\n return (\n <>\n <Table\n options={{ pageSize: 20, search: true }}\n columns={columns}\n data={data?.entities ?? []}\n emptyContent={\n <Typography className={classes.successMessage}>\n No failed entities found\n </Typography>\n }\n onSearchChange={(searchTerm: string) =>\n setSelectedSearchTerm(searchTerm)\n }\n detailPanel={({ rowData }) => {\n const errors = (rowData as UnprocessedEntity).errors;\n return (\n <>\n {errors?.map((e, idx) => {\n return (\n <Box key={idx} className={classes.errorBox}>\n <Typography className={classes.errorTitle}>\n {e.name}\n </Typography>\n <MarkdownContent content={e.message} />\n <RenderErrorContext\n error={e}\n rowData={rowData as UnprocessedEntity}\n />\n </Box>\n );\n })}\n </>\n );\n }}\n />\n <DeleteEntityConfirmationDialog\n open={confirmationDialogOpen}\n onClose={() => setConfirmationDialogOpen(false)}\n onConfirm={cleanUpAfterRemoval}\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsCA,MAAM,SAAA,GAAY,UAAA,CAAW,CAAC,KAAA,MAAkB;AAAA,EAC9C,QAAA,EAAU;AAAA,IACR,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IAC5B,eAAA,EAAiB,MAAM,OAAA,CAAQ,eAAA;AAAA,IAC/B,OAAA,EAAS,KAAA;AAAA,IACT,MAAA,EAAQ,KAAA;AAAA,IACR,MAAA,EAAQ,CAAA,UAAA,EAAa,KAAA,CAAM,OAAA,CAAQ,OAAO,KAAK,CAAA;AAAA,GACjD;AAAA,EACA,UAAA,EAAY;AAAA,IACV,KAAA,EAAO,MAAA;AAAA,IACP,UAAA,EAAY;AAAA,GACd;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,UA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AA,CAAQ,UAAA,EAC5B,YAAE,IAAA,EACL,CAAA;AAAA,8BACA,GAAA,CAAC,eAAA,EAAA,EAAgB,OAAA,EAAS,CAAA,CAAE,OAAA,EAAS,CAAA;AAAA,8BACrC,GAAA;AAAA,gBAAC,kBAAA;AAAA,gBAAA;AAAA,kBACC,KAAA,EAAO,CAAA;AAAA,kBACP;AAAA;AAAA;AACF,aAAA,EAAA,EARQ,GASV,CAAA;AAAA,UAEJ,CAAC,CAAA,EACH,CAAA;AAAA,QAEJ;AAAA;AAAA,KACF;AAAA,oBACA,GAAA;AAAA,MAAC,8BAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,sBAAA;AAAA,QACN,OAAA,EAAS,MAAM,yBAAA,CAA0B,KAAK,CAAA;AAAA,QAC9C,SAAA,EAAW;AAAA;AAAA;AACb,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"FailedEntities.esm.js","sources":["../../src/components/FailedEntities.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\nimport { DateTime } from 'luxon';\nimport {\n ErrorPanel,\n MarkdownContent,\n Progress,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport { Alert, Box, ButtonIcon, Text } from '@backstage/ui';\nimport { RiDeleteBinLine } from '@remixicon/react';\nimport { useApi } from '@backstage/core-plugin-api';\n\nimport { EntityDialog } from './EntityDialog';\nimport { catalogUnprocessedEntitiesApiRef } from '../api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { DeleteEntityConfirmationDialog } from './DeleteEntityConfirmationDialog';\nimport { UnprocessedEntity } from '@backstage/plugin-catalog-unprocessed-entities-common';\nimport { toastApiRef } from '@backstage/frontend-plugin-api';\nimport styles from './FailedEntities.module.css';\n\nconst RenderErrorContext = ({\n error,\n rowData,\n}: {\n error: { message: string };\n rowData: UnprocessedEntity;\n}) => {\n if (error.message.includes('tags.')) {\n return (\n <>\n <Text className={styles.errorText}>Tags</Text>\n <ul>\n {rowData.unprocessed_entity.metadata.tags?.map(t => (\n <li key={t}>{t}</li>\n ))}\n </ul>\n </>\n );\n }\n\n if (error.message.includes('metadata.name')) {\n return (\n <>\n <Text className={styles.errorText}>Name</Text>\n <Text className={styles.errorText} variant=\"body-small\">\n {rowData.unprocessed_entity.metadata.name}\n </Text>\n </>\n );\n }\n\n return null;\n};\n\n/**\n * Converts input datetime which lacks timezone info into user's local time so that they can\n * easily understand the times.\n */\nexport const convertTimeToLocalTimezone = (dateTime: string | Date) => {\n const isoDateTime =\n typeof dateTime === 'string' ? dateTime : dateTime.toISOString();\n\n const strDateTime = DateTime.fromISO(isoDateTime, {\n zone: DateTime.local().zoneName,\n });\n\n return strDateTime.toFormat('yyyy-MM-dd hh:mm:ss ZZZZ');\n};\n\nexport const FailedEntities = () => {\n const unprocessedApi = useApi(catalogUnprocessedEntitiesApiRef);\n const {\n loading,\n error,\n value: data,\n } = useAsync(async () => await unprocessedApi.failed());\n const toastApi = useApi(toastApiRef);\n const [selectedEntityId, setSelectedEntityId] = useState<string | undefined>(\n undefined,\n );\n const [selectedEntityRef, setSelectedEntityRef] = useState<\n string | undefined\n >(undefined);\n const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false);\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel error={error} />;\n }\n\n const handleDelete = ({\n entityId,\n entityRef,\n }: {\n entityId: string;\n entityRef: string;\n }) => {\n setSelectedEntityId(entityId);\n setSelectedEntityRef(entityRef);\n setConfirmationDialogOpen(true);\n };\n\n const cleanUpAfterRemoval = async () => {\n try {\n if (selectedEntityId) {\n await unprocessedApi.delete(selectedEntityId);\n toastApi.post({\n title: `Entity ${selectedEntityRef} has been deleted`,\n status: 'success',\n });\n }\n } catch (e) {\n toastApi.post({\n title: `Failed to delete entity ${selectedEntityRef}`,\n status: 'danger',\n });\n }\n setConfirmationDialogOpen(false);\n };\n\n const columns: TableColumn[] = [\n {\n title: <Text>entityRef</Text>,\n sorting: true,\n field: 'entity_ref',\n customFilterAndSearch: (query, row: any) =>\n row.entity_ref\n .toLocaleUpperCase('en-US')\n .includes(query.toLocaleUpperCase('en-US')),\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).entity_ref,\n },\n {\n title: <Text>Location Path</Text>,\n sorting: true,\n field: 'location_key',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).location_key,\n },\n {\n title: <Text>Kind</Text>,\n sorting: true,\n field: 'kind',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).unprocessed_entity.kind,\n },\n {\n title: <Text>Owner</Text>,\n sorting: true,\n field: 'unprocessed_entity.spec.owner',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).unprocessed_entity.spec?.owner ||\n 'unknown',\n },\n {\n title: <Text>Last Discovery At</Text>,\n sorting: true,\n field: 'last_discovery_at',\n render: (rowData: UnprocessedEntity | {}) =>\n convertTimeToLocalTimezone(\n (rowData as UnprocessedEntity).last_discovery_at,\n ) || 'unknown',\n },\n {\n title: <Text>Next Refresh At</Text>,\n sorting: true,\n field: 'next_update_at',\n render: (rowData: UnprocessedEntity | {}) =>\n convertTimeToLocalTimezone(\n (rowData as UnprocessedEntity).next_update_at,\n ) || 'unknown',\n },\n {\n title: <Text>Raw Entity Definition</Text>,\n sorting: false,\n render: (rowData: UnprocessedEntity | {}) => (\n <EntityDialog entity={rowData as UnprocessedEntity} />\n ),\n },\n {\n title: <Text>Actions</Text>,\n render: (rowData: UnprocessedEntity | {}) => {\n const { entity_id, entity_ref } = rowData as UnprocessedEntity;\n\n return (\n <ButtonIcon\n variant=\"tertiary\"\n aria-label=\"delete\"\n icon={<RiDeleteBinLine />}\n onPress={() =>\n handleDelete({\n entityId: entity_id,\n entityRef: entity_ref,\n })\n }\n />\n );\n },\n },\n ];\n\n return (\n <>\n <Table\n options={{ pageSize: 20, search: true }}\n columns={columns}\n data={data?.entities ?? []}\n emptyContent={\n <Alert\n status=\"info\"\n title=\"No failed entities found\"\n style={{ placeSelf: 'center', margin: 'var(--bui-space-4)' }}\n />\n }\n detailPanel={({ rowData }) => {\n const errors = (rowData as UnprocessedEntity).errors;\n return (\n <>\n {errors?.map((e, idx) => {\n return (\n <Box\n key={idx}\n bg=\"danger\"\n p=\"4\"\n m=\"4\"\n className={styles.errorBox}\n >\n <Text as=\"p\" weight=\"bold\" className={styles.errorText}>\n {e.name}\n </Text>\n <MarkdownContent content={e.message} />\n <RenderErrorContext\n error={e}\n rowData={rowData as UnprocessedEntity}\n />\n </Box>\n );\n })}\n </>\n );\n }}\n />\n <DeleteEntityConfirmationDialog\n open={confirmationDialogOpen}\n onClose={() => setConfirmationDialogOpen(false)}\n onConfirm={cleanUpAfterRemoval}\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAqCA,MAAM,qBAAqB,CAAC;AAAA,EAC1B,KAAA;AAAA,EACA;AACF,CAAA,KAGM;AACJ,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,QAAA,CAAS,OAAO,CAAA,EAAG;AACnC,IAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAW,MAAA,CAAO,SAAA,EAAW,QAAA,EAAA,MAAA,EAAI,CAAA;AAAA,sBACvC,GAAA,CAAC,IAAA,EAAA,EACE,QAAA,EAAA,OAAA,CAAQ,kBAAA,CAAmB,QAAA,CAAS,IAAA,EAAM,GAAA,CAAI,CAAA,CAA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S,MAAM,yBAAA,CAA0B,KAAK,CAAA;AAAA,QAC9C,SAAA,EAAW;AAAA;AAAA;AACb,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -0,0 +1,8 @@
1
+ import styleInject from '../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
+
3
+ var css_248z = ".FailedEntities_errorBox__7ff4c485d0 {\n color: var(--bui-fg-danger-on-bg);\n border: 1px solid var(--bui-border-danger);\n border-radius: var(--bui-radius-2);\n}\n\n.FailedEntities_errorText__7ff4c485d0 {\n color: var(--bui-fg-danger-on-bg);\n}\n";
4
+ var styles = {"errorBox":"FailedEntities_errorBox__7ff4c485d0","errorText":"FailedEntities_errorText__7ff4c485d0"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=FailedEntities.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FailedEntities.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,29 +1,18 @@
1
1
  import { jsx, Fragment } from 'react/jsx-runtime';
2
- import { useState } from 'react';
3
2
  import { Progress, ErrorPanel, Table } from '@backstage/core-components';
4
- import Typography from '@material-ui/core/Typography';
5
- import { makeStyles } from '@material-ui/core/styles';
3
+ import { Alert, Text } from '@backstage/ui';
6
4
  import { EntityDialog } from './EntityDialog.esm.js';
7
5
  import { useApi } from '@backstage/core-plugin-api';
8
6
  import useAsync from 'react-use/esm/useAsync';
9
7
  import { catalogUnprocessedEntitiesApiRef } from '../api/index.esm.js';
10
8
 
11
- const useStyles = makeStyles((theme) => ({
12
- successMessage: {
13
- background: theme.palette.infoBackground,
14
- color: theme.palette.infoText,
15
- padding: theme.spacing(2)
16
- }
17
- }));
18
9
  const PendingEntities = () => {
19
- const classes = useStyles();
20
10
  const unprocessedApi = useApi(catalogUnprocessedEntitiesApiRef);
21
11
  const {
22
12
  loading,
23
13
  error,
24
14
  value: data
25
15
  } = useAsync(async () => await unprocessedApi.pending());
26
- const [, setSelectedSearchTerm] = useState("");
27
16
  if (loading) {
28
17
  return /* @__PURE__ */ jsx(Progress, {});
29
18
  }
@@ -32,26 +21,26 @@ const PendingEntities = () => {
32
21
  }
33
22
  const columns = [
34
23
  {
35
- title: /* @__PURE__ */ jsx(Typography, { children: "entityRef" }),
24
+ title: /* @__PURE__ */ jsx(Text, { children: "entityRef" }),
36
25
  sorting: true,
37
26
  field: "entity_ref",
38
27
  customFilterAndSearch: (query, row) => row.entity_ref.toLocaleUpperCase("en-US").includes(query.toLocaleUpperCase("en-US")),
39
28
  render: (rowData) => rowData.entity_ref
40
29
  },
41
30
  {
42
- title: /* @__PURE__ */ jsx(Typography, { children: "Kind" }),
31
+ title: /* @__PURE__ */ jsx(Text, { children: "Kind" }),
43
32
  sorting: true,
44
33
  field: "kind",
45
34
  render: (rowData) => rowData.unprocessed_entity.kind
46
35
  },
47
36
  {
48
- title: /* @__PURE__ */ jsx(Typography, { children: "Owner" }),
37
+ title: /* @__PURE__ */ jsx(Text, { children: "Owner" }),
49
38
  sorting: true,
50
39
  field: "unprocessed_entity.spec.owner",
51
40
  render: (rowData) => rowData.unprocessed_entity.spec?.owner || "unknown"
52
41
  },
53
42
  {
54
- title: /* @__PURE__ */ jsx(Typography, { children: "Raw" }),
43
+ title: /* @__PURE__ */ jsx(Text, { children: "Raw" }),
55
44
  sorting: false,
56
45
  render: (rowData) => /* @__PURE__ */ jsx(EntityDialog, { entity: rowData })
57
46
  }
@@ -59,11 +48,17 @@ const PendingEntities = () => {
59
48
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
60
49
  Table,
61
50
  {
62
- options: { pageSize: 20 },
51
+ options: { pageSize: 20, search: true },
63
52
  columns,
64
53
  data: data?.entities || [],
65
- onSearchChange: (searchTerm) => setSelectedSearchTerm(searchTerm),
66
- emptyContent: /* @__PURE__ */ jsx(Typography, { className: classes.successMessage, children: "No pending entities found" })
54
+ emptyContent: /* @__PURE__ */ jsx(
55
+ Alert,
56
+ {
57
+ status: "info",
58
+ title: "No pending entities found",
59
+ style: { placeSelf: "center", margin: "var(--bui-space-4)" }
60
+ }
61
+ )
67
62
  }
68
63
  ) });
69
64
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PendingEntities.esm.js","sources":["../../src/components/PendingEntities.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\n\nimport {\n ErrorPanel,\n Progress,\n TableColumn,\n Table,\n} from '@backstage/core-components';\nimport Typography from '@material-ui/core/Typography';\nimport { Theme, makeStyles } from '@material-ui/core/styles';\n\nimport { UnprocessedEntity } from '../types';\n\nimport { EntityDialog } from './EntityDialog';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { catalogUnprocessedEntitiesApiRef } from '../api';\n\nconst useStyles = makeStyles((theme: Theme) => ({\n successMessage: {\n background: theme.palette.infoBackground,\n color: theme.palette.infoText,\n padding: theme.spacing(2),\n },\n}));\n\nexport const PendingEntities = () => {\n const classes = useStyles();\n const unprocessedApi = useApi(catalogUnprocessedEntitiesApiRef);\n const {\n loading,\n error,\n value: data,\n } = useAsync(async () => await unprocessedApi.pending());\n const [, setSelectedSearchTerm] = useState<string>('');\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel error={error} />;\n }\n\n const columns: TableColumn[] = [\n {\n title: <Typography>entityRef</Typography>,\n sorting: true,\n field: 'entity_ref',\n customFilterAndSearch: (query, row: any) =>\n row.entity_ref\n .toLocaleUpperCase('en-US')\n .includes(query.toLocaleUpperCase('en-US')),\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).entity_ref,\n },\n {\n title: <Typography>Kind</Typography>,\n sorting: true,\n field: 'kind',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).unprocessed_entity.kind,\n },\n {\n title: <Typography>Owner</Typography>,\n sorting: true,\n field: 'unprocessed_entity.spec.owner',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).unprocessed_entity.spec?.owner ||\n 'unknown',\n },\n {\n title: <Typography>Raw</Typography>,\n sorting: false,\n render: (rowData: UnprocessedEntity | {}) => (\n <EntityDialog entity={rowData as UnprocessedEntity} />\n ),\n },\n ];\n return (\n <>\n <Table\n options={{ pageSize: 20 }}\n columns={columns}\n data={data?.entities || []}\n onSearchChange={(searchTerm: string) =>\n setSelectedSearchTerm(searchTerm)\n }\n emptyContent={\n <Typography className={classes.successMessage}>\n No pending entities found\n </Typography>\n }\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAiCA,MAAM,SAAA,GAAY,UAAA,CAAW,CAAC,KAAA,MAAkB;AAAA,EAC9C,cAAA,EAAgB;AAAA,IACd,UAAA,EAAY,MAAM,OAAA,CAAQ,cAAA;AAAA,IAC1B,KAAA,EAAO,MAAM,OAAA,CAAQ,QAAA;AAAA,IACrB,OAAA,EAAS,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA;AAE5B,CAAA,CAAE,CAAA;AAEK,MAAM,kBAAkB,MAAM;AACnC,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,cAAA,GAAiB,OAAO,gCAAgC,CAAA;AAC9D,EAAA,MAAM;AAAA,IACJ,OAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA,EAAO;AAAA,MACL,QAAA,CAAS,YAAY,MAAM,cAAA,CAAe,SAAS,CAAA;AACvD,EAAA,MAAM,GAAG,qBAAqB,CAAA,GAAI,SAAiB,EAAE,CAAA;A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AAC,OAAA,qBACP,GAAA,CAAC,YAAA,EAAA,EAAa,QAAQ,OAAA,EAA8B;AAAA;AAExD,GACF;AACA,EAAA,uBACE,GAAA,CAAA,QAAA,EAAA,EACE,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAS,EAAE,QAAA,EAAU,EAAA,EAAG;AAAA,MACxB,OAAA;AAAA,MACA,IAAA,EAAM,IAAA,EAAM,QAAA,IAAY,EAAC;AAAA,MACzB,cAAA,EAAgB,CAAC,UAAA,KACf,qBAAA,CAAsB,UAAU,CAAA;AAAA,MAElC,8BACE,GAAA,CAAC,UAAA,EAAA,EAAW,SAAA,EAAW,OAAA,CAAQ,gBAAgB,QAAA,EAAA,2BAAA,EAE/C;AAAA;AAAA,GAEJ,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PendingEntities.esm.js","sources":["../../src/components/PendingEntities.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ErrorPanel,\n Progress,\n TableColumn,\n Table,\n} from '@backstage/core-components';\nimport { Alert, Text } from '@backstage/ui';\n\nimport { EntityDialog } from './EntityDialog';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { catalogUnprocessedEntitiesApiRef } from '../api';\nimport { UnprocessedEntity } from '@backstage/plugin-catalog-unprocessed-entities-common';\n\nexport const PendingEntities = () => {\n const unprocessedApi = useApi(catalogUnprocessedEntitiesApiRef);\n const {\n loading,\n error,\n value: data,\n } = useAsync(async () => await unprocessedApi.pending());\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ErrorPanel error={error} />;\n }\n\n const columns: TableColumn[] = [\n {\n title: <Text>entityRef</Text>,\n sorting: true,\n field: 'entity_ref',\n customFilterAndSearch: (query, row: any) =>\n row.entity_ref\n .toLocaleUpperCase('en-US')\n .includes(query.toLocaleUpperCase('en-US')),\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).entity_ref,\n },\n {\n title: <Text>Kind</Text>,\n sorting: true,\n field: 'kind',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).unprocessed_entity.kind,\n },\n {\n title: <Text>Owner</Text>,\n sorting: true,\n field: 'unprocessed_entity.spec.owner',\n render: (rowData: UnprocessedEntity | {}) =>\n (rowData as UnprocessedEntity).unprocessed_entity.spec?.owner ||\n 'unknown',\n },\n {\n title: <Text>Raw</Text>,\n sorting: false,\n render: (rowData: UnprocessedEntity | {}) => (\n <EntityDialog entity={rowData as UnprocessedEntity} />\n ),\n },\n ];\n return (\n <>\n <Table\n options={{ pageSize: 20, search: true }}\n columns={columns}\n data={data?.entities || []}\n emptyContent={\n <Alert\n status=\"info\"\n title=\"No pending entities found\"\n style={{ placeSelf: 'center', margin: 'var(--bui-space-4)' }}\n />\n }\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA6BO,MAAM,kBAAkB,MAAM;AACnC,EAAA,MAAM,cAAA,GAAiB,OAAO,gCAAgC,CAAA;AAC9D,EAAA,MAAM;AAAA,IACJ,OAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA,EAAO;AAAA,MACL,QAAA,CAAS,YAAY,MAAM,cAAA,CAAe,SAAS,CAAA;AAEvD,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB;AACA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,uBAAO,GAAA,CAAC,cAAW,KAAA,EAAc,CAAA;AAAA,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AAA;AAAA,MACC,OAAA,EAAS,EAAE,QAAA,EAAU,EAAA,EAAI,QAAQ,IAAA,EAAK;AAAA,MACtC,OAAA;AAAA,MACA,IAAA,EAAM,IAAA,EAAM,QAAA,IAAY,EAAC;AAAA,MACzB,YAAA,kBACE,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,MAAA,EAAO,MAAA;AAAA,UACP,KAAA,EAAM,2BAAA;AAAA,UACN,KAAA,EAAO,EAAE,SAAA,EAAW,QAAA,EAAU,QAAQ,oBAAA;AAAqB;AAAA;AAC7D;AAAA,GAEJ,EACF,CAAA;AAEJ;;;;"}
@@ -1,34 +1,17 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { useState } from 'react';
3
2
  import { Page, Header, Content } from '@backstage/core-components';
4
- import { HeaderPage } from '@backstage/ui';
5
- import Tab from '@material-ui/core/Tab';
6
- import { makeStyles } from '@material-ui/core/styles';
7
- import TabContext from '@material-ui/lab/TabContext';
8
- import TabList from '@material-ui/lab/TabList';
9
- import TabPanel from '@material-ui/lab/TabPanel';
3
+ import { Tabs, TabList, Tab, TabPanel, Header as Header$1 } from '@backstage/ui';
10
4
  import { FailedEntities } from './FailedEntities.esm.js';
11
5
  import { PendingEntities } from './PendingEntities.esm.js';
12
6
 
13
- const useStyles = makeStyles(() => ({
14
- tabPanel: {
15
- paddingLeft: "0px",
16
- paddingRight: "0px"
17
- }
18
- }));
19
7
  const UnprocessedEntitiesContent = () => {
20
- const classes = useStyles();
21
- const [tab, setTab] = useState("failed");
22
- const handleChange = (_event, tabValue) => {
23
- setTab(tabValue);
24
- };
25
- return /* @__PURE__ */ jsxs(TabContext, { value: tab, children: [
26
- /* @__PURE__ */ jsxs(TabList, { onChange: handleChange, children: [
27
- /* @__PURE__ */ jsx(Tab, { label: "Failed", value: "failed" }),
28
- /* @__PURE__ */ jsx(Tab, { label: "Pending", value: "pending" })
8
+ return /* @__PURE__ */ jsxs(Tabs, { defaultSelectedKey: "failed", children: [
9
+ /* @__PURE__ */ jsxs(TabList, { children: [
10
+ /* @__PURE__ */ jsx(Tab, { id: "failed", children: "Failed" }),
11
+ /* @__PURE__ */ jsx(Tab, { id: "pending", children: "Pending" })
29
12
  ] }),
30
- /* @__PURE__ */ jsx(TabPanel, { value: "failed", className: classes.tabPanel, children: /* @__PURE__ */ jsx(FailedEntities, {}) }),
31
- /* @__PURE__ */ jsx(TabPanel, { value: "pending", className: classes.tabPanel, children: /* @__PURE__ */ jsx(PendingEntities, {}) })
13
+ /* @__PURE__ */ jsx(TabPanel, { id: "failed", children: /* @__PURE__ */ jsx(FailedEntities, {}) }),
14
+ /* @__PURE__ */ jsx(TabPanel, { id: "pending", children: /* @__PURE__ */ jsx(PendingEntities, {}) })
32
15
  ] });
33
16
  };
34
17
  const UnprocessedEntities = () => {
@@ -39,7 +22,7 @@ const UnprocessedEntities = () => {
39
22
  };
40
23
  const NfsUnprocessedEntities = () => {
41
24
  return /* @__PURE__ */ jsxs(Fragment, { children: [
42
- /* @__PURE__ */ jsx(HeaderPage, { title: "Unprocessed Entities" }),
25
+ /* @__PURE__ */ jsx(Header$1, { title: "Unprocessed Entities" }),
43
26
  /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(UnprocessedEntitiesContent, {}) })
44
27
  ] });
45
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"UnprocessedEntities.esm.js","sources":["../../src/components/UnprocessedEntities.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ChangeEvent, useState } from 'react';\n\nimport { Page, Header, Content } from '@backstage/core-components';\nimport { HeaderPage } from '@backstage/ui';\nimport Tab from '@material-ui/core/Tab';\nimport { makeStyles } from '@material-ui/core/styles';\nimport TabContext from '@material-ui/lab/TabContext';\nimport TabList from '@material-ui/lab/TabList';\nimport TabPanel from '@material-ui/lab/TabPanel';\n\nimport { FailedEntities } from './FailedEntities';\nimport { PendingEntities } from './PendingEntities';\n\nconst useStyles = makeStyles(() => ({\n tabPanel: {\n paddingLeft: '0px',\n paddingRight: '0px',\n },\n}));\n\n/** @public */\nexport const UnprocessedEntitiesContent = () => {\n const classes = useStyles();\n const [tab, setTab] = useState('failed');\n const handleChange = (_event: ChangeEvent<{}>, tabValue: string) => {\n setTab(tabValue);\n };\n\n return (\n <TabContext value={tab}>\n <TabList onChange={handleChange}>\n <Tab label=\"Failed\" value=\"failed\" />\n <Tab label=\"Pending\" value=\"pending\" />\n </TabList>\n <TabPanel value=\"failed\" className={classes.tabPanel}>\n <FailedEntities />\n </TabPanel>\n <TabPanel value=\"pending\" className={classes.tabPanel}>\n <PendingEntities />\n </TabPanel>\n </TabContext>\n );\n};\n\nexport const UnprocessedEntities = () => {\n return (\n <Page themeId=\"tool\">\n <Header title=\"Unprocessed Entities\" />\n <Content>\n <UnprocessedEntitiesContent />\n </Content>\n </Page>\n );\n};\n\nexport const NfsUnprocessedEntities = () => {\n return (\n <>\n <HeaderPage title=\"Unprocessed Entities\" />\n <Content>\n <UnprocessedEntitiesContent />\n </Content>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA4BA,MAAM,SAAA,GAAY,WAAW,OAAO;AAAA,EAClC,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,KAAA;AAAA,IACb,YAAA,EAAc;AAAA;AAElB,CAAA,CAAE,CAAA;AAGK,MAAM,6BAA6B,MAAM;AAC9C,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,CAAC,GAAA,EAAK,MAAM,CAAA,GAAI,SAAS,QAAQ,CAAA;A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A,EAAA,EAAW,OAAM,sBAAA,EAAuB,CAAA;AAAA,oBACzC,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,0BAAA,EAAA,EAA2B,CAAA,EAC9B;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"UnprocessedEntities.esm.js","sources":["../../src/components/UnprocessedEntities.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Page, Header, Content } from '@backstage/core-components';\nimport {\n Header as UiHeader,\n Tabs,\n Tab,\n TabList,\n TabPanel,\n} from '@backstage/ui';\n\nimport { FailedEntities } from './FailedEntities';\nimport { PendingEntities } from './PendingEntities';\n\n/** @public */\nexport const UnprocessedEntitiesContent = () => {\n return (\n <Tabs defaultSelectedKey=\"failed\">\n <TabList>\n <Tab id=\"failed\">Failed</Tab>\n <Tab id=\"pending\">Pending</Tab>\n </TabList>\n <TabPanel id=\"failed\">\n <FailedEntities />\n </TabPanel>\n <TabPanel id=\"pending\">\n <PendingEntities />\n </TabPanel>\n </Tabs>\n );\n};\n\nexport const UnprocessedEntities = () => {\n return (\n <Page themeId=\"tool\">\n <Header title=\"Unprocessed Entities\" />\n <Content>\n <UnprocessedEntitiesContent />\n </Content>\n </Page>\n );\n};\n\nexport const NfsUnprocessedEntities = () => {\n return (\n <>\n <UiHeader title=\"Unprocessed Entities\" />\n <Content>\n <UnprocessedEntitiesContent />\n </Content>\n </>\n );\n};\n"],"names":["UiHeader"],"mappings":";;;;;;AA4BO,MAAM,6BAA6B,MAAM;AAC9C,E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if ( ref === void 0 ) ref = {};
3
+ var insertAt = ref.insertAt;
4
+
5
+ if (!css || typeof document === 'undefined') { return; }
6
+
7
+ var head = document.head || document.getElementsByTagName('head')[0];
8
+ var style = document.createElement('style');
9
+ style.type = 'text/css';
10
+
11
+ if (insertAt === 'top') {
12
+ if (head.firstChild) {
13
+ head.insertBefore(style, head.firstChild);
14
+ } else {
15
+ head.appendChild(style);
16
+ }
17
+ } else {
18
+ head.appendChild(style);
19
+ }
20
+
21
+ if (style.styleSheet) {
22
+ style.styleSheet.cssText = css;
23
+ } else {
24
+ style.appendChild(document.createTextNode(css));
25
+ }
26
+ }
27
+
28
+ export { styleInject as default };
29
+ //# sourceMappingURL=style-inject.es.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-inject.es.esm.js","sources":["../../../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,CAAC;;AAEzD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,IAAI,CAAC,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B,IAAI;AACJ,EAAE,CAAC,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,EAAE;;AAEF,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,EAAE,CAAC,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD,EAAE;AACF;;;;","x_google_ignoreList":[0]}
@@ -1,6 +1,7 @@
1
1
  import { createPlugin, createApiFactory, fetchApiRef, discoveryApiRef, createRoutableExtension } from '@backstage/core-plugin-api';
2
2
  import { rootRouteRef } from './routes.esm.js';
3
- import { CatalogUnprocessedEntitiesClient, catalogUnprocessedEntitiesApiRef } from './api/index.esm.js';
3
+ import { catalogUnprocessedEntitiesApiRef } from './api/index.esm.js';
4
+ import { CatalogUnprocessedEntitiesClient as CatalogUnprocessedEntitiesClient$1 } from '@backstage/plugin-catalog-unprocessed-entities-common';
4
5
 
5
6
  const catalogUnprocessedEntitiesPlugin = createPlugin({
6
7
  id: "catalog-unprocessed-entities",
@@ -11,7 +12,7 @@ const catalogUnprocessedEntitiesPlugin = createPlugin({
11
12
  createApiFactory({
12
13
  api: catalogUnprocessedEntitiesApiRef,
13
14
  deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },
14
- factory: ({ discoveryApi, fetchApi }) => new CatalogUnprocessedEntitiesClient(discoveryApi, fetchApi)
15
+ factory: ({ discoveryApi, fetchApi }) => new CatalogUnprocessedEntitiesClient$1(discoveryApi, fetchApi)
15
16
  })
16
17
  ]
17
18
  });
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\nimport {\n CatalogUnprocessedEntitiesClient,\n catalogUnprocessedEntitiesApiRef,\n} from './api';\n\n/**\n * Plugin entry point\n *\n * @public\n */\nexport const catalogUnprocessedEntitiesPlugin = createPlugin({\n id: 'catalog-unprocessed-entities',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: catalogUnprocessedEntitiesApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogUnprocessedEntitiesClient(discoveryApi, fetchApi),\n }),\n ],\n});\n\n/**\n * Tool page for the Catalog Unprocessed Entities Plugin\n *\n * @public\n */\nexport const CatalogUnprocessedEntitiesPage =\n catalogUnprocessedEntitiesPlugin.provide(\n createRoutableExtension({\n name: 'CatalogUnprocessedEntitiesPage',\n component: () =>\n import('./components/UnprocessedEntities').then(\n m => m.UnprocessedEntities,\n ),\n mountPoint: rootRouteRef,\n }),\n );\n"],"names":[],"mappings":";;;;AAkCO,MAAM,mCAAmC,YAAA,CAAa;AAAA,EAC3D,EAAA,EAAI,8BAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,gCAAA;AAAA,MACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,UAAU,WAAA,EAAY;AAAA,MAC7D,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,UAAS,KACjC,IAAI,gCAAA,CAAiC,YAAA,EAAc,QAAQ;AAAA,KAC9D;AAAA;AAEL,CAAC;AAOM,MAAM,iCACX,gCAAA,CAAiC,OAAA;AAAA,EAC/B,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,gCAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,yCAAkC,CAAA,CAAE,IAAA;AAAA,MACzC,OAAK,CAAA,CAAE;AAAA,KACT;AAAA,IACF,UAAA,EAAY;AAAA,GACb;AACH;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\nimport { catalogUnprocessedEntitiesApiRef } from './api';\nimport { CatalogUnprocessedEntitiesClient } from '@backstage/plugin-catalog-unprocessed-entities-common';\n\n/**\n * Plugin entry point\n *\n * @public\n */\nexport const catalogUnprocessedEntitiesPlugin = createPlugin({\n id: 'catalog-unprocessed-entities',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: catalogUnprocessedEntitiesApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogUnprocessedEntitiesClient(discoveryApi, fetchApi),\n }),\n ],\n});\n\n/**\n * Tool page for the Catalog Unprocessed Entities Plugin\n *\n * @public\n */\nexport const CatalogUnprocessedEntitiesPage =\n catalogUnprocessedEntitiesPlugin.provide(\n createRoutableExtension({\n name: 'CatalogUnprocessedEntitiesPage',\n component: () =>\n import('./components/UnprocessedEntities').then(\n m => m.UnprocessedEntities,\n ),\n mountPoint: rootRouteRef,\n }),\n );\n"],"names":["CatalogUnprocessedEntitiesClient"],"mappings":";;;;;AAgCO,MAAM,mCAAmC,YAAA,CAAa;AAAA,EAC3D,EAAA,EAAI,8BAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,gCAAA;AAAA,MACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,UAAU,WAAA,EAAY;AAAA,MAC7D,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,UAAS,KACjC,IAAIA,kCAAA,CAAiC,YAAA,EAAc,QAAQ;AAAA,KAC9D;AAAA;AAEL,CAAC;AAOM,MAAM,iCACX,gCAAA,CAAiC,OAAA;AAAA,EAC/B,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,gCAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,yCAAkC,CAAA,CAAE,IAAA;AAAA,MACzC,OAAK,CAAA,CAAE;AAAA,KACT;AAAA,IACF,UAAA,EAAY;AAAA,GACb;AACH;;;;"}
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage/plugin-catalog-unprocessed-entities";
2
- var version = "0.2.33";
2
+ var version = "0.2.34-next.1";
3
3
  var backstage = {
4
4
  role: "frontend-plugin",
5
5
  pluginId: "catalog-unprocessed-entities",
@@ -56,17 +56,20 @@ var dependencies = {
56
56
  "@backstage/frontend-plugin-api": "workspace:^",
57
57
  "@backstage/plugin-catalog-unprocessed-entities-common": "workspace:^",
58
58
  "@backstage/ui": "workspace:^",
59
- "@material-ui/core": "^4.9.13",
60
- "@material-ui/icons": "^4.9.1",
61
- "@material-ui/lab": "^4.0.0-alpha.60",
59
+ "@remixicon/react": ">=4.6.0 <4.9.0",
62
60
  luxon: "^3.5.0",
63
61
  "react-use": "^17.2.4"
64
62
  };
65
63
  var devDependencies = {
66
64
  "@backstage/cli": "workspace:^",
67
65
  "@backstage/dev-utils": "workspace:^",
66
+ "@backstage/frontend-test-utils": "workspace:^",
67
+ "@backstage/plugin-catalog": "workspace:^",
68
+ "@backstage/plugin-org": "workspace:^",
69
+ "@backstage/test-utils": "workspace:^",
68
70
  "@testing-library/jest-dom": "^6.0.0",
69
71
  "@testing-library/react": "^16.0.0",
72
+ "@testing-library/user-event": "^14.0.0",
70
73
  "@types/react": "^18.0.0",
71
74
  react: "^18.0.2",
72
75
  "react-dom": "^18.0.2",
@@ -1 +1 @@
1
- {"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-unprocessed-entities",
3
- "version": "0.2.33",
3
+ "version": "0.2.34-next.1",
4
4
  "backstage": {
5
5
  "role": "frontend-plugin",
6
6
  "pluginId": "catalog-unprocessed-entities",
@@ -62,24 +62,27 @@
62
62
  "test": "backstage-cli package test"
63
63
  },
64
64
  "dependencies": {
65
- "@backstage/core-compat-api": "^0.5.13",
66
- "@backstage/core-components": "^0.18.12",
67
- "@backstage/core-plugin-api": "^1.12.8",
68
- "@backstage/errors": "^1.3.1",
69
- "@backstage/frontend-plugin-api": "^0.17.3",
70
- "@backstage/plugin-catalog-unprocessed-entities-common": "^0.0.16",
71
- "@backstage/ui": "^0.17.0",
72
- "@material-ui/core": "^4.9.13",
73
- "@material-ui/icons": "^4.9.1",
74
- "@material-ui/lab": "^4.0.0-alpha.60",
65
+ "@backstage/core-compat-api": "0.5.14-next.1",
66
+ "@backstage/core-components": "0.18.13-next.2",
67
+ "@backstage/core-plugin-api": "1.12.9-next.0",
68
+ "@backstage/errors": "1.3.1",
69
+ "@backstage/frontend-plugin-api": "0.18.0-next.0",
70
+ "@backstage/plugin-catalog-unprocessed-entities-common": "0.0.16",
71
+ "@backstage/ui": "0.17.1-next.0",
72
+ "@remixicon/react": ">=4.6.0 <4.9.0",
75
73
  "luxon": "^3.5.0",
76
74
  "react-use": "^17.2.4"
77
75
  },
78
76
  "devDependencies": {
79
- "@backstage/cli": "^0.36.4",
80
- "@backstage/dev-utils": "^1.1.25",
77
+ "@backstage/cli": "0.36.5-next.1",
78
+ "@backstage/dev-utils": "1.1.26-next.2",
79
+ "@backstage/frontend-test-utils": "0.6.3-next.1",
80
+ "@backstage/plugin-catalog": "2.0.8-next.2",
81
+ "@backstage/plugin-org": "0.7.7-next.1",
82
+ "@backstage/test-utils": "1.7.21-next.1",
81
83
  "@testing-library/jest-dom": "^6.0.0",
82
84
  "@testing-library/react": "^16.0.0",
85
+ "@testing-library/user-event": "^14.0.0",
83
86
  "@types/react": "^18.0.0",
84
87
  "react": "^18.0.2",
85
88
  "react-dom": "^18.0.2",