@backstage/plugin-catalog 1.12.5-next.1 → 1.13.0-next.3
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 +43 -0
- package/dist/esm/{index-cd22824c.esm.js → index-087ed2ed.esm.js} +4 -4
- package/dist/esm/{index-cd22824c.esm.js.map → index-087ed2ed.esm.js.map} +1 -1
- package/dist/esm/{index-317e65a6.esm.js → index-4e218504.esm.js} +6 -6
- package/dist/esm/{index-317e65a6.esm.js.map → index-4e218504.esm.js.map} +1 -1
- package/dist/esm/{index-14937ecb.esm.js → index-5862e259.esm.js} +8 -8
- package/dist/esm/index-5862e259.esm.js.map +1 -0
- package/dist/esm/{index-21d99ae3.esm.js → index-7c223531.esm.js} +8 -8
- package/dist/esm/index-7c223531.esm.js.map +1 -0
- package/dist/esm/{index-8a2a4882.esm.js → index-ac94c8a1.esm.js} +34 -18
- package/dist/esm/index-ac94c8a1.esm.js.map +1 -0
- package/dist/index.esm.js +7 -7
- package/package.json +20 -19
- package/dist/esm/index-14937ecb.esm.js.map +0 -1
- package/dist/esm/index-21d99ae3.esm.js.map +0 -1
- package/dist/esm/index-8a2a4882.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.13.0-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-client@1.4.4-next.2
|
|
10
|
+
- @backstage/catalog-model@1.4.2-next.2
|
|
11
|
+
- @backstage/core-components@0.13.5-next.3
|
|
12
|
+
- @backstage/core-plugin-api@1.6.0-next.3
|
|
13
|
+
- @backstage/errors@1.2.2-next.0
|
|
14
|
+
- @backstage/integration-react@1.1.19-next.3
|
|
15
|
+
- @backstage/plugin-catalog-common@1.0.16-next.2
|
|
16
|
+
- @backstage/plugin-catalog-react@1.8.4-next.3
|
|
17
|
+
- @backstage/plugin-scaffolder-common@1.4.1-next.2
|
|
18
|
+
- @backstage/plugin-search-common@1.2.6-next.2
|
|
19
|
+
- @backstage/plugin-search-react@1.7.0-next.3
|
|
20
|
+
- @backstage/theme@0.4.2-next.0
|
|
21
|
+
- @backstage/types@1.1.1-next.0
|
|
22
|
+
|
|
23
|
+
## 1.13.0-next.2
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- e44f45ac4515: This change allows a new annotation of `backstage.io/techdocs-entity` this ref allows you to reference another entity for its TechDocs. This allows you have a single TechDoc for all items in a system, for example you might have a frontend and a backend in the same repo. This would allow you to have TechDocs build under a `System` entity while referencing the system e.g.: `backstage.io/techdocs-entity: system:default/example` that will show the systems docs in both the TechDocs button and the TechDocs tab without needing to do duplicate builds and filling the TechDocs page with garbage.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
- @backstage/integration-react@1.1.19-next.2
|
|
33
|
+
- @backstage/core-components@0.13.5-next.2
|
|
34
|
+
- @backstage/core-plugin-api@1.6.0-next.2
|
|
35
|
+
- @backstage/plugin-catalog-react@1.8.4-next.2
|
|
36
|
+
- @backstage/plugin-search-react@1.7.0-next.2
|
|
37
|
+
- @backstage/catalog-model@1.4.2-next.1
|
|
38
|
+
- @backstage/catalog-client@1.4.4-next.1
|
|
39
|
+
- @backstage/errors@1.2.1
|
|
40
|
+
- @backstage/theme@0.4.1
|
|
41
|
+
- @backstage/types@1.1.0
|
|
42
|
+
- @backstage/plugin-catalog-common@1.0.16-next.1
|
|
43
|
+
- @backstage/plugin-scaffolder-common@1.4.1-next.1
|
|
44
|
+
- @backstage/plugin-search-common@1.2.6-next.1
|
|
45
|
+
|
|
3
46
|
## 1.12.5-next.1
|
|
4
47
|
|
|
5
48
|
### Patch Changes
|
|
@@ -3,17 +3,17 @@ import LanguageIcon from '@material-ui/icons/Language';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { makeStyles, Typography, Button } from '@material-ui/core';
|
|
5
5
|
import { CodeSnippet, InfoCard } from '@backstage/core-components';
|
|
6
|
-
import { L as LinksGridList } from './index-
|
|
6
|
+
import { L as LinksGridList } from './index-ac94c8a1.esm.js';
|
|
7
7
|
import { useApp } from '@backstage/core-plugin-api';
|
|
8
8
|
import 'zen-observable';
|
|
9
9
|
import '@backstage/catalog-model';
|
|
10
10
|
import 'lodash';
|
|
11
11
|
import '@backstage/integration-react';
|
|
12
|
-
import '@backstage/plugin-scaffolder-common';
|
|
13
|
-
import '@material-ui/icons/AddCircleOutline';
|
|
14
12
|
import '@material-ui/icons/Cached';
|
|
13
|
+
import '@material-ui/icons/AddCircleOutline';
|
|
15
14
|
import '@material-ui/icons/Description';
|
|
16
15
|
import '@material-ui/icons/Edit';
|
|
16
|
+
import '@backstage/plugin-scaffolder-common';
|
|
17
17
|
import 'pluralize';
|
|
18
18
|
import 'react-use/lib/useAsync';
|
|
19
19
|
import '@material-ui/core/styles';
|
|
@@ -95,4 +95,4 @@ const EntityLinksCard = (props) => {
|
|
|
95
95
|
};
|
|
96
96
|
|
|
97
97
|
export { EntityLinksCard };
|
|
98
|
-
//# sourceMappingURL=index-
|
|
98
|
+
//# sourceMappingURL=index-087ed2ed.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-087ed2ed.esm.js","sources":["../../src/components/EntityLinksCard/EntityLinksEmptyState.tsx","../../src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["/*\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 { BackstageTheme } from '@backstage/theme';\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles<BackstageTheme>(\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: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n <>\n <Typography variant=\"body1\">\n No links defined for this entity. You can add links to your entity YAML\n as shown in the highlighted example below:\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#links-optional\"\n >\n Read more\n </Button>\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 { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n variant?: InfoCardVariants;\n}\n\nexport const EntityLinksCard = (props: EntityLinksCardProps) => {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <InfoCard title=\"Links\" variant={variant}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":["_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,WAAc,GAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAA,CAAA,CAAA;AAUpB,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,CAAA;AAAA,MACd,MAAQ,EAAA,KAAA,CAAM,OAAQ,CAAA,CAAA,EAAG,CAAC,CAAA;AAAA,MAC1B,UAAA,EACE,MAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,MAAS,GAAA,KAAA,CAAM,QAAQ,MAAO,CAAA,KAAA;AAAA,KAClE;AAAA,GACF,CAAA;AAAA,EACA,EAAE,MAAM,oCAAqC,EAAA;AAC/C,CAAA,CAAA;AAEO,SAAS,qBAAwB,GAAA;AACtC,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;A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G,CAArB,KAAA,IAAA,GAAAA,MAA0B,YAAe,GAAA,YAAA,CAAA;AAAA,GAAA,CAAA;AAEjD,EAAM,MAAA,KAAA,GAAA,CAAQ,EAAQ,GAAA,MAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,CAAA,QAAA,KAAR,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAEhC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAM,EAAA,OAAA,EAAQ,OACrB,EAAA,EAAA,CAAC,KAAS,IAAA,KAAA,CAAM,MAAW,KAAA,CAAA,mBACzB,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,CAEvB,mBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,KAAA,EAAO,MAAM,GAAI,CAAA,CAAC,EAAE,GAAK,EAAA,KAAA,EAAO,MAAY,MAAA;AAAA,QAC1C,MAAM,KAAS,IAAA,IAAA,GAAA,KAAA,GAAA,GAAA;AAAA,QACf,IAAM,EAAA,GAAA;AAAA,QACN,IAAA,EAAM,aAAa,IAAI,CAAA;AAAA,OACvB,CAAA,CAAA;AAAA,KAAA;AAAA,GAGR,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -3,19 +3,19 @@ import { useOutlet } from 'react-router-dom';
|
|
|
3
3
|
import { PageWithHeader, Content, ContentHeader, CreateButton, SupportButton } from '@backstage/core-components';
|
|
4
4
|
import { useApi, configApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
5
5
|
import { EntityListProvider, CatalogFilterLayout, EntityKindPicker, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker, EntityProcessingStatusPicker, EntityNamespacePicker } from '@backstage/plugin-catalog-react';
|
|
6
|
-
import { c as createComponentRouteRef, C as CatalogTable } from './index-
|
|
6
|
+
import { c as createComponentRouteRef, C as CatalogTable } from './index-ac94c8a1.esm.js';
|
|
7
7
|
import { usePluginOptions } from '@backstage/core-plugin-api/alpha';
|
|
8
8
|
import 'zen-observable';
|
|
9
9
|
import '@backstage/catalog-model';
|
|
10
10
|
import 'lodash';
|
|
11
|
-
import '@backstage/integration-react';
|
|
12
|
-
import '@backstage/plugin-scaffolder-common';
|
|
13
11
|
import '@material-ui/core';
|
|
14
|
-
import '@
|
|
12
|
+
import '@backstage/integration-react';
|
|
13
|
+
import '@material-ui/icons/Language';
|
|
15
14
|
import '@material-ui/icons/Cached';
|
|
15
|
+
import '@material-ui/icons/AddCircleOutline';
|
|
16
16
|
import '@material-ui/icons/Description';
|
|
17
17
|
import '@material-ui/icons/Edit';
|
|
18
|
-
import '@
|
|
18
|
+
import '@backstage/plugin-scaffolder-common';
|
|
19
19
|
import 'pluralize';
|
|
20
20
|
import 'react-use/lib/useAsync';
|
|
21
21
|
import '@material-ui/core/styles';
|
|
@@ -72,4 +72,4 @@ function CatalogPage(props) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
export { CatalogPage, DefaultCatalogPage };
|
|
75
|
-
//# sourceMappingURL=index-
|
|
75
|
+
//# sourceMappingURL=index-4e218504.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-4e218504.esm.js","sources":["../../src/options.ts","../../src/components/CatalogPage/DefaultCatalogPage.tsx","../../src/components/CatalogPage/CatalogPage.tsx"],"sourcesContent":["/*\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 { usePluginOptions } from '@backstage/core-plugin-api/alpha';\n\nexport type CatalogPluginOptions = {\n createButtonTitle: string;\n};\n\n/** @ignore */\nexport type CatalogInputPluginOptions = {\n createButtonTitle: string;\n};\n\nexport const useCatalogPluginOptions = () =>\n usePluginOptions<CatalogPluginOptions>();\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityProcessingStatusPicker,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n EntityKindPicker,\n EntityNamespacePicker,\n EntityOwnerPickerProps,\n} from '@backstage/plugin-catalog-react';\nimport React, { ReactNode } from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { useCatalogPluginOptions } from '../../options';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n ownerPickerMode?: EntityOwnerPickerProps['mode'];\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\n ownerPickerMode,\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n const { createButtonTitle } = useCatalogPluginOptions();\n\n return (\n <PageWithHeader title={`${orgName} Catalog`} themeId=\"home\">\n <Content>\n <ContentHeader title=\"\">\n <CreateButton\n title={createButtonTitle}\n to={createComponentLink && createComponentLink()}\n />\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter={initialKind} />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker mode={ownerPickerMode} />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n <EntityProcessingStatusPicker />\n <EntityNamespacePicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n emptyContent={emptyContent}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport {\n DefaultCatalogPage,\n DefaultCatalogPageProps,\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props: DefaultCatalogPageProps) {\n const outlet = useOutlet();\n\n return outlet || <DefaultCatalogPage {...props} />;\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B,OAApB,EAAA,IAAA,sCACE,gBAAiB,EAAA,EAAA,aAAA,EAAe,aAAa,CAC9C,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAiB,EAAA,IAAA,CAAA,kBACjB,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,EAAe,eAAe,uBAAyB,EAAA,CAAA,sCACvD,iBAAkB,EAAA,EAAA,IAAA,EAAM,iBAAiB,CAC1C,kBAAA,KAAA,CAAA,aAAA,CAAC,qBAAsB,EAAA,IAAA,CAAA,kBACtB,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA,IAAgB,mBAChB,KAAA,CAAA,aAAA,CAAA,4BAAA,EAAA,IAA6B,mBAC7B,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,CACzB,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,mBAAoB,CAAA,OAAA,EAApB,IACC,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,OAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KAAA;AAAA,GAEJ,CACF,CACF,CACF,CACF,CAAA,CAAA;AAEJ;;ACxFO,SAAS,YAAY,KAAgC,EAAA;AAC1D,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,OAAO,MAAU,oBAAA,KAAA,CAAA,aAAA,CAAC,kBAAoB,EAAA,EAAA,GAAG,KAAO,EAAA,CAAA,CAAA;AAClD;;;;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { E as EntityLabelsCard, h as hasLabels } from './index-
|
|
1
|
+
export { E as EntityLabelsCard, h as hasLabels } from './index-ac94c8a1.esm.js';
|
|
2
2
|
import 'zen-observable';
|
|
3
3
|
import '@backstage/catalog-model';
|
|
4
4
|
import 'lodash';
|
|
5
|
+
import '@material-ui/core';
|
|
5
6
|
import '@backstage/core-components';
|
|
6
|
-
import '
|
|
7
|
+
import 'react';
|
|
7
8
|
import '@backstage/integration-react';
|
|
9
|
+
import '@backstage/core-plugin-api';
|
|
8
10
|
import '@backstage/plugin-catalog-react';
|
|
9
|
-
import '@
|
|
10
|
-
import '@material-ui/core';
|
|
11
|
-
import '@material-ui/icons/AddCircleOutline';
|
|
11
|
+
import '@material-ui/icons/Language';
|
|
12
12
|
import '@material-ui/icons/Cached';
|
|
13
|
+
import '@material-ui/icons/AddCircleOutline';
|
|
13
14
|
import '@material-ui/icons/Description';
|
|
14
15
|
import '@material-ui/icons/Edit';
|
|
15
|
-
import '
|
|
16
|
-
import '@material-ui/icons/Language';
|
|
16
|
+
import '@backstage/plugin-scaffolder-common';
|
|
17
17
|
import 'pluralize';
|
|
18
18
|
import 'react-use/lib/useAsync';
|
|
19
19
|
import '@material-ui/core/styles';
|
|
@@ -31,4 +31,4 @@ import '@material-ui/icons/Cancel';
|
|
|
31
31
|
import '@backstage/errors';
|
|
32
32
|
import '@backstage/catalog-client';
|
|
33
33
|
import '@backstage/plugin-search-react';
|
|
34
|
-
//# sourceMappingURL=index-
|
|
34
|
+
//# sourceMappingURL=index-5862e259.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-5862e259.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { A as AboutCard, a as AboutContent, b as AboutField } from './index-
|
|
1
|
+
export { A as AboutCard, a as AboutContent, b as AboutField } from './index-ac94c8a1.esm.js';
|
|
2
2
|
import 'zen-observable';
|
|
3
3
|
import '@backstage/catalog-model';
|
|
4
4
|
import 'lodash';
|
|
5
|
+
import '@material-ui/core';
|
|
5
6
|
import '@backstage/core-components';
|
|
6
|
-
import '
|
|
7
|
+
import 'react';
|
|
7
8
|
import '@backstage/integration-react';
|
|
9
|
+
import '@backstage/core-plugin-api';
|
|
8
10
|
import '@backstage/plugin-catalog-react';
|
|
9
|
-
import '@
|
|
10
|
-
import '@material-ui/core';
|
|
11
|
-
import '@material-ui/icons/AddCircleOutline';
|
|
11
|
+
import '@material-ui/icons/Language';
|
|
12
12
|
import '@material-ui/icons/Cached';
|
|
13
|
+
import '@material-ui/icons/AddCircleOutline';
|
|
13
14
|
import '@material-ui/icons/Description';
|
|
14
15
|
import '@material-ui/icons/Edit';
|
|
15
|
-
import '
|
|
16
|
-
import '@material-ui/icons/Language';
|
|
16
|
+
import '@backstage/plugin-scaffolder-common';
|
|
17
17
|
import 'pluralize';
|
|
18
18
|
import 'react-use/lib/useAsync';
|
|
19
19
|
import '@material-ui/core/styles';
|
|
@@ -31,4 +31,4 @@ import '@material-ui/icons/Cancel';
|
|
|
31
31
|
import '@backstage/errors';
|
|
32
32
|
import '@backstage/catalog-client';
|
|
33
33
|
import '@backstage/plugin-search-react';
|
|
34
|
-
//# sourceMappingURL=index-
|
|
34
|
+
//# sourceMappingURL=index-7c223531.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-7c223531.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import ObservableImpl from 'zen-observable';
|
|
2
|
-
import { stringifyEntityRef, RELATION_PART_OF, RELATION_OWNED_BY, getEntitySourceLocation, ANNOTATION_EDIT_URL, DEFAULT_NAMESPACE, ANNOTATION_LOCATION, ANNOTATION_VIEW_URL } from '@backstage/catalog-model';
|
|
2
|
+
import { stringifyEntityRef, RELATION_PART_OF, RELATION_OWNED_BY, getEntitySourceLocation, ANNOTATION_EDIT_URL, parseEntityRef, DEFAULT_NAMESPACE, ANNOTATION_LOCATION, ANNOTATION_VIEW_URL } from '@backstage/catalog-model';
|
|
3
3
|
import { isArray, isString, capitalize } from 'lodash';
|
|
4
|
+
import { makeStyles, Typography, Grid, Box, useMediaQuery, ImageList, ImageListItem, Chip, Card, CardHeader, IconButton, Divider, CardContent, createStyles, Select, InputBase, MenuItem, ListItemIcon, ListItemText, Tooltip, Popover, MenuList, Dialog, DialogTitle, DialogActions, Button } from '@material-ui/core';
|
|
4
5
|
import { Link, MarkdownContent, HeaderIconLinkRow, OverflowTooltip, WarningPanel, CodeSnippet, Table, Page, Header, Progress, RoutedTabs, Content, HeaderLabel, ResponseErrorPanel, InfoCard } from '@backstage/core-components';
|
|
5
|
-
import
|
|
6
|
+
import React, { useCallback, useMemo, useState, useEffect } from 'react';
|
|
6
7
|
import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
|
|
8
|
+
import { createExternalRouteRef, createRouteRef, useElementFilter, useApp, useApi, alertApiRef, errorApiRef, useRouteRef, attachComponentData, useRouteRefParams, useApiHolder, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
|
|
7
9
|
import { getEntityRelations, EntityRefLinks, useEntity, catalogApiRef, getEntitySourceLocation as getEntitySourceLocation$1, useEntityList, EntityKindFilter, EntityRefLink, humanizeEntityRef, useStarredEntities, entityRouteRef, useAsyncEntity, UnregisterEntityDialog, InspectEntityDialog, FavoriteEntity, CatalogFilterLayout, starredEntitiesApiRef } from '@backstage/plugin-catalog-react';
|
|
8
|
-
import
|
|
9
|
-
import { makeStyles, Typography, Grid, Box, useMediaQuery, ImageList, ImageListItem, Chip, Card, CardHeader, IconButton, Divider, CardContent, createStyles, Select, InputBase, MenuItem, ListItemIcon, ListItemText, Tooltip, Popover, MenuList, Dialog, DialogTitle, DialogActions, Button } from '@material-ui/core';
|
|
10
|
-
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
|
|
10
|
+
import LanguageIcon from '@material-ui/icons/Language';
|
|
11
11
|
import CachedIcon from '@material-ui/icons/Cached';
|
|
12
|
+
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
|
|
12
13
|
import DocsIcon from '@material-ui/icons/Description';
|
|
13
14
|
import EditIcon from '@material-ui/icons/Edit';
|
|
14
|
-
import
|
|
15
|
-
import LanguageIcon from '@material-ui/icons/Language';
|
|
15
|
+
import { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
16
16
|
import pluralize from 'pluralize';
|
|
17
17
|
import useAsync from 'react-use/lib/useAsync';
|
|
18
18
|
import { withStyles, makeStyles as makeStyles$1 } from '@material-ui/core/styles';
|
|
@@ -338,6 +338,8 @@ function AboutContent(props) {
|
|
|
338
338
|
)));
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
+
const TECHDOCS_ANNOTATION = "backstage.io/techdocs-ref";
|
|
342
|
+
const TECHDOCS_EXTERNAL_ANNOTATION = "backstage.io/techdocs-entity";
|
|
341
343
|
const useStyles$4 = makeStyles({
|
|
342
344
|
gridItemCard: {
|
|
343
345
|
display: "flex",
|
|
@@ -359,7 +361,7 @@ const useStyles$4 = makeStyles({
|
|
|
359
361
|
}
|
|
360
362
|
});
|
|
361
363
|
function AboutCard(props) {
|
|
362
|
-
var _a, _b, _c, _d;
|
|
364
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
363
365
|
const { variant } = props;
|
|
364
366
|
const app = useApp();
|
|
365
367
|
const classes = useStyles$4();
|
|
@@ -375,6 +377,16 @@ function AboutCard(props) {
|
|
|
375
377
|
scmIntegrationsApi
|
|
376
378
|
);
|
|
377
379
|
const entityMetadataEditUrl = (_a = entity.metadata.annotations) == null ? void 0 : _a[ANNOTATION_EDIT_URL];
|
|
380
|
+
let techdocsRef;
|
|
381
|
+
if ((_b = entity.metadata.annotations) == null ? void 0 : _b[TECHDOCS_EXTERNAL_ANNOTATION]) {
|
|
382
|
+
try {
|
|
383
|
+
techdocsRef = parseEntityRef(
|
|
384
|
+
(_c = entity.metadata.annotations) == null ? void 0 : _c[TECHDOCS_EXTERNAL_ANNOTATION]
|
|
385
|
+
);
|
|
386
|
+
} catch {
|
|
387
|
+
techdocsRef = void 0;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
378
390
|
const viewInSource = {
|
|
379
391
|
label: "View Source",
|
|
380
392
|
disabled: !entitySourceLocation,
|
|
@@ -383,17 +395,21 @@ function AboutCard(props) {
|
|
|
383
395
|
};
|
|
384
396
|
const viewInTechDocs = {
|
|
385
397
|
label: "View TechDocs",
|
|
386
|
-
disabled: !((
|
|
398
|
+
disabled: !(((_d = entity.metadata.annotations) == null ? void 0 : _d[TECHDOCS_ANNOTATION]) || ((_e = entity.metadata.annotations) == null ? void 0 : _e[TECHDOCS_EXTERNAL_ANNOTATION])) || !viewTechdocLink,
|
|
387
399
|
icon: /* @__PURE__ */ React.createElement(DocsIcon, null),
|
|
388
|
-
href: viewTechdocLink && viewTechdocLink({
|
|
400
|
+
href: viewTechdocLink && (techdocsRef ? viewTechdocLink({
|
|
401
|
+
namespace: techdocsRef.namespace || DEFAULT_NAMESPACE,
|
|
402
|
+
kind: techdocsRef.kind,
|
|
403
|
+
name: techdocsRef.name
|
|
404
|
+
}) : viewTechdocLink({
|
|
389
405
|
namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,
|
|
390
406
|
kind: entity.kind,
|
|
391
407
|
name: entity.metadata.name
|
|
392
|
-
})
|
|
408
|
+
}))
|
|
393
409
|
};
|
|
394
410
|
const subHeaderLinks = [viewInSource, viewInTechDocs];
|
|
395
411
|
if (isTemplateEntityV1beta3(entity)) {
|
|
396
|
-
const Icon = (
|
|
412
|
+
const Icon = (_f = app.getSystemIcon("scaffolder")) != null ? _f : CreateComponentIcon;
|
|
397
413
|
const launchTemplate = {
|
|
398
414
|
label: "Launch Template",
|
|
399
415
|
icon: /* @__PURE__ */ React.createElement(Icon, null),
|
|
@@ -417,7 +433,7 @@ function AboutCard(props) {
|
|
|
417
433
|
} else if (variant === "fullHeight") {
|
|
418
434
|
cardContentClass = classes.fullHeightCardContent;
|
|
419
435
|
}
|
|
420
|
-
const entityLocation = (
|
|
436
|
+
const entityLocation = (_g = entity.metadata.annotations) == null ? void 0 : _g[ANNOTATION_LOCATION];
|
|
421
437
|
const allowRefresh = (entityLocation == null ? void 0 : entityLocation.startsWith("url:")) || (entityLocation == null ? void 0 : entityLocation.startsWith("file:"));
|
|
422
438
|
const refreshEntity = useCallback(async () => {
|
|
423
439
|
try {
|
|
@@ -1531,7 +1547,7 @@ const catalogPlugin = createPlugin({
|
|
|
1531
1547
|
const CatalogIndexPage = catalogPlugin.provide(
|
|
1532
1548
|
createRoutableExtension({
|
|
1533
1549
|
name: "CatalogIndexPage",
|
|
1534
|
-
component: () => import('./index-
|
|
1550
|
+
component: () => import('./index-4e218504.esm.js').then((m) => m.CatalogPage),
|
|
1535
1551
|
mountPoint: rootRouteRef
|
|
1536
1552
|
})
|
|
1537
1553
|
);
|
|
@@ -1546,7 +1562,7 @@ const EntityAboutCard = catalogPlugin.provide(
|
|
|
1546
1562
|
createComponentExtension({
|
|
1547
1563
|
name: "EntityAboutCard",
|
|
1548
1564
|
component: {
|
|
1549
|
-
lazy: () => import('./index-
|
|
1565
|
+
lazy: () => import('./index-7c223531.esm.js').then((m) => m.AboutCard)
|
|
1550
1566
|
}
|
|
1551
1567
|
})
|
|
1552
1568
|
);
|
|
@@ -1554,7 +1570,7 @@ const EntityLinksCard = catalogPlugin.provide(
|
|
|
1554
1570
|
createComponentExtension({
|
|
1555
1571
|
name: "EntityLinksCard",
|
|
1556
1572
|
component: {
|
|
1557
|
-
lazy: () => import('./index-
|
|
1573
|
+
lazy: () => import('./index-087ed2ed.esm.js').then((m) => m.EntityLinksCard)
|
|
1558
1574
|
}
|
|
1559
1575
|
})
|
|
1560
1576
|
);
|
|
@@ -1562,7 +1578,7 @@ const EntityLabelsCard = catalogPlugin.provide(
|
|
|
1562
1578
|
createComponentExtension({
|
|
1563
1579
|
name: "EntityLabelsCard",
|
|
1564
1580
|
component: {
|
|
1565
|
-
lazy: () => import('./index-
|
|
1581
|
+
lazy: () => import('./index-5862e259.esm.js').then((m) => m.EntityLabelsCard)
|
|
1566
1582
|
}
|
|
1567
1583
|
})
|
|
1568
1584
|
);
|
|
@@ -1651,4 +1667,4 @@ const CatalogSearchResultListItem = catalogPlugin.provide(
|
|
|
1651
1667
|
);
|
|
1652
1668
|
|
|
1653
1669
|
export { AboutCard as A, EntitySwitch as B, CatalogTable as C, DefaultStarredEntitiesApi as D, EntityLabelsCard$1 as E, isKind as F, isNamespace as G, isComponentType as H, isResourceType as I, isEntityWith as J, FilteredEntityLayout as K, LinksGridList as L, FilterContainer as M, EntityListContainer as N, RelatedEntitiesCard as R, AboutContent as a, AboutField as b, createComponentRouteRef as c, CatalogEntityPage as d, CatalogIndexPage as e, catalogPlugin as f, EntityAboutCard as g, hasLabels as h, EntityDependencyOfComponentsCard as i, EntityDependsOnComponentsCard as j, EntityDependsOnResourcesCard as k, EntityHasComponentsCard as l, EntityHasResourcesCard as m, EntityHasSubcomponentsCard as n, EntityHasSystemsCard as o, EntityLinksCard as p, EntityLabelsCard as q, CatalogSearchResultListItem as r, CatalogKindHeader as s, EntityLayout as t, EntityOrphanWarning as u, isOrphan as v, EntityRelationWarning as w, hasRelationWarnings as x, EntityProcessingErrorsPanel as y, hasCatalogProcessingErrors as z };
|
|
1654
|
-
//# sourceMappingURL=index-
|
|
1670
|
+
//# sourceMappingURL=index-ac94c8a1.esm.js.map
|