@techdocs/cli 1.8.19-next.2 → 1.8.19
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 +11 -0
- package/dist/embedded-app/.config-schema.json +0 -445
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{1297.56016a00.chunk.js → 1297.617c558a.chunk.js} +1 -1
- package/dist/embedded-app/static/{1297.56016a00.chunk.js.map → 1297.617c558a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/2177.e15b05f0.chunk.js +4 -0
- package/dist/embedded-app/static/2177.e15b05f0.chunk.js.map +1 -0
- package/dist/embedded-app/static/{3182.c93f3ad2.chunk.js → 3182.33110072.chunk.js} +1 -1
- package/dist/embedded-app/static/{3182.c93f3ad2.chunk.js.map → 3182.33110072.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5724.6bcea8b5.chunk.js → 5724.cfd2379f.chunk.js} +3 -3
- package/dist/embedded-app/static/5724.cfd2379f.chunk.js.map +1 -0
- package/dist/embedded-app/static/9605.7441e12c.chunk.js +11 -0
- package/dist/embedded-app/static/9605.7441e12c.chunk.js.map +1 -0
- package/dist/embedded-app/static/{main.835725b1.js → main.ea5e8476.js} +38 -15
- package/dist/embedded-app/static/main.ea5e8476.js.map +1 -0
- package/dist/embedded-app/static/{runtime.835725b1.js → runtime.ea5e8476.js} +2 -2
- package/dist/embedded-app/static/{runtime.835725b1.js.map → runtime.ea5e8476.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.835725b1.js → vendor.ea5e8476.js} +1 -1
- package/dist/embedded-app/static/{vendor.835725b1.js.map → vendor.ea5e8476.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/package.json +5 -5
- package/dist/embedded-app/static/2177.75b21fde.chunk.js +0 -4
- package/dist/embedded-app/static/2177.75b21fde.chunk.js.map +0 -1
- package/dist/embedded-app/static/5724.6bcea8b5.chunk.js.map +0 -1
- package/dist/embedded-app/static/9605.65ef8158.chunk.js +0 -11
- package/dist/embedded-app/static/9605.65ef8158.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.835725b1.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/3182.c93f3ad2.chunk.js","mappings":"mJAEIA,EAAyB,EAAQ,IAA8C,EAE/EC,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACAC,EAAQ,EAAU,OAElB,IAAIC,EAAQF,EAAwB,EAAQ,KAAO,CAAC,EAEhDG,EAAiBJ,EAAuB,EAAQ,KAAuB,CAAC,EAExEK,KAAeD,EAAe,SAAuBD,EAAM,cAAc,OAAQ,CACnF,EAAG,2DACL,CAAC,EAAG,cAAc,EAElBD,EAAQ,EAAUG,C,0MCQlB,MAAMC,KAAYC,EAAAA,GAChBC,IAAU,CACRC,KAAM,CACJC,SAAU,cACVC,QAASH,EAAMI,QAAQ,EAAG,EAAG,EAAG,GAAG,CACrC,EACAC,SAAU,CACRC,OAAQ,EACRC,MAAOP,EAAMQ,QAAQC,UACvB,EACAC,MAAO,CACLH,MAAOP,EAAMQ,QAAQC,UACvB,CACF,GACA,CAAEE,KAAM,qBAAsB,CAAC,EAgB1B,SAASC,EAAWC,EAAwB,CACjD,KAAM,CAAEC,KAAAA,EAAMC,MAAAA,EAAOC,QAAAA,CAAQ,EAAIH,EAC3BI,EAAUnB,EAAU,EAE1B,SACE,QAACoB,EAAAA,EAAGA,C,aACF,OAACC,EAAAA,EAAOA,CAAAA,CAAAA,KACR,OAACC,EAAAA,GAAIA,CAACC,GAAIP,EAAME,QAASA,EAASM,UAAU,O,YAC1C,QAACJ,EAAAA,EAAGA,CAACK,QAAQ,OAAOC,WAAW,SAASC,UAAWR,EAAQhB,K,aACzD,OAACiB,EAAAA,EAAGA,CAACO,UAAWR,EAAQZ,SAAUqB,WAAW,iBAAiBC,EAAG,E,YAC/D,OAACC,EAAAA,EAAUA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S,CACPC,OAAQ,GACRC,UAAW,GACXC,YAAa,SACbrL,OAAQ,GACRpD,QAAS,QACT0O,SAAU,EACVC,QAAS,GACTC,OAAQb,OAAOC,KAAKH,CAAM,EAAEI,OAAS,CACvC,C,IAKV,EClEO,SAASY,EAAUhI,EAAgB,CACxC,OAAOA,GAAQiH,UAAUD,OACrBE,OAAOC,KAAKnH,GAAQiH,UAAUD,MAAM,EAAEiB,KAAKC,OAAO,EAClD,EACN,C","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://techdocs-cli-embedded-app/../core-components/src/layout/BottomLink/BottomLink.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/InfoCard/InfoCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/alpha/translation.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLabelsCard/EntityLabelsEmptyState.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLabelsCard/EntityLabelsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLabelsCard/conditions.ts"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","/*\n * Copyright 2020 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 Box from '@material-ui/core/Box';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowIcon from '@material-ui/icons/ArrowForward';\nimport React from 'react';\nimport { Link } from '../../components/Link';\n\n/** @public */\nexport type BottomLinkClassKey = 'root' | 'boxTitle' | 'arrow';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n maxWidth: 'fit-content',\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n boxTitle: {\n margin: 0,\n color: theme.palette.textSubtle,\n },\n arrow: {\n color: theme.palette.textSubtle,\n },\n }),\n { name: 'BackstageBottomLink' },\n);\n\n/** @public */\nexport type BottomLinkProps = {\n link: string;\n title: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;\n};\n\n/**\n * Footer with link used in {@link InfoCard } and {@link TabbedCard}\n *\n * @public\n *\n */\nexport function BottomLink(props: BottomLinkProps) {\n const { link, title, onClick } = props;\n const classes = useStyles();\n\n return (\n <Box>\n <Divider />\n <Link to={link} onClick={onClick} underline=\"none\">\n <Box display=\"flex\" alignItems=\"center\" className={classes.root}>\n <Box className={classes.boxTitle} fontWeight=\"fontWeightBold\" m={1}>\n <Typography>\n <strong>{title}</strong>\n </Typography>\n </Box>\n <ArrowIcon className={classes.arrow} />\n </Box>\n </Link>\n </Box>\n );\n}\n","/*\n * Copyright 2020 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 Typography from '@material-ui/core/Typography';\nimport React, { ComponentClass, Component, ErrorInfo } from 'react';\nimport { LinkButton } from '../../components/LinkButton';\nimport { ErrorPanel } from '../../components/ErrorPanel';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\ntype SlackChannel = {\n name: string;\n href?: string;\n};\n\n/** @public */\nexport type ErrorBoundaryProps = React.PropsWithChildren<{\n slackChannel?: string | SlackChannel;\n onError?: (error: Error, errorInfo: string) => null;\n}>;\n\ntype State = {\n error?: Error;\n errorInfo?: ErrorInfo;\n};\n\nconst SlackLink = (props: { slackChannel?: string | SlackChannel }) => {\n const { slackChannel } = props;\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === 'string') {\n return (\n <Typography>{t('errorBoundary.title', { slackChannel })}</Typography>\n );\n } else if (!slackChannel.href) {\n return (\n <Typography>\n {t('errorBoundary.title', {\n slackChannel: slackChannel.name,\n })}\n </Typography>\n );\n }\n\n return (\n <LinkButton to={slackChannel.href} variant=\"contained\">\n {slackChannel.name}\n </LinkButton>\n );\n};\n\n/** @public */\nexport const ErrorBoundary: ComponentClass<\n ErrorBoundaryProps,\n State\n> = class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n error: undefined,\n errorInfo: undefined,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // eslint-disable-next-line no-console\n console.error(`ErrorBoundary, error: ${error}`, { error, errorInfo });\n this.setState({ error, errorInfo });\n }\n\n render() {\n const { slackChannel, children } = this.props;\n const { error } = this.state;\n\n if (!error) {\n return children;\n }\n\n return (\n <ErrorPanel title=\"Something Went Wrong\" error={error}>\n <SlackLink slackChannel={slackChannel} />\n </ErrorPanel>\n );\n }\n};\n","/*\n * Copyright 2020 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 Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader, { CardHeaderProps } from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport React, { ReactNode } from 'react';\nimport { BottomLink, BottomLinkProps } from '../BottomLink';\nimport { ErrorBoundary, ErrorBoundaryProps } from '../ErrorBoundary';\n\n/** @public */\nexport type InfoCardClassKey =\n | 'noPadding'\n | 'header'\n | 'headerTitle'\n | 'headerSubheader'\n | 'headerAvatar'\n | 'headerAction'\n | 'headerContent';\n\nconst useStyles = makeStyles(\n theme => ({\n noPadding: {\n padding: 0,\n '&:last-child': {\n paddingBottom: 0,\n },\n },\n contentAlignBottom: {\n display: 'flex',\n alignItems: 'self-end',\n },\n header: {\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n headerTitle: {\n fontWeight: theme.typography.fontWeightBold,\n },\n headerSubheader: {\n paddingTop: theme.spacing(1),\n },\n headerAvatar: {},\n headerAction: {},\n headerContent: {},\n subheader: {\n display: 'flex',\n },\n }),\n { name: 'BackstageInfoCard' },\n);\n\n/** @public */\nexport type CardActionsTopRightClassKey = 'root';\n\nconst CardActionsTopRight = withStyles(\n theme => ({\n root: {\n display: 'inline-block',\n padding: theme.spacing(8, 8, 0, 0),\n float: 'right',\n },\n }),\n { name: 'BackstageInfoCardCardActionsTopRight' },\n)(CardActions);\n\nconst VARIANT_STYLES = {\n card: {\n flex: {\n display: 'flex',\n flexDirection: 'column',\n },\n fullHeight: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItem: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n breakInside: 'avoid-page',\n '@media print': {\n height: 'auto',\n },\n },\n },\n cardContent: {\n fullHeight: {\n flex: 1,\n },\n gridItem: {\n flex: 1,\n },\n },\n};\n\n/** @public */\nexport type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem';\n\n/**\n * InfoCard is used to display a paper-styled block on the screen, similar to a panel.\n *\n * You can custom style an InfoCard with the 'className' (outer container) and 'cardClassName' (inner container)\n * props. This is typically used with the material-ui makeStyles mechanism.\n *\n * The InfoCard serves as an error boundary. As a result, if you provide an 'errorBoundaryProps' property this\n * specifies the extra information to display in the error component that is displayed if an error occurs\n * in any descendent components.\n *\n * By default the InfoCard has no custom layout of its children, but is treated as a block element. A\n * couple common variants are provided and can be specified via the variant property:\n *\n * When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items.\n * Set to the 'gridItem' variant to display the InfoCard with full height suitable for Grid:\n *\n * `<InfoCard variant=\"gridItem\">...</InfoCard>`\n */\nexport type Props = {\n title?: ReactNode;\n subheader?: ReactNode;\n divider?: boolean;\n deepLink?: BottomLinkProps;\n /** @deprecated Use errorBoundaryProps instead */\n slackChannel?: string;\n errorBoundaryProps?: ErrorBoundaryProps;\n variant?: InfoCardVariants;\n alignContent?: 'normal' | 'bottom';\n children?: ReactNode;\n headerStyle?: object;\n headerProps?: CardHeaderProps;\n icon?: ReactNode;\n action?: ReactNode;\n actionsClassName?: string;\n actions?: ReactNode;\n cardClassName?: string;\n actionsTopRight?: ReactNode;\n className?: string;\n noPadding?: boolean;\n titleTypographyProps?: object;\n subheaderTypographyProps?: object;\n};\n\n/**\n * Material-ui card with header , content and actions footer\n *\n * @public\n *\n */\nexport function InfoCard(props: Props): JSX.Element {\n const {\n title,\n subheader,\n divider = true,\n deepLink,\n slackChannel,\n errorBoundaryProps,\n variant,\n alignContent = 'normal',\n children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\n subheaderTypographyProps,\n } = props;\n const classes = useStyles();\n /**\n * If variant is specified, we build up styles for that particular variant for both\n * the Card and the CardContent (since these need to be synced)\n */\n let calculatedStyle = {};\n let calculatedCardStyle = {};\n if (variant) {\n const variants = variant.split(/[\\s]+/g);\n variants.forEach(name => {\n calculatedStyle = {\n ...calculatedStyle,\n ...VARIANT_STYLES.card[name as keyof (typeof VARIANT_STYLES)['card']],\n };\n calculatedCardStyle = {\n ...calculatedCardStyle,\n ...VARIANT_STYLES.cardContent[\n name as keyof (typeof VARIANT_STYLES)['cardContent']\n ],\n };\n });\n }\n\n const cardSubTitle = () => {\n if (!subheader && !icon) {\n return null;\n }\n\n return (\n <div data-testid=\"info-card-subheader\">\n {subheader && <div className={classes.subheader}>{subheader}</div>}\n {icon}\n </div>\n );\n };\n\n const errProps: ErrorBoundaryProps =\n errorBoundaryProps || (slackChannel ? { slackChannel } : {});\n\n return (\n <Card style={calculatedStyle} className={className}>\n <ErrorBoundary {...errProps}>\n {title && (\n <CardHeader\n classes={{\n root: classNames(classes.header),\n title: classes.headerTitle,\n subheader: classes.headerSubheader,\n avatar: classes.headerAvatar,\n action: classes.headerAction,\n content: classes.headerContent,\n }}\n title={title}\n subheader={cardSubTitle()}\n action={action}\n style={{ ...headerStyle }}\n titleTypographyProps={titleTypographyProps}\n subheaderTypographyProps={subheaderTypographyProps}\n {...headerProps}\n />\n )}\n {actionsTopRight && (\n <CardActionsTopRight>{actionsTopRight}</CardActionsTopRight>\n )}\n {divider && <Divider />}\n <CardContent\n className={classNames(cardClassName, {\n [classes.noPadding]: noPadding,\n [classes.contentAlignBottom]: alignContent === 'bottom',\n })}\n style={calculatedCardStyle}\n >\n {children}\n </CardContent>\n {actions && (\n <CardActions className={actionsClassName}>{actions}</CardActions>\n )}\n {deepLink && <BottomLink {...deepLink} />}\n </ErrorBoundary>\n </Card>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { AnalyticsContext } from '@backstage/core-plugin-api';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport React, { ReactNode } from 'react';\n\n/** @public */\nexport type EntityLoadingStatus<TEntity extends Entity = Entity> = {\n entity?: TEntity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n};\n\n// This context has support for multiple concurrent versions of this package.\n// It is currently used in parallel with the old context in order to provide\n// a smooth transition, but will eventually be the only context we use.\nconst NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n);\n\n/**\n * Properties for the AsyncEntityProvider component.\n *\n * @public\n */\nexport interface AsyncEntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n}\n\n/**\n * Provides a loaded entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const AsyncEntityProvider = (props: AsyncEntityProviderProps) => {\n const { children, entity, loading, error, refresh } = props;\n const value = { entity, loading, error, refresh };\n // We provide both the old and the new context, since\n // consumers might be doing things like `useContext(EntityContext)`\n return (\n <NewEntityContext.Provider value={createVersionedValueMap({ 1: value })}>\n <AnalyticsContext\n attributes={{\n ...(entity ? { entityRef: stringifyEntityRef(entity) } : undefined),\n }}\n >\n {children}\n </AnalyticsContext>\n </NewEntityContext.Provider>\n );\n};\n\n/**\n * Properties for the EntityProvider component.\n *\n * @public\n */\nexport interface EntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n}\n\n/**\n * Provides an entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const EntityProvider = (props: EntityProviderProps) => (\n <AsyncEntityProvider\n entity={props.entity}\n loading={!Boolean(props.entity)}\n error={undefined}\n refresh={undefined}\n children={props.children}\n />\n);\n\n/**\n * Grab the current entity from the context, throws if the entity has not yet been loaded\n * or is not available.\n *\n * @public\n */\nexport function useEntity<TEntity extends Entity = Entity>(): {\n entity: TEntity;\n} {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n if (!value.entity) {\n throw new Error(\n 'useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.',\n );\n }\n\n return { entity: value.entity as TEntity };\n}\n\n/**\n * Grab the current entity from the context, provides loading state and errors, and the ability to refresh.\n *\n * @public\n */\nexport function useAsyncEntity<\n TEntity extends Entity = Entity,\n>(): EntityLoadingStatus<TEntity> {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n const { entity, loading, error, refresh } = value;\n return { entity: entity as TEntity, loading, error, refresh };\n}\n","/*\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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates. Click here to delete.',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this.',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoo to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\n },\n },\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nconst ENTITY_YAML = `metadata:\n name: example\n labels:\n javaVersion: 1.2.3`;\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: theme.spacing(2, 0),\n background:\n theme.palette.type === 'dark' ? '#444' : theme.palette.common.white,\n },\n }),\n { name: 'PluginCatalogEntityLabelsEmptyState' },\n);\n\nexport function EntityLabelsEmptyState() {\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n return (\n <>\n <Typography variant=\"body1\">\n {t('entityLabelsCard.emptyDescription')}\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#labels-optional\"\n >\n {t('entityLabelsCard.readMoreButtonTitle')}\n </Button>\n </>\n );\n}\n","/*\n * Copyright 2022 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 { useEntity } from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { EntityLabelsEmptyState } from './EntityLabelsEmptyState';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface EntityLabelsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nconst useStyles = makeStyles(_ => ({\n key: {\n fontWeight: 'bold',\n },\n}));\n\nexport const EntityLabelsCard = (props: EntityLabelsCardProps) => {\n const { variant, title } = props;\n const { entity } = useEntity();\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const columns: TableColumn<{ key: string; value: string }>[] = [\n {\n render: row => {\n return (\n <Typography className={classes.key} variant=\"body2\">\n {row.key}\n </Typography>\n );\n },\n },\n {\n field: 'value',\n },\n ];\n\n const labels = entity?.metadata?.labels;\n\n return (\n <InfoCard title={title || t('entityLabelsCard.title')} variant={variant}>\n {!labels || Object.keys(labels).length === 0 ? (\n <EntityLabelsEmptyState />\n ) : (\n <Table\n columns={columns}\n data={Object.keys(labels).map(labelKey => ({\n key: labelKey,\n value: labels[labelKey],\n }))}\n options={{\n search: false,\n showTitle: true,\n loadingType: 'linear',\n header: false,\n padding: 'dense',\n pageSize: 5,\n toolbar: false,\n paging: Object.keys(labels).length > 5,\n }}\n />\n )}\n </InfoCard>\n );\n};\n","/*\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 { Entity } from '@backstage/catalog-model';\n\n/**\n * Returns true if the given entity has labels annotation given by the\n * catalog. For use by EntitySwitch\n *\n * @public\n */\nexport function hasLabels(entity: Entity) {\n return entity?.metadata?.labels\n ? Object.keys(entity?.metadata?.labels).some(Boolean)\n : false;\n}\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_createSvgIcon","_default","useStyles","makeStyles","theme","root","maxWidth","padding","spacing","boxTitle","margin","color","palette","textSubtle","arrow","name","BottomLink","props","link","title","onClick","classes","Box","Divider","Link","to","underline","display","alignItems","className","fontWeight","m","Typography","strong","ArrowIcon","SlackLink","slackChannel","t","useTranslationRef","coreComponentsTranslationRef","href","LinkButton","variant","ErrorBoundary","Component","constructor","state","error","undefined","errorInfo","componentDidCatch","console","setState","render","children","ErrorPanel","noPadding","paddingBottom","contentAlignBottom","header","headerTitle","typography","fontWeightBold","headerSubheader","paddingTop","headerAvatar","headerAction","headerContent","subheader","CardActionsTopRight","withStyles","float","CardActions","VARIANT_STYLES","card","flex","flexDirection","fullHeight","height","gridItem","marginBottom","breakInside","cardContent","InfoCard","divider","deepLink","errorBoundaryProps","alignContent","headerStyle","headerProps","icon","action","actionsClassName","actions","cardClassName","actionsTopRight","titleTypographyProps","subheaderTypographyProps","calculatedStyle","calculatedCardStyle","split","forEach","cardSubTitle","div","data-testid","errProps","Card","style","CardHeader","classNames","avatar","content","CardContent","NewEntityContext","createVersionedContext","AsyncEntityProvider","entity","loading","refresh","value","Provider","createVersionedValueMap","AnalyticsContext","attributes","entityRef","stringifyEntityRef","EntityProvider","useEntity","versionedHolder","useVersionedContext","Error","atVersion","useAsyncEntity","catalogTranslationRef","createTranslationRef","id","messages","indexPage","createButtonTitle","supportButtonContent","aboutCard","refreshButtonTitle","editButtonTitle","createSimilarButtonTitle","refreshScheduledMessage","launchTemplate","viewTechdocs","viewSource","descriptionField","label","ownerField","domainField","systemField","parentComponentField","typeField","lifecycleField","tagsField","targetsField","searchResultItem","lifecycle","Owner","catalogTable","warningPanelTitle","viewActionTitle","editActionTitle","starActionTitle","unStarActionTitle","dependencyOfComponentsCard","emptyMessage","dependsOnComponentsCard","dependsOnResourcesCard","entityContextMenu","copiedMessage","moreButtonTitle","inspectMenuTitle","copyURLMenuTitle","unregisterMenuTitle","entityLabelsCard","emptyDescription","readMoreButtonTitle","entityLabels","ownerLabel","lifecycleLabel","entityLinksCard","entityNotFound","description","docButtonTitle","deleteEntity","dialogTitle","deleteButtonTitle","cancelButtonTitle","entityProcessingErrorsDescription","entityRelationWarningDescription","hasComponentsCard","hasResourcesCard","hasSubcomponentsCard","hasSubdomainsCard","hasSystemsCard","relatedEntitiesCard","emptyHelpLinkTitle","systemDiagramCard","edgeLabels","partOf","provides","dependsOn","ENTITY_YAML","code","borderRadius","background","type","common","white","EntityLabelsEmptyState","CodeSnippet","text","language","showLineNumbers","highlightedNumbers","customStyle","fontSize","Button","target","_","key","EntityLabelsCard","columns","row","field","labels","metadata","Object","keys","length","Table","data","map","labelKey","options","search","showTitle","loadingType","pageSize","toolbar","paging","hasLabels","some","Boolean"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/3182.33110072.chunk.js","mappings":"mJAEIA,EAAyB,EAAQ,IAA8C,EAE/EC,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACAC,EAAQ,EAAU,OAElB,IAAIC,EAAQF,EAAwB,EAAQ,KAAO,CAAC,EAEhDG,EAAiBJ,EAAuB,EAAQ,KAAuB,CAAC,EAExEK,KAAeD,EAAe,SAAuBD,EAAM,cAAc,OAAQ,CACnF,EAAG,2DACL,CAAC,EAAG,cAAc,EAElBD,EAAQ,EAAUG,C,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AM,CAAEyB,QAAAA,EAASvB,MAAAA,CAAM,EAAIF,EACrB,CAAEmG,OAAAA,CAAO,KAAIW,EAAAA,IAAU,EACvB1G,EAAUnB,EAAU,EACpB,CAAEmC,EAAAA,CAAE,KAAIC,EAAAA,GAAkB+F,EAAAA,CAAqBA,EAE/C4F,EAAyD,CAC7D,CACE5K,OAAQ6K,MAEJ,OAAClM,EAAAA,EAAUA,CAACH,UAAWR,EAAQ0M,IAAKrL,QAAQ,Q,SACzCwL,EAAIH,G,EAIb,EACA,CACEI,MAAO,OACT,C,EAGIC,EAAShH,GAAQiH,UAAUD,OAEjC,SACE,OAACjJ,EAAAA,EAAQA,CAAChE,MAAOA,GAASkB,EAAE,wBAAwB,EAAGK,QAASA,E,SAC7D,CAAC0L,GAAUE,OAAOC,KAAKH,CAAM,EAAEI,SAAW,KACzC,OAACpB,EAAsBA,CAAAA,CAAAA,KAEvB,OAACqB,EAAAA,EAAKA,CACJR,QAASA,EACTS,KAAMJ,OAAOC,KAAKH,CAAM,EAAEO,IAAIC,IAAa,CACzCb,IAAKa,EACLrH,MAAO6G,EAAOQ,CAAQ,CACxB,EAAE,EACFC,QAAS,CACPC,OAAQ,GACRC,UAAW,GACXC,YAAa,SACbrL,OAAQ,GACRpD,QAAS,QACT0O,SAAU,EACVC,QAAS,GACTC,OAAQb,OAAOC,KAAKH,CAAM,EAAEI,OAAS,CACvC,C,IAKV,EClEO,SAASY,EAAUhI,EAAgB,CACxC,OAAOA,GAAQiH,UAAUD,OACrBE,OAAOC,KAAKnH,GAAQiH,UAAUD,MAAM,EAAEiB,KAAKC,OAAO,EAClD,EACN,C","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://techdocs-cli-embedded-app/../core-components/src/layout/BottomLink/BottomLink.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/InfoCard/InfoCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/alpha/translation.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLabelsCard/EntityLabelsEmptyState.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLabelsCard/EntityLabelsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLabelsCard/conditions.ts"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","/*\n * Copyright 2020 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 Box from '@material-ui/core/Box';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowIcon from '@material-ui/icons/ArrowForward';\nimport React from 'react';\nimport { Link } from '../../components/Link';\n\n/** @public */\nexport type BottomLinkClassKey = 'root' | 'boxTitle' | 'arrow';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n maxWidth: 'fit-content',\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n boxTitle: {\n margin: 0,\n color: theme.palette.textSubtle,\n },\n arrow: {\n color: theme.palette.textSubtle,\n },\n }),\n { name: 'BackstageBottomLink' },\n);\n\n/** @public */\nexport type BottomLinkProps = {\n link: string;\n title: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;\n};\n\n/**\n * Footer with link used in {@link InfoCard } and {@link TabbedCard}\n *\n * @public\n *\n */\nexport function BottomLink(props: BottomLinkProps) {\n const { link, title, onClick } = props;\n const classes = useStyles();\n\n return (\n <Box>\n <Divider />\n <Link to={link} onClick={onClick} underline=\"none\">\n <Box display=\"flex\" alignItems=\"center\" className={classes.root}>\n <Box className={classes.boxTitle} fontWeight=\"fontWeightBold\" m={1}>\n <Typography>\n <strong>{title}</strong>\n </Typography>\n </Box>\n <ArrowIcon className={classes.arrow} />\n </Box>\n </Link>\n </Box>\n );\n}\n","/*\n * Copyright 2020 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 Typography from '@material-ui/core/Typography';\nimport React, { ComponentClass, Component, ErrorInfo } from 'react';\nimport { LinkButton } from '../../components/LinkButton';\nimport { ErrorPanel } from '../../components/ErrorPanel';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\ntype SlackChannel = {\n name: string;\n href?: string;\n};\n\n/** @public */\nexport type ErrorBoundaryProps = React.PropsWithChildren<{\n slackChannel?: string | SlackChannel;\n onError?: (error: Error, errorInfo: string) => null;\n}>;\n\ntype State = {\n error?: Error;\n errorInfo?: ErrorInfo;\n};\n\nconst SlackLink = (props: { slackChannel?: string | SlackChannel }) => {\n const { slackChannel } = props;\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === 'string') {\n return (\n <Typography>{t('errorBoundary.title', { slackChannel })}</Typography>\n );\n } else if (!slackChannel.href) {\n return (\n <Typography>\n {t('errorBoundary.title', {\n slackChannel: slackChannel.name,\n })}\n </Typography>\n );\n }\n\n return (\n <LinkButton to={slackChannel.href} variant=\"contained\">\n {slackChannel.name}\n </LinkButton>\n );\n};\n\n/** @public */\nexport const ErrorBoundary: ComponentClass<\n ErrorBoundaryProps,\n State\n> = class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n error: undefined,\n errorInfo: undefined,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // eslint-disable-next-line no-console\n console.error(`ErrorBoundary, error: ${error}`, { error, errorInfo });\n this.setState({ error, errorInfo });\n }\n\n render() {\n const { slackChannel, children } = this.props;\n const { error } = this.state;\n\n if (!error) {\n return children;\n }\n\n return (\n <ErrorPanel title=\"Something Went Wrong\" error={error}>\n <SlackLink slackChannel={slackChannel} />\n </ErrorPanel>\n );\n }\n};\n","/*\n * Copyright 2020 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 Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader, { CardHeaderProps } from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport React, { ReactNode } from 'react';\nimport { BottomLink, BottomLinkProps } from '../BottomLink';\nimport { ErrorBoundary, ErrorBoundaryProps } from '../ErrorBoundary';\n\n/** @public */\nexport type InfoCardClassKey =\n | 'noPadding'\n | 'header'\n | 'headerTitle'\n | 'headerSubheader'\n | 'headerAvatar'\n | 'headerAction'\n | 'headerContent';\n\nconst useStyles = makeStyles(\n theme => ({\n noPadding: {\n padding: 0,\n '&:last-child': {\n paddingBottom: 0,\n },\n },\n contentAlignBottom: {\n display: 'flex',\n alignItems: 'self-end',\n },\n header: {\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n headerTitle: {\n fontWeight: theme.typography.fontWeightBold,\n },\n headerSubheader: {\n paddingTop: theme.spacing(1),\n },\n headerAvatar: {},\n headerAction: {},\n headerContent: {},\n subheader: {\n display: 'flex',\n },\n }),\n { name: 'BackstageInfoCard' },\n);\n\n/** @public */\nexport type CardActionsTopRightClassKey = 'root';\n\nconst CardActionsTopRight = withStyles(\n theme => ({\n root: {\n display: 'inline-block',\n padding: theme.spacing(8, 8, 0, 0),\n float: 'right',\n },\n }),\n { name: 'BackstageInfoCardCardActionsTopRight' },\n)(CardActions);\n\nconst VARIANT_STYLES = {\n card: {\n flex: {\n display: 'flex',\n flexDirection: 'column',\n },\n fullHeight: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItem: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n breakInside: 'avoid-page',\n '@media print': {\n height: 'auto',\n },\n },\n },\n cardContent: {\n fullHeight: {\n flex: 1,\n },\n gridItem: {\n flex: 1,\n },\n },\n};\n\n/** @public */\nexport type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem';\n\n/**\n * InfoCard is used to display a paper-styled block on the screen, similar to a panel.\n *\n * You can custom style an InfoCard with the 'className' (outer container) and 'cardClassName' (inner container)\n * props. This is typically used with the material-ui makeStyles mechanism.\n *\n * The InfoCard serves as an error boundary. As a result, if you provide an 'errorBoundaryProps' property this\n * specifies the extra information to display in the error component that is displayed if an error occurs\n * in any descendent components.\n *\n * By default the InfoCard has no custom layout of its children, but is treated as a block element. A\n * couple common variants are provided and can be specified via the variant property:\n *\n * When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items.\n * Set to the 'gridItem' variant to display the InfoCard with full height suitable for Grid:\n *\n * `<InfoCard variant=\"gridItem\">...</InfoCard>`\n */\nexport type Props = {\n title?: ReactNode;\n subheader?: ReactNode;\n divider?: boolean;\n deepLink?: BottomLinkProps;\n /** @deprecated Use errorBoundaryProps instead */\n slackChannel?: string;\n errorBoundaryProps?: ErrorBoundaryProps;\n variant?: InfoCardVariants;\n alignContent?: 'normal' | 'bottom';\n children?: ReactNode;\n headerStyle?: object;\n headerProps?: CardHeaderProps;\n icon?: ReactNode;\n action?: ReactNode;\n actionsClassName?: string;\n actions?: ReactNode;\n cardClassName?: string;\n actionsTopRight?: ReactNode;\n className?: string;\n noPadding?: boolean;\n titleTypographyProps?: object;\n subheaderTypographyProps?: object;\n};\n\n/**\n * Material-ui card with header , content and actions footer\n *\n * @public\n *\n */\nexport function InfoCard(props: Props): JSX.Element {\n const {\n title,\n subheader,\n divider = true,\n deepLink,\n slackChannel,\n errorBoundaryProps,\n variant,\n alignContent = 'normal',\n children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\n subheaderTypographyProps,\n } = props;\n const classes = useStyles();\n /**\n * If variant is specified, we build up styles for that particular variant for both\n * the Card and the CardContent (since these need to be synced)\n */\n let calculatedStyle = {};\n let calculatedCardStyle = {};\n if (variant) {\n const variants = variant.split(/[\\s]+/g);\n variants.forEach(name => {\n calculatedStyle = {\n ...calculatedStyle,\n ...VARIANT_STYLES.card[name as keyof (typeof VARIANT_STYLES)['card']],\n };\n calculatedCardStyle = {\n ...calculatedCardStyle,\n ...VARIANT_STYLES.cardContent[\n name as keyof (typeof VARIANT_STYLES)['cardContent']\n ],\n };\n });\n }\n\n const cardSubTitle = () => {\n if (!subheader && !icon) {\n return null;\n }\n\n return (\n <div data-testid=\"info-card-subheader\">\n {subheader && <div className={classes.subheader}>{subheader}</div>}\n {icon}\n </div>\n );\n };\n\n const errProps: ErrorBoundaryProps =\n errorBoundaryProps || (slackChannel ? { slackChannel } : {});\n\n return (\n <Card style={calculatedStyle} className={className}>\n <ErrorBoundary {...errProps}>\n {title && (\n <CardHeader\n classes={{\n root: classNames(classes.header),\n title: classes.headerTitle,\n subheader: classes.headerSubheader,\n avatar: classes.headerAvatar,\n action: classes.headerAction,\n content: classes.headerContent,\n }}\n title={title}\n subheader={cardSubTitle()}\n action={action}\n style={{ ...headerStyle }}\n titleTypographyProps={titleTypographyProps}\n subheaderTypographyProps={subheaderTypographyProps}\n {...headerProps}\n />\n )}\n {actionsTopRight && (\n <CardActionsTopRight>{actionsTopRight}</CardActionsTopRight>\n )}\n {divider && <Divider />}\n <CardContent\n className={classNames(cardClassName, {\n [classes.noPadding]: noPadding,\n [classes.contentAlignBottom]: alignContent === 'bottom',\n })}\n style={calculatedCardStyle}\n >\n {children}\n </CardContent>\n {actions && (\n <CardActions className={actionsClassName}>{actions}</CardActions>\n )}\n {deepLink && <BottomLink {...deepLink} />}\n </ErrorBoundary>\n </Card>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { AnalyticsContext } from '@backstage/core-plugin-api';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport React, { ReactNode } from 'react';\n\n/** @public */\nexport type EntityLoadingStatus<TEntity extends Entity = Entity> = {\n entity?: TEntity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n};\n\n// This context has support for multiple concurrent versions of this package.\n// It is currently used in parallel with the old context in order to provide\n// a smooth transition, but will eventually be the only context we use.\nconst NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n);\n\n/**\n * Properties for the AsyncEntityProvider component.\n *\n * @public\n */\nexport interface AsyncEntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n}\n\n/**\n * Provides a loaded entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const AsyncEntityProvider = (props: AsyncEntityProviderProps) => {\n const { children, entity, loading, error, refresh } = props;\n const value = { entity, loading, error, refresh };\n // We provide both the old and the new context, since\n // consumers might be doing things like `useContext(EntityContext)`\n return (\n <NewEntityContext.Provider value={createVersionedValueMap({ 1: value })}>\n <AnalyticsContext\n attributes={{\n ...(entity ? { entityRef: stringifyEntityRef(entity) } : undefined),\n }}\n >\n {children}\n </AnalyticsContext>\n </NewEntityContext.Provider>\n );\n};\n\n/**\n * Properties for the EntityProvider component.\n *\n * @public\n */\nexport interface EntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n}\n\n/**\n * Provides an entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const EntityProvider = (props: EntityProviderProps) => (\n <AsyncEntityProvider\n entity={props.entity}\n loading={!Boolean(props.entity)}\n error={undefined}\n refresh={undefined}\n children={props.children}\n />\n);\n\n/**\n * Grab the current entity from the context, throws if the entity has not yet been loaded\n * or is not available.\n *\n * @public\n */\nexport function useEntity<TEntity extends Entity = Entity>(): {\n entity: TEntity;\n} {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n if (!value.entity) {\n throw new Error(\n 'useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.',\n );\n }\n\n return { entity: value.entity as TEntity };\n}\n\n/**\n * Grab the current entity from the context, provides loading state and errors, and the ability to refresh.\n *\n * @public\n */\nexport function useAsyncEntity<\n TEntity extends Entity = Entity,\n>(): EntityLoadingStatus<TEntity> {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n const { entity, loading, error, refresh } = value;\n return { entity: entity as TEntity, loading, error, refresh };\n}\n","/*\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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates. Click here to delete.',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this.',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoo to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\n },\n },\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nconst ENTITY_YAML = `metadata:\n name: example\n labels:\n javaVersion: 1.2.3`;\n\n/** @public */\nexport type EntityLabelsEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: theme.spacing(2, 0),\n background:\n theme.palette.type === 'dark' ? '#444' : theme.palette.common.white,\n },\n }),\n { name: 'PluginCatalogEntityLabelsEmptyState' },\n);\n\nexport function EntityLabelsEmptyState() {\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n return (\n <>\n <Typography variant=\"body1\">\n {t('entityLabelsCard.emptyDescription')}\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#labels-optional\"\n >\n {t('entityLabelsCard.readMoreButtonTitle')}\n </Button>\n </>\n );\n}\n","/*\n * Copyright 2022 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 { useEntity } from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { EntityLabelsEmptyState } from './EntityLabelsEmptyState';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface EntityLabelsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nconst useStyles = makeStyles(_ => ({\n key: {\n fontWeight: 'bold',\n },\n}));\n\nexport const EntityLabelsCard = (props: EntityLabelsCardProps) => {\n const { variant, title } = props;\n const { entity } = useEntity();\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const columns: TableColumn<{ key: string; value: string }>[] = [\n {\n render: row => {\n return (\n <Typography className={classes.key} variant=\"body2\">\n {row.key}\n </Typography>\n );\n },\n },\n {\n field: 'value',\n },\n ];\n\n const labels = entity?.metadata?.labels;\n\n return (\n <InfoCard title={title || t('entityLabelsCard.title')} variant={variant}>\n {!labels || Object.keys(labels).length === 0 ? (\n <EntityLabelsEmptyState />\n ) : (\n <Table\n columns={columns}\n data={Object.keys(labels).map(labelKey => ({\n key: labelKey,\n value: labels[labelKey],\n }))}\n options={{\n search: false,\n showTitle: true,\n loadingType: 'linear',\n header: false,\n padding: 'dense',\n pageSize: 5,\n toolbar: false,\n paging: Object.keys(labels).length > 5,\n }}\n />\n )}\n </InfoCard>\n );\n};\n","/*\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 { Entity } from '@backstage/catalog-model';\n\n/**\n * Returns true if the given entity has labels annotation given by the\n * catalog. For use by EntitySwitch\n *\n * @public\n */\nexport function hasLabels(entity: Entity) {\n return entity?.metadata?.labels\n ? Object.keys(entity?.metadata?.labels).some(Boolean)\n : false;\n}\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_createSvgIcon","_default","useStyles","makeStyles","theme","root","maxWidth","padding","spacing","boxTitle","margin","color","palette","textSubtle","arrow","name","BottomLink","props","link","title","onClick","classes","Box","Divider","Link","to","underline","display","alignItems","className","fontWeight","m","Typography","strong","ArrowIcon","SlackLink","slackChannel","t","useTranslationRef","coreComponentsTranslationRef","href","LinkButton","variant","ErrorBoundary","Component","constructor","state","error","undefined","errorInfo","componentDidCatch","console","setState","render","children","ErrorPanel","noPadding","paddingBottom","contentAlignBottom","header","headerTitle","typography","fontWeightBold","headerSubheader","paddingTop","headerAvatar","headerAction","headerContent","subheader","CardActionsTopRight","withStyles","float","CardActions","VARIANT_STYLES","card","flex","flexDirection","fullHeight","height","gridItem","marginBottom","breakInside","cardContent","InfoCard","divider","deepLink","errorBoundaryProps","alignContent","headerStyle","headerProps","icon","action","actionsClassName","actions","cardClassName","actionsTopRight","titleTypographyProps","subheaderTypographyProps","calculatedStyle","calculatedCardStyle","split","forEach","cardSubTitle","div","data-testid","errProps","Card","style","CardHeader","classNames","avatar","content","CardContent","NewEntityContext","createVersionedContext","AsyncEntityProvider","entity","loading","refresh","value","Provider","createVersionedValueMap","AnalyticsContext","attributes","entityRef","stringifyEntityRef","EntityProvider","useEntity","versionedHolder","useVersionedContext","Error","atVersion","useAsyncEntity","catalogTranslationRef","createTranslationRef","id","messages","indexPage","createButtonTitle","supportButtonContent","aboutCard","refreshButtonTitle","editButtonTitle","createSimilarButtonTitle","refreshScheduledMessage","launchTemplate","viewTechdocs","viewSource","descriptionField","label","ownerField","domainField","systemField","parentComponentField","typeField","lifecycleField","tagsField","targetsField","searchResultItem","lifecycle","Owner","catalogTable","warningPanelTitle","viewActionTitle","editActionTitle","starActionTitle","unStarActionTitle","dependencyOfComponentsCard","emptyMessage","dependsOnComponentsCard","dependsOnResourcesCard","entityContextMenu","copiedMessage","moreButtonTitle","inspectMenuTitle","copyURLMenuTitle","unregisterMenuTitle","entityLabelsCard","emptyDescription","readMoreButtonTitle","entityLabels","ownerLabel","lifecycleLabel","entityLinksCard","entityNotFound","description","docButtonTitle","deleteEntity","dialogTitle","deleteButtonTitle","cancelButtonTitle","entityProcessingErrorsDescription","entityRelationWarningDescription","hasComponentsCard","hasResourcesCard","hasSubcomponentsCard","hasSubdomainsCard","hasSystemsCard","relatedEntitiesCard","emptyHelpLinkTitle","systemDiagramCard","edgeLabels","partOf","provides","dependsOn","ENTITY_YAML","code","borderRadius","background","type","common","white","EntityLabelsEmptyState","CodeSnippet","text","language","showLineNumbers","highlightedNumbers","customStyle","fontSize","Button","target","_","key","EntityLabelsCard","columns","row","field","labels","metadata","Object","keys","length","Table","data","map","labelKey","options","search","showTitle","loadingType","pageSize","toolbar","paging","hasLabels","some","Boolean"],"sourceRoot":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5724],{35773:(U,x,e)=>{e.d(x,{C4:()=>b,tS:()=>w});var t=e(14117);const u="catalog-entity",A=(0,t.i)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:u}),b=(0,t.i)({name:"catalog.entity.create",attributes:{action:"create"}}),
|
|
2
|
-
Entities not found are: `,hasComponentsCard:{title:"Has components",emptyMessage:"No component is part of this system"},hasResourcesCard:{title:"Has resources",emptyMessage:"No resource is part of this system"},hasSubcomponentsCard:{title:"Has subcomponents",emptyMessage:"No subcomponent is part of this component"},hasSubdomainsCard:{title:"Has subdomains",emptyMessage:"No subdomain is part of this domain"},hasSystemsCard:{title:"Has systems",emptyMessage:"No system is part of this domain"},relatedEntitiesCard:{emptyHelpLinkTitle:"Learn how to change this."},systemDiagramCard:{title:"System Diagram",description:"Use pinch & zoo to move around the diagram.",edgeLabels:{partOf:"part of",provides:"provides",dependsOn:"depends on"}}}})},65724:(U,x,e)=>{e.r(x),e.d(x,{AboutCard:()=>rt,AboutContent:()=>ce,AboutField:()=>L});var t=e(31085),u=e(72348),A=e(6820),b=e(17736),E=e(40703),w=e(48653),R=e(45685),k=e(37197),S=e(29365),T=e(58837),P=e(72072),d=e(31129),r=e(14041),p=e(53373),v=e.n(p),h=e(86613),y=e(10394),g=e(72501);const f=(0,T.A)(a=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:a.palette.text.secondary,cursor:"default"},primary:{color:a.palette.primary.main},secondary:{color:a.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:a.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function O({color:a="primary",disabled:n=!1,href:o="#",icon:i=(0,t.jsx)(h.A,{}),label:s,onClick:l,title:c}){const m=f();return n?(0,t.jsxs)(y.A,{title:c,className:v()(m.link,m.disabled),children:[i,(0,t.jsx)(g.A,{variant:"caption",component:"span",className:m.label,children:s})]}):(0,t.jsxs)(P.N_,{title:c,className:v()(m.link,m[a]),to:o,onClick:l,children:[i,(0,t.jsx)(g.A,{variant:"caption",component:"span",className:m.label,children:s})]})}const H=(0,T.A)(a=>({links:{margin:a.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:a.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function J(a){const{links:n}=a,o=H();return(0,t.jsx)("nav",{className:o.links,children:n.map((i,s)=>(0,t.jsx)(O,{...i},s+1))})}var Q=e(3347),ye=e(13660),ee=e(82266);const ge=a=>{const{type:n}=a,o=(0,ee.n)(),i=ye.A,s=n?o.getSystemIcon(n)??i:i;return(0,t.jsx)(s,{})};var z=e(72427),be=e(36017),ve=e(39837),te=e(9222),ne=e(99538),ie=e(7341),ae=e(78692);function xe(a,n){const o=a.metadata.annotations?.[b.I4];if(o)try{const i=(0,ae.aY)(o),s=n.byUrl(i.target);return{locationTargetUrl:i.target,integrationType:s?.type}}catch{return}}var se=e(95203),V=e(51372),W=e(67871),K=e(34428),Ae=e(67720),oe=e(42899),Te=e(4650),Ce=e(82442);const je=(0,T.A)(a=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:a.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function L(a){const{label:n,value:o,gridSizes:i,children:s}=a,l=je(),c=(0,Ce.O)(s,$=>$.getElements()),m=c.length>0?c:(0,t.jsx)(g.A,{variant:"body2",className:l.value,children:o||"unknown"});return(0,t.jsxs)(oe.A,{item:!0,...i,children:[(0,t.jsx)(g.A,{variant:"h2",className:l.label,children:n}),m]})}var Ee=e(18750),re=e(87849),le=e(90759);const Le=(0,T.A)({description:{wordBreak:"break-word"}});function ke(a,n,o){if(n==="url"||a.includes("://"))return a;const i=o.type==="file"?`file://${o.target}`:o.target;return n==="file"||o.type==="file"?new URL(a,i).href:i}function ce(a){const{entity:n}=a,o=Le(),{t:i}=(0,re.i)(le.W),s=n.kind.toLocaleLowerCase("en-US")==="system",l=n.kind.toLocaleLowerCase("en-US")==="resource",c=n.kind.toLocaleLowerCase("en-US")==="component",m=n.kind.toLocaleLowerCase("en-US")==="api",$=n.kind.toLocaleLowerCase("en-US")==="template",I=n.kind.toLocaleLowerCase("en-US")==="location",N=n.kind.toLocaleLowerCase("en-US")==="group",D=(0,W.t)(n,V.jn,{kind:"system"}),Y=(0,W.t)(n,V.jn,{kind:"component"}),C=(0,W.t)(n,V.jn,{kind:"domain"}),G=(0,W.t)(n,V.vv);let M;try{M=(0,ae.Cr)(n)}catch{M=void 0}return(0,t.jsxs)(oe.A,{container:!0,children:[(0,t.jsx)(L,{label:i("aboutCard.descriptionField.label"),gridSizes:{xs:12},children:(0,t.jsx)(Te.h,{className:o.description,content:n?.metadata?.description||i("aboutCard.descriptionField.value")})}),(0,t.jsx)(L,{label:i("aboutCard.ownerField.label"),value:i("aboutCard.ownerField.value"),gridSizes:{xs:12,sm:6,lg:4},children:G.length>0&&(0,t.jsx)(K.i,{entityRefs:G,defaultKind:"group"})}),(s||C.length>0)&&(0,t.jsx)(L,{label:i("aboutCard.domainField.label"),value:i("aboutCard.domainField.value"),gridSizes:{xs:12,sm:6,lg:4},children:C.length>0&&(0,t.jsx)(K.i,{entityRefs:C,defaultKind:"domain"})}),(m||c||l||D.length>0)&&(0,t.jsx)(L,{label:i("aboutCard.systemField.label"),value:i("aboutCard.systemField.value"),gridSizes:{xs:12,sm:6,lg:4},children:D.length>0&&(0,t.jsx)(K.i,{entityRefs:D,defaultKind:"system"})}),c&&Y.length>0&&(0,t.jsx)(L,{label:i("aboutCard.parentComponentField.label"),value:i("aboutCard.parentComponentField.value"),gridSizes:{xs:12,sm:6,lg:4},children:(0,t.jsx)(K.i,{entityRefs:Y,defaultKind:"component"})}),(m||c||l||$||N||I||typeof n?.spec?.type=="string")&&(0,t.jsx)(L,{label:i("aboutCard.typeField.label"),value:n?.spec?.type,gridSizes:{xs:12,sm:6,lg:4}}),(m||c||typeof n?.spec?.lifecycle=="string")&&(0,t.jsx)(L,{label:i("aboutCard.lifecycleField.label"),value:n?.spec?.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,t.jsx)(L,{label:i("aboutCard.tagsField.label"),value:i("aboutCard.tagsField.value"),gridSizes:{xs:12,sm:6,lg:4},children:(n?.metadata?.tags||[]).map(j=>(0,t.jsx)(Ae.A,{size:"small",label:j},j))}),I&&(n?.spec?.targets||n?.spec?.target)&&(0,t.jsx)(L,{label:i("aboutCard.targetsField.label"),gridSizes:{xs:12},children:(0,t.jsx)(Ee.m,{cols:1,items:(n.spec.targets||[n.spec.target]).map(j=>j).map(j=>({text:j,href:ke(j,n?.spec?.type||"unknown",M)}))})})]})}var Se=e(74011),Pe=e(25534),we=e(82451),Re=e(75625),Oe=e(11601),Ie=e.n(Oe);const Ne=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),De=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),Me=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),Ue=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","targetRef"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference","deprecated":true},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}'),de=new Map,Be=[De,Ne,Me,Ue];function $e(a){if(!a?.length)throw new TypeError("Unknown error");const n=a[0];throw new TypeError(`${n.instancePath||"<root>"} ${n.message}${n.params?` - ${Object.entries(n.params).map(([o,i])=>`${o}: ${i}`).join(", ")}`:""}`)}function Fe(a,n={}){const o=n?.disableCache??!1,i=o?"":JSON.stringify(a);if(!o){const m=de.get(i);if(m)return m}const s=ze(a),l=new(Ie())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});s.length&&l.addSchema(s,void 0,void 0,!0);const c=l.compile(a);return o||de.set(i,c),c}function ze(a){if(typeof a!="object")return[];const n=new Set;a.$id&&n.add(a.$id);const o=new Array,i=[a];for(;i.length;){const s=i.pop();for(const l of He(s))if(!n.has(l)){n.add(l);const c=Be.find(m=>m.$id===l);c&&(o.push(c),i.push(c))}}return o}function*He(a){const n=[a];for(;n.length;){const o=n.pop();if(typeof o=="object"&&o)for(const[i,s]of Object.entries(o))i==="$ref"&&typeof s=="string"?yield s.split("#")[0]:n.push(s)}}function Ve(a){const n=Fe(a);return o=>{if(n(o)===!0)return o;const s=n.errors?.filter(l=>["/kind","/apiVersion"].includes(l.instancePath));if(s?.length&&s.every(l=>l.keyword==="enum"))return!1;throw $e(n.errors)}}const We=Ve(JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta3","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"scaffolder.backstage.io/v1beta3","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","type":"website","parameters":{"required":["name","description","repoUrl"],"backstage:permissions":{"tags":["one","two"]},"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"},"repoUrl":{"title":"Pick a repository","type":"string","ui:field":"RepoUrlPicker"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"},"backstage:permissions":{"tags":["one","two"]}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"${{ parameters.repoUrl }}"},"if":"${{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"${{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["scaffolder.backstage.io/v1beta3"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}}]},"presentation":{"type":"object","description":"A way to redefine the presentation of the scaffolder.","properties":{"buttonLabels":{"type":"object","description":"A way to redefine the labels for actionable buttons.","properties":{"backButtonText":{"type":"string","description":"A button which return the user to one step back."},"createButtonText":{"type":"string","description":"A button which start the execution of the template."},"reviewButtonText":{"type":"string","description":"A button which open the review step to verify the input prior to start the execution."}}}}},"EXPERIMENTAL_recovery":{"type":"object","description":"A task recovery section.","properties":{"EXPERIMENTAL_strategy":{"type":"string","description":"Recovery strategy for your task (none or startOver). By default none"}}},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."},"backstage:permissions":{"type":"object","description":"Object used for authorizing the step","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}},"text":{"type":"array","description":"A list of Markdown text blobs, like output data from the template.","items":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"A user friendly display name for the text.","examples":["Output Content"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"content":{"type":"string","description":"The text blob to display in the UI, rendered as Markdown.","examples":["**hey** _I\'m_ Markdown"]}}}}},"additionalProperties":{"type":"string"}}}}}}]}')),ht={async check(a){return We(a)===a}},Ke=a=>a.apiVersion==="scaffolder.backstage.io/v1beta3"&&a.kind==="Template";var pe=e(36989);function Ye(a){const{entity:n,loading:o,error:i}=(0,ne.TY)(),{allowed:s,loading:l,error:c}=(0,pe.J)({permission:a,resourceRef:n?(0,A.U2)(n):void 0});return o||l?{loading:!0,allowed:!1}:i?{loading:!1,allowed:!1,error:i}:{loading:!1,allowed:s,error:c}}var Ge=e(35773),Je=e(91638);const Qe="backstage.io/source-template",Xe=a=>{const n=(0,z.gf)(ie.v),{value:o}=(0,Je.A)(async()=>{const i=a.metadata.annotations?.[Qe];let s;if(i)try{const l=await n.getEntityByRef(i);return s=(0,A.KU)(i),l!==void 0?s:void 0}catch{return}},[n,a]);return o};var B=e(14117);const me="scaffolder-template",Ze=(0,B.i)({name:"scaffolder.action.execute",attributes:{},resourceType:"scaffolder-action"}),qe=(0,B.i)({name:"scaffolder.template.parameter.read",attributes:{action:"read"},resourceType:me}),_e=(0,B.i)({name:"scaffolder.template.step.read",attributes:{action:"read"},resourceType:me}),et=(0,B.i)({name:"scaffolder.task.read",attributes:{action:"read"}}),ue=(0,B.i)({name:"scaffolder.task.create",attributes:{action:"create"}}),tt=(0,B.i)({name:"scaffolder.task.cancel",attributes:{}}),nt=[qe,_e],it=[Ze],at=[tt,ue,et],yt=[...nt,...it,...at],st="backstage.io/techdocs-ref",X="backstage.io/techdocs-entity",ot=(0,T.A)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function rt(a){const{variant:n}=a,o=(0,ee.n)(),i=ot(),{entity:s}=(0,ne.tN)(),l=(0,z.gf)(Q.Y),c=(0,z.gf)(ie.v),m=(0,z.gf)(be.k),$=(0,z.gf)(ve.m),I=(0,te.S)(se.UJ),N=(0,te.S)(se.Zg),D=Xe(s),{allowed:Y}=Ye(Ge.tS),{t:C}=(0,re.i)(le.W),{allowed:G}=(0,pe.J)({permission:ue}),M=xe(s,l),j=s.metadata.annotations?.[u.P];let F;if(s.metadata.annotations?.[X])try{F=(0,A.KU)(s.metadata.annotations?.[X])}catch{F=void 0}const lt={label:C("aboutCard.viewSource"),disabled:!M,icon:(0,t.jsx)(ge,{type:M?.integrationType}),href:M?.locationTargetUrl},ct={label:C("aboutCard.viewTechdocs"),disabled:!(s.metadata.annotations?.[st]||s.metadata.annotations?.[X])||!I,icon:(0,t.jsx)(we.A,{}),href:I&&I(F?{namespace:F.namespace||u.oQ,kind:F.kind,name:F.name}:{namespace:s.metadata.namespace||u.oQ,kind:s.kind,name:s.metadata.name})},he=[lt,ct];if(Ke(s)){const _=o.getSystemIcon("scaffolder")??Pe.A,mt={label:C("aboutCard.launchTemplate"),icon:(0,t.jsx)(_,{}),disabled:!N||!G,href:N&&N({templateName:s.metadata.name,namespace:s.metadata.namespace||u.oQ})};he.push(mt)}let Z="";n==="gridItem"?Z=i.gridItemCard:n==="fullHeight"&&(Z=i.fullHeightCard);let q="";n==="gridItem"?q=i.gridItemCardContent:n==="fullHeight"&&(q=i.fullHeightCardContent);const fe=s.metadata.annotations?.[b.Eo],dt=fe?.startsWith("url:")||fe?.startsWith("file:"),pt=(0,r.useCallback)(async()=>{try{await c.refreshEntity((0,A.U2)(s)),m.post({message:C("aboutCard.refreshScheduledMessage"),severity:"info",display:"transient"})}catch(_){$.post(_)}},[c,s,m,C,$]);return(0,t.jsxs)(E.A,{className:Z,children:[(0,t.jsx)(R.A,{title:C("aboutCard.title"),action:(0,t.jsxs)(t.Fragment,{children:[dt&&Y&&(0,t.jsx)(S.A,{"aria-label":"Refresh",title:C("aboutCard.refreshButtonTitle"),onClick:pt,children:(0,t.jsx)(Se.A,{})}),(0,t.jsx)(S.A,{component:P.N_,"aria-label":"Edit",disabled:!j,title:C("aboutCard.editButtonTitle"),to:j??"#",children:(0,t.jsx)(Re.A,{})}),D&&N&&(0,t.jsx)(S.A,{component:P.N_,title:C("aboutCard.createSimilarButtonTitle"),to:N({namespace:D.namespace,templateName:D.name}),children:(0,t.jsx)(d.z9,{id:"scaffolder"})})]}),subheader:(0,t.jsx)(J,{links:he})}),(0,t.jsx)(k.A,{}),(0,t.jsx)(w.A,{className:q,children:(0,t.jsx)(ce,{entity:s})})]})}},18750:(U,x,e)=>{e.d(x,{m:()=>v});var t=e(31085),u=e(24709),A=e(44913),b=e(14041),E=e(10394),w=e(72501),R=e(58837),k=e(23127),S=e(72072);const T=(0,R.A)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function P(h){const{href:y,text:g,Icon:f}=h,O=T();return(0,t.jsxs)(E.A,{display:"flex",children:[(0,t.jsx)(E.A,{mr:1,className:O.svgIcon,children:(0,t.jsx)(w.A,{component:"div",children:f?(0,t.jsx)(f,{}):(0,t.jsx)(k.A,{})})}),(0,t.jsx)(E.A,{flexGrow:"1",children:(0,t.jsx)(S.N_,{to:y,target:"_blank",rel:"noopener",children:g||y})})]})}var d=e(5893);const r={xs:1,sm:1,md:1,lg:2,xl:3};function p(h){const y=[(0,d.A)(f=>f.breakpoints.up("xl"))?"xl":null,(0,d.A)(f=>f.breakpoints.up("lg"))?"lg":null,(0,d.A)(f=>f.breakpoints.up("md"))?"md":null,(0,d.A)(f=>f.breakpoints.up("sm"))?"sm":null,(0,d.A)(f=>f.breakpoints.up("xs"))?"xs":null];let g=1;if(typeof h=="number")g=h;else{const f=y.find(O=>O!==null)??"xs";g=h?.[f]??r[f]}return g}function v(h){const{items:y,cols:g=void 0}=h,f=p(g);return(0,t.jsx)(u.A,{rowHeight:"auto",cols:f,children:y.map(({text:O,href:H,Icon:J},Q)=>(0,t.jsx)(A.A,{children:(0,t.jsx)(P,{href:H,text:O??H,Icon:J})},Q))})}},14117:(U,x,e)=>{e.d(x,{i:()=>t});function t({name:u,attributes:A,resourceType:b}){return b?{type:"resource",name:u,attributes:A,resourceType:b}:{type:"basic",name:u,attributes:A}}},36989:(U,x,e)=>{e.d(x,{J:()=>d});var t=e(72427),u=e(96824);function A(r,p){return r.name===p.name}function b(r,p){return"resourceType"in r?!p||r.resourceType===p:!1}function E(r){return r.attributes.action==="create"}function w(r){return r.attributes.action==="read"}function R(r){return r.attributes.action==="update"}function k(r){return r.attributes.action==="delete"}function S(r){return{authorize:async(p,v)=>await r.authorize(p,v),authorizeConditional(p,v){const h=p;return r.authorize(h,v)}}}var T=e(54241),P=e(68721);function d(r){const p=(0,t.gf)(u.x),{data:v,error:h}=(0,P.Ay)(r,async y=>{if(b(y.permission)&&!y.resourceRef)return T.b.DENY;const{result:g}=await p.authorize(y);return g});return h?{error:h,loading:!1,allowed:!1}:v===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:v===T.b.ALLOW}}}}]);})();
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5724],{35773:(U,x,e)=>{e.d(x,{C4:()=>b,tS:()=>w});var t=e(14117);const u="catalog-entity",A=(0,t.i)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:u}),b=(0,t.i)({name:"catalog.entity.create",attributes:{action:"create"}}),L=(0,t.i)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:u}),w=(0,t.i)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:u}),R=(0,t.i)({name:"catalog.entity.validate",attributes:{}}),S=(0,t.i)({name:"catalog.location.read",attributes:{action:"read"}}),P=(0,t.i)({name:"catalog.location.create",attributes:{action:"create"}}),T=(0,t.i)({name:"catalog.location.analyze",attributes:{}}),j=(0,t.i)({name:"catalog.location.delete",attributes:{action:"delete"}}),c=[A,b,L,w,R,S,P,j,T]},99538:(U,x,e)=>{e.d(x,{T7:()=>S,TY:()=>j,tN:()=>T});var t=e(31085),u=e(6820),A=e(25862),b=e(43836),L=e(10602),w=e(14041);const R=(0,b.tK)("entity-context"),S=c=>{const{children:r,entity:p,loading:v,error:h,refresh:y}=c,g={entity:p,loading:v,error:h,refresh:y};return(0,t.jsx)(R.Provider,{value:(0,L.B)({1:g}),children:(0,t.jsx)(A.Ig,{attributes:{...p?{entityRef:(0,u.U2)(p)}:void 0},children:r})})},P=c=>_jsx(S,{entity:c.entity,loading:!c.entity,error:void 0,refresh:void 0,children:c.children});function T(){const c=(0,b.qO)("entity-context");if(!c)throw new Error("Entity context is not available");const r=c.atVersion(1);if(!r)throw new Error("EntityContext v1 not available");if(!r.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:r.entity}}function j(){const c=(0,b.qO)("entity-context");if(!c)throw new Error("Entity context is not available");const r=c.atVersion(1);if(!r)throw new Error("EntityContext v1 not available");const{entity:p,loading:v,error:h,refresh:y}=r;return{entity:p,loading:v,error:h,refresh:y}}},90759:(U,x,e)=>{e.d(x,{W:()=>u});var t=e(93184);const u=(0,t.h)({id:"catalog",messages:{indexPage:{title:"{{orgName}} Catalog",createButtonTitle:"Create",supportButtonContent:"All your software catalog entities"},aboutCard:{title:"About",refreshButtonTitle:"Schedule entity refresh",editButtonTitle:"Edit Metadata",createSimilarButtonTitle:"Create something similar",refreshScheduledMessage:"Refresh scheduled",launchTemplate:"Launch Template",viewTechdocs:"View TechDocs",viewSource:"View Source",descriptionField:{label:"Description",value:"No description"},ownerField:{label:"Owner",value:"No Owner"},domainField:{label:"Domain",value:"No Domain"},systemField:{label:"System",value:"No System"},parentComponentField:{label:"Parent Component",value:"No Parent Component"},typeField:{label:"Type"},lifecycleField:{label:"Lifecycle"},tagsField:{label:"Tags",value:"No Tags"},targetsField:{label:"Targets"}},searchResultItem:{lifecycle:"Lifecycle",Owner:"Owner"},catalogTable:{warningPanelTitle:"Could not fetch catalog entities.",viewActionTitle:"View",editActionTitle:"Edit",starActionTitle:"Add to favorites",unStarActionTitle:"Remove from favorites"},dependencyOfComponentsCard:{title:"Dependency of components",emptyMessage:"No component depends on this component"},dependsOnComponentsCard:{title:"Depends on components",emptyMessage:"No component is a dependency of this component"},dependsOnResourcesCard:{title:"Depends on resources",emptyMessage:"No resource is a dependency of this component"},entityContextMenu:{copiedMessage:"Copied!",moreButtonTitle:"More",inspectMenuTitle:"Inspect entity",copyURLMenuTitle:"Copy entity URL",unregisterMenuTitle:"Unregister entity"},entityLabelsCard:{title:"Labels",emptyDescription:"No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityLabels:{warningPanelTitle:"Entity not found",ownerLabel:"Owner",lifecycleLabel:"Lifecycle"},entityLinksCard:{title:"Links",emptyDescription:"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityNotFound:{title:"Entity was not found",description:"Want to help us build this? Check out our Getting Started documentation.",docButtonTitle:"DOCS"},deleteEntity:{dialogTitle:"Are you sure you want to delete this entity?",deleteButtonTitle:"Delete",cancelButtonTitle:"Cancel",description:"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."},entityProcessingErrorsDescription:"The error below originates from",entityRelationWarningDescription:`This entity has relations to other entities, which can't be found in the catalog.
|
|
2
|
+
Entities not found are: `,hasComponentsCard:{title:"Has components",emptyMessage:"No component is part of this system"},hasResourcesCard:{title:"Has resources",emptyMessage:"No resource is part of this system"},hasSubcomponentsCard:{title:"Has subcomponents",emptyMessage:"No subcomponent is part of this component"},hasSubdomainsCard:{title:"Has subdomains",emptyMessage:"No subdomain is part of this domain"},hasSystemsCard:{title:"Has systems",emptyMessage:"No system is part of this domain"},relatedEntitiesCard:{emptyHelpLinkTitle:"Learn how to change this."},systemDiagramCard:{title:"System Diagram",description:"Use pinch & zoo to move around the diagram.",edgeLabels:{partOf:"part of",provides:"provides",dependsOn:"depends on"}}}})},65724:(U,x,e)=>{e.r(x),e.d(x,{AboutCard:()=>rt,AboutContent:()=>ce,AboutField:()=>k});var t=e(31085),u=e(72348),A=e(6820),b=e(17736),L=e(40703),w=e(48653),R=e(45685),S=e(37197),P=e(29365),T=e(58837),j=e(72072),c=e(31129),r=e(14041),p=e(53373),v=e.n(p),h=e(86613),y=e(10394),g=e(72501);const f=(0,T.A)(a=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:a.palette.text.secondary,cursor:"default"},primary:{color:a.palette.primary.main},secondary:{color:a.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:a.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function O({color:a="primary",disabled:n=!1,href:o="#",icon:i=(0,t.jsx)(h.A,{}),label:s,onClick:l,title:d}){const m=f();return n?(0,t.jsxs)(y.A,{title:d,className:v()(m.link,m.disabled),children:[i,(0,t.jsx)(g.A,{variant:"caption",component:"span",className:m.label,children:s})]}):(0,t.jsxs)(j.N_,{title:d,className:v()(m.link,m[a]),to:o,onClick:l,children:[i,(0,t.jsx)(g.A,{variant:"caption",component:"span",className:m.label,children:s})]})}const V=(0,T.A)(a=>({links:{margin:a.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:a.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function J(a){const{links:n}=a,o=V();return(0,t.jsx)("nav",{className:o.links,children:n.map((i,s)=>(0,t.jsx)(O,{...i},s+1))})}var Q=e(3347),ye=e(13660),ee=e(82266);const ge=a=>{const{type:n}=a,o=(0,ee.n)(),i=ye.A,s=n?o.getSystemIcon(n)??i:i;return(0,t.jsx)(s,{})};var z=e(72427),be=e(36017),ve=e(39837),te=e(9222),ne=e(99538),ie=e(7341),ae=e(78692);function xe(a,n){const o=a.metadata.annotations?.[b.I4];if(o)try{const i=(0,ae.aY)(o),s=n.byUrl(i.target);return{locationTargetUrl:i.target,integrationType:s?.type}}catch{return}}var se=e(95203),H=e(51372),W=e(67871),K=e(34428),Ae=e(67720),oe=e(42899),Te=e(4650),Ce=e(82442);const je=(0,T.A)(a=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:a.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function k(a){const{label:n,value:o,gridSizes:i,children:s}=a,l=je(),d=(0,Ce.O)(s,$=>$.getElements()),m=d.length>0?d:(0,t.jsx)(g.A,{variant:"body2",className:l.value,children:o||"unknown"});return(0,t.jsxs)(oe.A,{item:!0,...i,children:[(0,t.jsx)(g.A,{variant:"h2",className:l.label,children:n}),m]})}var Ee=e(18750),re=e(87849),le=e(90759);const Le=(0,T.A)({description:{wordBreak:"break-word"}});function ke(a,n,o){if(n==="url"||a.includes("://"))return a;const i=o.type==="file"?`file://${o.target}`:o.target;return n==="file"||o.type==="file"?new URL(a,i).href:i}function ce(a){const{entity:n}=a,o=Le(),{t:i}=(0,re.i)(le.W),s=n.kind.toLocaleLowerCase("en-US")==="system",l=n.kind.toLocaleLowerCase("en-US")==="resource",d=n.kind.toLocaleLowerCase("en-US")==="component",m=n.kind.toLocaleLowerCase("en-US")==="api",$=n.kind.toLocaleLowerCase("en-US")==="template",I=n.kind.toLocaleLowerCase("en-US")==="location",N=n.kind.toLocaleLowerCase("en-US")==="group",D=(0,W.t)(n,H.jn,{kind:"system"}),Y=(0,W.t)(n,H.jn,{kind:"component"}),C=(0,W.t)(n,H.jn,{kind:"domain"}),G=(0,W.t)(n,H.vv);let M;try{M=(0,ae.Cr)(n)}catch{M=void 0}return(0,t.jsxs)(oe.A,{container:!0,children:[(0,t.jsx)(k,{label:i("aboutCard.descriptionField.label"),gridSizes:{xs:12},children:(0,t.jsx)(Te.h,{className:o.description,content:n?.metadata?.description||i("aboutCard.descriptionField.value")})}),(0,t.jsx)(k,{label:i("aboutCard.ownerField.label"),value:i("aboutCard.ownerField.value"),gridSizes:{xs:12,sm:6,lg:4},children:G.length>0&&(0,t.jsx)(K.i,{entityRefs:G,defaultKind:"group"})}),(s||C.length>0)&&(0,t.jsx)(k,{label:i("aboutCard.domainField.label"),value:i("aboutCard.domainField.value"),gridSizes:{xs:12,sm:6,lg:4},children:C.length>0&&(0,t.jsx)(K.i,{entityRefs:C,defaultKind:"domain"})}),(m||d||l||D.length>0)&&(0,t.jsx)(k,{label:i("aboutCard.systemField.label"),value:i("aboutCard.systemField.value"),gridSizes:{xs:12,sm:6,lg:4},children:D.length>0&&(0,t.jsx)(K.i,{entityRefs:D,defaultKind:"system"})}),d&&Y.length>0&&(0,t.jsx)(k,{label:i("aboutCard.parentComponentField.label"),value:i("aboutCard.parentComponentField.value"),gridSizes:{xs:12,sm:6,lg:4},children:(0,t.jsx)(K.i,{entityRefs:Y,defaultKind:"component"})}),(m||d||l||$||N||I||typeof n?.spec?.type=="string")&&(0,t.jsx)(k,{label:i("aboutCard.typeField.label"),value:n?.spec?.type,gridSizes:{xs:12,sm:6,lg:4}}),(m||d||typeof n?.spec?.lifecycle=="string")&&(0,t.jsx)(k,{label:i("aboutCard.lifecycleField.label"),value:n?.spec?.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,t.jsx)(k,{label:i("aboutCard.tagsField.label"),value:i("aboutCard.tagsField.value"),gridSizes:{xs:12,sm:6,lg:4},children:(n?.metadata?.tags||[]).map(E=>(0,t.jsx)(Ae.A,{size:"small",label:E},E))}),I&&(n?.spec?.targets||n?.spec?.target)&&(0,t.jsx)(k,{label:i("aboutCard.targetsField.label"),gridSizes:{xs:12},children:(0,t.jsx)(Ee.m,{cols:1,items:(n.spec.targets||[n.spec.target]).map(E=>E).map(E=>({text:E,href:ke(E,n?.spec?.type||"unknown",M)}))})})]})}var Se=e(74011),Pe=e(25534),we=e(82451),Re=e(75625),Oe=e(11601),Ie=e.n(Oe);const Ne=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),De=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),Me=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),Ue=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","targetRef"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference","deprecated":true},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}'),de=new Map,Be=[De,Ne,Me,Ue];function $e(a){if(!a?.length)throw new TypeError("Unknown error");const n=a[0];throw new TypeError(`${n.instancePath||"<root>"} ${n.message}${n.params?` - ${Object.entries(n.params).map(([o,i])=>`${o}: ${i}`).join(", ")}`:""}`)}function Fe(a,n={}){const o=n?.disableCache??!1,i=o?"":JSON.stringify(a);if(!o){const m=de.get(i);if(m)return m}const s=ze(a),l=new(Ie())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});s.length&&l.addSchema(s,void 0,void 0,!0);const d=l.compile(a);return o||de.set(i,d),d}function ze(a){if(typeof a!="object")return[];const n=new Set;a.$id&&n.add(a.$id);const o=new Array,i=[a];for(;i.length;){const s=i.pop();for(const l of Ve(s))if(!n.has(l)){n.add(l);const d=Be.find(m=>m.$id===l);d&&(o.push(d),i.push(d))}}return o}function*Ve(a){const n=[a];for(;n.length;){const o=n.pop();if(typeof o=="object"&&o)for(const[i,s]of Object.entries(o))i==="$ref"&&typeof s=="string"?yield s.split("#")[0]:n.push(s)}}function He(a){const n=Fe(a);return o=>{if(n(o)===!0)return o;const s=n.errors?.filter(l=>["/kind","/apiVersion"].includes(l.instancePath));if(s?.length&&s.every(l=>l.keyword==="enum"))return!1;throw $e(n.errors)}}const We=He(JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta3","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"scaffolder.backstage.io/v1beta3","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","type":"website","parameters":{"required":["name","description","repoUrl"],"backstage:permissions":{"tags":["one","two"]},"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"},"repoUrl":{"title":"Pick a repository","type":"string","ui:field":"RepoUrlPicker"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"},"backstage:permissions":{"tags":["one","two"]}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"${{ parameters.repoUrl }}"},"if":"${{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"${{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["scaffolder.backstage.io/v1beta3"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}}]},"presentation":{"type":"object","description":"A way to redefine the presentation of the scaffolder.","properties":{"buttonLabels":{"type":"object","description":"A way to redefine the labels for actionable buttons.","properties":{"backButtonText":{"type":"string","description":"A button which return the user to one step back."},"createButtonText":{"type":"string","description":"A button which start the execution of the template."},"reviewButtonText":{"type":"string","description":"A button which open the review step to verify the input prior to start the execution."}}}}},"EXPERIMENTAL_recovery":{"type":"object","description":"A task recovery section.","properties":{"EXPERIMENTAL_strategy":{"type":"string","description":"Recovery strategy for your task (none or startOver). By default none"}}},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."},"backstage:permissions":{"type":"object","description":"Object used for authorizing the step","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}},"text":{"type":"array","description":"A list of Markdown text blobs, like output data from the template.","items":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"A user friendly display name for the text.","examples":["Output Content"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"content":{"type":"string","description":"The text blob to display in the UI, rendered as Markdown.","examples":["**hey** _I\'m_ Markdown"]}}}}},"additionalProperties":{"type":"string"}}}}}}]}')),ht={async check(a){return We(a)===a}},Ke=a=>a.apiVersion==="scaffolder.backstage.io/v1beta3"&&a.kind==="Template";var pe=e(36989);function Ye(a){const{entity:n,loading:o,error:i}=(0,ne.TY)(),{allowed:s,loading:l,error:d}=(0,pe.J)({permission:a,resourceRef:n?(0,A.U2)(n):void 0});return o||l?{loading:!0,allowed:!1}:i?{loading:!1,allowed:!1,error:i}:{loading:!1,allowed:s,error:d}}var Ge=e(35773),Je=e(91638);const Qe="backstage.io/source-template",Xe=a=>{const n=(0,z.gf)(ie.v),{value:o}=(0,Je.A)(async()=>{const i=a.metadata.annotations?.[Qe];let s;if(i)try{const l=await n.getEntityByRef(i);return s=(0,A.KU)(i),l!==void 0?s:void 0}catch{return}},[n,a]);return o};var B=e(14117);const me="scaffolder-template",Ze=(0,B.i)({name:"scaffolder.action.execute",attributes:{},resourceType:"scaffolder-action"}),qe=(0,B.i)({name:"scaffolder.template.parameter.read",attributes:{action:"read"},resourceType:me}),_e=(0,B.i)({name:"scaffolder.template.step.read",attributes:{action:"read"},resourceType:me}),et=(0,B.i)({name:"scaffolder.task.read",attributes:{action:"read"}}),ue=(0,B.i)({name:"scaffolder.task.create",attributes:{action:"create"}}),tt=(0,B.i)({name:"scaffolder.task.cancel",attributes:{}}),nt=[qe,_e],it=[Ze],at=[tt,ue,et],yt=[...nt,...it,...at],st="backstage.io/techdocs-ref",X="backstage.io/techdocs-entity",ot=(0,T.A)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function rt(a){const{variant:n}=a,o=(0,ee.n)(),i=ot(),{entity:s}=(0,ne.tN)(),l=(0,z.gf)(Q.Y),d=(0,z.gf)(ie.v),m=(0,z.gf)(be.k),$=(0,z.gf)(ve.m),I=(0,te.S)(se.UJ),N=(0,te.S)(se.Zg),D=Xe(s),{allowed:Y}=Ye(Ge.tS),{t:C}=(0,re.i)(le.W),{allowed:G}=(0,pe.J)({permission:ue}),M=xe(s,l),E=s.metadata.annotations?.[u.P];let F;if(s.metadata.annotations?.[X])try{F=(0,A.KU)(s.metadata.annotations?.[X])}catch{F=void 0}const lt={label:C("aboutCard.viewSource"),disabled:!M,icon:(0,t.jsx)(ge,{type:M?.integrationType}),href:M?.locationTargetUrl},ct={label:C("aboutCard.viewTechdocs"),disabled:!(s.metadata.annotations?.[st]||s.metadata.annotations?.[X])||!I,icon:(0,t.jsx)(we.A,{}),href:I&&I(F?{namespace:F.namespace||u.oQ,kind:F.kind,name:F.name}:{namespace:s.metadata.namespace||u.oQ,kind:s.kind,name:s.metadata.name})},he=[lt,ct];if(Ke(s)){const _=o.getSystemIcon("scaffolder")??Pe.A,mt={label:C("aboutCard.launchTemplate"),icon:(0,t.jsx)(_,{}),disabled:!N||!G,href:N&&N({templateName:s.metadata.name,namespace:s.metadata.namespace||u.oQ})};he.push(mt)}let Z="";n==="gridItem"?Z=i.gridItemCard:n==="fullHeight"&&(Z=i.fullHeightCard);let q="";n==="gridItem"?q=i.gridItemCardContent:n==="fullHeight"&&(q=i.fullHeightCardContent);const fe=s.metadata.annotations?.[b.Eo],dt=fe?.startsWith("url:")||fe?.startsWith("file:"),pt=(0,r.useCallback)(async()=>{try{await d.refreshEntity((0,A.U2)(s)),m.post({message:C("aboutCard.refreshScheduledMessage"),severity:"info",display:"transient"})}catch(_){$.post(_)}},[d,s,m,C,$]);return(0,t.jsxs)(L.A,{className:Z,children:[(0,t.jsx)(R.A,{title:C("aboutCard.title"),action:(0,t.jsxs)(t.Fragment,{children:[dt&&Y&&(0,t.jsx)(P.A,{"aria-label":"Refresh",title:C("aboutCard.refreshButtonTitle"),onClick:pt,children:(0,t.jsx)(Se.A,{})}),(0,t.jsx)(P.A,{component:j.N_,"aria-label":"Edit",disabled:!E,title:C("aboutCard.editButtonTitle"),to:E??"#",children:(0,t.jsx)(Re.A,{})}),D&&N&&(0,t.jsx)(P.A,{component:j.N_,title:C("aboutCard.createSimilarButtonTitle"),to:N({namespace:D.namespace,templateName:D.name}),children:(0,t.jsx)(c.z9,{id:"scaffolder"})})]}),subheader:(0,t.jsx)(J,{links:he})}),(0,t.jsx)(S.A,{}),(0,t.jsx)(w.A,{className:q,children:(0,t.jsx)(ce,{entity:s})})]})}},18750:(U,x,e)=>{e.d(x,{m:()=>v});var t=e(31085),u=e(24709),A=e(44913),b=e(14041),L=e(10394),w=e(72501),R=e(58837),S=e(23127),P=e(72072);const T=(0,R.A)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function j(h){const{href:y,text:g,Icon:f}=h,O=T();return(0,t.jsxs)(L.A,{display:"flex",children:[(0,t.jsx)(L.A,{mr:1,className:O.svgIcon,children:(0,t.jsx)(w.A,{component:"div",children:f?(0,t.jsx)(f,{}):(0,t.jsx)(S.A,{})})}),(0,t.jsx)(L.A,{flexGrow:"1",children:(0,t.jsx)(P.N_,{to:y,target:"_blank",rel:"noopener",children:g||y})})]})}var c=e(5893);const r={xs:1,sm:1,md:1,lg:2,xl:3};function p(h){const y=[(0,c.A)(f=>f.breakpoints.up("xl"))?"xl":null,(0,c.A)(f=>f.breakpoints.up("lg"))?"lg":null,(0,c.A)(f=>f.breakpoints.up("md"))?"md":null,(0,c.A)(f=>f.breakpoints.up("sm"))?"sm":null,(0,c.A)(f=>f.breakpoints.up("xs"))?"xs":null];let g=1;if(typeof h=="number")g=h;else{const f=y.find(O=>O!==null)??"xs";g=h?.[f]??r[f]}return g}function v(h){const{items:y,cols:g=void 0}=h,f=p(g);return(0,t.jsx)(u.A,{rowHeight:"auto",cols:f,children:y.map(({text:O,href:V,Icon:J},Q)=>(0,t.jsx)(A.A,{children:(0,t.jsx)(j,{href:V,text:O??V,Icon:J})},Q))})}},14117:(U,x,e)=>{e.d(x,{i:()=>t});function t({name:u,attributes:A,resourceType:b}){return b?{type:"resource",name:u,attributes:A,resourceType:b}:{type:"basic",name:u,attributes:A}}},36989:(U,x,e)=>{e.d(x,{J:()=>c});var t=e(72427),u=e(96824);function A(r,p){return r.name===p.name}function b(r,p){return"resourceType"in r?!p||r.resourceType===p:!1}function L(r){return r.attributes.action==="create"}function w(r){return r.attributes.action==="read"}function R(r){return r.attributes.action==="update"}function S(r){return r.attributes.action==="delete"}function P(r){return{authorize:async(p,v)=>await r.authorize(p,v),authorizeConditional(p,v){const h=p;return r.authorize(h,v)}}}var T=e(54241),j=e(68721);function c(r){const p=(0,t.gf)(u.x),{data:v,error:h}=(0,j.Ay)(r,async y=>{if(b(y.permission)&&!y.resourceRef)return T.b.DENY;const{result:g}=await p.authorize(y);return g});return h?{error:h,loading:!1,allowed:!1}:v===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:v===T.b.ALLOW}}}}]);})();
|
|
3
3
|
|
|
4
|
-
//# sourceMappingURL=5724.
|
|
4
|
+
//# sourceMappingURL=5724.cfd2379f.chunk.js.map
|