@bcgov/plugin-catalog-dataset 0.1.0 → 0.2.5-feature.aps-4105-connect-pipelines.8e93874b
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.
- package/dist/components/CatalogDataset/AboutDatasetCard.esm.js +24 -0
- package/dist/components/CatalogDataset/AboutDatasetCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/AccessMethodsCard.esm.js +72 -0
- package/dist/components/CatalogDataset/AccessMethodsCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/AuthoritativeDesignationCard.esm.js +30 -0
- package/dist/components/CatalogDataset/AuthoritativeDesignationCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/CatalogDatasetPage.esm.js +121 -0
- package/dist/components/CatalogDataset/CatalogDatasetPage.esm.js.map +1 -0
- package/dist/components/CatalogDataset/DatasetApisDialog.esm.js +141 -0
- package/dist/components/CatalogDataset/DatasetApisDialog.esm.js.map +1 -0
- package/dist/components/CatalogDataset/FieldsAndDefinitionCard.esm.js +23 -0
- package/dist/components/CatalogDataset/FieldsAndDefinitionCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/LineageAndQualityCard.esm.js +52 -0
- package/dist/components/CatalogDataset/LineageAndQualityCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/MainCard.esm.js +131 -0
- package/dist/components/CatalogDataset/MainCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/RelatedResourcesCard.esm.js +33 -0
- package/dist/components/CatalogDataset/RelatedResourcesCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/SchemaCard.esm.js +164 -0
- package/dist/components/CatalogDataset/SchemaCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/SupportCard.esm.js +86 -0
- package/dist/components/CatalogDataset/SupportCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/VersioningAndChangeGovernanceCard.esm.js +57 -0
- package/dist/components/CatalogDataset/VersioningAndChangeGovernanceCard.esm.js.map +1 -0
- package/dist/components/CatalogDataset/index.esm.js +2 -0
- package/dist/components/CatalogDataset/index.esm.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/plugin.esm.js +19 -0
- package/dist/plugin.esm.js.map +1 -0
- package/dist/routes.esm.js +8 -0
- package/dist/routes.esm.js.map +1 -0
- package/package.json +17 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Card, CardHeader, CardContent } from '@material-ui/core';
|
|
3
|
+
import { MarkdownContent } from '@backstage/core-components';
|
|
4
|
+
|
|
5
|
+
const AboutDatasetCard = ({ description }) => {
|
|
6
|
+
return /* @__PURE__ */ jsxs(
|
|
7
|
+
Card,
|
|
8
|
+
{
|
|
9
|
+
style: {
|
|
10
|
+
borderRadius: 8,
|
|
11
|
+
marginBottom: 16,
|
|
12
|
+
border: "2px solid rgba(0,0,0,0.23)"
|
|
13
|
+
},
|
|
14
|
+
variant: "outlined",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(CardHeader, { title: "About this dataset" }),
|
|
17
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(MarkdownContent, { content: description ?? "No description provided." }) })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { AboutDatasetCard };
|
|
24
|
+
//# sourceMappingURL=AboutDatasetCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AboutDatasetCard.esm.js","sources":["../../../src/components/CatalogDataset/AboutDatasetCard.tsx"],"sourcesContent":["import { Card, CardHeader, CardContent } from '@material-ui/core';\nimport { MarkdownContent } from '@backstage/core-components';\n\ntype Props = {\n description?: string;\n};\n\nexport const AboutDatasetCard = ({ description }: Props) => {\n return (\n <Card\n style={{\n borderRadius: 8,\n marginBottom: 16,\n border: '2px solid rgba(0,0,0,0.23)',\n }}\n variant=\"outlined\"\n >\n <CardHeader title=\"About this dataset\" />\n <CardContent>\n <MarkdownContent content={description ?? 'No description provided.'} />\n </CardContent>\n </Card>\n );\n};"],"names":[],"mappings":";;;;AAOO,MAAM,gBAAA,GAAmB,CAAC,EAAE,WAAA,EAAY,KAAa;AAC1D,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACD,KAAA,EAAO;AAAA,QACH,YAAA,EAAc,CAAA;AAAA,QACd,YAAA,EAAc,EAAA;AAAA,QACd,MAAA,EAAQ;AAAA,OACZ;AAAA,MACA,OAAA,EAAQ,UAAA;AAAA,MAEN,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAM,oBAAA,EAAqB,CAAA;AAAA,4BACtC,WAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,mBAAgB,OAAA,EAAS,WAAA,IAAe,4BAA4B,CAAA,EACvE;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { Card, CardHeader, CardContent, Typography, Link } from '@material-ui/core';
|
|
3
|
+
import { EntityRefLink } from '@backstage/plugin-catalog-react';
|
|
4
|
+
|
|
5
|
+
const AccessMethodsCard = ({
|
|
6
|
+
accessMethods,
|
|
7
|
+
apiEntityRefs
|
|
8
|
+
}) => {
|
|
9
|
+
const hasApis = !!apiEntityRefs?.length;
|
|
10
|
+
const hasOther = !!accessMethods?.length;
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
Card,
|
|
13
|
+
{
|
|
14
|
+
style: {
|
|
15
|
+
borderRadius: 8,
|
|
16
|
+
marginBottom: 16,
|
|
17
|
+
border: "2px solid rgba(0,0,0,0.23)"
|
|
18
|
+
},
|
|
19
|
+
variant: "outlined",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(CardHeader, { title: "Access Methods" }),
|
|
22
|
+
/* @__PURE__ */ jsx(CardContent, { children: !hasApis && !hasOther ? /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "No access methods defined." }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
+
hasApis && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
Typography,
|
|
26
|
+
{
|
|
27
|
+
variant: "subtitle1",
|
|
28
|
+
style: { marginBottom: 8, fontWeight: 600 },
|
|
29
|
+
children: "APIs"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: apiEntityRefs.map((apiRef) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(EntityRefLink, { entityRef: apiRef }) }, apiRef)) })
|
|
33
|
+
] }),
|
|
34
|
+
hasOther && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
Typography,
|
|
37
|
+
{
|
|
38
|
+
variant: "subtitle1",
|
|
39
|
+
style: { marginTop: hasApis ? 16 : 0, marginBottom: 8, fontWeight: 600 },
|
|
40
|
+
children: "Other"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: accessMethods.map((m) => /* @__PURE__ */ jsxs("li", { style: { marginBottom: 8 }, children: [
|
|
44
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
Link,
|
|
47
|
+
{
|
|
48
|
+
href: m.url,
|
|
49
|
+
target: "_blank",
|
|
50
|
+
rel: "noopener noreferrer",
|
|
51
|
+
children: m.title
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
(m.type || m.format) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
|
+
" ",
|
|
56
|
+
"(",
|
|
57
|
+
m.type,
|
|
58
|
+
m.format ? ` \u2022 ${m.format}` : "",
|
|
59
|
+
")"
|
|
60
|
+
] })
|
|
61
|
+
] }),
|
|
62
|
+
m.description && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", style: { whiteSpace: "pre-line" }, children: m.description })
|
|
63
|
+
] }, m.id)) })
|
|
64
|
+
] })
|
|
65
|
+
] }) })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export { AccessMethodsCard };
|
|
72
|
+
//# sourceMappingURL=AccessMethodsCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessMethodsCard.esm.js","sources":["../../../src/components/CatalogDataset/AccessMethodsCard.tsx"],"sourcesContent":["import {\n Card,\n CardHeader,\n CardContent,\n Typography,\n Link\n} from '@material-ui/core';\nimport { EntityRefLink } from '@backstage/plugin-catalog-react';\n\ntype AccessMethod = {\n id: string;\n title: string;\n url: string;\n type?: string;\n format?: string;\n description?: string;\n};\n\ntype Props = {\n accessMethods?: AccessMethod[];\n apiEntityRefs?: string[];\n};\n\nexport const AccessMethodsCard = ({\n accessMethods,\n apiEntityRefs,\n}: Props) => {\n const hasApis = !!apiEntityRefs?.length;\n const hasOther = !!accessMethods?.length;\n\n return (\n <Card\n style={{\n borderRadius: 8,\n marginBottom: 16,\n border: '2px solid rgba(0,0,0,0.23)',\n }}\n variant=\"outlined\"\n >\n <CardHeader title=\"Access Methods\" />\n <CardContent>\n {!hasApis && !hasOther ? (\n <Typography variant=\"body2\">\n No access methods defined.\n </Typography>\n ) : (\n <>\n {hasApis && (\n <>\n <Typography\n variant=\"subtitle1\"\n style={{ marginBottom: 8, fontWeight: 600 }}\n >\n APIs\n </Typography>\n\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {apiEntityRefs!.map(apiRef => (\n <li key={apiRef}>\n <EntityRefLink entityRef={apiRef} />\n </li>\n ))}\n </ul>\n </>\n )}\n\n {hasOther && (\n <>\n <Typography\n variant=\"subtitle1\"\n style={{ marginTop: hasApis ? 16 : 0, marginBottom: 8, fontWeight: 600 }}\n >\n Other\n </Typography>\n\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {accessMethods!.map(m => (\n <li key={m.id} style={{ marginBottom: 8 }}>\n <Typography variant=\"body2\">\n <Link\n href={m.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {m.title}\n </Link>\n {(m.type || m.format) && (\n <>\n {' '}\n ({m.type}\n {m.format ? ` • ${m.format}` : ''})\n </>\n )}\n </Typography>\n\n {m.description && (\n <Typography variant=\"body2\" color=\"textSecondary\" style={{ whiteSpace: 'pre-line' }}>\n {m.description}\n </Typography>\n )}\n </li>\n ))}\n </ul>\n </>\n )}\n </>\n )}\n </CardContent>\n </Card>\n );\n};"],"names":[],"mappings":";;;;AAuBO,MAAM,oBAAoB,CAAC;AAAA,EAChC,aAAA;AAAA,EACA;AACF,CAAA,KAAa;AACX,EAAA,MAAM,OAAA,GAAU,CAAC,CAAC,aAAA,EAAe,MAAA;AACjC,EAAA,MAAM,QAAA,GAAW,CAAC,CAAC,aAAA,EAAe,MAAA;AAElC,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO;AAAA,QACL,YAAA,EAAc,CAAA;AAAA,QACd,YAAA,EAAc,EAAA;AAAA,QACd,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,OAAA,EAAQ,UAAA;AAAA,MAER,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAM,gBAAA,EAAiB,CAAA;AAAA,wBACnC,GAAA,CAAC,WAAA,EAAA,EACE,QAAA,EAAA,CAAC,OAAA,IAAW,CAAC,QAAA,mBACZ,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,O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A;AAAA,gCAAA,GAAA;AAAA,kBAAC,IAAA;AAAA,kBAAA;AAAA,oBACD,MAAM,CAAA,CAAE,GAAA;AAAA,oBACR,MAAA,EAAO,QAAA;AAAA,oBACP,GAAA,EAAI,qBAAA;AAAA,oBAEH,QAAA,EAAA,CAAA,CAAE;AAAA;AAAA,iBACH;AAAA,gBAAA,CACE,CAAA,CAAE,IAAA,IAAQ,CAAA,CAAE,MAAA,qBACd,IAAA,CAAA,QAAA,EAAA,EACK,QAAA,EAAA;AAAA,kBAAA,GAAA;AAAA,kBAAI,GAAA;AAAA,kBACH,CAAA,CAAE,IAAA;AAAA,kBACH,CAAA,CAAE,MAAA,GAAS,CAAA,QAAA,EAAM,CAAA,CAAE,MAAM,CAAA,CAAA,GAAK,EAAA;AAAA,kBAAG;AAAA,iBAAA,EACtC;AAAA,eAAA,EAEJ,CAAA;AAAA,cAEC,CAAA,CAAE,WAAA,oBACC,GAAA,CAAC,UAAA,EAAA,EAAW,SAAQ,OAAA,EAAQ,KAAA,EAAM,eAAA,EAAgB,KAAA,EAAO,EAAE,UAAA,EAAY,UAAA,EAAW,EACjF,YAAE,WAAA,EACH;AAAA,aAAA,EAAA,EArBK,CAAA,CAAE,EAuBX,CACD,CAAA,EACH;AAAA,WAAA,EACF;AAAA,SAAA,EAEJ,CAAA,EAEJ;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Card, CardHeader, CardContent, Typography } from '@material-ui/core';
|
|
3
|
+
|
|
4
|
+
const AuthoritativeDesignationCard = ({}) => {
|
|
5
|
+
return /* @__PURE__ */ jsxs(
|
|
6
|
+
Card,
|
|
7
|
+
{
|
|
8
|
+
style: {
|
|
9
|
+
borderRadius: 8,
|
|
10
|
+
marginBottom: 16,
|
|
11
|
+
border: "2px solid rgba(0,0,0,0.23)"
|
|
12
|
+
},
|
|
13
|
+
variant: "outlined",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx(CardHeader, { title: "Authoritative Designation" }),
|
|
16
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
17
|
+
"This dataset is designated authoritative. Authoritative status means:",
|
|
18
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
19
|
+
/* @__PURE__ */ jsx("li", { children: "Stewardship accountability is assigned." }),
|
|
20
|
+
/* @__PURE__ */ jsx("li", { children: "Change management is governed." }),
|
|
21
|
+
/* @__PURE__ */ jsx("li", { children: "Definitions are standardized and versioned." })
|
|
22
|
+
] })
|
|
23
|
+
] }) })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { AuthoritativeDesignationCard };
|
|
30
|
+
//# sourceMappingURL=AuthoritativeDesignationCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoritativeDesignationCard.esm.js","sources":["../../../src/components/CatalogDataset/AuthoritativeDesignationCard.tsx"],"sourcesContent":["import { Card, CardHeader, CardContent, Typography } from '@material-ui/core';\n\ntype Props = {\n\n};\n\nexport const AuthoritativeDesignationCard = ({ }: Props) => {\n return (\n <Card\n style={{\n borderRadius: 8,\n marginBottom: 16,\n border: '2px solid rgba(0,0,0,0.23)',\n }}\n variant=\"outlined\"\n >\n <CardHeader title=\"Authoritative Designation\" />\n <CardContent>\n <Typography variant=\"body2\">\n This dataset is designated authoritative.\n\n Authoritative status means:\n <ul>\n <li>Stewardship accountability is assigned.</li>\n <li>Change management is governed.</li>\n <li>Definitions are standardized and versioned.</li>\n </ul>\n </Typography>\n </CardContent>\n </Card>\n );\n};"],"names":[],"mappings":";;;AAMO,MAAM,4BAAA,GAA+B,CAAC,EAAE,KAAa;AAC1D,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO;AAAA,QACL,YAAA,EAAc,CAAA;AAAA,QACd,YAAA,EAAc,EAAA;AAAA,QACd,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,OAAA,EAAQ,UAAA;AAAA,MAER,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAM,2BAAA,EAA4B,CAAA;AAAA,wBAC9C,GAAA,CAAC,WAAA,EAAA,EACC,QAAA,kBAAA,IAAA,CAAC,UAAA,EAAA,EAAW,SAAQ,OAAA,EAAQ,QAAA,EAAA;AAAA,UAAA,uEAAA;AAAA,+BAIzB,IAAA,EAAA,EACC,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,QAAG,QAAA,EAAA,yCAAA,EAAuC,CAAA;AAAA,4BAC3C,GAAA,CAAC,QAAG,QAAA,EAAA,gCAAA,EAA8B,CAAA;AAAA,4BAClC,GAAA,CAAC,QAAG,QAAA,EAAA,6CAAA,EAA2C;AAAA,WAAA,EACjD;AAAA,SAAA,EACF,CAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { Grid, Card, CardContent, Typography, Link } from '@material-ui/core';
|
|
3
|
+
import { EntityLayout, EntityRelationWarning } from '@backstage/plugin-catalog';
|
|
4
|
+
import { useEntity, catalogApiRef } from '@backstage/plugin-catalog-react';
|
|
5
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
6
|
+
import { useAsync } from 'react-use';
|
|
7
|
+
import { RELATION_PROVIDES_API } from '@backstage/catalog-model';
|
|
8
|
+
import { useState, useMemo } from 'react';
|
|
9
|
+
import { AboutDatasetCard } from './AboutDatasetCard.esm.js';
|
|
10
|
+
import { AuthoritativeDesignationCard } from './AuthoritativeDesignationCard.esm.js';
|
|
11
|
+
import { AccessMethodsCard } from './AccessMethodsCard.esm.js';
|
|
12
|
+
import { SchemaCard } from './SchemaCard.esm.js';
|
|
13
|
+
import { FieldsAndDefinitionCard } from './FieldsAndDefinitionCard.esm.js';
|
|
14
|
+
import { MainCard } from './MainCard.esm.js';
|
|
15
|
+
import { LineageAndQualityCard } from './LineageAndQualityCard.esm.js';
|
|
16
|
+
import { VersioningAndChangeGovernanceCard } from './VersioningAndChangeGovernanceCard.esm.js';
|
|
17
|
+
import { SupportCard } from './SupportCard.esm.js';
|
|
18
|
+
import { DatasetApisDialog } from './DatasetApisDialog.esm.js';
|
|
19
|
+
import { RelatedResourcesCard } from './RelatedResourcesCard.esm.js';
|
|
20
|
+
|
|
21
|
+
const CatalogDatasetPage = () => {
|
|
22
|
+
const { entity } = useEntity();
|
|
23
|
+
const spec = entity.spec;
|
|
24
|
+
const catalogApi = useApi(catalogApiRef);
|
|
25
|
+
const [apisOpen, setApisOpen] = useState(false);
|
|
26
|
+
const datasetTitle = entity.metadata.title ?? entity.metadata.name;
|
|
27
|
+
const { value: ownerEntity } = useAsync(
|
|
28
|
+
async () => {
|
|
29
|
+
if (!spec.owner) {
|
|
30
|
+
return void 0;
|
|
31
|
+
}
|
|
32
|
+
return await catalogApi.getEntityByRef(spec.owner);
|
|
33
|
+
},
|
|
34
|
+
[catalogApi, spec.owner]
|
|
35
|
+
);
|
|
36
|
+
const ownerLabel = ownerEntity?.spec?.profile?.displayName ?? ownerEntity?.metadata.title ?? ownerEntity?.metadata.name ?? spec.owner;
|
|
37
|
+
const apiEntityRefs = useMemo(() => {
|
|
38
|
+
const refs = entity.relations?.filter((relation) => relation.type === RELATION_PROVIDES_API).map((relation) => relation.targetRef) ?? spec.providesApis ?? [];
|
|
39
|
+
return [...new Set(refs)];
|
|
40
|
+
}, [entity.relations, spec.providesApis]);
|
|
41
|
+
return /* @__PURE__ */ jsx(EntityLayout, { children: /* @__PURE__ */ jsx(EntityLayout.Route, { path: "/", title: "Overview", children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
+
/* @__PURE__ */ jsx(EntityRelationWarning, {}),
|
|
43
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 3, children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, md: 4, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { marginBottom: 8 }, children: "On this page" }),
|
|
46
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#overview", children: "Overview" }) }),
|
|
47
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#about-this-dataset", children: "About this Dataset" }) }),
|
|
48
|
+
entity.metadata.tags?.includes("authoritative-data-register") ? /* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#authoritative-designation", children: "Authoritative Designation" }) }) : null,
|
|
49
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#access-methods", children: "Access Methods" }) }),
|
|
50
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#schema", children: "Schema" }) }),
|
|
51
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#fields-and-definitions", children: "Fields & definitions" }) }),
|
|
52
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#lineage-and-quality", children: "Lineage and Quality" }) }),
|
|
53
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#versioning-and-change-governance", children: "Versioning and Change Governance" }) }),
|
|
54
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#support", children: "Support" }) }),
|
|
55
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { href: "#related-resources", children: "Related Resources" }) })
|
|
56
|
+
] }) }) }),
|
|
57
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, xs: 12, md: 8, children: [
|
|
58
|
+
/* @__PURE__ */ jsx("div", { id: "overview", children: /* @__PURE__ */ jsx(
|
|
59
|
+
MainCard,
|
|
60
|
+
{
|
|
61
|
+
entity,
|
|
62
|
+
spec,
|
|
63
|
+
ownerLabel,
|
|
64
|
+
onViewApis: () => setApisOpen(true)
|
|
65
|
+
}
|
|
66
|
+
) }),
|
|
67
|
+
/* @__PURE__ */ jsx("div", { id: "about-this-dataset", children: /* @__PURE__ */ jsx(AboutDatasetCard, { description: spec.about?.description }) }),
|
|
68
|
+
entity.metadata.tags?.includes("authoritative-data-register") ? /* @__PURE__ */ jsx("div", { id: "authoritative-designation", children: /* @__PURE__ */ jsx(AuthoritativeDesignationCard, {}) }) : null,
|
|
69
|
+
/* @__PURE__ */ jsx("div", { id: "access-methods", children: /* @__PURE__ */ jsx(
|
|
70
|
+
AccessMethodsCard,
|
|
71
|
+
{
|
|
72
|
+
accessMethods: spec.accessMethods,
|
|
73
|
+
apiEntityRefs
|
|
74
|
+
}
|
|
75
|
+
) }),
|
|
76
|
+
/* @__PURE__ */ jsx("div", { id: "schema", children: /* @__PURE__ */ jsx(SchemaCard, { tables: spec.schema?.tables }) }),
|
|
77
|
+
/* @__PURE__ */ jsx("div", { id: "fields-and-definitions", children: /* @__PURE__ */ jsx(FieldsAndDefinitionCard, {}) }),
|
|
78
|
+
/* @__PURE__ */ jsx("div", { id: "lineage-and-quality", children: /* @__PURE__ */ jsx(
|
|
79
|
+
LineageAndQualityCard,
|
|
80
|
+
{
|
|
81
|
+
sourceSystem: spec.lineage?.sourceSystem,
|
|
82
|
+
transformation: spec.lineage?.transformation,
|
|
83
|
+
validation: spec.quality?.validation,
|
|
84
|
+
refresh: spec.lineage?.refresh,
|
|
85
|
+
qualityControls: spec.quality?.controls
|
|
86
|
+
}
|
|
87
|
+
) }),
|
|
88
|
+
/* @__PURE__ */ jsx("div", { id: "versioning-and-change-governance", children: /* @__PURE__ */ jsx(
|
|
89
|
+
VersioningAndChangeGovernanceCard,
|
|
90
|
+
{
|
|
91
|
+
currentVersion: spec.versioning?.currentVersion,
|
|
92
|
+
initialRelease: spec.versioning?.initialRelease,
|
|
93
|
+
lastUpdated: spec.versioning?.lastUpdated,
|
|
94
|
+
versioningDescription: spec.versioning?.description,
|
|
95
|
+
governanceDescription: spec.governance?.description
|
|
96
|
+
}
|
|
97
|
+
) }),
|
|
98
|
+
/* @__PURE__ */ jsx("div", { id: "support", children: /* @__PURE__ */ jsx(SupportCard, { support: spec.support }) }),
|
|
99
|
+
/* @__PURE__ */ jsx("div", { id: "related-resources", children: /* @__PURE__ */ jsx(
|
|
100
|
+
RelatedResourcesCard,
|
|
101
|
+
{
|
|
102
|
+
relatedResources: spec.relatedResources
|
|
103
|
+
}
|
|
104
|
+
) })
|
|
105
|
+
] })
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ jsx(
|
|
108
|
+
DatasetApisDialog,
|
|
109
|
+
{
|
|
110
|
+
open: apisOpen,
|
|
111
|
+
onClose: () => setApisOpen(false),
|
|
112
|
+
datasetTitle,
|
|
113
|
+
apiEntityRefs,
|
|
114
|
+
namespace: entity.metadata.namespace
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] }) }) });
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export { CatalogDatasetPage };
|
|
121
|
+
//# sourceMappingURL=CatalogDatasetPage.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CatalogDatasetPage.esm.js","sources":["../../../src/components/CatalogDataset/CatalogDatasetPage.tsx"],"sourcesContent":["import { Grid, Card, CardContent, Typography, Link } from '@material-ui/core';\nimport { EntityLayout, EntityRelationWarning } from '@backstage/plugin-catalog';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport type { DatasetEntity } from '@bcgov/plugin-catalog-common-bc-data-catalogue';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport { useAsync } from 'react-use';\nimport { RELATION_PROVIDES_API } from '@backstage/catalog-model';\nimport { useMemo, useState } from 'react';\nimport { AboutDatasetCard } from './AboutDatasetCard';\nimport { AuthoritativeDesignationCard } from './AuthoritativeDesignationCard';\nimport { AccessMethodsCard } from './AccessMethodsCard';\nimport { SchemaCard } from './SchemaCard';\nimport { FieldsAndDefinitionCard } from './FieldsAndDefinitionCard';\nimport { MainCard } from './MainCard';\nimport { LineageAndQualityCard } from './LineageAndQualityCard';\nimport { VersioningAndChangeGovernanceCard } from './VersioningAndChangeGovernanceCard';\nimport { SupportCard } from './SupportCard';\nimport { DatasetApisDialog } from './DatasetApisDialog';\nimport { RelatedResourcesCard } from './RelatedResourcesCard';\n\nexport const CatalogDatasetPage = () => {\n const { entity } = useEntity();\n const spec = (entity as DatasetEntity).spec;\n\n const catalogApi = useApi(catalogApiRef);\n const [apisOpen, setApisOpen] = useState(false);\n\n const datasetTitle = entity.metadata.title ?? entity.metadata.name;\n\n const { value: ownerEntity } = useAsync(\n async () => {\n if (!spec.owner) {\n return undefined;\n }\n return await catalogApi.getEntityByRef(spec.owner);\n },\n [catalogApi, spec.owner],\n );\n\n const ownerLabel =\n (ownerEntity?.spec?.profile as { displayName?: string } | undefined)?.displayName ??\n ownerEntity?.metadata.title ??\n ownerEntity?.metadata.name ??\n spec.owner;\n\n const apiEntityRefs = useMemo(() => {\n const refs =\n entity.relations\n ?.filter(relation => relation.type === RELATION_PROVIDES_API)\n .map(relation => relation.targetRef) ??\n spec.providesApis ??\n [];\n\n return [...new Set(refs)];\n }, [entity.relations, spec.providesApis]);\n\n return (\n <EntityLayout>\n <EntityLayout.Route path=\"/\" title=\"Overview\">\n <>\n <EntityRelationWarning />\n <Grid container spacing={3}>\n <Grid item xs={12} md={4}>\n <Card>\n <CardContent>\n <Typography variant=\"body2\" style={{ marginBottom: 8 }}>\n On this page\n </Typography>\n <Typography variant=\"body2\">\n <Link href=\"#overview\">\n Overview\n </Link>\n </Typography>\n <Typography variant=\"body2\">\n <Link href=\"#about-this-dataset\">\n About this Dataset\n </Link>\n </Typography>\n {entity.metadata.tags?.includes('authoritative-data-register') ? (\n <Typography variant=\"body2\">\n <Link href=\"#authoritative-designation\">\n Authoritative Designation\n </Link>\n </Typography>\n ) : null}\n <Typography variant=\"body2\">\n <Link href=\"#access-methods\">\n Access Methods\n </Link>\n </Typography>\n <Typography variant=\"body2\">\n <Link href=\"#schema\">\n Schema\n </Link>\n </Typography>\n <Typography variant=\"body2\">\n <Link href=\"#fields-and-definitions\">\n Fields & definitions\n </Link>\n </Typography>\n <Typography variant=\"body2\">\n <Link href=\"#lineage-and-quality\">\n Lineage and Quality\n </Link>\n </Typography>\n <Typography variant=\"body2\">\n <Link href=\"#versioning-and-change-governance\">\n Versioning and Change Governance\n </Link>\n </Typography>\n <Typography variant=\"body2\">\n <Link href=\"#support\">\n Support\n </Link>\n </Typography>\n <Typography variant=\"body2\">\n <Link href=\"#related-resources\">\n Related Resources\n </Link>\n </Typography>\n </CardContent>\n </Card>\n </Grid>\n\n <Grid item xs={12} md={8}>\n <div id=\"overview\">\n <MainCard\n entity={entity}\n spec={spec}\n ownerLabel={ownerLabel}\n onViewApis={() => setApisOpen(true)}\n />\n </div>\n\n <div id=\"about-this-dataset\">\n <AboutDatasetCard description={spec.about?.description} />\n </div>\n\n {entity.metadata.tags?.includes('authoritative-data-register') ? (\n <div id=\"authoritative-designation\">\n <AuthoritativeDesignationCard />\n </div>\n ) : null}\n\n <div id=\"access-methods\">\n <AccessMethodsCard\n accessMethods={spec.accessMethods}\n apiEntityRefs={apiEntityRefs}\n />\n </div>\n\n <div id=\"schema\">\n <SchemaCard tables={spec.schema?.tables} />\n </div>\n\n <div id=\"fields-and-definitions\">\n <FieldsAndDefinitionCard />\n </div>\n\n <div id=\"lineage-and-quality\">\n <LineageAndQualityCard\n sourceSystem={spec.lineage?.sourceSystem}\n transformation={spec.lineage?.transformation}\n validation={spec.quality?.validation}\n refresh={spec.lineage?.refresh}\n qualityControls={spec.quality?.controls}\n />\n </div>\n\n <div id=\"versioning-and-change-governance\">\n <VersioningAndChangeGovernanceCard\n currentVersion={spec.versioning?.currentVersion}\n initialRelease={spec.versioning?.initialRelease}\n lastUpdated={spec.versioning?.lastUpdated}\n versioningDescription={spec.versioning?.description}\n governanceDescription={spec.governance?.description}\n />\n </div>\n\n <div id=\"support\">\n <SupportCard support={spec.support} />\n </div>\n\n <div id=\"related-resources\">\n <RelatedResourcesCard\n relatedResources={spec.relatedResources}\n />\n </div>\n </Grid>\n </Grid>\n\n <DatasetApisDialog\n open={apisOpen}\n onClose={() => setApisOpen(false)}\n datasetTitle={datasetTitle}\n apiEntityRefs={apiEntityRefs}\n namespace={entity.metadata.namespace}\n />\n </>\n </EntityLayout.Route>\n </EntityLayout>\n );\n};"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBO,MAAM,qBAAqB,MAAM;AACtC,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,OAAQ,MAAA,CAAyB,IAAA;AAEvC,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,KAAK,CAAA;AAE9C,EAAA,MAAM,YAAA,GAAe,MAAA,CAAO,QAAA,CAAS,KAAA,IAAS,OAAO,QAAA,CAAS,IAAA;AAE9D,EAAA,MAAM,EAAE,KAAA,EAAO,WAAA,EAAY,GAAI,QAAA;AAAA,IAC7B,YAAY;AACV,MAAA,IAAI,CAAC,KAAK,KAAA,EAAO;AACf,QAAA,OAAO,MAAA;AAAA,MACT;AACA,MAAA,OAAO,MAAM,UAAA,CAAW,cAAA,CAAe,IAAA,CAAK,KAAK,CAAA;AAAA,IACnD,CAAA;AAAA,IAC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Y,OAAA,EAAS,IAAA,CAAK,OAAA,EAAS,CAAA,EACtC,CAAA;AAAA,wBAEA,GAAA,CAAC,KAAA,EAAA,EAAI,EAAA,EAAG,mBAAA,EACN,QAAA,kBAAA,GAAA;AAAA,UAAC,oBAAA;AAAA,UAAA;AAAA,YACC,kBAAkB,IAAA,CAAK;AAAA;AAAA,SACzB,EACF;AAAA,OAAA,EACF;AAAA,KAAA,EACF,CAAA;AAAA,oBAEA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,QAAA;AAAA,QACN,OAAA,EAAS,MAAM,WAAA,CAAY,KAAK,CAAA;AAAA,QAChC,YAAA;AAAA,QACA,aAAA;AAAA,QACA,SAAA,EAAW,OAAO,QAAA,CAAS;AAAA;AAAA;AAC7B,GAAA,EACF,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Dialog, DialogTitle, Typography, DialogContent, Grid, Card, CardContent, DialogActions, Button } from '@material-ui/core';
|
|
3
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
4
|
+
import { catalogApiRef, EntityRefLink } from '@backstage/plugin-catalog-react';
|
|
5
|
+
import { stringifyEntityRef, parseEntityRef } from '@backstage/catalog-model';
|
|
6
|
+
import { useAsync } from 'react-use';
|
|
7
|
+
import { getOpenApiSummary } from '@bcgov/plugin-catalog-common-bc-data-catalogue';
|
|
8
|
+
|
|
9
|
+
const DatasetApisDialog = ({
|
|
10
|
+
open,
|
|
11
|
+
onClose,
|
|
12
|
+
datasetTitle,
|
|
13
|
+
apiEntityRefs,
|
|
14
|
+
namespace
|
|
15
|
+
}) => {
|
|
16
|
+
const catalogApi = useApi(catalogApiRef);
|
|
17
|
+
const { value: apiEntities, loading: apiEntitiesLoading } = useAsync(
|
|
18
|
+
async () => {
|
|
19
|
+
if (!open || !apiEntityRefs.length) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
const resolved = await Promise.all(
|
|
23
|
+
apiEntityRefs.map(async (apiRef) => {
|
|
24
|
+
try {
|
|
25
|
+
return await catalogApi.getEntityByRef(apiRef);
|
|
26
|
+
} catch {
|
|
27
|
+
return void 0;
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
return resolved.filter(
|
|
32
|
+
(api) => Boolean(api)
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
[open, apiEntityRefs, catalogApi]
|
|
36
|
+
);
|
|
37
|
+
const { value: apiCards = [], loading: apiCardsLoading } = useAsync(
|
|
38
|
+
async () => {
|
|
39
|
+
if (!open || !apiEntities?.length) {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
return await Promise.all(
|
|
43
|
+
apiEntities.map(async (api) => {
|
|
44
|
+
const apiSpec = api.spec ?? {};
|
|
45
|
+
const openApiSummary = await getOpenApiSummary(apiSpec.definition);
|
|
46
|
+
return {
|
|
47
|
+
entityRef: stringifyEntityRef(api),
|
|
48
|
+
title: api.metadata.title ?? api.metadata.name,
|
|
49
|
+
type: apiSpec.type ?? "\u2014",
|
|
50
|
+
security: openApiSummary.securityRequirements ?? [],
|
|
51
|
+
environments: openApiSummary.environments ?? []
|
|
52
|
+
};
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
},
|
|
56
|
+
[open, apiEntities]
|
|
57
|
+
);
|
|
58
|
+
return /* @__PURE__ */ jsxs(Dialog, { open, onClose, fullWidth: true, maxWidth: "lg", children: [
|
|
59
|
+
/* @__PURE__ */ jsx(DialogTitle, { disableTypography: true, children: /* @__PURE__ */ jsx(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
style: {
|
|
63
|
+
display: "flex",
|
|
64
|
+
justifyContent: "space-between",
|
|
65
|
+
alignItems: "flex-start",
|
|
66
|
+
paddingBottom: 8
|
|
67
|
+
},
|
|
68
|
+
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h3", component: "h2", gutterBottom: true, children: "APIs" }),
|
|
70
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body1", children: [
|
|
71
|
+
"Dataset: ",
|
|
72
|
+
datasetTitle
|
|
73
|
+
] })
|
|
74
|
+
] })
|
|
75
|
+
}
|
|
76
|
+
) }),
|
|
77
|
+
/* @__PURE__ */ jsxs(DialogContent, { dividers: true, children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, style: { marginBottom: 20 }, children: "Consumed by:" }),
|
|
79
|
+
apiEntitiesLoading || apiCardsLoading ? /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Loading..." }) : apiCards.length ? /* @__PURE__ */ jsx(Grid, { container: true, spacing: 3, children: apiCards.map((api) => /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, md: 6, lg: 4, children: /* @__PURE__ */ jsx(
|
|
80
|
+
Card,
|
|
81
|
+
{
|
|
82
|
+
variant: "outlined",
|
|
83
|
+
style: {
|
|
84
|
+
height: "100%",
|
|
85
|
+
borderWidth: 2,
|
|
86
|
+
borderRadius: 8
|
|
87
|
+
},
|
|
88
|
+
children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
89
|
+
/* @__PURE__ */ jsx(
|
|
90
|
+
Typography,
|
|
91
|
+
{
|
|
92
|
+
variant: "h6",
|
|
93
|
+
gutterBottom: true,
|
|
94
|
+
style: { fontWeight: 600, textDecoration: "underline" },
|
|
95
|
+
children: /* @__PURE__ */ jsx(
|
|
96
|
+
EntityRefLink,
|
|
97
|
+
{
|
|
98
|
+
entityRef: api.entityRef,
|
|
99
|
+
title: api.title
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body1", children: [
|
|
105
|
+
"Type: ",
|
|
106
|
+
api.type
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", style: { marginTop: 8 }, children: /* @__PURE__ */ jsx("strong", { children: "Security:" }) }),
|
|
109
|
+
api.security.length ? /* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: api.security.map((s, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: s }) }, i)) }) : /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "\u2014" }),
|
|
110
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", style: { marginTop: 8 }, children: /* @__PURE__ */ jsx("strong", { children: "Environments:" }) }),
|
|
111
|
+
api.environments.length ? /* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: api.environments.map((e, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: e }) }, i)) }) : /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "\u2014" })
|
|
112
|
+
] })
|
|
113
|
+
}
|
|
114
|
+
) }, api.entityRef)) }) : /* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: apiEntityRefs.map((apiRef) => {
|
|
115
|
+
const parsed = parseEntityRef(apiRef, {
|
|
116
|
+
defaultKind: "API",
|
|
117
|
+
defaultNamespace: namespace ?? "default"
|
|
118
|
+
});
|
|
119
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
120
|
+
EntityRefLink,
|
|
121
|
+
{
|
|
122
|
+
entityRef: apiRef,
|
|
123
|
+
title: parsed.name
|
|
124
|
+
}
|
|
125
|
+
) }, apiRef);
|
|
126
|
+
}) })
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(
|
|
129
|
+
Button,
|
|
130
|
+
{
|
|
131
|
+
onClick: onClose,
|
|
132
|
+
color: "default",
|
|
133
|
+
style: { minWidth: "auto", padding: 0, textTransform: "none" },
|
|
134
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "h6", style: { textDecoration: "underline" }, children: "X Close" })
|
|
135
|
+
}
|
|
136
|
+
) })
|
|
137
|
+
] });
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export { DatasetApisDialog };
|
|
141
|
+
//# sourceMappingURL=DatasetApisDialog.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatasetApisDialog.esm.js","sources":["../../../src/components/CatalogDataset/DatasetApisDialog.tsx"],"sourcesContent":["import {\n Button,\n Card,\n CardContent,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Grid,\n Typography,\n} from '@material-ui/core';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef, EntityRefLink } from '@backstage/plugin-catalog-react';\nimport { parseEntityRef, stringifyEntityRef } from '@backstage/catalog-model';\nimport { useAsync } from 'react-use';\nimport { getOpenApiSummary } from '@bcgov/plugin-catalog-common-bc-data-catalogue';\n\ntype Props = {\n open: boolean;\n onClose: () => void;\n datasetTitle: string;\n apiEntityRefs: string[];\n namespace?: string;\n};\n\nexport const DatasetApisDialog = ({\n open,\n onClose,\n datasetTitle,\n apiEntityRefs,\n namespace,\n}: Props) => {\n const catalogApi = useApi(catalogApiRef);\n\n const { value: apiEntities, loading: apiEntitiesLoading } = useAsync(\n async () => {\n if (!open || !apiEntityRefs.length) {\n return [];\n }\n\n const resolved = await Promise.all(\n apiEntityRefs.map(async apiRef => {\n try {\n return await catalogApi.getEntityByRef(apiRef);\n } catch {\n return undefined;\n }\n }),\n );\n\n return resolved.filter(\n (api): api is NonNullable<typeof api> => Boolean(api),\n );\n },\n [open, apiEntityRefs, catalogApi],\n );\n\n const { value: apiCards = [], loading: apiCardsLoading } = useAsync(\n async () => {\n if (!open || !apiEntities?.length) {\n return [];\n }\n\n return await Promise.all(\n apiEntities.map(async api => {\n const apiSpec = (api.spec ?? {}) as Record<string, any>;\n const openApiSummary = await getOpenApiSummary(apiSpec.definition);\n\n return {\n entityRef: stringifyEntityRef(api),\n title: api.metadata.title ?? api.metadata.name,\n type: apiSpec.type ?? '—',\n security: openApiSummary.securityRequirements ?? [],\n environments: openApiSummary.environments ?? [],\n };\n }),\n );\n },\n [open, apiEntities],\n );\n\n return (\n <Dialog open={open} onClose={onClose} fullWidth maxWidth=\"lg\">\n <DialogTitle disableTypography>\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n paddingBottom: 8,\n }}\n >\n <div>\n <Typography variant=\"h3\" component=\"h2\" gutterBottom>\n APIs\n </Typography>\n <Typography variant=\"body1\">\n Dataset: {datasetTitle}\n </Typography>\n </div>\n </div>\n </DialogTitle>\n\n <DialogContent dividers>\n <Typography variant=\"h6\" gutterBottom style={{ marginBottom: 20 }}>\n Consumed by:\n </Typography>\n\n {apiEntitiesLoading || apiCardsLoading ? (\n <Typography variant=\"body2\">Loading...</Typography>\n ) : apiCards.length ? (\n <Grid container spacing={3}>\n {apiCards.map(api => (\n <Grid item xs={12} md={6} lg={4} key={api.entityRef}>\n <Card\n variant=\"outlined\"\n style={{\n height: '100%',\n borderWidth: 2,\n borderRadius: 8,\n }}\n >\n <CardContent>\n <Typography\n variant=\"h6\"\n gutterBottom\n style={{ fontWeight: 600, textDecoration: 'underline' }}\n >\n <EntityRefLink\n entityRef={api.entityRef}\n title={api.title}\n />\n </Typography>\n\n <Typography variant=\"body1\">\n Type: {api.type}\n </Typography>\n\n <Typography variant=\"body1\" style={{ marginTop: 8 }}>\n <strong>Security:</strong>\n </Typography>\n {api.security.length ? (\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {api.security.map((s: string, i: number) => (\n <li key={i}>\n <Typography variant=\"body2\">{s}</Typography>\n </li>\n ))}\n </ul>\n ) : (\n <Typography variant=\"body2\">—</Typography>\n )}\n\n <Typography variant=\"body1\" style={{ marginTop: 8 }}>\n <strong>Environments:</strong>\n </Typography>\n {api.environments.length ? (\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {api.environments.map((e: string, i: number) => (\n <li key={i}>\n <Typography variant=\"body2\">{e}</Typography>\n </li>\n ))}\n </ul>\n ) : (\n <Typography variant=\"body2\">—</Typography>\n )}\n </CardContent>\n </Card>\n </Grid>\n ))}\n </Grid>\n ) : (\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {apiEntityRefs.map(apiRef => {\n const parsed = parseEntityRef(apiRef, {\n defaultKind: 'API',\n defaultNamespace: namespace ?? 'default',\n });\n\n return (\n <li key={apiRef}>\n <EntityRefLink\n entityRef={apiRef}\n title={parsed.name}\n />\n </li>\n );\n })}\n </ul>\n )}\n </DialogContent>\n\n <DialogActions>\n <Button\n onClick={onClose}\n color=\"default\"\n style={{ minWidth: 'auto', padding: 0, textTransform: 'none' }}\n >\n <Typography variant=\"h6\" style={{ textDecoration: 'underline' }}>\n X Close\n </Typography>\n </Button>\n </DialogActions>\n </Dialog>\n );\n};"],"names":[],"mappings":";;;;;;;;AAyBO,MAAM,oBAAoB,CAAC;AAAA,EAChC,IAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAA,KAAa;AACX,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AAEvC,EAAA,MAAM,EAAE,KAAA,EAAO,WAAA,EAAa,OAAA,EAAS,oBAAmB,GAAI,QAAA;AAAA,IAC1D,YAAY;AACV,MAAA,IAAI,CAAC,IAAA,IAAQ,CAAC,aAAA,CAAc,MAAA,EAAQ;AAClC,QAAA,OAAO,EAAC;AAAA,MACV;AAEA,MAAA,MAAM,QAAA,GAAW,MAAM,OAAA,CAAQ,GAAA;AAAA,QAC7B,aAAA,CAAc,GAAA,CAAI,OAAM,MAAA,KAAU;AAChC,UAAA,IAAI;AACF,YAAA,OAAO,MAAM,UAAA,CAAW,cAAA,CAAe,MAAM,CAAA;AAAA,UAC/C,CAAA,CAAA,MAAQ;AACN,YAAA,OAAO,MAAA;A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SAAA,EAAW,MAAA;AAAA,YACX,OAAO,MAAA,CAAO;AAAA;AAAA,aAHT,MAKT,CAAA;AAAA,MAEJ,CAAC,CAAA,EACH;AAAA,KAAA,EAEJ,CAAA;AAAA,wBAEC,aAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAS,OAAA;AAAA,QACT,KAAA,EAAM,SAAA;AAAA,QACN,OAAO,EAAE,QAAA,EAAU,QAAQ,OAAA,EAAS,CAAA,EAAG,eAAe,MAAA,EAAO;AAAA,QAE7D,QAAA,kBAAA,GAAA,CAAC,cAAW,OAAA,EAAQ,IAAA,EAAK,OAAO,EAAE,cAAA,EAAgB,WAAA,EAAY,EAAG,QAAA,EAAA,SAAA,EAEjE;AAAA;AAAA,KACF,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Card, CardHeader, CardContent, Typography } from '@material-ui/core';
|
|
3
|
+
|
|
4
|
+
const FieldsAndDefinitionCard = ({}) => {
|
|
5
|
+
return /* @__PURE__ */ jsxs(
|
|
6
|
+
Card,
|
|
7
|
+
{
|
|
8
|
+
style: {
|
|
9
|
+
borderRadius: 8,
|
|
10
|
+
marginBottom: 16,
|
|
11
|
+
border: "2px solid rgba(0,0,0,0.23)"
|
|
12
|
+
},
|
|
13
|
+
variant: "outlined",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx(CardHeader, { title: "Fields & Definitions" }),
|
|
16
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "GAP<fieldsAndDefinitions>" }) })
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { FieldsAndDefinitionCard };
|
|
23
|
+
//# sourceMappingURL=FieldsAndDefinitionCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldsAndDefinitionCard.esm.js","sources":["../../../src/components/CatalogDataset/FieldsAndDefinitionCard.tsx"],"sourcesContent":["import {\n Card,\n CardHeader,\n CardContent,\n Typography,\n} from '@material-ui/core';\n\ntype Props = {\n};\n\nexport const FieldsAndDefinitionCard = ({ }: Props) => {\n return (\n <Card\n style={{\n borderRadius: 8,\n marginBottom: 16,\n border: '2px solid rgba(0,0,0,0.23)',\n }}\n variant=\"outlined\"\n >\n <CardHeader title=\"Fields & Definitions\" />\n <CardContent>\n <Typography variant=\"body2\">{'GAP<fieldsAndDefinitions>'}</Typography>\n </CardContent>\n </Card>\n );\n};"],"names":[],"mappings":";;;AAUO,MAAM,uBAAA,GAA0B,CAAC,EAAE,KAAa;AACrD,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO;AAAA,QACL,YAAA,EAAc,CAAA;AAAA,QACd,YAAA,EAAc,EAAA;AAAA,QACd,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,OAAA,EAAQ,UAAA;AAAA,MAER,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAM,sBAAA,EAAuB,CAAA;AAAA,4BACxC,WAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,cAAW,OAAA,EAAQ,OAAA,EAAS,uCAA4B,CAAA,EAC3D;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Card, CardHeader, CardContent, Typography } from '@material-ui/core';
|
|
3
|
+
|
|
4
|
+
const LineageAndQualityCard = ({
|
|
5
|
+
sourceSystem,
|
|
6
|
+
transformation,
|
|
7
|
+
validation,
|
|
8
|
+
refresh,
|
|
9
|
+
qualityControls
|
|
10
|
+
}) => {
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
Card,
|
|
13
|
+
{
|
|
14
|
+
style: {
|
|
15
|
+
borderRadius: 8,
|
|
16
|
+
marginBottom: 16,
|
|
17
|
+
border: "2px solid rgba(0,0,0,0.23)"
|
|
18
|
+
},
|
|
19
|
+
variant: "outlined",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(CardHeader, { title: "Lineage & Quality" }),
|
|
22
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
23
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
24
|
+
/* @__PURE__ */ jsx("strong", { children: "Source:" }),
|
|
25
|
+
" ",
|
|
26
|
+
sourceSystem ?? "N/A"
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
29
|
+
/* @__PURE__ */ jsx("strong", { children: "Transformation:" }),
|
|
30
|
+
" ",
|
|
31
|
+
transformation ?? "N/A"
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", style: { marginBottom: 8 }, children: [
|
|
34
|
+
/* @__PURE__ */ jsx("strong", { children: "Validation:" }),
|
|
35
|
+
" ",
|
|
36
|
+
validation ?? "N/A"
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", style: { marginBottom: 8 }, children: [
|
|
39
|
+
/* @__PURE__ */ jsx("strong", { children: "Lineage Refresh:" }),
|
|
40
|
+
" ",
|
|
41
|
+
refresh ?? "N/A"
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Quality controls include:" }),
|
|
44
|
+
qualityControls?.length ? /* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: qualityControls.map((qc, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: qc }) }, i)) }) : /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "N/A" })
|
|
45
|
+
] })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { LineageAndQualityCard };
|
|
52
|
+
//# sourceMappingURL=LineageAndQualityCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineageAndQualityCard.esm.js","sources":["../../../src/components/CatalogDataset/LineageAndQualityCard.tsx"],"sourcesContent":["import {\n Card,\n CardHeader,\n CardContent,\n Typography,\n} from '@material-ui/core';\n\ntype Props = {\n sourceSystem?: string;\n transformation?: string;\n validation?: string;\n refresh?: string;\n qualityControls?: string[];\n};\n\nexport const LineageAndQualityCard = ({\n sourceSystem,\n transformation,\n validation,\n refresh,\n qualityControls,\n}: Props) => {\n return (\n <Card\n style={{\n borderRadius: 8,\n marginBottom: 16,\n border: '2px solid rgba(0,0,0,0.23)',\n }}\n variant=\"outlined\"\n >\n <CardHeader title=\"Lineage & Quality\" />\n <CardContent>\n <Typography variant=\"body2\">\n <strong>Source:</strong> {sourceSystem ?? 'N/A'}\n </Typography>\n <Typography variant=\"body2\">\n <strong>Transformation:</strong> {transformation ?? 'N/A'}\n </Typography>\n <Typography variant=\"body2\" style={{ marginBottom: 8 }}>\n <strong>Validation:</strong> {validation ?? 'N/A'}\n </Typography>\n <Typography variant=\"body2\" style={{ marginBottom: 8 }}>\n <strong>Lineage Refresh:</strong> {refresh ?? 'N/A'}\n </Typography>\n <Typography variant=\"body2\">\n Quality controls include:\n </Typography>\n {qualityControls?.length ? (\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {qualityControls.map((qc, i) => (\n <li key={i}>\n <Typography variant=\"body2\">{qc}</Typography>\n </li>\n ))}\n </ul>\n ) : (\n <Typography variant=\"body2\">N/A</Typography>\n )}\n </CardContent>\n </Card>\n );\n};"],"names":[],"mappings":";;;AAeO,MAAM,wBAAwB,CAAC;AAAA,EACpC,YAAA;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