@backstage/plugin-app-visualizer 0.1.22-next.1 → 0.1.22
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 +9 -0
- package/dist/components/AppVisualizerPage/AppVisualizerPage.esm.js.map +1 -1
- package/dist/components/AppVisualizerPage/DetailedVisualizer.esm.js +1 -1
- package/dist/components/AppVisualizerPage/DetailedVisualizer.esm.js.map +1 -1
- package/dist/components/AppVisualizerPage/TextVisualizer.esm.js.map +1 -1
- package/dist/components/AppVisualizerPage/TreeVisualizer.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/package.json.esm.js +1 -1
- package/dist/plugin.esm.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @backstage/plugin-app-visualizer
|
|
2
2
|
|
|
3
|
+
## 0.1.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e4ddf22: Internal update to align with new blueprint parameter naming in the new frontend system.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/core-components@0.17.5
|
|
10
|
+
- @backstage/frontend-plugin-api@0.11.0
|
|
11
|
+
|
|
3
12
|
## 0.1.22-next.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppVisualizerPage.esm.js","sources":["../../../src/components/AppVisualizerPage/AppVisualizerPage.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 { Content, Header, HeaderTabs, Page } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { appTreeApiRef } from '@backstage/frontend-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { DetailedVisualizer } from './DetailedVisualizer';\nimport { TextVisualizer } from './TextVisualizer';\nimport { TreeVisualizer } from './TreeVisualizer';\nimport {\n matchRoutes,\n useLocation,\n useNavigate,\n useParams,\n useRoutes,\n} from 'react-router-dom';\n\nexport function AppVisualizerPage() {\n const appTreeApi = useApi(appTreeApiRef);\n const { tree } = appTreeApi.getTree();\n\n const tabs = useMemo(\n () => [\n {\n id: 'tree',\n path: 'tree',\n label: 'Tree',\n element: <TreeVisualizer tree={tree} />,\n },\n {\n id: 'detailed',\n path: 'detailed',\n label: 'Detailed',\n element: <DetailedVisualizer tree={tree} />,\n },\n {\n id: 'text',\n path: 'text',\n label: 'Text',\n element: <TextVisualizer tree={tree} />,\n },\n ],\n [tree],\n );\n\n const location = useLocation();\n const element = useRoutes(tabs, location);\n\n const currentPath = `/${useParams()['*']}`;\n const [matchedRoute] = matchRoutes(tabs, currentPath) ?? [];\n\n const currentTabIndex = matchedRoute\n ? tabs.findIndex(t => t.path === matchedRoute.route.path)\n : 0;\n\n const navigate = useNavigate();\n const handleTabChange = useCallback(\n (index: number) => {\n navigate(tabs[index].id);\n },\n [navigate, tabs],\n );\n\n useEffect(() => {\n if (!element) {\n navigate(tabs[0].path);\n }\n }, [element, navigate, tabs]);\n\n return (\n <Page themeId=\"tool\">\n <Header title=\"App Visualizer\" />\n <Content noPadding stretch>\n <Box display=\"flex\" flexDirection=\"column\" height=\"100%\">\n <HeaderTabs\n tabs={tabs}\n selectedIndex={currentTabIndex}\n onChange={handleTabChange}\n />\n {element}\n </Box>\n </Content>\n </Page>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAgCO,SAAS,
|
|
1
|
+
{"version":3,"file":"AppVisualizerPage.esm.js","sources":["../../../src/components/AppVisualizerPage/AppVisualizerPage.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 { Content, Header, HeaderTabs, Page } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { appTreeApiRef } from '@backstage/frontend-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { DetailedVisualizer } from './DetailedVisualizer';\nimport { TextVisualizer } from './TextVisualizer';\nimport { TreeVisualizer } from './TreeVisualizer';\nimport {\n matchRoutes,\n useLocation,\n useNavigate,\n useParams,\n useRoutes,\n} from 'react-router-dom';\n\nexport function AppVisualizerPage() {\n const appTreeApi = useApi(appTreeApiRef);\n const { tree } = appTreeApi.getTree();\n\n const tabs = useMemo(\n () => [\n {\n id: 'tree',\n path: 'tree',\n label: 'Tree',\n element: <TreeVisualizer tree={tree} />,\n },\n {\n id: 'detailed',\n path: 'detailed',\n label: 'Detailed',\n element: <DetailedVisualizer tree={tree} />,\n },\n {\n id: 'text',\n path: 'text',\n label: 'Text',\n element: <TextVisualizer tree={tree} />,\n },\n ],\n [tree],\n );\n\n const location = useLocation();\n const element = useRoutes(tabs, location);\n\n const currentPath = `/${useParams()['*']}`;\n const [matchedRoute] = matchRoutes(tabs, currentPath) ?? [];\n\n const currentTabIndex = matchedRoute\n ? tabs.findIndex(t => t.path === matchedRoute.route.path)\n : 0;\n\n const navigate = useNavigate();\n const handleTabChange = useCallback(\n (index: number) => {\n navigate(tabs[index].id);\n },\n [navigate, tabs],\n );\n\n useEffect(() => {\n if (!element) {\n navigate(tabs[0].path);\n }\n }, [element, navigate, tabs]);\n\n return (\n <Page themeId=\"tool\">\n <Header title=\"App Visualizer\" />\n <Content noPadding stretch>\n <Box display=\"flex\" flexDirection=\"column\" height=\"100%\">\n <HeaderTabs\n tabs={tabs}\n selectedIndex={currentTabIndex}\n onChange={handleTabChange}\n />\n {element}\n </Box>\n </Content>\n </Page>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAgCO,SAAS,iBAAA,GAAoB;AAClC,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,UAAA,CAAW,OAAA,EAAQ;AAEpC,EAAA,MAAM,IAAA,GAAO,OAAA;AAAA,IACX,MAAM;AAAA,MACJ;AAAA,QACE,EAAA,EAAI,MAAA;AAAA,QACJ,IAAA,EAAM,MAAA;AAAA,QACN,KAAA,EAAO,MAAA;AAAA,QACP,OAAA,kBAAS,GAAA,CAAC,cAAA,EAAA,EAAe,IAAA,EAAY;AAAA,OACvC;AAAA,MACA;AAAA,QACE,EAAA,EAAI,UAAA;AAAA,QACJ,IAAA,EAAM,UAAA;AAAA,QACN,KAAA,EAAO,UAAA;AAAA,QACP,OAAA,kBAAS,GAAA,CAAC,kBAAA,EAAA,EAAmB,IAAA,EAAY;AAAA,OAC3C;AAAA,MACA;AAAA,QACE,EAAA,EAAI,MAAA;AAAA,QACJ,IAAA,EAAM,MAAA;AAAA,QACN,KAAA,EAAO,MAAA;AAAA,QACP,OAAA,kBAAS,GAAA,CAAC,cAAA,EAAA,EAAe,IAAA,EAAY;AAAA;AACvC,KACF;AAAA,IACA,CAAC,IAAI;AAAA,GACP;AAEA,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,OAAA,GAAU,SAAA,CAAU,IAAA,EAAM,QAAQ,CAAA;AAExC,EAAA,MAAM,WAAA,GAAc,CAAA,CAAA,EAAI,SAAA,EAAU,CAAE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A,EACH,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeBlueprint, NavItemBlueprint, coreExtensionData, ApiBlueprint, useRouteRef } from '@backstage/frontend-plugin-api';
|
|
3
3
|
import Box from '@material-ui/core/Box';
|
|
4
4
|
import Paper from '@material-ui/core/Paper';
|
|
5
5
|
import Tooltip from '@material-ui/core/Tooltip';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailedVisualizer.esm.js","sources":["../../../src/components/AppVisualizerPage/DetailedVisualizer.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 AppNode,\n AppTree,\n ExtensionDataRef,\n RouteRef,\n coreExtensionData,\n ApiBlueprint,\n NavItemBlueprint,\n ThemeBlueprint,\n useRouteRef,\n} from '@backstage/frontend-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport Paper from '@material-ui/core/Paper';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport * as colors from '@material-ui/core/colors';\nimport { makeStyles } from '@material-ui/core/styles';\nimport InputIcon from '@material-ui/icons/InputSharp';\nimport DisabledIcon from '@material-ui/icons/NotInterestedSharp';\nimport { Link } from 'react-router-dom';\n\nfunction createOutputColorGenerator(\n colorMap: { [extDataId: string]: string },\n availableColors: string[],\n) {\n const map = new Map<string, string>();\n let i = 0;\n\n return function getOutputColor(id: string) {\n if (id in colorMap) {\n return colorMap[id];\n }\n let color = map.get(id);\n if (color) {\n return color;\n }\n color = availableColors[i];\n i += 1;\n if (i >= availableColors.length) {\n i = 0;\n }\n map.set(id, color);\n return color;\n };\n}\n\nconst getOutputColor = createOutputColorGenerator(\n {\n [coreExtensionData.reactElement.id]: colors.green[500],\n [coreExtensionData.routePath.id]: colors.yellow[500],\n [coreExtensionData.routeRef.id]: colors.purple[500],\n [ApiBlueprint.dataRefs.factory.id]: colors.blue[500],\n [ThemeBlueprint.dataRefs.theme.id]: colors.lime[500],\n [NavItemBlueprint.dataRefs.target.id]: colors.orange[500],\n },\n\n [\n colors.blue[200],\n colors.orange[200],\n colors.green[200],\n colors.red[200],\n colors.yellow[200],\n colors.purple[200],\n colors.lime[200],\n ],\n);\n\ninterface StyleProps {\n enabled: boolean;\n depth: number;\n}\n\nconst config = {\n borderWidth: 0.75,\n};\n\nconst useStyles = makeStyles(theme => ({\n extension: {\n borderLeftWidth: theme.spacing(config.borderWidth),\n borderLeftStyle: 'solid',\n borderLeftColor: ({ depth }: StyleProps) =>\n colors.grey[(700 - (depth % 6) * 100) as keyof typeof colors.grey],\n cursor: 'pointer',\n\n '&:hover $extensionHeader': {\n color: ({ enabled }: StyleProps) =>\n enabled ? theme.palette.primary.main : theme.palette.text.secondary,\n },\n },\n extensionHeader: {\n display: 'flex',\n alignItems: 'center',\n width: 'fit-content',\n\n padding: theme.spacing(0.5, 1),\n color: ({ enabled }: StyleProps) =>\n enabled ? theme.palette.text.primary : theme.palette.text.disabled,\n background: theme.palette.background.paper,\n\n borderTopRightRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n },\n extensionHeaderId: {\n userSelect: 'all',\n },\n extensionHeaderOutputs: {\n display: 'flex',\n alignItems: 'center',\n marginLeft: theme.spacing(1),\n gap: theme.spacing(1),\n },\n attachments: {\n gap: theme.spacing(2),\n display: 'flex',\n flexDirection: 'column',\n },\n attachmentsInput: {\n '&:first-child $attachmentsInputTitle': {\n borderTop: 0,\n },\n },\n attachmentsInputTitle: {\n display: 'flex',\n alignItems: 'center',\n width: 'fit-content',\n padding: theme.spacing(1),\n\n borderTopWidth: theme.spacing(config.borderWidth),\n borderTopStyle: 'solid',\n borderTopColor: ({ depth }: StyleProps) =>\n colors.grey[(700 - (depth % 6) * 100) as keyof typeof colors.grey],\n },\n attachmentsInputName: {\n marginLeft: theme.spacing(1),\n },\n attachmentsInputChildren: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n gap: theme.spacing(0.5),\n marginLeft: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst useOutputStyles = makeStyles(theme => ({\n output: ({ color }: { color: string }) => ({\n padding: `0 10px`,\n height: 20,\n borderRadius: 10,\n color: theme.palette.getContrastText(color),\n backgroundColor: color,\n }),\n}));\n\nfunction getFullPath(node?: AppNode): string {\n if (!node) {\n return '';\n }\n const parent = node.edges.attachedTo?.node;\n const part = node.instance?.getData(coreExtensionData.routePath);\n if (!part) {\n return getFullPath(parent);\n }\n return getFullPath(parent) + part;\n}\n\nfunction OutputLink(props: {\n dataRef: ExtensionDataRef<unknown>;\n node?: AppNode;\n className: string;\n}) {\n const routeRef = props.node?.instance?.getData(coreExtensionData.routeRef);\n\n try {\n const link = useRouteRef(routeRef as RouteRef<undefined>);\n\n return (\n <Tooltip title={<Typography>{props.dataRef.id}</Typography>}>\n <Box className={props.className}>\n {link ? <Link to={link()}>link</Link> : null}\n </Box>\n </Tooltip>\n );\n } catch (ex) {\n // eslint-disable-next-line no-console\n console.warn(\n props.node?.spec.id\n ? `Unable to generate output link for ${props.node.spec.id}`\n : 'Unable to generate output link',\n ex,\n );\n return null;\n }\n}\n\nfunction Output(props: { dataRef: ExtensionDataRef<unknown>; node?: AppNode }) {\n const { dataRef, node } = props;\n const { id } = dataRef;\n const instance = node?.instance;\n\n const classes = useOutputStyles({ color: getOutputColor(id) });\n\n if (id === coreExtensionData.routePath.id) {\n return (\n <Tooltip title={<Typography>{getFullPath(node)}</Typography>}>\n <Box className={classes.output}>\n {String(instance?.getData(dataRef) ?? '')}\n </Box>\n </Tooltip>\n );\n }\n\n if (id === coreExtensionData.routeRef.id) {\n return <OutputLink {...props} className={classes.output} />;\n }\n\n return (\n <Tooltip title={<Typography>{id}</Typography>}>\n <Box className={classes.output} />\n </Tooltip>\n );\n}\n\nfunction Attachments(props: {\n node: AppNode;\n enabled: boolean;\n depth: number;\n}) {\n const { node, enabled, depth } = props;\n const { attachments } = node.edges;\n\n const classes = useStyles({ enabled, depth });\n\n if (attachments.size === 0) {\n return null;\n }\n\n return (\n <Box className={classes.attachments}>\n {[...attachments.entries()]\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([key, children]) => {\n return (\n <Box key={key} className={classes.attachmentsInput}>\n <Box className={classes.attachmentsInputTitle}>\n <InputIcon />\n <Typography className={classes.attachmentsInputName}>\n {key}\n </Typography>\n </Box>\n <Box className={classes.attachmentsInputChildren}>\n {children.map(childNode => (\n <Extension\n key={childNode.spec.id}\n node={childNode}\n depth={depth + 1}\n />\n ))}\n </Box>\n </Box>\n );\n })}\n </Box>\n );\n}\n\nfunction ExtensionTooltip(props: { node: AppNode }) {\n const parts = [];\n let node = props.node;\n parts.push(node.spec.id);\n while (node.edges.attachedTo) {\n const input = node.edges.attachedTo.input;\n node = node.edges.attachedTo.node;\n parts.push(`${node.spec.id} [${input}]`);\n }\n parts.reverse();\n\n return (\n <>\n {parts.map(part => (\n <Typography key={part}>{part}</Typography>\n ))}\n </>\n );\n}\n\nfunction Extension(props: { node: AppNode; depth: number }) {\n const { node, depth } = props;\n\n const enabled = Boolean(node.instance);\n const classes = useStyles({ enabled, depth });\n\n const dataRefs = node.instance && [...node.instance.getDataRefs()];\n\n return (\n <Box key={node.spec.id} className={classes.extension}>\n <Box className={classes.extensionHeader}>\n <Tooltip title={<ExtensionTooltip node={node} />}>\n <Typography className={classes.extensionHeaderId}>\n {node.spec.id}\n </Typography>\n </Tooltip>\n <Box className={classes.extensionHeaderOutputs}>\n {dataRefs &&\n dataRefs.length > 0 &&\n dataRefs\n .sort((a, b) => a.id.localeCompare(b.id))\n .map(ref => <Output key={ref.id} dataRef={ref} node={node} />)}\n {!enabled && <DisabledIcon fontSize=\"small\" />}\n </Box>\n </Box>\n <Attachments node={node} enabled={enabled} depth={depth} />\n </Box>\n );\n}\n\nconst legendMap = {\n 'React Element': coreExtensionData.reactElement,\n 'Utility API': ApiBlueprint.dataRefs.factory,\n 'Route Path': coreExtensionData.routePath,\n 'Route Ref': coreExtensionData.routeRef,\n 'Nav Target': NavItemBlueprint.dataRefs.target,\n Theme: ThemeBlueprint.dataRefs.theme,\n};\n\nfunction Legend() {\n return (\n <Box\n display=\"grid\"\n maxWidth={600}\n p={1}\n style={{\n grid: 'auto-flow / repeat(3, 1fr)',\n gap: 16,\n }}\n >\n {Object.entries(legendMap).map(([label, dataRef]) => (\n <Box\n key={dataRef.id}\n display=\"flex\"\n style={{ gap: 8 }}\n alignItems=\"center\"\n >\n <Output dataRef={dataRef} />\n <Typography>{label}</Typography>\n </Box>\n ))}\n </Box>\n );\n}\n\nexport function DetailedVisualizer({ tree }: { tree: AppTree }) {\n return (\n <Box display=\"flex\" height=\"100%\" flex=\"1 1 100%\" flexDirection=\"column\">\n <Box flex=\"1 1 0\" overflow=\"auto\" ml={2} mt={2}>\n <Extension node={tree.root} depth={0} />\n </Box>\n\n <Box component={Paper} flex=\"0 0 auto\" m={1}>\n <Legend />\n </Box>\n </Box>\n );\n}\n"],"names":["getOutputColor"],"mappings":";;;;;;;;;;;;AAqCA,SAAS,0BAAA,CACP,UACA,eACA,EAAA;AACA,EAAM,MAAA,GAAA,uBAAU,GAAoB,EAAA;AACpC,EAAA,IAAI,CAAI,GAAA,CAAA;AAER,EAAO,OAAA,SAASA,gBAAe,EAAY,EAAA;AACzC,IAAA,IAAI,MAAM,QAAU,EAAA;AAClB,MAAA,OAAO,SAAS,EAAE,CAAA;AAAA;AAEpB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CAC3C,EAAA,QAAA,kBAAA,GAAA,CAAC,aAAU,IAAM,EAAA,IAAA,CAAK,IAAM,EAAA,KAAA,EAAO,GAAG,CACxC,EAAA,CAAA;AAAA,oBAEA,GAAA,CAAC,GAAI,EAAA,EAAA,SAAA,EAAW,KAAO,EAAA,IAAA,EAAK,YAAW,CAAG,EAAA,CAAA,EACxC,QAAC,kBAAA,GAAA,CAAA,MAAA,EAAA,EAAO,CACV,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"DetailedVisualizer.esm.js","sources":["../../../src/components/AppVisualizerPage/DetailedVisualizer.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 AppNode,\n AppTree,\n ExtensionDataRef,\n RouteRef,\n coreExtensionData,\n ApiBlueprint,\n NavItemBlueprint,\n ThemeBlueprint,\n useRouteRef,\n} from '@backstage/frontend-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport Paper from '@material-ui/core/Paper';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport * as colors from '@material-ui/core/colors';\nimport { makeStyles } from '@material-ui/core/styles';\nimport InputIcon from '@material-ui/icons/InputSharp';\nimport DisabledIcon from '@material-ui/icons/NotInterestedSharp';\nimport { Link } from 'react-router-dom';\n\nfunction createOutputColorGenerator(\n colorMap: { [extDataId: string]: string },\n availableColors: string[],\n) {\n const map = new Map<string, string>();\n let i = 0;\n\n return function getOutputColor(id: string) {\n if (id in colorMap) {\n return colorMap[id];\n }\n let color = map.get(id);\n if (color) {\n return color;\n }\n color = availableColors[i];\n i += 1;\n if (i >= availableColors.length) {\n i = 0;\n }\n map.set(id, color);\n return color;\n };\n}\n\nconst getOutputColor = createOutputColorGenerator(\n {\n [coreExtensionData.reactElement.id]: colors.green[500],\n [coreExtensionData.routePath.id]: colors.yellow[500],\n [coreExtensionData.routeRef.id]: colors.purple[500],\n [ApiBlueprint.dataRefs.factory.id]: colors.blue[500],\n [ThemeBlueprint.dataRefs.theme.id]: colors.lime[500],\n [NavItemBlueprint.dataRefs.target.id]: colors.orange[500],\n },\n\n [\n colors.blue[200],\n colors.orange[200],\n colors.green[200],\n colors.red[200],\n colors.yellow[200],\n colors.purple[200],\n colors.lime[200],\n ],\n);\n\ninterface StyleProps {\n enabled: boolean;\n depth: number;\n}\n\nconst config = {\n borderWidth: 0.75,\n};\n\nconst useStyles = makeStyles(theme => ({\n extension: {\n borderLeftWidth: theme.spacing(config.borderWidth),\n borderLeftStyle: 'solid',\n borderLeftColor: ({ depth }: StyleProps) =>\n colors.grey[(700 - (depth % 6) * 100) as keyof typeof colors.grey],\n cursor: 'pointer',\n\n '&:hover $extensionHeader': {\n color: ({ enabled }: StyleProps) =>\n enabled ? theme.palette.primary.main : theme.palette.text.secondary,\n },\n },\n extensionHeader: {\n display: 'flex',\n alignItems: 'center',\n width: 'fit-content',\n\n padding: theme.spacing(0.5, 1),\n color: ({ enabled }: StyleProps) =>\n enabled ? theme.palette.text.primary : theme.palette.text.disabled,\n background: theme.palette.background.paper,\n\n borderTopRightRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n },\n extensionHeaderId: {\n userSelect: 'all',\n },\n extensionHeaderOutputs: {\n display: 'flex',\n alignItems: 'center',\n marginLeft: theme.spacing(1),\n gap: theme.spacing(1),\n },\n attachments: {\n gap: theme.spacing(2),\n display: 'flex',\n flexDirection: 'column',\n },\n attachmentsInput: {\n '&:first-child $attachmentsInputTitle': {\n borderTop: 0,\n },\n },\n attachmentsInputTitle: {\n display: 'flex',\n alignItems: 'center',\n width: 'fit-content',\n padding: theme.spacing(1),\n\n borderTopWidth: theme.spacing(config.borderWidth),\n borderTopStyle: 'solid',\n borderTopColor: ({ depth }: StyleProps) =>\n colors.grey[(700 - (depth % 6) * 100) as keyof typeof colors.grey],\n },\n attachmentsInputName: {\n marginLeft: theme.spacing(1),\n },\n attachmentsInputChildren: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n gap: theme.spacing(0.5),\n marginLeft: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst useOutputStyles = makeStyles(theme => ({\n output: ({ color }: { color: string }) => ({\n padding: `0 10px`,\n height: 20,\n borderRadius: 10,\n color: theme.palette.getContrastText(color),\n backgroundColor: color,\n }),\n}));\n\nfunction getFullPath(node?: AppNode): string {\n if (!node) {\n return '';\n }\n const parent = node.edges.attachedTo?.node;\n const part = node.instance?.getData(coreExtensionData.routePath);\n if (!part) {\n return getFullPath(parent);\n }\n return getFullPath(parent) + part;\n}\n\nfunction OutputLink(props: {\n dataRef: ExtensionDataRef<unknown>;\n node?: AppNode;\n className: string;\n}) {\n const routeRef = props.node?.instance?.getData(coreExtensionData.routeRef);\n\n try {\n const link = useRouteRef(routeRef as RouteRef<undefined>);\n\n return (\n <Tooltip title={<Typography>{props.dataRef.id}</Typography>}>\n <Box className={props.className}>\n {link ? <Link to={link()}>link</Link> : null}\n </Box>\n </Tooltip>\n );\n } catch (ex) {\n // eslint-disable-next-line no-console\n console.warn(\n props.node?.spec.id\n ? `Unable to generate output link for ${props.node.spec.id}`\n : 'Unable to generate output link',\n ex,\n );\n return null;\n }\n}\n\nfunction Output(props: { dataRef: ExtensionDataRef<unknown>; node?: AppNode }) {\n const { dataRef, node } = props;\n const { id } = dataRef;\n const instance = node?.instance;\n\n const classes = useOutputStyles({ color: getOutputColor(id) });\n\n if (id === coreExtensionData.routePath.id) {\n return (\n <Tooltip title={<Typography>{getFullPath(node)}</Typography>}>\n <Box className={classes.output}>\n {String(instance?.getData(dataRef) ?? '')}\n </Box>\n </Tooltip>\n );\n }\n\n if (id === coreExtensionData.routeRef.id) {\n return <OutputLink {...props} className={classes.output} />;\n }\n\n return (\n <Tooltip title={<Typography>{id}</Typography>}>\n <Box className={classes.output} />\n </Tooltip>\n );\n}\n\nfunction Attachments(props: {\n node: AppNode;\n enabled: boolean;\n depth: number;\n}) {\n const { node, enabled, depth } = props;\n const { attachments } = node.edges;\n\n const classes = useStyles({ enabled, depth });\n\n if (attachments.size === 0) {\n return null;\n }\n\n return (\n <Box className={classes.attachments}>\n {[...attachments.entries()]\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([key, children]) => {\n return (\n <Box key={key} className={classes.attachmentsInput}>\n <Box className={classes.attachmentsInputTitle}>\n <InputIcon />\n <Typography className={classes.attachmentsInputName}>\n {key}\n </Typography>\n </Box>\n <Box className={classes.attachmentsInputChildren}>\n {children.map(childNode => (\n <Extension\n key={childNode.spec.id}\n node={childNode}\n depth={depth + 1}\n />\n ))}\n </Box>\n </Box>\n );\n })}\n </Box>\n );\n}\n\nfunction ExtensionTooltip(props: { node: AppNode }) {\n const parts = [];\n let node = props.node;\n parts.push(node.spec.id);\n while (node.edges.attachedTo) {\n const input = node.edges.attachedTo.input;\n node = node.edges.attachedTo.node;\n parts.push(`${node.spec.id} [${input}]`);\n }\n parts.reverse();\n\n return (\n <>\n {parts.map(part => (\n <Typography key={part}>{part}</Typography>\n ))}\n </>\n );\n}\n\nfunction Extension(props: { node: AppNode; depth: number }) {\n const { node, depth } = props;\n\n const enabled = Boolean(node.instance);\n const classes = useStyles({ enabled, depth });\n\n const dataRefs = node.instance && [...node.instance.getDataRefs()];\n\n return (\n <Box key={node.spec.id} className={classes.extension}>\n <Box className={classes.extensionHeader}>\n <Tooltip title={<ExtensionTooltip node={node} />}>\n <Typography className={classes.extensionHeaderId}>\n {node.spec.id}\n </Typography>\n </Tooltip>\n <Box className={classes.extensionHeaderOutputs}>\n {dataRefs &&\n dataRefs.length > 0 &&\n dataRefs\n .sort((a, b) => a.id.localeCompare(b.id))\n .map(ref => <Output key={ref.id} dataRef={ref} node={node} />)}\n {!enabled && <DisabledIcon fontSize=\"small\" />}\n </Box>\n </Box>\n <Attachments node={node} enabled={enabled} depth={depth} />\n </Box>\n );\n}\n\nconst legendMap = {\n 'React Element': coreExtensionData.reactElement,\n 'Utility API': ApiBlueprint.dataRefs.factory,\n 'Route Path': coreExtensionData.routePath,\n 'Route Ref': coreExtensionData.routeRef,\n 'Nav Target': NavItemBlueprint.dataRefs.target,\n Theme: ThemeBlueprint.dataRefs.theme,\n};\n\nfunction Legend() {\n return (\n <Box\n display=\"grid\"\n maxWidth={600}\n p={1}\n style={{\n grid: 'auto-flow / repeat(3, 1fr)',\n gap: 16,\n }}\n >\n {Object.entries(legendMap).map(([label, dataRef]) => (\n <Box\n key={dataRef.id}\n display=\"flex\"\n style={{ gap: 8 }}\n alignItems=\"center\"\n >\n <Output dataRef={dataRef} />\n <Typography>{label}</Typography>\n </Box>\n ))}\n </Box>\n );\n}\n\nexport function DetailedVisualizer({ tree }: { tree: AppTree }) {\n return (\n <Box display=\"flex\" height=\"100%\" flex=\"1 1 100%\" flexDirection=\"column\">\n <Box flex=\"1 1 0\" overflow=\"auto\" ml={2} mt={2}>\n <Extension node={tree.root} depth={0} />\n </Box>\n\n <Box component={Paper} flex=\"0 0 auto\" m={1}>\n <Legend />\n </Box>\n </Box>\n );\n}\n"],"names":["getOutputColor"],"mappings":";;;;;;;;;;;;AAqCA,SAAS,0BAAA,CACP,UACA,eAAA,EACA;AACA,EAAA,MAAM,GAAA,uBAAU,GAAA,EAAoB;AACpC,EAAA,IAAI,CAAA,GAAI,CAAA;AAER,EAAA,OAAO,SAASA,gBAAe,EAAA,EAAY;AACzC,IAAA,IAAI,MAAM,QAAA,EAAU;AAClB,MAAA,OAAO,SAAS,EAAE,CAAA;AAAA,IACpB;AACA,IAAA,IAAI,KAAA,GAAQ,GAAA,CAAI,GAA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,EAAG,EAAA,EAAI,CAAA,EAC3C,QAAA,kBAAA,GAAA,CAAC,aAAU,IAAA,EAAM,IAAA,CAAK,IAAA,EAAM,KAAA,EAAO,GAAG,CAAA,EACxC,CAAA;AAAA,oBAEA,GAAA,CAAC,GAAA,EAAA,EAAI,SAAA,EAAW,KAAA,EAAO,IAAA,EAAK,YAAW,CAAA,EAAG,CAAA,EACxC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,EACV;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextVisualizer.esm.js","sources":["../../../src/components/AppVisualizerPage/TextVisualizer.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 { AppNode, AppTree } from '@backstage/frontend-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Paper from '@material-ui/core/Paper';\nimport { ReactNode, useState } from 'react';\n\nfunction mkDiv(\n children: ReactNode,\n options?: { indent?: boolean; key?: string | number; color?: string },\n) {\n return (\n <div\n key={options?.key}\n style={{\n color: options?.color,\n marginLeft: options?.indent ? 16 : undefined,\n }}\n >\n {children}\n </div>\n );\n}\n\nfunction nodeToText(\n node: AppNode,\n options?: { showOutputs?: boolean; showDisabled?: boolean },\n): ReactNode {\n const dataRefIds =\n node.instance && [...node.instance.getDataRefs()].map(r => r.id);\n const out =\n options?.showOutputs && dataRefIds && dataRefIds.length > 0\n ? ` out=\"${[...dataRefIds].sort().join(', ')}\"`\n : '';\n const color = node.instance ? undefined : 'gray';\n\n if (node.edges.attachments.size === 0) {\n return mkDiv(`<${node.spec.id}${out}/>`, { color });\n }\n\n return mkDiv([\n mkDiv(`<${node.spec.id}${out}>`, { key: 'start', color }),\n ...[...node.edges.attachments.entries()]\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([key, v]) => {\n const children = v\n .filter(e => options?.showDisabled || e.instance)\n .sort((a, b) => a.spec.id.localeCompare(b.spec.id));\n if (children.length === 0) {\n return mkDiv(`${key} []`, { indent: true });\n }\n return mkDiv(\n [\n mkDiv(`${key} [`),\n ...children.map(e =>\n mkDiv(nodeToText(e, options), { indent: true }),\n ),\n mkDiv(']'),\n ],\n { key, indent: true },\n );\n }),\n mkDiv(`</${node.spec.id}>`, { key: 'end', color }),\n ]);\n}\n\nexport function TextVisualizer({ tree }: { tree: AppTree }) {\n const [showOutputs, setShowOutputs] = useState(false);\n const [showDisabled, setShowDisabled] = useState(false);\n\n return (\n <>\n <Box style={{ overflow: 'auto', flex: '1 0 0' }}>\n <div style={{ margin: 16, width: 'max-content' }}>\n {nodeToText(tree.root, { showOutputs, showDisabled })}\n </div>\n </Box>\n <Paper style={{ padding: '8px 16px' }}>\n <FormControlLabel\n control={\n <Checkbox\n checked={showOutputs}\n onChange={(_, value) => setShowOutputs(value)}\n />\n }\n label=\"Show Outputs\"\n />\n <FormControlLabel\n control={\n <Checkbox\n checked={showDisabled}\n onChange={(_, value) => setShowDisabled(value)}\n />\n }\n label=\"Show Disabled\"\n />\n </Paper>\n </>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAuBA,SAAS,KAAA,CACP,UACA,
|
|
1
|
+
{"version":3,"file":"TextVisualizer.esm.js","sources":["../../../src/components/AppVisualizerPage/TextVisualizer.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 { AppNode, AppTree } from '@backstage/frontend-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Paper from '@material-ui/core/Paper';\nimport { ReactNode, useState } from 'react';\n\nfunction mkDiv(\n children: ReactNode,\n options?: { indent?: boolean; key?: string | number; color?: string },\n) {\n return (\n <div\n key={options?.key}\n style={{\n color: options?.color,\n marginLeft: options?.indent ? 16 : undefined,\n }}\n >\n {children}\n </div>\n );\n}\n\nfunction nodeToText(\n node: AppNode,\n options?: { showOutputs?: boolean; showDisabled?: boolean },\n): ReactNode {\n const dataRefIds =\n node.instance && [...node.instance.getDataRefs()].map(r => r.id);\n const out =\n options?.showOutputs && dataRefIds && dataRefIds.length > 0\n ? ` out=\"${[...dataRefIds].sort().join(', ')}\"`\n : '';\n const color = node.instance ? undefined : 'gray';\n\n if (node.edges.attachments.size === 0) {\n return mkDiv(`<${node.spec.id}${out}/>`, { color });\n }\n\n return mkDiv([\n mkDiv(`<${node.spec.id}${out}>`, { key: 'start', color }),\n ...[...node.edges.attachments.entries()]\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([key, v]) => {\n const children = v\n .filter(e => options?.showDisabled || e.instance)\n .sort((a, b) => a.spec.id.localeCompare(b.spec.id));\n if (children.length === 0) {\n return mkDiv(`${key} []`, { indent: true });\n }\n return mkDiv(\n [\n mkDiv(`${key} [`),\n ...children.map(e =>\n mkDiv(nodeToText(e, options), { indent: true }),\n ),\n mkDiv(']'),\n ],\n { key, indent: true },\n );\n }),\n mkDiv(`</${node.spec.id}>`, { key: 'end', color }),\n ]);\n}\n\nexport function TextVisualizer({ tree }: { tree: AppTree }) {\n const [showOutputs, setShowOutputs] = useState(false);\n const [showDisabled, setShowDisabled] = useState(false);\n\n return (\n <>\n <Box style={{ overflow: 'auto', flex: '1 0 0' }}>\n <div style={{ margin: 16, width: 'max-content' }}>\n {nodeToText(tree.root, { showOutputs, showDisabled })}\n </div>\n </Box>\n <Paper style={{ padding: '8px 16px' }}>\n <FormControlLabel\n control={\n <Checkbox\n checked={showOutputs}\n onChange={(_, value) => setShowOutputs(value)}\n />\n }\n label=\"Show Outputs\"\n />\n <FormControlLabel\n control={\n <Checkbox\n checked={showDisabled}\n onChange={(_, value) => setShowDisabled(value)}\n />\n }\n label=\"Show Disabled\"\n />\n </Paper>\n </>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAuBA,SAAS,KAAA,CACP,UACA,OAAA,EACA;AACA,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MAEC,KAAA,EAAO;AAAA,QACL,OAAO,OAAA,EAAS,KAAA;AAAA,QAChB,UAAA,EAAY,OAAA,EAAS,MAAA,GAAS,EAAA,GAAK;AAAA,OACrC;AAAA,MAEC;AAAA,KAAA;AAAA,IANI,OAAA,EAAS;AAAA,GAOhB;AAEJ;AAEA,SAAS,UAAA,CACP,MACA,OAAA,EACW;AACX,EAAA,MAAM,UAAA,GACJ,IAAA,CAAK,QAAA,IAAY,CAAC,GAAG,IAAA,CAAK,QAAA,CAAS,WAAA,EAAa,CAAA,CAAE,GAAA,CAAI,CAAA,CAAA,KAAK,EAAE,EAAE,CAAA;AACjE,EAAA,MAAM,MACJ,OAAA,EAAS,WAAA,IAAe,UAAA,IAAc,UAAA,CAAW,SAAS,CAAA,GACtD,CAAA,MAAA,EAAS,CAAC,GAAG,UAAU,CAAA,CAAE,IAAA,GAAO,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,CAAA,GAC1C,EAAA;AACN,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,QAAA,GAAW,MAAA,GAAY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,WAC9C;AAAA,UAEF,KAAA,EAAM;AAAA;AAAA,OACR;AAAA,sBACA,GAAA;AAAA,QAAC,gBAAA;AAAA,QAAA;AAAA,UACC,OAAA,kBACE,GAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAS,YAAA;AAAA,cACT,QAAA,EAAU,CAAC,CAAA,EAAG,KAAA,KAAU,gBAAgB,KAAK;AAAA;AAAA,WAC/C;AAAA,UAEF,KAAA,EAAM;AAAA;AAAA;AACR,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeVisualizer.esm.js","sources":["../../../src/components/AppVisualizerPage/TreeVisualizer.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 DependencyGraph,\n DependencyGraphTypes,\n} from '@backstage/core-components';\nimport { AppNode, AppTree } from '@backstage/frontend-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useLayoutEffect, useMemo, useRef, useState } from 'react';\n\ntype NodeType =\n | ({ type: 'node'; id: string } & AppNode)\n | { type: 'input'; id: string; name: string };\n\nfunction inputId({ node, input }: { node: AppNode; input: string }) {\n return `${node.spec.id}$$${input}`;\n}\n\nfunction trimNodeId(id: string) {\n let newId = id;\n if (newId.startsWith('apis.')) {\n newId = newId.slice('apis.'.length);\n }\n if (newId.startsWith('plugin.')) {\n newId = newId.slice('plugin.'.length);\n }\n if (newId.startsWith('catalog.filter.entity.')) {\n newId = newId.slice('catalog.filter.entity.'.length);\n }\n if (newId.endsWith('.nav.index')) {\n newId = newId.slice(0, -'.nav.index'.length);\n }\n return newId;\n}\n\nfunction resolveGraphData(tree: AppTree): {\n nodes: NodeType[];\n edges: { from: string; to: string }[];\n} {\n const nodes = [...tree.nodes.values()]\n .filter(node => node.instance)\n .map(node => ({ ...node, id: node.spec.id, type: 'node' as const }));\n\n return {\n nodes: [\n ...nodes,\n ...nodes.flatMap(node =>\n [...node.edges.attachments.keys()].map(input => ({\n id: inputId({ node, input }),\n type: 'input' as const,\n name: input,\n })),\n ),\n ],\n edges: [\n ...nodes\n .filter(node => node.edges.attachedTo)\n .map(node => ({\n from: inputId(node.edges.attachedTo!),\n to: node.spec.id,\n })),\n ...nodes.flatMap(node =>\n [...node.edges.attachments.keys()].map(input => ({\n from: node.spec.id,\n to: inputId({ node, input }),\n })),\n ),\n ],\n };\n}\n\nconst useStyles = makeStyles(theme => ({\n node: {\n fill: (node: NodeType) =>\n node.type === 'node'\n ? theme.palette.primary.light\n : theme.palette.grey[500],\n stroke: (node: NodeType) =>\n node.type === 'node'\n ? theme.palette.primary.main\n : theme.palette.grey[600],\n },\n text: {\n fill: theme.palette.primary.contrastText,\n },\n}));\n\n/** @public */\nexport function Node(props: { node: NodeType }) {\n const { node } = props;\n const classes = useStyles(node);\n const [width, setWidth] = useState(0);\n const [height, setHeight] = useState(0);\n const idRef = useRef<SVGTextElement | null>(null);\n\n useLayoutEffect(() => {\n // set the width to the length of the ID\n if (idRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n idRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setWidth(renderedWidth);\n setHeight(renderedHeight);\n }\n }\n }, [width, height]);\n\n const padding = 10;\n const paddedWidth = width + padding * 2;\n const paddedHeight = height + padding * 2;\n\n return (\n <g>\n <rect\n className={classes.node}\n width={paddedWidth}\n height={paddedHeight}\n rx={node.type === 'node' ? 0 : 20}\n />\n <text\n ref={idRef}\n className={classes.text}\n y={paddedHeight / 2}\n x={paddedWidth / 2}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n >\n {node.type === 'node' ? trimNodeId(node.id) : node.name}\n </text>\n </g>\n );\n}\n\nexport function TreeVisualizer({ tree }: { tree: AppTree }) {\n const graphData = useMemo(() => resolveGraphData(tree), [tree]);\n\n return (\n <Box height=\"100%\" flex=\"1 1 100%\" flexDirection=\"column\" overflow=\"hidden\">\n <DependencyGraph\n fit=\"contain\"\n style={{ height: '100%', width: '100%' }}\n {...graphData}\n nodeMargin={10}\n rankMargin={50}\n paddingX={50}\n renderNode={Node}\n align={DependencyGraphTypes.Alignment.DOWN_RIGHT}\n ranker={DependencyGraphTypes.Ranker.TIGHT_TREE}\n direction={DependencyGraphTypes.Direction.TOP_BOTTOM}\n />\n </Box>\n );\n}\n"],"names":[],"mappings":";;;;;;AA6BA,SAAS,
|
|
1
|
+
{"version":3,"file":"TreeVisualizer.esm.js","sources":["../../../src/components/AppVisualizerPage/TreeVisualizer.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 DependencyGraph,\n DependencyGraphTypes,\n} from '@backstage/core-components';\nimport { AppNode, AppTree } from '@backstage/frontend-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useLayoutEffect, useMemo, useRef, useState } from 'react';\n\ntype NodeType =\n | ({ type: 'node'; id: string } & AppNode)\n | { type: 'input'; id: string; name: string };\n\nfunction inputId({ node, input }: { node: AppNode; input: string }) {\n return `${node.spec.id}$$${input}`;\n}\n\nfunction trimNodeId(id: string) {\n let newId = id;\n if (newId.startsWith('apis.')) {\n newId = newId.slice('apis.'.length);\n }\n if (newId.startsWith('plugin.')) {\n newId = newId.slice('plugin.'.length);\n }\n if (newId.startsWith('catalog.filter.entity.')) {\n newId = newId.slice('catalog.filter.entity.'.length);\n }\n if (newId.endsWith('.nav.index')) {\n newId = newId.slice(0, -'.nav.index'.length);\n }\n return newId;\n}\n\nfunction resolveGraphData(tree: AppTree): {\n nodes: NodeType[];\n edges: { from: string; to: string }[];\n} {\n const nodes = [...tree.nodes.values()]\n .filter(node => node.instance)\n .map(node => ({ ...node, id: node.spec.id, type: 'node' as const }));\n\n return {\n nodes: [\n ...nodes,\n ...nodes.flatMap(node =>\n [...node.edges.attachments.keys()].map(input => ({\n id: inputId({ node, input }),\n type: 'input' as const,\n name: input,\n })),\n ),\n ],\n edges: [\n ...nodes\n .filter(node => node.edges.attachedTo)\n .map(node => ({\n from: inputId(node.edges.attachedTo!),\n to: node.spec.id,\n })),\n ...nodes.flatMap(node =>\n [...node.edges.attachments.keys()].map(input => ({\n from: node.spec.id,\n to: inputId({ node, input }),\n })),\n ),\n ],\n };\n}\n\nconst useStyles = makeStyles(theme => ({\n node: {\n fill: (node: NodeType) =>\n node.type === 'node'\n ? theme.palette.primary.light\n : theme.palette.grey[500],\n stroke: (node: NodeType) =>\n node.type === 'node'\n ? theme.palette.primary.main\n : theme.palette.grey[600],\n },\n text: {\n fill: theme.palette.primary.contrastText,\n },\n}));\n\n/** @public */\nexport function Node(props: { node: NodeType }) {\n const { node } = props;\n const classes = useStyles(node);\n const [width, setWidth] = useState(0);\n const [height, setHeight] = useState(0);\n const idRef = useRef<SVGTextElement | null>(null);\n\n useLayoutEffect(() => {\n // set the width to the length of the ID\n if (idRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n idRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setWidth(renderedWidth);\n setHeight(renderedHeight);\n }\n }\n }, [width, height]);\n\n const padding = 10;\n const paddedWidth = width + padding * 2;\n const paddedHeight = height + padding * 2;\n\n return (\n <g>\n <rect\n className={classes.node}\n width={paddedWidth}\n height={paddedHeight}\n rx={node.type === 'node' ? 0 : 20}\n />\n <text\n ref={idRef}\n className={classes.text}\n y={paddedHeight / 2}\n x={paddedWidth / 2}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n >\n {node.type === 'node' ? trimNodeId(node.id) : node.name}\n </text>\n </g>\n );\n}\n\nexport function TreeVisualizer({ tree }: { tree: AppTree }) {\n const graphData = useMemo(() => resolveGraphData(tree), [tree]);\n\n return (\n <Box height=\"100%\" flex=\"1 1 100%\" flexDirection=\"column\" overflow=\"hidden\">\n <DependencyGraph\n fit=\"contain\"\n style={{ height: '100%', width: '100%' }}\n {...graphData}\n nodeMargin={10}\n rankMargin={50}\n paddingX={50}\n renderNode={Node}\n align={DependencyGraphTypes.Alignment.DOWN_RIGHT}\n ranker={DependencyGraphTypes.Ranker.TIGHT_TREE}\n direction={DependencyGraphTypes.Direction.TOP_BOTTOM}\n />\n </Box>\n );\n}\n"],"names":[],"mappings":";;;;;;AA6BA,SAAS,OAAA,CAAQ,EAAE,IAAA,EAAM,KAAA,EAAM,EAAqC;AAClE,EAAA,OAAO,CAAA,EAAG,IAAA,CAAK,IAAA,CAAK,EAAE,KAAK,KAAK,CAAA,CAAA;AAClC;AAEA,SAAS,WAAW,EAAA,EAAY;AAC9B,EAAA,IAAI,KAAA,GAAQ,EAAA;AACZ,EAAA,IAAI,KAAA,CAAM,UAAA,CAAW,OAAO,CAAA,EAAG;AAC7B,IAAA,KAAA,GAAQ,KAAA,CAAM,KAAA,CAAM,OAAA,CAAQ,MAAM,CAAA;AAAA,EACpC;AACA,EAAA,IAAI,KAAA,CAAM,UAAA,CAAW,SAAS,CAAA,EAAG;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A,QACjB,UAAA,EAAW,QAAA;AAAA,QACX,iBAAA,EAAkB,QAAA;AAAA,QAEjB,eAAK,IAAA,KAAS,MAAA,GAAS,WAAW,IAAA,CAAK,EAAE,IAAI,IAAA,CAAK;AAAA;AAAA;AACrD,GAAA,EACF,CAAA;AAEJ;AAEO,SAAS,cAAA,CAAe,EAAE,IAAA,EAAK,EAAsB;AAC1D,EAAA,MAAM,SAAA,GAAY,QAAQ,MAAM,gBAAA,CAAiB,IAAI,CAAA,EAAG,CAAC,IAAI,CAAC,CAAA;AAE9D,EAAA,uBACE,GAAA,CAAC,OAAI,MAAA,EAAO,MAAA,EAAO,MAAK,UAAA,EAAW,aAAA,EAAc,QAAA,EAAS,QAAA,EAAS,QAAA,EACjE,QAAA,kBAAA,GAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,GAAA,EAAI,SAAA;AAAA,MACJ,KAAA,EAAO,EAAE,MAAA,EAAQ,MAAA,EAAQ,OAAO,MAAA,EAAO;AAAA,MACtC,GAAG,SAAA;AAAA,MACJ,UAAA,EAAY,EAAA;AAAA,MACZ,UAAA,EAAY,EAAA;AAAA,MACZ,QAAA,EAAU,EAAA;AAAA,MACV,UAAA,EAAY,IAAA;AAAA,MACZ,KAAA,EAAO,qBAAqB,SAAA,CAAU,UAAA;AAAA,MACtC,MAAA,EAAQ,qBAAqB,MAAA,CAAO,UAAA;AAAA,MACpC,SAAA,EAAW,qBAAqB,SAAA,CAAU;AAAA;AAAA,GAC5C,EACF,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api'
|
|
|
3
3
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
4
|
|
|
5
5
|
/** @public */
|
|
6
|
-
declare const visualizerPlugin: _backstage_frontend_plugin_api.
|
|
6
|
+
declare const visualizerPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{}, {}, {
|
|
7
7
|
"nav-item:app-visualizer": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
8
8
|
kind: "nav-item";
|
|
9
9
|
name: undefined;
|
package/dist/package.json.esm.js
CHANGED
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/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 createRouteRef,\n NavItemBlueprint,\n PageBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport VisualizerIcon from '@material-ui/icons/Visibility';\n\nconst rootRouteRef = createRouteRef();\n\nconst appVisualizerPage = PageBlueprint.make({\n params: {\n path: '/visualizer',\n routeRef: rootRouteRef,\n loader: () =>\n import('./components/AppVisualizerPage').then(m => (\n <m.AppVisualizerPage />\n )),\n },\n});\n\nexport const appVisualizerNavItem = NavItemBlueprint.make({\n params: {\n title: 'Visualizer',\n icon: VisualizerIcon,\n routeRef: rootRouteRef,\n },\n});\n\n/** @public */\nexport const visualizerPlugin = createFrontendPlugin({\n pluginId: 'app-visualizer',\n info: { packageJson: () => import('../package.json') },\n extensions: [appVisualizerPage, appVisualizerNavItem],\n});\n"],"names":[],"mappings":";;;;AAwBA,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/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 createRouteRef,\n NavItemBlueprint,\n PageBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport VisualizerIcon from '@material-ui/icons/Visibility';\n\nconst rootRouteRef = createRouteRef();\n\nconst appVisualizerPage = PageBlueprint.make({\n params: {\n path: '/visualizer',\n routeRef: rootRouteRef,\n loader: () =>\n import('./components/AppVisualizerPage').then(m => (\n <m.AppVisualizerPage />\n )),\n },\n});\n\nexport const appVisualizerNavItem = NavItemBlueprint.make({\n params: {\n title: 'Visualizer',\n icon: VisualizerIcon,\n routeRef: rootRouteRef,\n },\n});\n\n/** @public */\nexport const visualizerPlugin = createFrontendPlugin({\n pluginId: 'app-visualizer',\n info: { packageJson: () => import('../package.json') },\n extensions: [appVisualizerPage, appVisualizerNavItem],\n});\n"],"names":[],"mappings":";;;;AAwBA,MAAM,eAAe,cAAA,EAAe;AAEpC,MAAM,iBAAA,GAAoB,cAAc,IAAA,CAAK;AAAA,EAC3C,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,aAAA;AAAA,IACN,QAAA,EAAU,YAAA;AAAA,IACV,MAAA,EAAQ,MACN,OAAO,6CAAgC,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAC5C,GAAA,CAAC,CAAA,CAAE,iBAAA,EAAF,EAAoB,CACtB;AAAA;AAEP,CAAC,CAAA;AAEM,MAAM,oBAAA,GAAuB,iBAAiB,IAAA,CAAK;AAAA,EACxD,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,YAAA;AAAA,IACP,IAAA,EAAM,cAAA;AAAA,IACN,QAAA,EAAU;AAAA;AAEd,CAAC;AAGM,MAAM,mBAAmB,oBAAA,CAAqB;AAAA,EACnD,QAAA,EAAU,gBAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,UAAA,EAAY,CAAC,iBAAA,EAAmB,oBAAoB;AACtD,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-app-visualizer",
|
|
3
|
-
"version": "0.1.22
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Visualizes the Backstage app structure",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"test": "backstage-cli package test"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@backstage/core-components": "0.17.5
|
|
41
|
-
"@backstage/core-plugin-api": "1.10.9",
|
|
42
|
-
"@backstage/frontend-plugin-api": "0.11.0
|
|
40
|
+
"@backstage/core-components": "^0.17.5",
|
|
41
|
+
"@backstage/core-plugin-api": "^1.10.9",
|
|
42
|
+
"@backstage/frontend-plugin-api": "^0.11.0",
|
|
43
43
|
"@material-ui/core": "^4.12.2",
|
|
44
44
|
"@material-ui/icons": "^4.9.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@backstage/cli": "0.34.0
|
|
48
|
-
"@backstage/frontend-defaults": "0.3.0
|
|
47
|
+
"@backstage/cli": "^0.34.0",
|
|
48
|
+
"@backstage/frontend-defaults": "^0.3.0",
|
|
49
49
|
"@types/react": "^18.0.0",
|
|
50
50
|
"react": "^18.0.2",
|
|
51
51
|
"react-dom": "^18.0.2",
|