@backstage-community/plugin-quay 1.21.1 → 1.22.0
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 +6 -0
- package/dist/components/QuayRepository/QuayRepository.esm.js +58 -3
- package/dist/components/QuayRepository/QuayRepository.esm.js.map +1 -1
- package/dist/components/QuayRepository/tableHeading.esm.js +2 -2
- package/dist/components/QuayRepository/tableHeading.esm.js.map +1 -1
- package/dist/doc-links.esm.js +7 -0
- package/dist/doc-links.esm.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Progress, Table, Link } from '@backstage/core-components';
|
|
3
3
|
import { useApi, configApiRef } from '@backstage/core-plugin-api';
|
|
4
|
+
import { Box, Typography } from '@material-ui/core';
|
|
5
|
+
import { DOC_LINKS } from '../../doc-links.esm.js';
|
|
4
6
|
import { useRepository, useTags } from '../../hooks/quay.esm.js';
|
|
5
7
|
import { useQuayViewPermission } from '../../hooks/useQuayViewPermission.esm.js';
|
|
6
8
|
import PermissionAlert from '../PermissionAlert/PermissionAlert.esm.js';
|
|
7
|
-
import {
|
|
9
|
+
import { columns } from './tableHeading.esm.js';
|
|
8
10
|
|
|
9
11
|
function QuayRepository(_props) {
|
|
10
12
|
const { repository, organization } = useRepository();
|
|
11
|
-
const classes = useStyles();
|
|
12
13
|
const configApi = useApi(configApiRef);
|
|
13
14
|
const quayUiUrl = configApi.getOptionalString("quay.apiUrl") ?? configApi.getOptionalString("quay.uiUrl");
|
|
14
15
|
const hasViewPermission = useQuayViewPermission();
|
|
@@ -36,7 +37,61 @@ function QuayRepository(_props) {
|
|
|
36
37
|
options: { sorting: true, paging: true, padding: "dense" },
|
|
37
38
|
data,
|
|
38
39
|
columns,
|
|
39
|
-
emptyContent: /* @__PURE__ */
|
|
40
|
+
emptyContent: /* @__PURE__ */ jsxs(Box, { "data-testid": "quay-repo-table-empty", padding: 2, children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Typography, { component: "h3", align: "center", variant: "h6", gutterBottom: true, children: "No container images found" }),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
Typography,
|
|
44
|
+
{
|
|
45
|
+
component: "p",
|
|
46
|
+
align: "center",
|
|
47
|
+
variant: "body1",
|
|
48
|
+
color: "textSecondary",
|
|
49
|
+
gutterBottom: true,
|
|
50
|
+
children: "This repository doesn't contain any images yet, or there might be an access issue."
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ jsxs(Box, { mt: 2, children: [
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
Typography,
|
|
56
|
+
{
|
|
57
|
+
component: "p",
|
|
58
|
+
align: "center",
|
|
59
|
+
variant: "body2",
|
|
60
|
+
gutterBottom: true,
|
|
61
|
+
children: /* @__PURE__ */ jsx("strong", { children: "Possible solutions:" })
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
Typography,
|
|
66
|
+
{
|
|
67
|
+
component: "p",
|
|
68
|
+
align: "center",
|
|
69
|
+
variant: "body2",
|
|
70
|
+
gutterBottom: true,
|
|
71
|
+
children: "1. Check if images have been pushed to this repository"
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
Typography,
|
|
76
|
+
{
|
|
77
|
+
component: "p",
|
|
78
|
+
align: "center",
|
|
79
|
+
variant: "body2",
|
|
80
|
+
gutterBottom: true,
|
|
81
|
+
children: "2. Review the application logs in your Backstage instance"
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ jsxs(Typography, { component: "p", align: "center", variant: "body2", children: [
|
|
85
|
+
"3. Verify your",
|
|
86
|
+
" ",
|
|
87
|
+
/* @__PURE__ */ jsx(Link, { to: DOC_LINKS.AUTH_TOKEN_GUIDE, children: "Quay access tokens" }),
|
|
88
|
+
" ",
|
|
89
|
+
"are",
|
|
90
|
+
" ",
|
|
91
|
+
/* @__PURE__ */ jsx(Link, { to: DOC_LINKS.BACKEND_CONFIGURATION_GUIDE, children: "configured correctly" })
|
|
92
|
+
] })
|
|
93
|
+
] })
|
|
94
|
+
] })
|
|
40
95
|
}
|
|
41
96
|
) });
|
|
42
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuayRepository.esm.js","sources":["../../../src/components/QuayRepository/QuayRepository.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 { Link, Progress, Table } from '@backstage/core-components';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { useRepository, useTags } from '../../hooks';\nimport { useQuayViewPermission } from '../../hooks/useQuayViewPermission';\nimport PermissionAlert from '../PermissionAlert/PermissionAlert';\nimport { columns
|
|
1
|
+
{"version":3,"file":"QuayRepository.esm.js","sources":["../../../src/components/QuayRepository/QuayRepository.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 { Link, Progress, Table } from '@backstage/core-components';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { Box, Typography } from '@material-ui/core';\n\nimport { DOC_LINKS } from '../../doc-links';\nimport { useRepository, useTags } from '../../hooks';\nimport { useQuayViewPermission } from '../../hooks/useQuayViewPermission';\nimport PermissionAlert from '../PermissionAlert/PermissionAlert';\nimport { columns } from './tableHeading';\n\ntype QuayRepositoryProps = Record<never, any>;\n\nexport function QuayRepository(_props: QuayRepositoryProps) {\n const { repository, organization } = useRepository();\n const configApi = useApi(configApiRef);\n const quayUiUrl =\n configApi.getOptionalString('quay.apiUrl') ??\n configApi.getOptionalString('quay.uiUrl');\n\n const hasViewPermission = useQuayViewPermission();\n\n const title = quayUiUrl ? (\n <>\n {`Quay repository: `}\n <Link\n to={`${quayUiUrl}/repository/${organization}/${repository}`}\n >{`${organization}/${repository}`}</Link>\n </>\n ) : (\n `Quay repository: ${organization}/${repository}`\n );\n const { loading, data } = useTags(organization, repository);\n\n if (!hasViewPermission) {\n return <PermissionAlert />;\n }\n\n if (loading) {\n return (\n <div data-testid=\"quay-repo-progress\">\n <Progress />\n </div>\n );\n }\n\n return (\n <div data-testid=\"quay-repo-table\">\n <Table\n title={title}\n options={{ sorting: true, paging: true, padding: 'dense' }}\n data={data}\n columns={columns}\n emptyContent={\n <Box data-testid=\"quay-repo-table-empty\" padding={2}>\n <Typography component=\"h3\" align=\"center\" variant=\"h6\" gutterBottom>\n No container images found\n </Typography>\n <Typography\n component=\"p\"\n align=\"center\"\n variant=\"body1\"\n color=\"textSecondary\"\n gutterBottom\n >\n This repository doesn't contain any images yet, or there might be\n an access issue.\n </Typography>\n <Box mt={2}>\n <Typography\n component=\"p\"\n align=\"center\"\n variant=\"body2\"\n gutterBottom\n >\n <strong>Possible solutions:</strong>\n </Typography>\n <Typography\n component=\"p\"\n align=\"center\"\n variant=\"body2\"\n gutterBottom\n >\n 1. Check if images have been pushed to this repository\n </Typography>\n <Typography\n component=\"p\"\n align=\"center\"\n variant=\"body2\"\n gutterBottom\n >\n 2. Review the application logs in your Backstage instance\n </Typography>\n <Typography component=\"p\" align=\"center\" variant=\"body2\">\n 3. Verify your{' '}\n <Link to={DOC_LINKS.AUTH_TOKEN_GUIDE}>Quay access tokens</Link>{' '}\n are{' '}\n <Link to={DOC_LINKS.BACKEND_CONFIGURATION_GUIDE}>\n configured correctly\n </Link>\n </Typography>\n </Box>\n </Box>\n }\n />\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;AA4BO,SAAS,eAAe,MAA6B,EAAA;AAC1D,EAAA,MAAM,EAAE,UAAA,EAAY,YAAa,EAAA,GAAI,aAAc,EAAA;AACnD,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAA,MAAM,YACJ,SAAU,CAAA,iBAAA,CAAkB,aAAa,CACzC,IAAA,SAAA,CAAU,kBAAkB,YAAY,CAAA;AAE1C,EAAA,MAAM,oBAAoB,qBAAsB,EAAA;AAEhD,EAAM,MAAA,KAAA,GAAQ,4BAET,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IAAA,CAAA,iBAAA,CAAA;AAAA,oBACD,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,IAAI,CAAG,EAAA,SAAS,CAAe,YAAA,EAAA,YAAY,IAAI,UAAU,CAAA,CAAA;AAAA,QACzD,QAAA,EAAA,CAAA,EAAG,YAAY,CAAA,CAAA,EAAI,UAAU,CAAA;AAAA;AAAA;AAAG,GAAA,EACpC,CAEA,GAAA,CAAA,iBAAA,EAAoB,YAAY,CAAA,CAAA,EAAI,UAAU,CAAA,CAAA;AAEhD,EAAA,MAAM,EAAE,OAAS,EAAA,IAAA,EAAS,GAAA,OAAA,CAAQ,cAAc,UAAU,CAAA;AAE1D,EAAA,IAAI,CAAC,iBAAmB,EAAA;AACtB,IAAA,2BAAQ,eAAgB,EAAA,EAAA,CAAA;AAAA;AAG1B,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,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AAAA,YAAA;AAAA,cACC,SAAU,EAAA,GAAA;AAAA,cACV,KAAM,EAAA,QAAA;AAAA,cACN,OAAQ,EAAA,OAAA;AAAA,cACR,YAAY,EAAA,IAAA;AAAA,cACb,QAAA,EAAA;AAAA;AAAA,WAED;AAAA,0BACA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,SAAU,EAAA,GAAA;AAAA,cACV,KAAM,EAAA,QAAA;AAAA,cACN,OAAQ,EAAA,OAAA;AAAA,cACR,YAAY,EAAA,IAAA;AAAA,cACb,QAAA,EAAA;AAAA;AAAA,WAED;AAAA,+BACC,UAAW,EAAA,EAAA,SAAA,EAAU,KAAI,KAAM,EAAA,QAAA,EAAS,SAAQ,OAAQ,EAAA,QAAA,EAAA;AAAA,YAAA,gBAAA;AAAA,YACxC,GAAA;AAAA,4BACd,GAAA,CAAA,IAAA,EAAA,EAAK,EAAI,EAAA,SAAA,CAAU,kBAAkB,QAAkB,EAAA,oBAAA,EAAA,CAAA;AAAA,YAAQ,GAAA;AAAA,YAAI,KAAA;AAAA,YAChE,GAAA;AAAA,4BACH,GAAA,CAAA,IAAA,EAAA,EAAK,EAAI,EAAA,SAAA,CAAU,6BAA6B,QAEjD,EAAA,sBAAA,EAAA;AAAA,WACF,EAAA;AAAA,SACF,EAAA;AAAA,OACF,EAAA;AAAA;AAAA,GAGN,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -62,7 +62,7 @@ const columns = [
|
|
|
62
62
|
customSort: (a, b) => a.manifest_digest_raw.localeCompare(b.manifest_digest_raw)
|
|
63
63
|
}
|
|
64
64
|
];
|
|
65
|
-
|
|
65
|
+
makeStyles((theme) => ({
|
|
66
66
|
empty: {
|
|
67
67
|
padding: theme.spacing(2),
|
|
68
68
|
display: "flex",
|
|
@@ -70,5 +70,5 @@ const useStyles = makeStyles((theme) => ({
|
|
|
70
70
|
}
|
|
71
71
|
}));
|
|
72
72
|
|
|
73
|
-
export { columns
|
|
73
|
+
export { columns };
|
|
74
74
|
//# sourceMappingURL=tableHeading.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableHeading.esm.js","sources":["../../../src/components/QuayRepository/tableHeading.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 type { ReactNode } from 'react';\n\nimport { Link, Progress, TableColumn } from '@backstage/core-components';\n\nimport { Tooltip } from '@material-ui/core';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\n\nimport { securityScanComparator, vulnerabilitySummary } from '../../lib/utils';\nimport type { QuayTagData } from '../../types';\n\nexport const columns: TableColumn<QuayTagData>[] = [\n {\n title: 'Tag',\n field: 'name',\n type: 'string',\n highlight: true,\n },\n {\n title: 'Last Modified',\n field: 'last_modified',\n type: 'date',\n },\n {\n title: 'Security Scan',\n field: 'securityScan',\n render: (rowData: QuayTagData): ReactNode => {\n if (!rowData.securityStatus && !rowData.securityDetails) {\n return (\n <span data-testid=\"quay-repo-security-scan-progress\">\n <Progress />\n </span>\n );\n }\n\n if (rowData.securityStatus === 'queued') {\n return (\n <Tooltip title=\"The manifest for this tag is queued to be scanned for vulnerabilities\">\n <span data-testid=\"quay-repo-queued-for-scan\">Queued</span>\n </Tooltip>\n );\n }\n\n if (rowData.securityStatus === 'unsupported') {\n return (\n <Tooltip title=\"The manifest for this tag has an operating system or package manager unsupported by Quay Security Scanner\">\n <span data-testid=\"quay-repo-security-scan-unsupported\">\n Unsupported\n </span>\n </Tooltip>\n );\n }\n\n const tagManifest = rowData.manifest_digest_raw;\n const retStr = vulnerabilitySummary(rowData.securityDetails);\n return (\n <Link\n data-testid={`${rowData.name}-security-scan`}\n to={`tag/${tagManifest}`}\n >\n {retStr}\n </Link>\n );\n },\n id: 'securityScan',\n customSort: (a: QuayTagData, b: QuayTagData) =>\n securityScanComparator(a, b),\n },\n {\n title: 'Size',\n field: 'size',\n type: 'numeric',\n customSort: (a: QuayTagData, b: QuayTagData) => a.rawSize - b.rawSize,\n },\n {\n title: 'Expires',\n field: 'expiration',\n type: 'date',\n emptyValue: <i>Never</i>,\n },\n {\n title: 'Manifest',\n field: 'manifest_digest',\n type: 'string',\n customSort: (a: QuayTagData, b: QuayTagData) =>\n a.manifest_digest_raw.localeCompare(b.manifest_digest_raw),\n },\n];\n\nexport const useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,OAAsC,GAAA;AAAA,EACjD;AAAA,IACE,KAAO,EAAA,KAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,IAAM,EAAA,QAAA;AAAA,IACN,SAAW,EAAA;AAAA,GACb;AAAA,EACA;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,IACP,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,KAAO,EAAA,cAAA;AAAA,IACP,MAAA,EAAQ,CAAC,OAAoC,KAAA;AAC3C,MAAA,IAAI,CAAC,OAAA,CAAQ,cAAkB,IAAA,CAAC,QAAQ,eAAiB,EAAA;AACvD,QAAA,2BACG,MAAK,EAAA,EAAA,aAAA,EAAY,kCAChB,EAAA,QAAA,kBAAA,GAAA,CAAC,YAAS,CACZ,EAAA,CAAA;AAAA;AAIJ,MAAI,IAAA,OAAA,CAAQ,mBAAmB,QAAU,EAAA;AACvC,QACE,uBAAA,GAAA,CAAC,WAAQ,KAAM,EAAA,uEAAA,EACb,8BAAC,MAAK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EAAA,QAAA;AAAA,IACN,UAAA,EAAY,CAAC,CAAgB,EAAA,CAAA,KAC3B,EAAE,mBAAoB,CAAA,aAAA,CAAc,EAAE,mBAAmB;AAAA;AAE/D;
|
|
1
|
+
{"version":3,"file":"tableHeading.esm.js","sources":["../../../src/components/QuayRepository/tableHeading.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 type { ReactNode } from 'react';\n\nimport { Link, Progress, TableColumn } from '@backstage/core-components';\n\nimport { Tooltip } from '@material-ui/core';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\n\nimport { securityScanComparator, vulnerabilitySummary } from '../../lib/utils';\nimport type { QuayTagData } from '../../types';\n\nexport const columns: TableColumn<QuayTagData>[] = [\n {\n title: 'Tag',\n field: 'name',\n type: 'string',\n highlight: true,\n },\n {\n title: 'Last Modified',\n field: 'last_modified',\n type: 'date',\n },\n {\n title: 'Security Scan',\n field: 'securityScan',\n render: (rowData: QuayTagData): ReactNode => {\n if (!rowData.securityStatus && !rowData.securityDetails) {\n return (\n <span data-testid=\"quay-repo-security-scan-progress\">\n <Progress />\n </span>\n );\n }\n\n if (rowData.securityStatus === 'queued') {\n return (\n <Tooltip title=\"The manifest for this tag is queued to be scanned for vulnerabilities\">\n <span data-testid=\"quay-repo-queued-for-scan\">Queued</span>\n </Tooltip>\n );\n }\n\n if (rowData.securityStatus === 'unsupported') {\n return (\n <Tooltip title=\"The manifest for this tag has an operating system or package manager unsupported by Quay Security Scanner\">\n <span data-testid=\"quay-repo-security-scan-unsupported\">\n Unsupported\n </span>\n </Tooltip>\n );\n }\n\n const tagManifest = rowData.manifest_digest_raw;\n const retStr = vulnerabilitySummary(rowData.securityDetails);\n return (\n <Link\n data-testid={`${rowData.name}-security-scan`}\n to={`tag/${tagManifest}`}\n >\n {retStr}\n </Link>\n );\n },\n id: 'securityScan',\n customSort: (a: QuayTagData, b: QuayTagData) =>\n securityScanComparator(a, b),\n },\n {\n title: 'Size',\n field: 'size',\n type: 'numeric',\n customSort: (a: QuayTagData, b: QuayTagData) => a.rawSize - b.rawSize,\n },\n {\n title: 'Expires',\n field: 'expiration',\n type: 'date',\n emptyValue: <i>Never</i>,\n },\n {\n title: 'Manifest',\n field: 'manifest_digest',\n type: 'string',\n customSort: (a: QuayTagData, b: QuayTagData) =>\n a.manifest_digest_raw.localeCompare(b.manifest_digest_raw),\n },\n];\n\nexport const useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,OAAsC,GAAA;AAAA,EACjD;AAAA,IACE,KAAO,EAAA,KAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,IAAM,EAAA,QAAA;AAAA,IACN,SAAW,EAAA;AAAA,GACb;AAAA,EACA;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,IACP,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,KAAO,EAAA,cAAA;AAAA,IACP,MAAA,EAAQ,CAAC,OAAoC,KAAA;AAC3C,MAAA,IAAI,CAAC,OAAA,CAAQ,cAAkB,IAAA,CAAC,QAAQ,eAAiB,EAAA;AACvD,QAAA,2BACG,MAAK,EAAA,EAAA,aAAA,EAAY,kCAChB,EAAA,QAAA,kBAAA,GAAA,CAAC,YAAS,CACZ,EAAA,CAAA;AAAA;AAIJ,MAAI,IAAA,OAAA,CAAQ,mBAAmB,QAAU,EAAA;AACvC,Q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,KAAO,EAAA,UAAA;AAAA,IACP,KAAO,EAAA,iBAAA;AAAA,IACP,IAAM,EAAA,QAAA;AAAA,IACN,UAAA,EAAY,CAAC,CAAgB,EAAA,CAAA,KAC3B,EAAE,mBAAoB,CAAA,aAAA,CAAc,EAAE,mBAAmB;AAAA;AAE/D;AAEyB,WAAW,CAAU,KAAA,MAAA;AAAA,EAC5C,KAAO,EAAA;AAAA,IACL,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,OAAS,EAAA,MAAA;AAAA,IACT,cAAgB,EAAA;AAAA;AAEpB,CAAE,CAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const DOC_LINKS = {
|
|
2
|
+
AUTH_TOKEN_GUIDE: "https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#creating-oauth-access-token",
|
|
3
|
+
BACKEND_CONFIGURATION_GUIDE: "https://github.com/backstage/community-plugins/tree/main/workspaces/quay/plugins/quay-backend#app-config"
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export { DOC_LINKS };
|
|
7
|
+
//# sourceMappingURL=doc-links.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-links.esm.js","sources":["../src/doc-links.ts"],"sourcesContent":["/*\n * Copyright 2024 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\nexport const DOC_LINKS = {\n AUTH_TOKEN_GUIDE:\n 'https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#creating-oauth-access-token',\n BACKEND_CONFIGURATION_GUIDE:\n 'https://github.com/backstage/community-plugins/tree/main/workspaces/quay/plugins/quay-backend#app-config',\n} as const;\n"],"names":[],"mappings":"AAgBO,MAAM,SAAY,GAAA;AAAA,EACvB,gBACE,EAAA,8HAAA;AAAA,EACF,2BACE,EAAA;AACJ;;;;"}
|