@backstage/plugin-catalog 1.11.0 → 1.11.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/esm/{index-41f94bc9.esm.js → index-0a0ebd3f.esm.js} +4 -2
- package/dist/esm/{index-41f94bc9.esm.js.map → index-0a0ebd3f.esm.js.map} +1 -1
- package/dist/esm/{index-6391c20c.esm.js → index-19f433db.esm.js} +4 -2
- package/dist/esm/index-19f433db.esm.js.map +1 -0
- package/dist/esm/{index-1c47c3d8.esm.js → index-2dfcbc93.esm.js} +4 -2
- package/dist/esm/{index-1c47c3d8.esm.js.map → index-2dfcbc93.esm.js.map} +1 -1
- package/dist/esm/{index-37b55325.esm.js → index-3dc34235.esm.js} +4 -2
- package/dist/esm/index-3dc34235.esm.js.map +1 -0
- package/dist/esm/{index-06f6e8ce.esm.js → index-72280907.esm.js} +34 -10
- package/dist/esm/index-72280907.esm.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.esm.js +3 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +18 -17
- package/dist/esm/index-06f6e8ce.esm.js.map +0 -1
- package/dist/esm/index-37b55325.esm.js.map +0 -1
- package/dist/esm/index-6391c20c.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.11.1-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 08f177b91084: Add link from Template entity to the scaffolder launch page for the template in the AboutCard.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/errors@1.2.0-next.0
|
|
10
|
+
- @backstage/plugin-search-react@1.6.1-next.1
|
|
11
|
+
- @backstage/core-components@0.13.2-next.1
|
|
12
|
+
- @backstage/plugin-catalog-react@1.7.0-next.1
|
|
13
|
+
- @backstage/catalog-model@1.4.0-next.0
|
|
14
|
+
- @backstage/core-plugin-api@1.5.2-next.0
|
|
15
|
+
- @backstage/integration-react@1.1.14-next.1
|
|
16
|
+
- @backstage/catalog-client@1.4.2-next.1
|
|
17
|
+
- @backstage/plugin-catalog-common@1.0.14-next.0
|
|
18
|
+
- @backstage/plugin-scaffolder-common@1.3.1-next.0
|
|
19
|
+
- @backstage/theme@0.4.0-next.0
|
|
20
|
+
- @backstage/types@1.0.2
|
|
21
|
+
- @backstage/plugin-search-common@1.2.4-next.0
|
|
22
|
+
|
|
23
|
+
## 1.11.1-next.0
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @backstage/catalog-client@1.4.2-next.0
|
|
29
|
+
- @backstage/plugin-catalog-react@1.7.0-next.0
|
|
30
|
+
- @backstage/theme@0.4.0-next.0
|
|
31
|
+
- @backstage/core-components@0.13.2-next.0
|
|
32
|
+
- @backstage/core-plugin-api@1.5.1
|
|
33
|
+
- @backstage/integration-react@1.1.14-next.0
|
|
34
|
+
- @backstage/plugin-search-react@1.6.1-next.0
|
|
35
|
+
- @backstage/catalog-model@1.3.0
|
|
36
|
+
- @backstage/errors@1.1.5
|
|
37
|
+
- @backstage/types@1.0.2
|
|
38
|
+
- @backstage/plugin-catalog-common@1.0.13
|
|
39
|
+
- @backstage/plugin-search-common@1.2.3
|
|
40
|
+
|
|
3
41
|
## 1.11.0
|
|
4
42
|
|
|
5
43
|
### Minor Changes
|
|
@@ -3,13 +3,15 @@ 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-72280907.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
11
|
import '@backstage/integration-react';
|
|
12
|
+
import '@backstage/plugin-scaffolder-common';
|
|
12
13
|
import '@material-ui/core';
|
|
14
|
+
import '@material-ui/icons/AddCircleOutline';
|
|
13
15
|
import '@material-ui/icons/Cached';
|
|
14
16
|
import '@material-ui/icons/Description';
|
|
15
17
|
import '@material-ui/icons/Edit';
|
|
@@ -69,4 +71,4 @@ function CatalogPage(props) {
|
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
export { CatalogPage, DefaultCatalogPage };
|
|
72
|
-
//# sourceMappingURL=index-
|
|
74
|
+
//# sourceMappingURL=index-0a0ebd3f.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-0a0ebd3f.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} 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}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\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 />\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} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2Ba,MAAA,uBAAA,GAA0B,MACrC,gBAAuC,EAAA;;AC8BlC,SAAS,mBAAmB,KAAgC,EAAA;AA1DnE,EAAA,IAAA,EAAA,CAAA;AA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AA,aAAA,CAAA,iBAAA,EAAA,IAAkB,mBAClB,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,mBACtB,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;;ACrFO,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,4 +1,4 @@
|
|
|
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-72280907.esm.js';
|
|
2
2
|
import 'zen-observable';
|
|
3
3
|
import '@backstage/catalog-model';
|
|
4
4
|
import 'lodash';
|
|
@@ -6,7 +6,9 @@ import '@backstage/core-components';
|
|
|
6
6
|
import '@backstage/core-plugin-api';
|
|
7
7
|
import '@backstage/integration-react';
|
|
8
8
|
import '@backstage/plugin-catalog-react';
|
|
9
|
+
import '@backstage/plugin-scaffolder-common';
|
|
9
10
|
import '@material-ui/core';
|
|
11
|
+
import '@material-ui/icons/AddCircleOutline';
|
|
10
12
|
import '@material-ui/icons/Cached';
|
|
11
13
|
import '@material-ui/icons/Description';
|
|
12
14
|
import '@material-ui/icons/Edit';
|
|
@@ -29,4 +31,4 @@ import '@material-ui/icons/Cancel';
|
|
|
29
31
|
import '@backstage/errors';
|
|
30
32
|
import '@backstage/catalog-client';
|
|
31
33
|
import '@backstage/plugin-search-react';
|
|
32
|
-
//# sourceMappingURL=index-
|
|
34
|
+
//# sourceMappingURL=index-19f433db.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-19f433db.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,12 +3,14 @@ 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-72280907.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';
|
|
12
14
|
import '@material-ui/icons/Cached';
|
|
13
15
|
import '@material-ui/icons/Description';
|
|
14
16
|
import '@material-ui/icons/Edit';
|
|
@@ -93,4 +95,4 @@ const EntityLinksCard = (props) => {
|
|
|
93
95
|
};
|
|
94
96
|
|
|
95
97
|
export { EntityLinksCard };
|
|
96
|
-
//# sourceMappingURL=index-
|
|
98
|
+
//# sourceMappingURL=index-2dfcbc93.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-2dfcbc93.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)}px 0px`,\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,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA,CAAA,MAAA,CAAA;AAAA,MAC1B,UAAA,EACE,MAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,MAAS,GAAA,K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A,MAAM,MAAM,MAAO,EAAA,CAAA;AAEnB,EAAM,MAAA,YAAA,GAAe,CAAC,GAA6B,KAAA;AApCrD,IAAAA,IAAAA,GAAAA,CAAAA;AAqCI,IAAA,OAAA,GAAA,GAAA,CAAMA,MAAA,GAAI,CAAA,aAAA,CAAc,GAAG,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;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EntityLabelsCard, h as hasLabels } from './index-
|
|
1
|
+
export { E as EntityLabelsCard, h as hasLabels } from './index-72280907.esm.js';
|
|
2
2
|
import 'zen-observable';
|
|
3
3
|
import '@backstage/catalog-model';
|
|
4
4
|
import 'lodash';
|
|
@@ -6,7 +6,9 @@ import '@backstage/core-components';
|
|
|
6
6
|
import '@backstage/core-plugin-api';
|
|
7
7
|
import '@backstage/integration-react';
|
|
8
8
|
import '@backstage/plugin-catalog-react';
|
|
9
|
+
import '@backstage/plugin-scaffolder-common';
|
|
9
10
|
import '@material-ui/core';
|
|
11
|
+
import '@material-ui/icons/AddCircleOutline';
|
|
10
12
|
import '@material-ui/icons/Cached';
|
|
11
13
|
import '@material-ui/icons/Description';
|
|
12
14
|
import '@material-ui/icons/Edit';
|
|
@@ -29,4 +31,4 @@ import '@material-ui/icons/Cancel';
|
|
|
29
31
|
import '@backstage/errors';
|
|
30
32
|
import '@backstage/catalog-client';
|
|
31
33
|
import '@backstage/plugin-search-react';
|
|
32
|
-
//# sourceMappingURL=index-
|
|
34
|
+
//# sourceMappingURL=index-3dc34235.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-3dc34235.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,10 +2,12 @@ import ObservableImpl from 'zen-observable';
|
|
|
2
2
|
import { stringifyEntityRef, RELATION_PART_OF, RELATION_OWNED_BY, getEntitySourceLocation, ANNOTATION_EDIT_URL, DEFAULT_NAMESPACE, ANNOTATION_LOCATION, ANNOTATION_VIEW_URL } from '@backstage/catalog-model';
|
|
3
3
|
import { isArray, isString, capitalize } from 'lodash';
|
|
4
4
|
import { Link, MarkdownContent, HeaderIconLinkRow, OverflowTooltip, WarningPanel, CodeSnippet, Table, Page, Header, Progress, RoutedTabs, Content, HeaderLabel, ResponseErrorPanel, InfoCard } from '@backstage/core-components';
|
|
5
|
-
import { createExternalRouteRef, createRouteRef, useElementFilter, useApi, alertApiRef, errorApiRef, useRouteRef, attachComponentData, useRouteRefParams, useApiHolder, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
|
|
5
|
+
import { createExternalRouteRef, createRouteRef, useElementFilter, useApp, useApi, alertApiRef, errorApiRef, useRouteRef, attachComponentData, useRouteRefParams, useApiHolder, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
|
|
6
6
|
import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
|
|
7
7
|
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 { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
8
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';
|
|
9
11
|
import CachedIcon from '@material-ui/icons/Cached';
|
|
10
12
|
import DocsIcon from '@material-ui/icons/Description';
|
|
11
13
|
import EditIcon from '@material-ui/icons/Edit';
|
|
@@ -103,6 +105,11 @@ const viewTechDocRouteRef = createExternalRouteRef({
|
|
|
103
105
|
optional: true,
|
|
104
106
|
params: ["namespace", "kind", "name"]
|
|
105
107
|
});
|
|
108
|
+
const createFromTemplateRouteRef = createExternalRouteRef({
|
|
109
|
+
id: "create-from-template",
|
|
110
|
+
optional: true,
|
|
111
|
+
params: ["namespace", "templateName"]
|
|
112
|
+
});
|
|
106
113
|
const rootRouteRef = createRouteRef({
|
|
107
114
|
id: "catalog"
|
|
108
115
|
});
|
|
@@ -344,8 +351,9 @@ const useStyles$4 = makeStyles({
|
|
|
344
351
|
}
|
|
345
352
|
});
|
|
346
353
|
function AboutCard(props) {
|
|
347
|
-
var _a, _b, _c;
|
|
354
|
+
var _a, _b, _c, _d;
|
|
348
355
|
const { variant } = props;
|
|
356
|
+
const app = useApp();
|
|
349
357
|
const classes = useStyles$4();
|
|
350
358
|
const { entity } = useEntity();
|
|
351
359
|
const scmIntegrationsApi = useApi(scmIntegrationsApiRef);
|
|
@@ -353,6 +361,7 @@ function AboutCard(props) {
|
|
|
353
361
|
const alertApi = useApi(alertApiRef);
|
|
354
362
|
const errorApi = useApi(errorApiRef);
|
|
355
363
|
const viewTechdocLink = useRouteRef(viewTechDocRouteRef);
|
|
364
|
+
const templateRoute = useRouteRef(createFromTemplateRouteRef);
|
|
356
365
|
const entitySourceLocation = getEntitySourceLocation$1(
|
|
357
366
|
entity,
|
|
358
367
|
scmIntegrationsApi
|
|
@@ -374,6 +383,20 @@ function AboutCard(props) {
|
|
|
374
383
|
name: entity.metadata.name
|
|
375
384
|
})
|
|
376
385
|
};
|
|
386
|
+
const subHeaderLinks = [viewInSource, viewInTechDocs];
|
|
387
|
+
if (isTemplateEntityV1beta3(entity)) {
|
|
388
|
+
const Icon = (_c = app.getSystemIcon("scaffolder")) != null ? _c : CreateComponentIcon;
|
|
389
|
+
const launchTemplate = {
|
|
390
|
+
label: "Launch Template",
|
|
391
|
+
icon: /* @__PURE__ */ React.createElement(Icon, null),
|
|
392
|
+
disabled: !templateRoute,
|
|
393
|
+
href: templateRoute && templateRoute({
|
|
394
|
+
templateName: entity.metadata.name,
|
|
395
|
+
namespace: entity.metadata.namespace || DEFAULT_NAMESPACE
|
|
396
|
+
})
|
|
397
|
+
};
|
|
398
|
+
subHeaderLinks.push(launchTemplate);
|
|
399
|
+
}
|
|
377
400
|
let cardClass = "";
|
|
378
401
|
if (variant === "gridItem") {
|
|
379
402
|
cardClass = classes.gridItemCard;
|
|
@@ -386,7 +409,7 @@ function AboutCard(props) {
|
|
|
386
409
|
} else if (variant === "fullHeight") {
|
|
387
410
|
cardContentClass = classes.fullHeightCardContent;
|
|
388
411
|
}
|
|
389
|
-
const entityLocation = (
|
|
412
|
+
const entityLocation = (_d = entity.metadata.annotations) == null ? void 0 : _d[ANNOTATION_LOCATION];
|
|
390
413
|
const allowRefresh = (entityLocation == null ? void 0 : entityLocation.startsWith("url:")) || (entityLocation == null ? void 0 : entityLocation.startsWith("file:"));
|
|
391
414
|
const refreshEntity = useCallback(async () => {
|
|
392
415
|
try {
|
|
@@ -419,7 +442,7 @@ function AboutCard(props) {
|
|
|
419
442
|
},
|
|
420
443
|
/* @__PURE__ */ React.createElement(EditIcon, null)
|
|
421
444
|
)),
|
|
422
|
-
subheader: /* @__PURE__ */ React.createElement(HeaderIconLinkRow, { links:
|
|
445
|
+
subheader: /* @__PURE__ */ React.createElement(HeaderIconLinkRow, { links: subHeaderLinks })
|
|
423
446
|
}
|
|
424
447
|
), /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(CardContent, { className: cardContentClass }, /* @__PURE__ */ React.createElement(AboutContent, { entity })));
|
|
425
448
|
}
|
|
@@ -1441,7 +1464,8 @@ const catalogPlugin = createPlugin({
|
|
|
1441
1464
|
},
|
|
1442
1465
|
externalRoutes: {
|
|
1443
1466
|
createComponent: createComponentRouteRef,
|
|
1444
|
-
viewTechDoc: viewTechDocRouteRef
|
|
1467
|
+
viewTechDoc: viewTechDocRouteRef,
|
|
1468
|
+
createFromTemplate: createFromTemplateRouteRef
|
|
1445
1469
|
},
|
|
1446
1470
|
__experimentalConfigure(options) {
|
|
1447
1471
|
const defaultOptions = {
|
|
@@ -1453,7 +1477,7 @@ const catalogPlugin = createPlugin({
|
|
|
1453
1477
|
const CatalogIndexPage = catalogPlugin.provide(
|
|
1454
1478
|
createRoutableExtension({
|
|
1455
1479
|
name: "CatalogIndexPage",
|
|
1456
|
-
component: () => import('./index-
|
|
1480
|
+
component: () => import('./index-0a0ebd3f.esm.js').then((m) => m.CatalogPage),
|
|
1457
1481
|
mountPoint: rootRouteRef
|
|
1458
1482
|
})
|
|
1459
1483
|
);
|
|
@@ -1468,7 +1492,7 @@ const EntityAboutCard = catalogPlugin.provide(
|
|
|
1468
1492
|
createComponentExtension({
|
|
1469
1493
|
name: "EntityAboutCard",
|
|
1470
1494
|
component: {
|
|
1471
|
-
lazy: () => import('./index-
|
|
1495
|
+
lazy: () => import('./index-19f433db.esm.js').then((m) => m.AboutCard)
|
|
1472
1496
|
}
|
|
1473
1497
|
})
|
|
1474
1498
|
);
|
|
@@ -1476,7 +1500,7 @@ const EntityLinksCard = catalogPlugin.provide(
|
|
|
1476
1500
|
createComponentExtension({
|
|
1477
1501
|
name: "EntityLinksCard",
|
|
1478
1502
|
component: {
|
|
1479
|
-
lazy: () => import('./index-
|
|
1503
|
+
lazy: () => import('./index-2dfcbc93.esm.js').then((m) => m.EntityLinksCard)
|
|
1480
1504
|
}
|
|
1481
1505
|
})
|
|
1482
1506
|
);
|
|
@@ -1484,7 +1508,7 @@ const EntityLabelsCard = catalogPlugin.provide(
|
|
|
1484
1508
|
createComponentExtension({
|
|
1485
1509
|
name: "EntityLabelsCard",
|
|
1486
1510
|
component: {
|
|
1487
|
-
lazy: () => import('./index-
|
|
1511
|
+
lazy: () => import('./index-3dc34235.esm.js').then((m) => m.EntityLabelsCard)
|
|
1488
1512
|
}
|
|
1489
1513
|
})
|
|
1490
1514
|
);
|
|
@@ -1573,4 +1597,4 @@ const CatalogSearchResultListItem = catalogPlugin.provide(
|
|
|
1573
1597
|
);
|
|
1574
1598
|
|
|
1575
1599
|
export { AboutCard as A, isNamespace as B, CatalogTable as C, DefaultStarredEntitiesApi as D, EntityLabelsCard$1 as E, isComponentType as F, isResourceType as G, isEntityWith as H, FilteredEntityLayout as I, FilterContainer as J, EntityListContainer as K, LinksGridList as L, 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, EntityProcessingErrorsPanel as w, hasCatalogProcessingErrors as x, EntitySwitch as y, isKind as z };
|
|
1576
|
-
//# sourceMappingURL=index-
|
|
1600
|
+
//# sourceMappingURL=index-72280907.esm.js.map
|