@red-hat-developer-hub/backstage-plugin-adoption-insights 0.1.0 → 0.2.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.
- package/CHANGELOG.md +27 -0
- package/dist/api/index.esm.js +1 -1
- package/dist/api/index.esm.js.map +1 -1
- package/dist/components/ActiveUsers/ActiveUsers.esm.js +108 -90
- package/dist/components/ActiveUsers/ActiveUsers.esm.js.map +1 -1
- package/dist/components/ActiveUsers/CustomLegend.esm.js +40 -35
- package/dist/components/ActiveUsers/CustomLegend.esm.js.map +1 -1
- package/dist/components/ActiveUsers/ExportCSVButton.esm.js +27 -25
- package/dist/components/ActiveUsers/ExportCSVButton.esm.js.map +1 -1
- package/dist/components/AdoptionInsightsPage/AdoptionInsightsPage.esm.js +13 -2
- package/dist/components/AdoptionInsightsPage/AdoptionInsightsPage.esm.js.map +1 -1
- package/dist/components/CardFooter/TableFooterPagination.esm.js +42 -42
- package/dist/components/CardFooter/TableFooterPagination.esm.js.map +1 -1
- package/dist/components/CardWrapper/CardWrapper.esm.js +29 -24
- package/dist/components/CardWrapper/CardWrapper.esm.js.map +1 -1
- package/dist/components/CatalogEntities/CatalogEntities.esm.js +96 -92
- package/dist/components/CatalogEntities/CatalogEntities.esm.js.map +1 -1
- package/dist/components/CatalogEntities/FilterDropdown.esm.js +22 -17
- package/dist/components/CatalogEntities/FilterDropdown.esm.js.map +1 -1
- package/dist/components/Common/ChartTooltip.esm.js +91 -0
- package/dist/components/Common/ChartTooltip.esm.js.map +1 -0
- package/dist/components/Common/CustomCursor.esm.js +2 -2
- package/dist/components/Common/CustomCursor.esm.js.map +1 -1
- package/dist/components/Common/EmptyChartState.esm.js +2 -2
- package/dist/components/Common/EmptyChartState.esm.js.map +1 -1
- package/dist/components/Common/PermissionRequiredIcon.esm.js +2 -2
- package/dist/components/Common/PermissionRequiredIcon.esm.js.map +1 -1
- package/dist/components/Common/PermissionRequiredState.esm.js +29 -23
- package/dist/components/Common/PermissionRequiredState.esm.js.map +1 -1
- package/dist/components/Header/DateRangeContext.esm.js +7 -6
- package/dist/components/Header/DateRangeContext.esm.js.map +1 -1
- package/dist/components/Header/DateRangePicker.esm.js +67 -59
- package/dist/components/Header/DateRangePicker.esm.js.map +1 -1
- package/dist/components/Header/Header.esm.js +117 -106
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Plugins/Plugins.esm.js +74 -64
- package/dist/components/Plugins/Plugins.esm.js.map +1 -1
- package/dist/components/Searches/Searches.esm.js +86 -75
- package/dist/components/Searches/Searches.esm.js.map +1 -1
- package/dist/components/Techdocs/Techdocs.esm.js +85 -81
- package/dist/components/Techdocs/Techdocs.esm.js.map +1 -1
- package/dist/components/Templates/Templates.esm.js +74 -70
- package/dist/components/Templates/Templates.esm.js.map +1 -1
- package/dist/components/Users/Info.esm.js +12 -12
- package/dist/components/Users/Info.esm.js.map +1 -1
- package/dist/components/Users/Tooltip.esm.js +27 -23
- package/dist/components/Users/Tooltip.esm.js.map +1 -1
- package/dist/components/Users/Users.esm.js +119 -95
- package/dist/components/Users/Users.esm.js.map +1 -1
- package/dist/hooks/useActiveUsers.esm.js +10 -8
- package/dist/hooks/useActiveUsers.esm.js.map +1 -1
- package/dist/hooks/useCatalogEntities.esm.js +9 -6
- package/dist/hooks/useCatalogEntities.esm.js.map +1 -1
- package/dist/hooks/usePlugins.esm.js +9 -6
- package/dist/hooks/usePlugins.esm.js.map +1 -1
- package/dist/hooks/useSearches.esm.js +11 -7
- package/dist/hooks/useSearches.esm.js.map +1 -1
- package/dist/hooks/useTechdocs.esm.js +9 -6
- package/dist/hooks/useTechdocs.esm.js.map +1 -1
- package/dist/hooks/useTemplates.esm.js +9 -6
- package/dist/hooks/useTemplates.esm.js.map +1 -1
- package/dist/hooks/useUsers.esm.js +10 -7
- package/dist/hooks/useUsers.esm.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/utils/utils.esm.js +70 -30
- package/dist/utils/utils.esm.js.map +1 -1
- package/package.json +19 -17
- package/dist/components/ActiveUsers/CustomTooltip.esm.js +0 -87
- package/dist/components/ActiveUsers/CustomTooltip.esm.js.map +0 -1
- package/dist/components/Searches/CustomTooltip.esm.js +0 -66
- package/dist/components/Searches/CustomTooltip.esm.js.map +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
2
2
|
import { Page, Content } from '@backstage/core-components';
|
3
3
|
import Masonry from '@mui/lab/Masonry';
|
4
4
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
@@ -22,7 +22,18 @@ const AdoptionInsightsPage = () => {
|
|
22
22
|
if (loading) {
|
23
23
|
return null;
|
24
24
|
}
|
25
|
-
return /* @__PURE__ */
|
25
|
+
return /* @__PURE__ */ jsx(Page, { themeId: "home", children: !hasEventsReadPermission ? /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(PermissionRequiredState, {}) }) : /* @__PURE__ */ jsxs(DateRangeProvider, { children: [
|
26
|
+
/* @__PURE__ */ jsx(InsightsHeader, { title: "Adoption Insights" }),
|
27
|
+
/* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsxs(Masonry, { columns: isSmallScreen ? 1 : 2, spacing: 2, children: [
|
28
|
+
/* @__PURE__ */ jsx(ActiveUsers, {}),
|
29
|
+
/* @__PURE__ */ jsx(Users, {}),
|
30
|
+
/* @__PURE__ */ jsx(Templates, {}),
|
31
|
+
/* @__PURE__ */ jsx(CatalogEntities, {}),
|
32
|
+
/* @__PURE__ */ jsx(Plugins, {}),
|
33
|
+
/* @__PURE__ */ jsx(Techdocs, {}),
|
34
|
+
/* @__PURE__ */ jsx(Searches, {})
|
35
|
+
] }) })
|
36
|
+
] }) });
|
26
37
|
};
|
27
38
|
|
28
39
|
export { AdoptionInsightsPage };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AdoptionInsightsPage.esm.js","sources":["../../../src/components/AdoptionInsightsPage/AdoptionInsightsPage.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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
|
1
|
+
{"version":3,"file":"AdoptionInsightsPage.esm.js","sources":["../../../src/components/AdoptionInsightsPage/AdoptionInsightsPage.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { Content, Page } from '@backstage/core-components';\nimport Masonry from '@mui/lab/Masonry';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { useTheme } from '@mui/material/styles';\n\nimport InsightsHeader from '../Header';\nimport CatalogEntities from '../CatalogEntities';\nimport Templates from '../Templates';\nimport Techdocs from '../Techdocs';\nimport ActiveUsers from '../ActiveUsers';\nimport Plugins from '../Plugins';\nimport Searches from '../Searches';\nimport Users from '../Users';\nimport { DateRangeProvider } from '../Header/DateRangeContext';\nimport { useAdoptionInsightsEventsReadPermission } from '../../hooks/useAdoptionInsightsEventsReadPermission';\nimport PermissionRequiredState from '../Common/PermissionRequiredState';\n\nexport const AdoptionInsightsPage = () => {\n const theme = useTheme();\n const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'));\n const { allowed: hasEventsReadPermission, loading } =\n useAdoptionInsightsEventsReadPermission();\n\n if (loading) {\n return null;\n }\n\n return (\n <Page themeId=\"home\">\n {!hasEventsReadPermission ? (\n <Content>\n <PermissionRequiredState />\n </Content>\n ) : (\n <DateRangeProvider>\n <InsightsHeader title=\"Adoption Insights\" />\n <Content>\n <Masonry columns={isSmallScreen ? 1 : 2} spacing={2}>\n <ActiveUsers />\n <Users />\n <Templates />\n <CatalogEntities />\n <Plugins />\n <Techdocs />\n <Searches />\n </Masonry>\n </Content>\n </DateRangeProvider>\n )}\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgCO,MAAM,uBAAuB,MAAM;AACxC,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAA,MAAM,gBAAgB,aAAc,CAAA,KAAA,CAAM,WAAY,CAAA,IAAA,CAAK,IAAI,CAAC,CAAA;AAChE,EAAA,MAAM,EAAE,OAAA,EAAS,uBAAyB,EAAA,OAAA,KACxC,uCAAwC,EAAA;AAE1C,EAAA,IAAI,OAAS,EAAA;AACX,IAAO,OAAA,IAAA;AAAA;AAGT,EAAA,uBACG,GAAA,CAAA,IAAA,EAAA,EAAK,OAAQ,EAAA,MAAA,EACX,QAAC,EAAA,CAAA,uBAAA,mBACC,GAAA,CAAA,OAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,uBAAA,EAAA,EAAwB,CAC3B,EAAA,CAAA,wBAEC,iBACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,cAAA,EAAA,EAAe,OAAM,mBAAoB,EAAA,CAAA;AAAA,oBAC1C,GAAA,CAAC,WACC,QAAC,kBAAA,IAAA,CAAA,OAAA,EAAA,EAAQ,SAAS,aAAgB,GAAA,CAAA,GAAI,CAAG,EAAA,OAAA,EAAS,CAChD,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,WAAY,EAAA,EAAA,CAAA;AAAA,0BACZ,KAAM,EAAA,EAAA,CAAA;AAAA,0BACN,SAAU,EAAA,EAAA,CAAA;AAAA,0BACV,eAAgB,EAAA,EAAA,CAAA;AAAA,0BAChB,OAAQ,EAAA,EAAA,CAAA;AAAA,0BACR,QAAS,EAAA,EAAA,CAAA;AAAA,0BACT,QAAS,EAAA,EAAA;AAAA,KAAA,EACZ,CACF,EAAA;AAAA,GAAA,EACF,CAEJ,EAAA,CAAA;AAEJ;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import Paper from '@mui/material/Paper';
|
4
4
|
import TablePagination from '@mui/material/TablePagination';
|
@@ -10,7 +10,7 @@ const TableFooterPagination = ({
|
|
10
10
|
handleChangePage,
|
11
11
|
handleChangeRowsPerPage
|
12
12
|
}) => {
|
13
|
-
return /* @__PURE__ */
|
13
|
+
return /* @__PURE__ */ jsx(
|
14
14
|
Box,
|
15
15
|
{
|
16
16
|
component: Paper,
|
@@ -18,51 +18,51 @@ const TableFooterPagination = ({
|
|
18
18
|
display: "flex",
|
19
19
|
justifyContent: "flex-end",
|
20
20
|
padding: 1
|
21
|
-
}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
}
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
21
|
+
},
|
22
|
+
children: /* @__PURE__ */ jsx(
|
23
|
+
TablePagination,
|
24
|
+
{
|
25
|
+
sx: {
|
26
|
+
"& .v5-MuiTablePagination-select:focus": {
|
27
|
+
backgroundColor: "transparent"
|
28
|
+
}
|
29
|
+
},
|
30
|
+
rowsPerPageOptions: [
|
31
|
+
{ label: "Top 3", value: 3 },
|
32
|
+
{ label: "Top 5", value: 5 },
|
33
|
+
{ label: "Top 10", value: 10 },
|
34
|
+
{ label: "Top 20", value: 20 }
|
35
|
+
],
|
36
|
+
component: "div",
|
37
|
+
count,
|
38
|
+
rowsPerPage,
|
39
|
+
page,
|
40
|
+
onPageChange: handleChangePage,
|
41
|
+
onRowsPerPageChange: handleChangeRowsPerPage,
|
42
|
+
labelRowsPerPage: null,
|
43
|
+
labelDisplayedRows: () => null,
|
44
|
+
ActionsComponent: () => null,
|
45
|
+
slotProps: {
|
46
|
+
select: {
|
47
|
+
MenuProps: {
|
48
|
+
MenuListProps: {
|
49
|
+
autoFocusItem: false
|
50
|
+
},
|
51
|
+
PaperProps: {
|
52
|
+
sx: {
|
53
|
+
width: 190,
|
54
|
+
boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.2)",
|
55
|
+
borderRadius: 2,
|
56
|
+
border: (theme) => `1px solid ${theme.palette.grey[300]}`,
|
57
|
+
overflow: "hidden"
|
58
|
+
}
|
59
59
|
}
|
60
60
|
}
|
61
61
|
}
|
62
62
|
}
|
63
63
|
}
|
64
|
-
|
65
|
-
|
64
|
+
)
|
65
|
+
}
|
66
66
|
);
|
67
67
|
};
|
68
68
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TableFooterPagination.esm.js","sources":["../../../src/components/CardFooter/TableFooterPagination.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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
|
1
|
+
{"version":3,"file":"TableFooterPagination.esm.js","sources":["../../../src/components/CardFooter/TableFooterPagination.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 type { MouseEvent, ChangeEvent, FC } from 'react';\nimport Box from '@mui/material/Box';\nimport Paper from '@mui/material/Paper';\nimport TablePagination from '@mui/material/TablePagination';\n\ninterface TableFooterPaginationProps {\n count: number;\n rowsPerPage: number;\n page: number;\n handleChangePage: (\n event: MouseEvent<HTMLButtonElement> | null,\n newPage: number,\n ) => void;\n handleChangeRowsPerPage: (\n event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n ) => void;\n}\n\nconst TableFooterPagination: FC<TableFooterPaginationProps> = ({\n count,\n rowsPerPage,\n page,\n handleChangePage,\n handleChangeRowsPerPage,\n}) => {\n return (\n <Box\n component={Paper}\n sx={{\n display: 'flex',\n justifyContent: 'flex-end',\n padding: 1,\n }}\n >\n <TablePagination\n sx={{\n '& .v5-MuiTablePagination-select:focus': {\n backgroundColor: 'transparent',\n },\n }}\n rowsPerPageOptions={[\n { label: 'Top 3', value: 3 },\n { label: 'Top 5', value: 5 },\n { label: 'Top 10', value: 10 },\n { label: 'Top 20', value: 20 },\n ]}\n component=\"div\"\n count={count}\n rowsPerPage={rowsPerPage}\n page={page}\n onPageChange={handleChangePage}\n onRowsPerPageChange={handleChangeRowsPerPage}\n labelRowsPerPage={null}\n labelDisplayedRows={() => null}\n ActionsComponent={() => null}\n slotProps={{\n select: {\n MenuProps: {\n MenuListProps: {\n autoFocusItem: false,\n },\n PaperProps: {\n sx: {\n width: 190,\n boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.2)',\n borderRadius: 2,\n border: theme => `1px solid ${theme.palette.grey[300]}`,\n overflow: 'hidden',\n },\n },\n },\n },\n }}\n />\n </Box>\n );\n};\n\nexport default TableFooterPagination;\n"],"names":[],"mappings":";;;;;AAiCA,MAAM,wBAAwD,CAAC;AAAA,EAC7D,KAAA;AAAA,EACA,WAAA;AAAA,EACA,IAAA;AAAA,EACA,gBAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EACE,uBAAA,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,KAAA;AAAA,MACX,EAAI,EAAA;AAAA,QACF,OAAS,EAAA,MAAA;AAAA,QACT,cAAgB,EAAA,UAAA;AAAA,QAChB,OAAS,EAAA;AAAA,OACX;AAAA,MAEA,QAAA,kBAAA,GAAA;AAAA,QAAC,eAAA;AAAA,QAAA;AAAA,UACC,EAAI,EAAA;AAAA,YACF,uCAAyC,EAAA;AAAA,cACvC,eAAiB,EAAA;AAAA;AACnB,WACF;AAAA,UACA,kBAAoB,EAAA;AAAA,YAClB,EAAE,KAAA,EAAO,OAAS,EAAA,KAAA,EAAO,CAAE,EAAA;AAAA,YAC3B,EAAE,KAAA,EAAO,OAAS,EAAA,KAAA,EAAO,CAAE,EAAA;AAAA,YAC3B,EAAE,KAAA,EAAO,QAAU,EAAA,KAAA,EAAO,EAAG,EAAA;AAAA,YAC7B,EAAE,KAAA,EAAO,QAAU,EAAA,KAAA,EAAO,EAAG;AAAA,WAC/B;AAAA,UACA,SAAU,EAAA,KAAA;AAAA,UACV,KAAA;AAAA,UACA,WAAA;AAAA,UACA,IAAA;AAAA,UACA,YAAc,EAAA,gBAAA;AAAA,UACd,mBAAqB,EAAA,uBAAA;AAAA,UACrB,gBAAkB,EAAA,IAAA;AAAA,UAClB,oBAAoB,MAAM,IAAA;AAAA,UAC1B,kBAAkB,MAAM,IAAA;AAAA,UACxB,SAAW,EAAA;AAAA,YACT,MAAQ,EAAA;AAAA,cACN,SAAW,EAAA;AAAA,gBACT,aAAe,EAAA;AAAA,kBACb,aAAe,EAAA;AAAA,iBACjB;AAAA,gBACA,UAAY,EAAA;AAAA,kBACV,EAAI,EAAA;AAAA,oBACF,KAAO,EAAA,GAAA;AAAA,oBACP,SAAW,EAAA,iCAAA;AAAA,oBACX,YAAc,EAAA,CAAA;AAAA,oBACd,QAAQ,CAAS,KAAA,KAAA,CAAA,UAAA,EAAa,MAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA,oBACrD,QAAU,EAAA;AAAA;AACZ;AACF;AACF;AACF;AACF;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
2
2
|
import Paper from '@mui/material/Paper';
|
3
3
|
import Box from '@mui/material/Box';
|
4
4
|
import Divider from '@mui/material/Divider';
|
@@ -9,32 +9,37 @@ const CardWrapper = ({
|
|
9
9
|
title,
|
10
10
|
filter
|
11
11
|
}) => {
|
12
|
-
return /* @__PURE__ */
|
12
|
+
return /* @__PURE__ */ jsxs(
|
13
13
|
Box,
|
14
14
|
{
|
15
15
|
component: Paper,
|
16
|
-
sx: { border: (theme) => `1px solid ${theme.palette.grey[300]}` }
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
16
|
+
sx: { border: (theme) => `1px solid ${theme.palette.grey[300]}` },
|
17
|
+
children: [
|
18
|
+
/* @__PURE__ */ jsxs(Box, { sx: { display: "flex", justifyContent: "space-between" }, children: [
|
19
|
+
/* @__PURE__ */ jsx(
|
20
|
+
Typography,
|
21
|
+
{
|
22
|
+
variant: "h5",
|
23
|
+
sx: {
|
24
|
+
p: 3,
|
25
|
+
display: "flex",
|
26
|
+
alignItems: "center",
|
27
|
+
fontWeight: "bold"
|
28
|
+
},
|
29
|
+
children: title
|
30
|
+
}
|
31
|
+
),
|
32
|
+
filter && /* @__PURE__ */ jsx(Box, { children: filter })
|
33
|
+
] }),
|
34
|
+
/* @__PURE__ */ jsx(
|
35
|
+
Divider,
|
36
|
+
{
|
37
|
+
sx: { border: (theme) => `1px solid ${theme.palette.grey[300]}` }
|
38
|
+
}
|
39
|
+
),
|
40
|
+
/* @__PURE__ */ jsx(Box, { children })
|
41
|
+
]
|
42
|
+
}
|
38
43
|
);
|
39
44
|
};
|
40
45
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardWrapper.esm.js","sources":["../../../src/components/CardWrapper/CardWrapper.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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
|
1
|
+
{"version":3,"file":"CardWrapper.esm.js","sources":["../../../src/components/CardWrapper/CardWrapper.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 type { ReactNode, HTMLProps, FC } from 'react';\n\nimport Paper from '@mui/material/Paper';\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\nimport Typography from '@mui/material/Typography';\n\ninterface CardWrapperProps extends HTMLProps<HTMLDivElement> {\n children: ReactNode;\n title: string;\n filter?: ReactNode;\n}\n\nconst CardWrapper: FC<CardWrapperProps> = ({\n children,\n title,\n filter,\n}: CardWrapperProps) => {\n return (\n <Box\n component={Paper}\n sx={{ border: theme => `1px solid ${theme.palette.grey[300]}` }}\n >\n <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>\n <Typography\n variant=\"h5\"\n sx={{\n p: 3,\n display: 'flex',\n alignItems: 'center',\n fontWeight: 'bold',\n }}\n >\n {title}\n </Typography>\n\n {filter && <Box>{filter}</Box>}\n </Box>\n <Divider\n sx={{ border: theme => `1px solid ${theme.palette.grey[300]}` }}\n />\n <Box>{children}</Box>\n </Box>\n );\n};\n\nexport default CardWrapper;\n"],"names":[],"mappings":";;;;;;AA4BA,MAAM,cAAoC,CAAC;AAAA,EACzC,QAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAwB,KAAA;AACtB,EACE,uBAAA,IAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,KAAA;AAAA,MACX,EAAA,EAAI,EAAE,MAAA,EAAQ,CAAS,KAAA,KAAA,CAAA,UAAA,EAAa,MAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAG,CAAA,EAAA;AAAA,MAE9D,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,OAAI,EAAI,EAAA,EAAE,SAAS,MAAQ,EAAA,cAAA,EAAgB,iBAC1C,EAAA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,OAAQ,EAAA,IAAA;AAAA,cACR,EAAI,EAAA;AAAA,gBACF,CAAG,EAAA,CAAA;AAAA,gBACH,OAAS,EAAA,MAAA;AAAA,gBACT,UAAY,EAAA,QAAA;AAAA,gBACZ,UAAY,EAAA;AAAA,eACd;AAAA,cAEC,QAAA,EAAA;AAAA;AAAA,WACH;AAAA,UAEC,MAAA,oBAAW,GAAA,CAAA,GAAA,EAAA,EAAK,QAAO,EAAA,MAAA,EAAA;AAAA,SAC1B,EAAA,CAAA;AAAA,wBACA,GAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,EAAA,EAAI,EAAE,MAAA,EAAQ,CAAS,KAAA,KAAA,CAAA,UAAA,EAAa,MAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAG,CAAA;AAAA;AAAA,SAChE;AAAA,wBACA,GAAA,CAAC,OAAK,QAAS,EAAA;AAAA;AAAA;AAAA,GACjB;AAEJ;;;;"}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
2
|
+
import { useState, useEffect, useCallback, useMemo } from 'react';
|
2
3
|
import { ResponseErrorPanel } from '@backstage/core-components';
|
3
4
|
import Box from '@mui/material/Box';
|
4
5
|
import Table from '@mui/material/Table';
|
@@ -20,39 +21,36 @@ import FilterDropdown from './FilterDropdown.esm.js';
|
|
20
21
|
import EmptyChartState from '../Common/EmptyChartState.esm.js';
|
21
22
|
|
22
23
|
const CatalogEntities = () => {
|
23
|
-
const [page, setPage] =
|
24
|
-
const [limit] =
|
25
|
-
const [rowsPerPage, setRowsPerPage] =
|
26
|
-
const [selectedOption, setSelectedOption] =
|
27
|
-
const [uniqueCatalogEntityKinds, setUniqueCatalogEntityKinds] =
|
24
|
+
const [page, setPage] = useState(0);
|
25
|
+
const [limit] = useState(20);
|
26
|
+
const [rowsPerPage, setRowsPerPage] = useState(3);
|
27
|
+
const [selectedOption, setSelectedOption] = useState("");
|
28
|
+
const [uniqueCatalogEntityKinds, setUniqueCatalogEntityKinds] = useState([]);
|
28
29
|
const entityLink = useRouteRef(entityRouteRef);
|
29
30
|
const { catalogEntities, loading, error } = useCatalogEntities({
|
30
31
|
limit,
|
31
32
|
kind: selectedOption === "All" ? "" : selectedOption.toLocaleLowerCase()
|
32
33
|
});
|
33
|
-
|
34
|
+
useEffect(() => {
|
34
35
|
if (catalogEntities?.data?.length > 0 && uniqueCatalogEntityKinds?.length === 0) {
|
35
36
|
const uniqueKinds = getUniqueCatalogEntityKinds(catalogEntities.data);
|
36
37
|
setUniqueCatalogEntityKinds(uniqueKinds);
|
37
38
|
}
|
38
39
|
}, [catalogEntities, uniqueCatalogEntityKinds]);
|
39
|
-
const handleChangePage =
|
40
|
-
(
|
41
|
-
|
42
|
-
|
43
|
-
[]
|
44
|
-
);
|
45
|
-
const handleChangeRowsPerPage = React__default.useCallback(
|
40
|
+
const handleChangePage = useCallback((_event, newPage) => {
|
41
|
+
setPage(newPage);
|
42
|
+
}, []);
|
43
|
+
const handleChangeRowsPerPage = useCallback(
|
46
44
|
(event) => {
|
47
45
|
setRowsPerPage(+event.target.value);
|
48
46
|
setPage(0);
|
49
47
|
},
|
50
48
|
[]
|
51
49
|
);
|
52
|
-
const handleChange =
|
50
|
+
const handleChange = useCallback((event) => {
|
53
51
|
setSelectedOption(event.target.value);
|
54
52
|
}, []);
|
55
|
-
const visibleCatalogEntities =
|
53
|
+
const visibleCatalogEntities = useMemo(() => {
|
56
54
|
return catalogEntities.data?.filter((entity) => {
|
57
55
|
if (selectedOption && selectedOption !== "All") {
|
58
56
|
return entity.kind.toLocaleLowerCase() === selectedOption.toLocaleLowerCase();
|
@@ -61,100 +59,106 @@ const CatalogEntities = () => {
|
|
61
59
|
}).slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage);
|
62
60
|
}, [catalogEntities, page, rowsPerPage, selectedOption]);
|
63
61
|
if (error) {
|
64
|
-
return /* @__PURE__ */
|
62
|
+
return /* @__PURE__ */ jsx(CardWrapper, { title: CATALOG_ENTITIES_TITLE, children: /* @__PURE__ */ jsx(ResponseErrorPanel, { error }) });
|
65
63
|
}
|
66
64
|
if ((!visibleCatalogEntities || visibleCatalogEntities?.length === 0) && !loading) {
|
67
|
-
return /* @__PURE__ */
|
65
|
+
return /* @__PURE__ */ jsx(CardWrapper, { title: CATALOG_ENTITIES_TITLE, children: /* @__PURE__ */ jsx(
|
68
66
|
Box,
|
69
67
|
{
|
70
68
|
display: "flex",
|
71
69
|
justifyContent: "center",
|
72
70
|
alignItems: "center",
|
73
|
-
height: 200
|
74
|
-
|
75
|
-
|
76
|
-
));
|
71
|
+
height: 200,
|
72
|
+
children: /* @__PURE__ */ jsx(EmptyChartState, {})
|
73
|
+
}
|
74
|
+
) });
|
77
75
|
}
|
78
|
-
return /* @__PURE__ */
|
76
|
+
return /* @__PURE__ */ jsx(
|
79
77
|
CardWrapper,
|
80
78
|
{
|
81
79
|
title: CATALOG_ENTITIES_TITLE,
|
82
|
-
filter: /* @__PURE__ */
|
80
|
+
filter: /* @__PURE__ */ jsx(
|
83
81
|
FilterDropdown,
|
84
82
|
{
|
85
83
|
selectedOption,
|
86
84
|
handleChange,
|
87
85
|
uniqueCatalogEntityKinds
|
88
86
|
}
|
89
|
-
)
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
)) : visibleCatalogEntities?.map((entity) => /* @__PURE__ */ React__default.createElement(
|
110
|
-
TableRow,
|
111
|
-
{
|
112
|
-
key: `${entity.kind}-${entity.name}`,
|
113
|
-
sx: {
|
114
|
-
"&:nth-of-type(odd)": { backgroundColor: "inherit" },
|
115
|
-
borderBottom: (theme) => `1px solid ${theme.palette.grey[300]}`
|
116
|
-
}
|
117
|
-
},
|
118
|
-
/* @__PURE__ */ React__default.createElement(TableCell, { sx: { width: "25%" } }, /* @__PURE__ */ React__default.createElement(
|
119
|
-
Link,
|
120
|
-
{
|
121
|
-
component: "a",
|
122
|
-
href: entityLink({
|
123
|
-
kind: entity.kind,
|
124
|
-
namespace: entity.namespace,
|
125
|
-
name: entity.name
|
126
|
-
}),
|
127
|
-
target: "_blank",
|
128
|
-
rel: "noopener noreferrer",
|
129
|
-
sx: {
|
130
|
-
textDecoration: "none",
|
131
|
-
"&:hover": {
|
132
|
-
textDecoration: "none"
|
133
|
-
}
|
87
|
+
),
|
88
|
+
children: /* @__PURE__ */ jsxs(Table, { "aria-labelledby": "Catalog entities", sx: { width: "100%" }, children: [
|
89
|
+
/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { children: CATALOG_ENTITIES_TABLE_HEADERS.map((header) => /* @__PURE__ */ jsx(
|
90
|
+
TableCell,
|
91
|
+
{
|
92
|
+
align: "left",
|
93
|
+
sx: {
|
94
|
+
borderBottom: (theme) => `1px solid ${theme.palette.grey[300]}`,
|
95
|
+
width: "25%"
|
96
|
+
},
|
97
|
+
children: header.title
|
98
|
+
},
|
99
|
+
header.id
|
100
|
+
)) }) }),
|
101
|
+
/* @__PURE__ */ jsx(TableBody, { children: loading ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
|
102
|
+
TableCell,
|
103
|
+
{
|
104
|
+
colSpan: CATALOG_ENTITIES_TABLE_HEADERS.length,
|
105
|
+
align: "center",
|
106
|
+
children: /* @__PURE__ */ jsx(CircularProgress, {})
|
134
107
|
}
|
135
|
-
}
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
108
|
+
) }) : visibleCatalogEntities?.map((entity) => /* @__PURE__ */ jsxs(
|
109
|
+
TableRow,
|
110
|
+
{
|
111
|
+
sx: {
|
112
|
+
"&:nth-of-type(odd)": { backgroundColor: "inherit" },
|
113
|
+
borderBottom: (theme) => `1px solid ${theme.palette.grey[300]}`
|
114
|
+
},
|
115
|
+
children: [
|
116
|
+
/* @__PURE__ */ jsx(TableCell, { sx: { width: "25%" }, children: /* @__PURE__ */ jsx(
|
117
|
+
Link,
|
118
|
+
{
|
119
|
+
component: "a",
|
120
|
+
href: entityLink({
|
121
|
+
kind: entity.kind,
|
122
|
+
namespace: entity.namespace,
|
123
|
+
name: entity.name
|
124
|
+
}),
|
125
|
+
target: "_blank",
|
126
|
+
rel: "noopener noreferrer",
|
127
|
+
sx: {
|
128
|
+
textDecoration: "none",
|
129
|
+
"&:hover": {
|
130
|
+
textDecoration: "none"
|
131
|
+
}
|
132
|
+
},
|
133
|
+
children: entity.name ?? "--"
|
134
|
+
}
|
135
|
+
) }),
|
136
|
+
/* @__PURE__ */ jsx(TableCell, { sx: { width: "25%" }, children: entity.kind?.charAt(0).toLocaleUpperCase("en-US") + entity.kind?.slice(1) || "--" }),
|
137
|
+
/* @__PURE__ */ jsx(TableCell, { sx: { width: "25%" }, children: getLastUsedDay(entity.last_used) ?? "--" }),
|
138
|
+
/* @__PURE__ */ jsx(TableCell, { sx: { width: "25%" }, children: Number(entity.count).toLocaleString("en-US") ?? "--" })
|
139
|
+
]
|
140
|
+
},
|
141
|
+
`${entity.kind}-${entity.name}`
|
142
|
+
)) }),
|
143
|
+
/* @__PURE__ */ jsx(TableFooter, { children: /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
|
144
|
+
TableCell,
|
145
|
+
{
|
146
|
+
colSpan: CATALOG_ENTITIES_TABLE_HEADERS.length,
|
147
|
+
sx: { padding: 0 },
|
148
|
+
children: /* @__PURE__ */ jsx(
|
149
|
+
TableFooterPagination,
|
150
|
+
{
|
151
|
+
count: catalogEntities.data?.length,
|
152
|
+
rowsPerPage,
|
153
|
+
page,
|
154
|
+
handleChangePage,
|
155
|
+
handleChangeRowsPerPage
|
156
|
+
}
|
157
|
+
)
|
158
|
+
}
|
159
|
+
) }) })
|
160
|
+
] })
|
161
|
+
}
|
158
162
|
);
|
159
163
|
};
|
160
164
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CatalogEntities.esm.js","sources":["../../../src/components/CatalogEntities/CatalogEntities.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 React from 'react';\n\nimport { ResponseErrorPanel } from '@backstage/core-components';\nimport Box from '@mui/material/Box';\nimport { SelectChangeEvent } from '@mui/material/Select';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableFooter from '@mui/material/TableFooter';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Link from '@mui/material/Link';\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\nimport CardWrapper from '../CardWrapper';\nimport {\n CATALOG_ENTITIES_TABLE_HEADERS,\n CATALOG_ENTITIES_TITLE,\n} from '../../utils/constants';\nimport { useCatalogEntities } from '../../hooks/useCatalogEntities';\nimport TableFooterPagination from '../CardFooter';\nimport { getLastUsedDay, getUniqueCatalogEntityKinds } from '../../utils/utils';\nimport FilterDropdown from './FilterDropdown';\nimport EmptyChartState from '../Common/EmptyChartState';\n\nconst CatalogEntities = () => {\n const [page, setPage] = React.useState(0);\n const [limit] = React.useState(20);\n const [rowsPerPage, setRowsPerPage] = React.useState(3);\n const [selectedOption, setSelectedOption] = React.useState('');\n const [uniqueCatalogEntityKinds, setUniqueCatalogEntityKinds] =\n React.useState<string[]>([]);\n\n const entityLink = useRouteRef(entityRouteRef);\n\n const { catalogEntities, loading, error } = useCatalogEntities({\n limit,\n kind: selectedOption === 'All' ? '' : selectedOption.toLocaleLowerCase(),\n });\n\n React.useEffect(() => {\n if (\n catalogEntities?.data?.length > 0 &&\n uniqueCatalogEntityKinds?.length === 0\n ) {\n const uniqueKinds = getUniqueCatalogEntityKinds(catalogEntities.data);\n setUniqueCatalogEntityKinds(uniqueKinds);\n }\n }, [catalogEntities, uniqueCatalogEntityKinds]);\n\n const handleChangePage = React.useCallback(\n (_event: unknown, newPage: number) => {\n setPage(newPage);\n },\n [],\n );\n\n const handleChangeRowsPerPage = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n setRowsPerPage(+event.target.value);\n setPage(0);\n },\n [],\n );\n\n const handleChange = React.useCallback((event: SelectChangeEvent<string>) => {\n setSelectedOption(event.target.value);\n }, []);\n\n const visibleCatalogEntities = React.useMemo(() => {\n return catalogEntities.data\n ?.filter(entity => {\n if (selectedOption && selectedOption !== 'All') {\n return (\n entity.kind.toLocaleLowerCase() ===\n selectedOption.toLocaleLowerCase()\n );\n }\n return true;\n })\n .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage);\n }, [catalogEntities, page, rowsPerPage, selectedOption]);\n\n if (error) {\n return (\n <CardWrapper title={CATALOG_ENTITIES_TITLE}>\n <ResponseErrorPanel error={error} />\n </CardWrapper>\n );\n }\n\n if (\n (!visibleCatalogEntities || visibleCatalogEntities?.length === 0) &&\n !loading\n ) {\n return (\n <CardWrapper title={CATALOG_ENTITIES_TITLE}>\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n height={200}\n >\n <EmptyChartState />\n </Box>\n </CardWrapper>\n );\n }\n\n return (\n <CardWrapper\n title={CATALOG_ENTITIES_TITLE}\n filter={\n <FilterDropdown\n selectedOption={selectedOption}\n handleChange={handleChange}\n uniqueCatalogEntityKinds={uniqueCatalogEntityKinds}\n />\n }\n >\n <Table aria-labelledby=\"Catalog entities\" sx={{ width: '100%' }}>\n <TableHead>\n <TableRow>\n {CATALOG_ENTITIES_TABLE_HEADERS.map(header => (\n <TableCell\n key={header.id}\n align=\"left\"\n sx={{\n borderBottom: theme => `1px solid ${theme.palette.grey[300]}`,\n width: '25%',\n }}\n >\n {header.title}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {loading ? (\n <TableRow>\n <TableCell\n colSpan={CATALOG_ENTITIES_TABLE_HEADERS.length}\n align=\"center\"\n >\n <CircularProgress />\n </TableCell>\n </TableRow>\n ) : (\n visibleCatalogEntities?.map(entity => (\n <TableRow\n key={`${entity.kind}-${entity.name}`}\n sx={{\n '&:nth-of-type(odd)': { backgroundColor: 'inherit' },\n borderBottom: theme => `1px solid ${theme.palette.grey[300]}`,\n }}\n >\n <TableCell sx={{ width: '25%' }}>\n <Link\n component=\"a\"\n href={entityLink({\n kind: entity.kind,\n namespace: entity.namespace,\n name: entity.name,\n })}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n sx={{\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'none',\n },\n }}\n >\n {entity.name ?? '--'}\n </Link>\n </TableCell>\n <TableCell sx={{ width: '25%' }}>\n {entity.kind?.charAt(0).toLocaleUpperCase('en-US') +\n entity.kind?.slice(1) || '--'}\n </TableCell>\n <TableCell sx={{ width: '25%' }}>\n {getLastUsedDay(entity.last_used) ?? '--'}\n </TableCell>\n <TableCell sx={{ width: '25%' }}>\n {Number(entity.count).toLocaleString() ?? '--'}\n </TableCell>\n </TableRow>\n ))\n )}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TableCell\n colSpan={CATALOG_ENTITIES_TABLE_HEADERS.length}\n sx={{ padding: 0 }}\n >\n <TableFooterPagination\n count={catalogEntities.data?.length}\n rowsPerPage={rowsPerPage}\n page={page}\n handleChangePage={handleChangePage}\n handleChangeRowsPerPage={handleChangeRowsPerPage}\n />\n </TableCell>\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AA,aAAA,CAAC,SAAU,EAAA,EAAA,EAAA,EAAI,EAAE,KAAA,EAAO,KAAM,EAAA,EAAA,EAC3B,cAAe,CAAA,MAAA,CAAO,SAAS,CAAA,IAAK,IACvC,CAAA;AAAA,sBACCA,cAAA,CAAA,aAAA,CAAA,SAAA,EAAA,EAAU,EAAI,EAAA,EAAE,KAAO,EAAA,KAAA,EACrB,EAAA,EAAA,MAAA,CAAO,MAAO,CAAA,KAAK,CAAE,CAAA,cAAA,MAAoB,IAC5C;AAAA,KAEH,CAEL,CAAA,kBACCA,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA,IAAA,+CACE,QACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,SAAS,8BAA+B,CAAA,MAAA;AAAA,QACxC,EAAA,EAAI,EAAE,OAAA,EAAS,CAAE;AAAA,OAAA;AAAA,sBAEjBA,cAAA,CAAA,aAAA;AAAA,QAAC,qBAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,gBAAgB,IAAM,EAAA,MAAA;AAAA,UAC7B,WAAA;AAAA,UACA,IAAA;AAAA,UACA,gBAAA;AAAA,UACA;AAAA;AAAA;AACF,KAEJ,CACF,CACF;AAAA,GACF;AAEJ;;;;"}
|
1
|
+
{"version":3,"file":"CatalogEntities.esm.js","sources":["../../../src/components/CatalogEntities/CatalogEntities.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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, useEffect, useMemo, useCallback } from 'react';\nimport type { ChangeEvent } from 'react';\n\nimport { ResponseErrorPanel } from '@backstage/core-components';\nimport Box from '@mui/material/Box';\nimport { SelectChangeEvent } from '@mui/material/Select';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableFooter from '@mui/material/TableFooter';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Link from '@mui/material/Link';\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\nimport CardWrapper from '../CardWrapper';\nimport {\n CATALOG_ENTITIES_TABLE_HEADERS,\n CATALOG_ENTITIES_TITLE,\n} from '../../utils/constants';\nimport { useCatalogEntities } from '../../hooks/useCatalogEntities';\nimport TableFooterPagination from '../CardFooter';\nimport { getLastUsedDay, getUniqueCatalogEntityKinds } from '../../utils/utils';\nimport FilterDropdown from './FilterDropdown';\nimport EmptyChartState from '../Common/EmptyChartState';\n\nconst CatalogEntities = () => {\n const [page, setPage] = useState(0);\n const [limit] = useState(20);\n const [rowsPerPage, setRowsPerPage] = useState(3);\n const [selectedOption, setSelectedOption] = useState('');\n const [uniqueCatalogEntityKinds, setUniqueCatalogEntityKinds] = useState<\n string[]\n >([]);\n\n const entityLink = useRouteRef(entityRouteRef);\n\n const { catalogEntities, loading, error } = useCatalogEntities({\n limit,\n kind: selectedOption === 'All' ? '' : selectedOption.toLocaleLowerCase(),\n });\n\n useEffect(() => {\n if (\n catalogEntities?.data?.length > 0 &&\n uniqueCatalogEntityKinds?.length === 0\n ) {\n const uniqueKinds = getUniqueCatalogEntityKinds(catalogEntities.data);\n setUniqueCatalogEntityKinds(uniqueKinds);\n }\n }, [catalogEntities, uniqueCatalogEntityKinds]);\n\n const handleChangePage = useCallback((_event: unknown, newPage: number) => {\n setPage(newPage);\n }, []);\n\n const handleChangeRowsPerPage = useCallback(\n (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n setRowsPerPage(+event.target.value);\n setPage(0);\n },\n [],\n );\n\n const handleChange = useCallback((event: SelectChangeEvent<string>) => {\n setSelectedOption(event.target.value);\n }, []);\n\n const visibleCatalogEntities = useMemo(() => {\n return catalogEntities.data\n ?.filter(entity => {\n if (selectedOption && selectedOption !== 'All') {\n return (\n entity.kind.toLocaleLowerCase() ===\n selectedOption.toLocaleLowerCase()\n );\n }\n return true;\n })\n .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage);\n }, [catalogEntities, page, rowsPerPage, selectedOption]);\n\n if (error) {\n return (\n <CardWrapper title={CATALOG_ENTITIES_TITLE}>\n <ResponseErrorPanel error={error} />\n </CardWrapper>\n );\n }\n\n if (\n (!visibleCatalogEntities || visibleCatalogEntities?.length === 0) &&\n !loading\n ) {\n return (\n <CardWrapper title={CATALOG_ENTITIES_TITLE}>\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n height={200}\n >\n <EmptyChartState />\n </Box>\n </CardWrapper>\n );\n }\n\n return (\n <CardWrapper\n title={CATALOG_ENTITIES_TITLE}\n filter={\n <FilterDropdown\n selectedOption={selectedOption}\n handleChange={handleChange}\n uniqueCatalogEntityKinds={uniqueCatalogEntityKinds}\n />\n }\n >\n <Table aria-labelledby=\"Catalog entities\" sx={{ width: '100%' }}>\n <TableHead>\n <TableRow>\n {CATALOG_ENTITIES_TABLE_HEADERS.map(header => (\n <TableCell\n key={header.id}\n align=\"left\"\n sx={{\n borderBottom: theme => `1px solid ${theme.palette.grey[300]}`,\n width: '25%',\n }}\n >\n {header.title}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {loading ? (\n <TableRow>\n <TableCell\n colSpan={CATALOG_ENTITIES_TABLE_HEADERS.length}\n align=\"center\"\n >\n <CircularProgress />\n </TableCell>\n </TableRow>\n ) : (\n visibleCatalogEntities?.map(entity => (\n <TableRow\n key={`${entity.kind}-${entity.name}`}\n sx={{\n '&:nth-of-type(odd)': { backgroundColor: 'inherit' },\n borderBottom: theme => `1px solid ${theme.palette.grey[300]}`,\n }}\n >\n <TableCell sx={{ width: '25%' }}>\n <Link\n component=\"a\"\n href={entityLink({\n kind: entity.kind,\n namespace: entity.namespace,\n name: entity.name,\n })}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n sx={{\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'none',\n },\n }}\n >\n {entity.name ?? '--'}\n </Link>\n </TableCell>\n <TableCell sx={{ width: '25%' }}>\n {entity.kind?.charAt(0).toLocaleUpperCase('en-US') +\n entity.kind?.slice(1) || '--'}\n </TableCell>\n <TableCell sx={{ width: '25%' }}>\n {getLastUsedDay(entity.last_used) ?? '--'}\n </TableCell>\n <TableCell sx={{ width: '25%' }}>\n {Number(entity.count).toLocaleString('en-US') ?? '--'}\n </TableCell>\n </TableRow>\n ))\n )}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TableCell\n colSpan={CATALOG_ENTITIES_TABLE_HEADERS.length}\n sx={{ padding: 0 }}\n >\n <TableFooterPagination\n count={catalogEntities.data?.length}\n rowsPerPage={rowsPerPage}\n page={page}\n handleChangePage={handleChangePage}\n handleChangeRowsPerPage={handleChangeRowsPerPage}\n />\n </TableCell>\n </TableRow>\n </TableFooter>\n </Table>\n </CardWrapper>\n );\n};\n\nexport default CatalogEntities;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,kBAAkB,MAAM;AAC5B,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,CAAC,CAAA;AAClC,EAAA,MAAM,CAAC,KAAK,CAAI,GAAA,QAAA,CAAS,EAAE,CAAA;AAC3B,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,CAAC,CAAA;AAChD,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,CAAA,GAAI,SAAS,EAAE,CAAA;AACvD,EAAA,MAAM,CAAC,wBAA0B,EAAA,2BAA2B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