@backstage-community/plugin-xcmetrics 0.6.1 → 0.8.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 +12 -0
- package/dist/components/Accordion/Accordion.esm.js +19 -15
- package/dist/components/Accordion/Accordion.esm.js.map +1 -1
- package/dist/components/BuildDetails/BuildDetails.esm.js +93 -62
- package/dist/components/BuildDetails/BuildDetails.esm.js.map +1 -1
- package/dist/components/BuildList/BuildList.esm.js +40 -36
- package/dist/components/BuildList/BuildList.esm.js.map +1 -1
- package/dist/components/BuildListFilter/BuildListFilter.esm.js +73 -64
- package/dist/components/BuildListFilter/BuildListFilter.esm.js.map +1 -1
- package/dist/components/BuildTableColumns.esm.js +4 -4
- package/dist/components/BuildTableColumns.esm.js.map +1 -1
- package/dist/components/BuildTimeline/BuildTimeline.esm.js +26 -14
- package/dist/components/BuildTimeline/BuildTimeline.esm.js.map +1 -1
- package/dist/components/DataValue/DataValue.esm.js +6 -3
- package/dist/components/DataValue/DataValue.esm.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.esm.js +14 -11
- package/dist/components/DatePicker/DatePicker.esm.js.map +1 -1
- package/dist/components/Overview/Overview.esm.js +27 -18
- package/dist/components/Overview/Overview.esm.js.map +1 -1
- package/dist/components/OverviewTrends/OverviewTrends.esm.js +86 -67
- package/dist/components/OverviewTrends/OverviewTrends.esm.js.map +1 -1
- package/dist/components/PreformattedText/PreformattedText.esm.js +43 -31
- package/dist/components/PreformattedText/PreformattedText.esm.js.map +1 -1
- package/dist/components/StatusCell/StatusCell.esm.js +29 -16
- package/dist/components/StatusCell/StatusCell.esm.js.map +1 -1
- package/dist/components/StatusIcon/StatusIcon.esm.js +5 -5
- package/dist/components/StatusIcon/StatusIcon.esm.js.map +1 -1
- package/dist/components/StatusMatrix/StatusMatrix.esm.js +19 -17
- package/dist/components/StatusMatrix/StatusMatrix.esm.js.map +1 -1
- package/dist/components/Trend/Trend.esm.js +13 -10
- package/dist/components/Trend/Trend.esm.js.map +1 -1
- package/dist/components/XcmetricsLayout/XcmetricsLayout.esm.js +10 -4
- package/dist/components/XcmetricsLayout/XcmetricsLayout.esm.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/package.json +13 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverviewTrends.esm.js","sources":["../../../src/components/OverviewTrends/OverviewTrends.tsx"],"sourcesContent":["/*\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 Grid from '@material-ui/core/Grid';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport
|
|
1
|
+
{"version":3,"file":"OverviewTrends.esm.js","sources":["../../../src/components/OverviewTrends/OverviewTrends.tsx"],"sourcesContent":["/*\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 Grid from '@material-ui/core/Grid';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport { useState } from 'react';\nimport { Progress, Select } from '@backstage/core-components';\nimport { Trend } from '../Trend';\nimport Alert from '@material-ui/lab/Alert';\nimport AlertTitle from '@material-ui/lab/AlertTitle';\nimport { xcmetricsApiRef } from '../../api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { DataValueGridItem } from '../DataValue';\nimport {\n formatDuration,\n formatPercentage,\n getAverageDuration,\n getErrorRatios,\n getValues,\n sumField,\n} from '../../utils';\n\nconst useStyles = makeStyles({\n spacingTop: {\n marginTop: 8,\n },\n spacingVertical: {\n marginTop: 8,\n marginBottom: 8,\n },\n});\n\nconst DAYS_SELECT_ITEMS = [\n { label: '7 days', value: 7 },\n { label: '14 days', value: 14 },\n { label: '30 days', value: 30 },\n { label: '60 days', value: 60 },\n];\n\nexport const OverviewTrends = () => {\n const [days, setDays] = useState(14);\n const theme = useTheme();\n const classes = useStyles();\n const client = useApi(xcmetricsApiRef);\n const buildCountsResult = useAsync(\n async () => client.getBuildCounts(days),\n [days],\n );\n const buildTimesResult = useAsync(\n async () => client.getBuildTimes(days),\n [days],\n );\n\n if (buildCountsResult.loading && buildTimesResult.loading) {\n return <Progress />;\n }\n\n const sumBuilds = sumField(b => b.builds, buildCountsResult.value);\n const sumErrors = sumField(b => b.errors, buildCountsResult.value);\n const errorRate = sumBuilds && sumErrors ? sumErrors / sumBuilds : undefined;\n\n const averageBuildDurationP50 = getAverageDuration(\n buildTimesResult.value,\n b => b.durationP50,\n );\n const averageBuildDurationP95 = getAverageDuration(\n buildTimesResult.value,\n b => b.durationP95,\n );\n const totalBuildTime = sumField(t => t.totalDuration, buildTimesResult.value);\n\n return (\n <>\n <Select\n selected={days}\n items={DAYS_SELECT_ITEMS}\n label=\"Trends for\"\n onChange={selection => setDays(selection as number)}\n />\n {buildCountsResult.error && (\n <Alert severity=\"error\" className={classes.spacingVertical}>\n <AlertTitle>Failed to fetch build counts</AlertTitle>\n {buildCountsResult?.error?.message}\n </Alert>\n )}\n {buildTimesResult.error && (\n <Alert severity=\"error\" className={classes.spacingVertical}>\n <AlertTitle>Failed to fetch build times</AlertTitle>\n {buildTimesResult?.error?.message}\n </Alert>\n )}\n {(!buildCountsResult.error || !buildTimesResult.error) && (\n <div className={classes.spacingVertical}>\n <Trend\n title=\"Build Time\"\n color={theme.palette.secondary.main}\n data={getValues(e => e.durationP50, buildTimesResult.value)}\n />\n <Trend\n title=\"Error Rate\"\n color={theme.palette.status.warning}\n data={getErrorRatios(buildCountsResult.value)}\n />\n <Trend\n title=\"Build Count\"\n color={theme.palette.primary.main}\n data={getValues(e => e.builds, buildCountsResult.value)}\n />\n <Grid\n container\n spacing={3}\n direction=\"row\"\n className={classes.spacingTop}\n >\n <DataValueGridItem field=\"Build Count\" value={sumBuilds} />\n <DataValueGridItem field=\"Error Count\" value={sumErrors} />\n <DataValueGridItem\n field=\"Error Rate\"\n value={errorRate && formatPercentage(errorRate)}\n />\n <DataValueGridItem\n field=\"Avg. Build Time (P50)\"\n value={averageBuildDurationP50}\n />\n <DataValueGridItem\n field=\"Avg. Build Time (P95)\"\n value={averageBuildDurationP95}\n />\n <DataValueGridItem\n field=\"Total Build Time\"\n value={totalBuildTime && formatDuration(totalBuildTime)}\n />\n </Grid>\n </div>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,MAAM,YAAY,UAAW,CAAA;AAAA,EAC3B,UAAY,EAAA;AAAA,IACV,SAAW,EAAA;AAAA,GACb;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,SAAW,EAAA,CAAA;AAAA,IACX,YAAc,EAAA;AAAA;AAElB,CAAC,CAAA;AAED,MAAM,iBAAoB,GAAA;AAAA,EACxB,EAAE,KAAA,EAAO,QAAU,EAAA,KAAA,EAAO,CAAE,EAAA;AAAA,EAC5B,EAAE,KAAA,EAAO,SAAW,EAAA,KAAA,EAAO,EAAG,EAAA;AAAA,EAC9B,EAAE,KAAA,EAAO,SAAW,EAAA,KAAA,EAAO,EAAG,EAAA;AAAA,EAC9B,EAAE,KAAA,EAAO,SAAW,EAAA,KAAA,EAAO,EAAG;AAChC,CAAA;AAEO,MAAM,iBAAiB,MAAM;AAClC,EAAA,MAAM,CAAC,IAAA,EAAM,O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O,cAAkB,IAAA,cAAA,CAAe,cAAc;AAAA;AAAA;AACxD;AAAA;AAAA;AACF,KACF,EAAA;AAAA,GAEJ,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import Button from '@material-ui/core/Button';
|
|
2
3
|
import Dialog from '@material-ui/core/Dialog';
|
|
3
4
|
import DialogActions from '@material-ui/core/DialogActions';
|
|
@@ -6,7 +7,7 @@ import DialogTitle from '@material-ui/core/DialogTitle';
|
|
|
6
7
|
import IconButton from '@material-ui/core/IconButton';
|
|
7
8
|
import { makeStyles, createStyles } from '@material-ui/core/styles';
|
|
8
9
|
import CloseIcon from '@material-ui/icons/Close';
|
|
9
|
-
import
|
|
10
|
+
import { useState } from 'react';
|
|
10
11
|
import 'luxon';
|
|
11
12
|
import 'lodash/upperFirst';
|
|
12
13
|
import { cn } from '../../utils/classnames.esm.js';
|
|
@@ -44,37 +45,48 @@ const PreformattedText = ({
|
|
|
44
45
|
setOpen(true);
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
maxWidth: "xl",
|
|
64
|
-
fullWidth: true
|
|
65
|
-
},
|
|
66
|
-
/* @__PURE__ */ React.createElement(DialogTitle, { id: "dialog-title" }, title, /* @__PURE__ */ React.createElement(
|
|
67
|
-
IconButton,
|
|
48
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
role: expandable ? "button" : void 0,
|
|
53
|
+
onClick: () => expandable && setOpen(true),
|
|
54
|
+
onKeyUp: handleKeyUp,
|
|
55
|
+
tabIndex: expandable ? 0 : void 0,
|
|
56
|
+
children: /* @__PURE__ */ jsxs("pre", { className: cn(classes.pre, expandable && classes.expandable), children: [
|
|
57
|
+
text.slice(0, maxChars - 1).trim(),
|
|
58
|
+
text.length > maxChars - 1 && "\u2026"
|
|
59
|
+
] })
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
expandable && /* @__PURE__ */ jsxs(
|
|
63
|
+
Dialog,
|
|
68
64
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
open,
|
|
66
|
+
onClose: () => setOpen(false),
|
|
67
|
+
"aria-labelledby": "dialog-title",
|
|
68
|
+
"aria-describedby": "dialog-description",
|
|
69
|
+
maxWidth: "xl",
|
|
70
|
+
fullWidth: true,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsxs(DialogTitle, { id: "dialog-title", children: [
|
|
73
|
+
title,
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
IconButton,
|
|
76
|
+
{
|
|
77
|
+
"aria-label": "close",
|
|
78
|
+
className: classes.closeButton,
|
|
79
|
+
onClick: () => setOpen(false),
|
|
80
|
+
children: /* @__PURE__ */ jsx(CloseIcon, {})
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx("pre", { className: classes.fullPre, children: text }) }),
|
|
85
|
+
/* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, { color: "primary", onClick: () => setOpen(false), children: "Close" }) })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
] });
|
|
78
90
|
};
|
|
79
91
|
|
|
80
92
|
export { PreformattedText };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreformattedText.esm.js","sources":["../../../src/components/PreformattedText/PreformattedText.tsx"],"sourcesContent":["/*\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 Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport IconButton from '@material-ui/core/IconButton';\nimport { createStyles, makeStyles } from '@material-ui/core/styles';\nimport CloseIcon from '@material-ui/icons/Close';\nimport
|
|
1
|
+
{"version":3,"file":"PreformattedText.esm.js","sources":["../../../src/components/PreformattedText/PreformattedText.tsx"],"sourcesContent":["/*\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 Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport IconButton from '@material-ui/core/IconButton';\nimport { createStyles, makeStyles } from '@material-ui/core/styles';\nimport CloseIcon from '@material-ui/icons/Close';\nimport type { KeyboardEvent } from 'react';\nimport { useState } from 'react';\nimport { cn } from '../../utils';\n\nconst useStyles = makeStyles(theme =>\n createStyles({\n pre: {\n whiteSpace: 'pre-line',\n wordBreak: 'break-all',\n },\n expandable: {\n cursor: 'pointer',\n },\n fullPre: {\n whiteSpace: 'pre-wrap',\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n }),\n);\n\ninterface PreformattedTextProps {\n text: string;\n maxChars: number;\n}\n\ninterface ExpandableProps extends PreformattedTextProps {\n expandable: boolean;\n title: string;\n}\n\ninterface NonExpandableProps extends PreformattedTextProps {\n expandable?: never;\n title?: string;\n}\n\nexport const PreformattedText = ({\n text,\n maxChars,\n expandable,\n title,\n}: NonExpandableProps | ExpandableProps) => {\n const [open, setOpen] = useState(false);\n const classes = useStyles();\n\n const handleKeyUp = (event: KeyboardEvent<HTMLDivElement>) => {\n if (expandable && event.key === 'Enter') {\n setOpen(true);\n }\n };\n\n return (\n <>\n <div\n role={expandable ? 'button' : undefined}\n onClick={() => expandable && setOpen(true)}\n onKeyUp={handleKeyUp}\n tabIndex={expandable ? 0 : undefined}\n >\n <pre className={cn(classes.pre, expandable && classes.expandable)}>\n {text.slice(0, maxChars - 1).trim()}\n {text.length > maxChars - 1 && '…'}\n </pre>\n </div>\n\n {expandable && (\n <Dialog\n open={open}\n onClose={() => setOpen(false)}\n aria-labelledby=\"dialog-title\"\n aria-describedby=\"dialog-description\"\n maxWidth=\"xl\"\n fullWidth\n >\n <DialogTitle id=\"dialog-title\">\n {title}\n <IconButton\n aria-label=\"close\"\n className={classes.closeButton}\n onClick={() => setOpen(false)}\n >\n <CloseIcon />\n </IconButton>\n </DialogTitle>\n <DialogContent>\n <pre className={classes.fullPre}>{text}</pre>\n </DialogContent>\n <DialogActions>\n <Button color=\"primary\" onClick={() => setOpen(false)}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;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AK,CAAG,EAAA,QAAA,EAAA,OAAA,EAEvD,CACF,EAAA;AAAA;AAAA;AAAA;AACF,GAEJ,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import Tooltip from '@material-ui/core/Tooltip';
|
|
2
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
import { xcmetricsApiRef } from '../../api/types.esm.js';
|
|
5
5
|
import '@backstage/errors';
|
|
6
6
|
import 'luxon';
|
|
@@ -17,12 +17,25 @@ const TooltipContent = ({ buildId }) => {
|
|
|
17
17
|
[]
|
|
18
18
|
);
|
|
19
19
|
if (error) {
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsx("div", { children: error.message });
|
|
21
21
|
}
|
|
22
22
|
if (loading || !value?.build) {
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ jsx(Progress, { style: { width: 100 } });
|
|
24
24
|
}
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
26
|
+
/* @__PURE__ */ jsxs("tr", { children: [
|
|
27
|
+
/* @__PURE__ */ jsx("td", { children: "Started" }),
|
|
28
|
+
/* @__PURE__ */ jsx("td", { children: new Date(value.build.startTimestamp).toLocaleString() })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsxs("tr", { children: [
|
|
31
|
+
/* @__PURE__ */ jsx("td", { children: "Duration" }),
|
|
32
|
+
/* @__PURE__ */ jsx("td", { children: formatDuration(value.build.duration) })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ jsxs("tr", { children: [
|
|
35
|
+
/* @__PURE__ */ jsx("td", { children: "Status" }),
|
|
36
|
+
/* @__PURE__ */ jsx("td", { children: formatStatus(value.build.buildStatus) })
|
|
37
|
+
] })
|
|
38
|
+
] }) });
|
|
26
39
|
};
|
|
27
40
|
const useStyles = makeStyles((theme) => ({
|
|
28
41
|
root: {
|
|
@@ -56,22 +69,22 @@ const StatusCell = (props) => {
|
|
|
56
69
|
const classes = useStyles(props);
|
|
57
70
|
const { buildStatus } = props;
|
|
58
71
|
if (!buildStatus) {
|
|
59
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ jsx("div", { className: classes.root });
|
|
60
73
|
}
|
|
61
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
62
75
|
Tooltip,
|
|
63
76
|
{
|
|
64
|
-
title: /* @__PURE__ */
|
|
77
|
+
title: /* @__PURE__ */ jsx(TooltipContent, { buildId: buildStatus.id }),
|
|
65
78
|
enterNextDelay: 500,
|
|
66
|
-
arrow: true
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
arrow: true,
|
|
80
|
+
children: /* @__PURE__ */ jsx(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
"data-testid": buildStatus.id,
|
|
84
|
+
className: cn(classes.root, classes[buildStatus.buildStatus])
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
}
|
|
75
88
|
);
|
|
76
89
|
};
|
|
77
90
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusCell.esm.js","sources":["../../../src/components/StatusCell/StatusCell.tsx"],"sourcesContent":["/*\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 Tooltip from '@material-ui/core/Tooltip';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport
|
|
1
|
+
{"version":3,"file":"StatusCell.esm.js","sources":["../../../src/components/StatusCell/StatusCell.tsx"],"sourcesContent":["/*\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 Tooltip from '@material-ui/core/Tooltip';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport { BuildStatus, BuildStatusResult, xcmetricsApiRef } from '../../api';\nimport { cn, formatDuration, formatStatus } from '../../utils';\nimport useAsync from 'react-use/esm/useAsync';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { Progress } from '@backstage/core-components';\n\ninterface TooltipContentProps {\n buildId: string;\n}\n\nconst TooltipContent = ({ buildId }: TooltipContentProps) => {\n const client = useApi(xcmetricsApiRef);\n const { value, loading, error } = useAsync(\n async () => client.getBuild(buildId),\n [],\n );\n\n if (error) {\n return <div>{error.message}</div>;\n }\n\n if (loading || !value?.build) {\n return <Progress style={{ width: 100 }} />;\n }\n\n return (\n <table>\n <tbody>\n <tr>\n <td>Started</td>\n <td>{new Date(value.build.startTimestamp).toLocaleString()}</td>\n </tr>\n <tr>\n <td>Duration</td>\n <td>{formatDuration(value.build.duration)}</td>\n </tr>\n <tr>\n <td>Status</td>\n <td>{formatStatus(value.build.buildStatus)}</td>\n </tr>\n </tbody>\n </table>\n );\n};\n\ninterface StatusCellProps {\n buildStatus?: BuildStatusResult;\n size: number;\n spacing: number;\n}\n\ntype StatusStyle = {\n [key in BuildStatus]: any;\n};\n\nconst useStyles = makeStyles<Theme, StatusCellProps>(theme => ({\n root: {\n width: ({ size }) => size,\n height: ({ size }) => size,\n marginRight: ({ spacing }) => spacing,\n marginBottom: ({ spacing }) => spacing,\n backgroundColor: theme.palette.grey[600],\n '&:hover': {\n transform: 'scale(1.2)',\n },\n },\n ...({\n succeeded: {\n backgroundColor:\n theme.palette.type === 'light'\n ? theme.palette.success.light\n : theme.palette.success.main,\n },\n } as StatusStyle), // Make sure that key matches a status\n ...({\n failed: {\n backgroundColor: theme.palette.error[theme.palette.type],\n },\n } as StatusStyle),\n ...({\n stopped: {\n backgroundColor: theme.palette.warning[theme.palette.type],\n },\n } as StatusStyle),\n}));\n\nexport const StatusCell = (props: StatusCellProps) => {\n const classes = useStyles(props);\n const { buildStatus } = props;\n\n if (!buildStatus) {\n return <div className={classes.root} />;\n }\n\n return (\n <Tooltip\n title={<TooltipContent buildId={buildStatus.id} />}\n enterNextDelay={500}\n arrow\n >\n <div\n data-testid={buildStatus.id}\n className={cn(classes.root, classes[buildStatus.buildStatus])}\n />\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA4BA,MAAM,cAAiB,GAAA,CAAC,EAAE,OAAA,EAAmC,KAAA;AAC3D,EAAM,MAAA,MAAA,GAAS,OAAO,eAAe,CAAA;AACrC,EAAA,MAAM,EAAE,KAAA,EAAO,OAAS,EAAA,KAAA,EAAU,GAAA,QAAA;AAAA,IAChC,YAAY,MAAO,CAAA,QAAA,CAAS,OAAO,CAAA;AAAA,IACnC;AAAC,GACH;AAEA,EAAA,IAAI,KAAO,EAAA;AACT,IAAO,uBAAA,GAAA,CAAC,KAAK,EAAA,EAAA,QAAA,EAAA,KAAA,CAAM,OAAQ,EAAA,CAAA;AAAA;AAG7B,EAAI,IAAA,OAAA,IAAW,CAAC,KAAA,EAAO,KAAO,EAAA;AAC5B,IAAA,2BAAQ,QAAS,EAAA,EAAA,KAAA,EAAO,EAAE,KAAA,EAAO,KAAO,EAAA,CAA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AAQ,CAAA,WAAA,CAAY,WAAW,CAAC;AAAA;AAAA;AAC9D;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { StatusAborted, StatusOK, StatusError, StatusWarning } from '@backstage/core-components';
|
|
3
3
|
|
|
4
4
|
const STATUS_ICONS = {
|
|
5
|
-
succeeded: /* @__PURE__ */
|
|
6
|
-
failed: /* @__PURE__ */
|
|
7
|
-
stopped: /* @__PURE__ */
|
|
5
|
+
succeeded: /* @__PURE__ */ jsx(StatusOK, {}),
|
|
6
|
+
failed: /* @__PURE__ */ jsx(StatusError, {}),
|
|
7
|
+
stopped: /* @__PURE__ */ jsx(StatusWarning, {})
|
|
8
8
|
};
|
|
9
|
-
const StatusIcon = ({ buildStatus }) => STATUS_ICONS[buildStatus] ?? /* @__PURE__ */
|
|
9
|
+
const StatusIcon = ({ buildStatus }) => STATUS_ICONS[buildStatus] ?? /* @__PURE__ */ jsx(StatusAborted, {});
|
|
10
10
|
|
|
11
11
|
export { StatusIcon };
|
|
12
12
|
//# sourceMappingURL=StatusIcon.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.esm.js","sources":["../../../src/components/StatusIcon/StatusIcon.tsx"],"sourcesContent":["/*\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 */\nimport
|
|
1
|
+
{"version":3,"file":"StatusIcon.esm.js","sources":["../../../src/components/StatusIcon/StatusIcon.tsx"],"sourcesContent":["/*\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 */\nimport {\n StatusAborted,\n StatusError,\n StatusOK,\n StatusWarning,\n} from '@backstage/core-components';\nimport { BuildStatus } from '../../api';\n\nconst STATUS_ICONS: { [key in BuildStatus]: JSX.Element } = {\n succeeded: <StatusOK />,\n failed: <StatusError />,\n stopped: <StatusWarning />,\n};\n\ninterface StatusIconProps {\n buildStatus: BuildStatus;\n}\n\nexport const StatusIcon = ({ buildStatus }: StatusIconProps) =>\n STATUS_ICONS[buildStatus] ?? <StatusAborted />;\n"],"names":[],"mappings":";;;AAuBA,MAAM,YAAsD,GAAA;AAAA,EAC1D,SAAA,sBAAY,QAAS,EAAA,EAAA,CAAA;AAAA,EACrB,MAAA,sBAAS,WAAY,EAAA,EAAA,CAAA;AAAA,EACrB,OAAA,sBAAU,aAAc,EAAA,EAAA;AAC1B,CAAA;AAMa,MAAA,UAAA,GAAa,CAAC,EAAE,WAAA,OAC3B,YAAa,CAAA,WAAW,CAAK,oBAAA,GAAA,CAAC,aAAc,EAAA,EAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
3
|
import { xcmetricsApiRef } from '../../api/types.esm.js';
|
|
4
4
|
import '@backstage/errors';
|
|
@@ -40,27 +40,29 @@ const StatusMatrix = () => {
|
|
|
40
40
|
error
|
|
41
41
|
} = useAsync(async () => client.getBuildStatuses(300), []);
|
|
42
42
|
if (error) {
|
|
43
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ jsx(Alert, { severity: "error", children: error.message });
|
|
44
44
|
}
|
|
45
45
|
const cols = Math.trunc(rootWidth / (CELL_SIZE + CELL_MARGIN)) || 1;
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ jsxs(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
49
|
className: cn(classes.root, loading && classes.loading),
|
|
50
|
-
ref: measureRef
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
ref: measureRef,
|
|
51
|
+
children: [
|
|
52
|
+
loading && [...new Array(cols * MAX_ROWS)].map((_, index) => {
|
|
53
|
+
return /* @__PURE__ */ jsx(StatusCell, { size: CELL_SIZE, spacing: CELL_MARGIN }, index);
|
|
54
|
+
}),
|
|
55
|
+
builds && builds.slice(0, cols * MAX_ROWS).map((buildStatus, index) => /* @__PURE__ */ jsx(
|
|
56
|
+
StatusCell,
|
|
57
|
+
{
|
|
58
|
+
buildStatus,
|
|
59
|
+
size: CELL_SIZE,
|
|
60
|
+
spacing: CELL_MARGIN
|
|
61
|
+
},
|
|
62
|
+
index
|
|
63
|
+
))
|
|
64
|
+
]
|
|
65
|
+
}
|
|
64
66
|
);
|
|
65
67
|
};
|
|
66
68
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusMatrix.esm.js","sources":["../../../src/components/StatusMatrix/StatusMatrix.tsx"],"sourcesContent":["/*\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
|
|
1
|
+
{"version":3,"file":"StatusMatrix.esm.js","sources":["../../../src/components/StatusMatrix/StatusMatrix.tsx"],"sourcesContent":["/*\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 { makeStyles } from '@material-ui/core/styles';\nimport { xcmetricsApiRef } from '../../api';\nimport useAsync from 'react-use/esm/useAsync';\nimport useMeasure from 'react-use/esm/useMeasure';\nimport { cn } from '../../utils';\nimport { useApi } from '@backstage/core-plugin-api';\nimport Alert from '@material-ui/lab/Alert';\nimport { StatusCell } from '../StatusCell';\n\nconst CELL_SIZE = 12;\nconst CELL_MARGIN = 4;\nconst MAX_ROWS = 4;\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginTop: 8,\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n },\n loading: {\n animation: `$loadingOpacity 900ms ${theme.transitions.easing.easeInOut}`,\n animationIterationCount: 'infinite',\n },\n '@keyframes loadingOpacity': {\n '0%': { opacity: 0.3 },\n '100%': { opacity: 0.8 },\n },\n}));\n\nexport const StatusMatrix = () => {\n const classes = useStyles();\n const [measureRef, { width: rootWidth }] = useMeasure<HTMLDivElement>();\n const client = useApi(xcmetricsApiRef);\n const {\n value: builds,\n loading,\n error,\n } = useAsync(async () => client.getBuildStatuses(300), []);\n\n if (error) {\n return <Alert severity=\"error\">{error.message}</Alert>;\n }\n\n const cols = Math.trunc(rootWidth / (CELL_SIZE + CELL_MARGIN)) || 1;\n\n return (\n <div\n className={cn(classes.root, loading && classes.loading)}\n ref={measureRef}\n >\n {loading &&\n [...new Array(cols * MAX_ROWS)].map((_, index) => {\n return (\n <StatusCell key={index} size={CELL_SIZE} spacing={CELL_MARGIN} />\n );\n })}\n\n {builds &&\n builds\n .slice(0, cols * MAX_ROWS)\n .map((buildStatus, index) => (\n <StatusCell\n key={index}\n buildStatus={buildStatus}\n size={CELL_SIZE}\n spacing={CELL_MARGIN}\n />\n ))}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyBA,MAAM,SAAY,GAAA,EAAA;AAClB,MAAM,WAAc,GAAA,CAAA;AACpB,MAAM,QAAW,GAAA,CAAA;AAEjB,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,SAAW,EAAA,CAAA;AAAA,IACX,OAAS,EAAA,MAAA;AAAA,IACT,QAAU,EAAA,MAAA;AAAA,IACV,KAAO,EAAA;AAAA,GACT;AAAA,EACA,OAAS,EAAA;AAAA,IACP,SAAW,EAAA,CAAA,sBAAA,EAAyB,KAAM,CAAA,WAAA,CAAY,OAAO,SAAS,CAAA,CAAA;AAAA,IACtE,uBAAyB,EAAA;AAAA,GAC3B;AAAA,EACA,2BAA6B,EAAA;AAAA,IAC3B,IAAA,EAAM,EAAE,OAAA,EAAS,GAAI,EAAA;AAAA,IACrB,MAAA,EAAQ,EAAE,OAAA,EAAS,GAAI;AAAA;AAE3B,CAAE,CAAA,CAAA;AAEK,MAAM,eAAe,MAAM;AAChC,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAA,MAAM,CAAC,UAAY,EAAA,EAAE,OAAO,SAAU,EAAC,IAAI,UAA2B,EAAA;AACtE,EAAM,MAAA,MAAA,GAAS,OAAO,eAAe,CAAA;AACrC,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,MAAA;AAAA,IACP,OAAA;AAAA,IACA;AAAA,GACF,GAAI,SAAS,YAAY,MAAA,CAAO,iBAAiB,GAAG,CAAA,EAAG,EAAE,CAAA;AAEzD,EAAA,IAAI,KAAO,EAAA;AACT,IAAA,uBAAQ,GAAA,CAAA,KAAA,EAAA,EAAM,QAAS,EAAA,OAAA,EAAS,gBAAM,OAAQ,EAAA,CAAA;AAAA;AAGhD,EAAA,MAAM,OAAO,IAAK,CAAA,KAAA,CAAM,SAAa,IAAA,SAAA,GAAY,YAAY,CAAK,IAAA,CAAA;AAElE,EACE,uBAAA,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAW,EAAG,CAAA,OAAA,CAAQ,IAAM,EAAA,OAAA,IAAW,QAAQ,OAAO,CAAA;AAAA,MACtD,GAAK,EAAA,UAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,QACC,OAAA,IAAA,CAAC,GAAG,IAAI,KAAM,CAAA,IAAA,GAAO,QAAQ,CAAC,CAAE,CAAA,GAAA,CAAI,CAAC,CAAA,EAAG,KAAU,KAAA;AAChD,UAAA,2BACG,UAAuB,EAAA,EAAA,IAAA,EAAM,SAAW,EAAA,OAAA,EAAS,eAAjC,KAA8C,CAAA;AAAA,SAElE,CAAA;AAAA,QAEF,MAAA,IACC,MACG,CAAA,KAAA,CAAM,CAAG,EAAA,IAAA,GAAO,QAAQ,CACxB,CAAA,GAAA,CAAI,CAAC,WAAA,EAAa,KACjB,qBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YAEC,WAAA;AAAA,YACA,IAAM,EAAA,SAAA;AAAA,YACN,OAAS,EAAA;AAAA,WAAA;AAAA,UAHJ;AAAA,SAKR;AAAA;AAAA;AAAA,GACP;AAEJ;;;;"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { TrendLine } from '@backstage/core-components';
|
|
3
3
|
import Typography from '@material-ui/core/Typography';
|
|
4
4
|
|
|
5
5
|
const Trend = ({ data, title, color }) => {
|
|
6
6
|
const emptyData = [0, 0];
|
|
7
7
|
const max = Math.max(...data ?? emptyData);
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx(Typography, { variant: "overline", children: title }),
|
|
10
|
+
/* @__PURE__ */ jsx(
|
|
11
|
+
TrendLine,
|
|
12
|
+
{
|
|
13
|
+
data: data ?? emptyData,
|
|
14
|
+
title,
|
|
15
|
+
max,
|
|
16
|
+
color: data && color
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
] });
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
export { Trend };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trend.esm.js","sources":["../../../src/components/Trend/Trend.tsx"],"sourcesContent":["/*\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 */\nimport
|
|
1
|
+
{"version":3,"file":"Trend.esm.js","sources":["../../../src/components/Trend/Trend.tsx"],"sourcesContent":["/*\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 */\nimport { TrendLine } from '@backstage/core-components';\nimport Typography from '@material-ui/core/Typography';\n\ninterface TrendProps {\n data?: number[];\n title: string;\n color: string;\n}\n\nexport const Trend = ({ data, title, color }: TrendProps) => {\n const emptyData = [0, 0];\n const max = Math.max(...(data ?? emptyData));\n\n return (\n <>\n <Typography variant=\"overline\">{title}</Typography>\n <TrendLine\n data={data ?? emptyData}\n title={title}\n max={max}\n color={data && color}\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,QAAQ,CAAC,EAAE,IAAM,EAAA,KAAA,EAAO,OAAwB,KAAA;AAC3D,EAAM,MAAA,SAAA,GAAY,CAAC,CAAA,EAAG,CAAC,CAAA;AACvB,EAAA,MAAM,GAAM,GAAA,IAAA,CAAK,GAAI,CAAA,GAAI,QAAQ,SAAU,CAAA;AAE3C,EAAA,uBAEI,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,UAAA,EAAY,QAAM,EAAA,KAAA,EAAA,CAAA;AAAA,oBACtC,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,MAAM,IAAQ,IAAA,SAAA;AAAA,QACd,KAAA;AAAA,QACA,GAAA;AAAA,QACA,OAAO,IAAQ,IAAA;AAAA;AAAA;AACjB,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Page, Header, HeaderLabel, TabbedLayout, Content } from '@backstage/core-components';
|
|
3
3
|
import { Overview } from '../Overview/Overview.esm.js';
|
|
4
4
|
import { buildsRouteRef } from '../../routes.esm.js';
|
|
@@ -8,15 +8,21 @@ const TABS = [
|
|
|
8
8
|
{
|
|
9
9
|
path: "/",
|
|
10
10
|
title: "Overview",
|
|
11
|
-
component: /* @__PURE__ */
|
|
11
|
+
component: /* @__PURE__ */ jsx(Overview, {})
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
path: buildsRouteRef.path,
|
|
15
15
|
title: "Builds",
|
|
16
|
-
component: /* @__PURE__ */
|
|
16
|
+
component: /* @__PURE__ */ jsx(BuildList, {})
|
|
17
17
|
}
|
|
18
18
|
];
|
|
19
|
-
const XcmetricsLayout = () => /* @__PURE__ */
|
|
19
|
+
const XcmetricsLayout = () => /* @__PURE__ */ jsxs(Page, { themeId: "tool", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs(Header, { title: "XCMetrics", subtitle: "Dashboard", children: [
|
|
21
|
+
/* @__PURE__ */ jsx(HeaderLabel, { label: "Owner", value: "Spotify" }),
|
|
22
|
+
/* @__PURE__ */ jsx(HeaderLabel, { label: "Lifecycle", value: "Alpha" })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsx(TabbedLayout, { children: TABS.map((tab) => /* @__PURE__ */ jsx(TabbedLayout.Route, { path: tab.path, title: tab.title, children: /* @__PURE__ */ jsx(Content, { children: tab.component }) }, tab.path)) })
|
|
25
|
+
] });
|
|
20
26
|
|
|
21
27
|
export { XcmetricsLayout };
|
|
22
28
|
//# sourceMappingURL=XcmetricsLayout.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XcmetricsLayout.esm.js","sources":["../../../src/components/XcmetricsLayout/XcmetricsLayout.tsx"],"sourcesContent":["/*\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 */\nimport
|
|
1
|
+
{"version":3,"file":"XcmetricsLayout.esm.js","sources":["../../../src/components/XcmetricsLayout/XcmetricsLayout.tsx"],"sourcesContent":["/*\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 */\nimport { ReactChild } from 'react';\nimport {\n Content,\n Header,\n HeaderLabel,\n Page,\n TabbedLayout,\n} from '@backstage/core-components';\nimport { Overview } from '../Overview';\nimport { buildsRouteRef } from '../../routes';\nimport { BuildList } from '../BuildList';\n\nexport interface TabConfig {\n path: string;\n title: string;\n component: ReactChild;\n}\n\nconst TABS: TabConfig[] = [\n {\n path: '/',\n title: 'Overview',\n component: <Overview />,\n },\n {\n path: buildsRouteRef.path,\n title: 'Builds',\n component: <BuildList />,\n },\n];\n\nexport const XcmetricsLayout = () => (\n <Page themeId=\"tool\">\n <Header title=\"XCMetrics\" subtitle=\"Dashboard\">\n <HeaderLabel label=\"Owner\" value=\"Spotify\" />\n <HeaderLabel label=\"Lifecycle\" value=\"Alpha\" />\n </Header>\n <TabbedLayout>\n {TABS.map(tab => (\n <TabbedLayout.Route key={tab.path} path={tab.path} title={tab.title}>\n <Content>{tab.component}</Content>\n </TabbedLayout.Route>\n ))}\n </TabbedLayout>\n </Page>\n);\n"],"names":[],"mappings":";;;;;;AAiCA,MAAM,IAAoB,GAAA;AAAA,EACxB;AAAA,IACE,IAAM,EAAA,GAAA;AAAA,IACN,KAAO,EAAA,UAAA;AAAA,IACP,SAAA,sBAAY,QAAS,EAAA,EAAA;AAAA,GACvB;AAAA,EACA;AAAA,IACE,MAAM,cAAe,CAAA,IAAA;AAAA,IACrB,KAAO,EAAA,QAAA;AAAA,IACP,SAAA,sBAAY,SAAU,EAAA,EAAA;AAAA;AAE1B,CAAA;AAEO,MAAM,eAAkB,GAAA,sBAC5B,IAAA,CAAA,IAAA,EAAA,EAAK,SAAQ,MACZ,EAAA,QAAA,EAAA;AAAA,kBAAA,IAAA,CAAC,MAAO,EAAA,EAAA,KAAA,EAAM,WAAY,EAAA,QAAA,EAAS,WACjC,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,WAAY,EAAA,EAAA,KAAA,EAAM,OAAQ,EAAA,KAAA,EAAM,SAAU,EAAA,CAAA;AAAA,oBAC1C,GAAA,CAAA,WAAA,EAAA,EAAY,KAAM,EAAA,WAAA,EAAY,OAAM,OAAQ,EAAA;AAAA,GAC/C,EAAA,CAAA;AAAA,kBACA,GAAA,CAAC,gBACE,QAAK,EAAA,IAAA,CAAA,GAAA,CAAI,yBACP,GAAA,CAAA,YAAA,CAAa,KAAb,EAAA,EAAkC,IAAM,EAAA,GAAA,CAAI,MAAM,KAAO,EAAA,GAAA,CAAI,KAC5D,EAAA,QAAA,kBAAA,GAAA,CAAC,OAAS,EAAA,EAAA,QAAA,EAAA,GAAA,CAAI,WAAU,CADD,EAAA,EAAA,GAAA,CAAI,IAE7B,CACD,CACH,EAAA;AAAA,CACF,EAAA;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as react from 'react';
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
3
|
|
|
5
4
|
/** @public */
|
|
@@ -7,6 +6,6 @@ declare const xcmetricsPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
|
7
6
|
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
8
7
|
}, {}, {}>;
|
|
9
8
|
/** @public */
|
|
10
|
-
declare const XcmetricsPage: () =>
|
|
9
|
+
declare const XcmetricsPage: () => react_jsx_runtime.JSX.Element;
|
|
11
10
|
|
|
12
11
|
export { XcmetricsPage, xcmetricsPlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-xcmetrics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "A Backstage plugin that shows XCode build metrics for your components",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"test": "backstage-cli package test"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@backstage/core-components": "^0.17.
|
|
41
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
40
|
+
"@backstage/core-components": "^0.17.2",
|
|
41
|
+
"@backstage/core-plugin-api": "^1.10.7",
|
|
42
42
|
"@backstage/errors": "^1.2.7",
|
|
43
43
|
"@material-ui/core": "^4.12.2",
|
|
44
44
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"recharts": "^2.5.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@backstage/cli": "^0.
|
|
54
|
-
"@backstage/dev-utils": "^1.1.
|
|
55
|
-
"@backstage/test-utils": "^1.7.
|
|
53
|
+
"@backstage/cli": "^0.32.1",
|
|
54
|
+
"@backstage/dev-utils": "^1.1.10",
|
|
55
|
+
"@backstage/test-utils": "^1.7.8",
|
|
56
56
|
"@testing-library/dom": "^10.0.0",
|
|
57
57
|
"@testing-library/jest-dom": "^6.0.0",
|
|
58
58
|
"@testing-library/react": "^15.0.0",
|
|
@@ -69,5 +69,12 @@
|
|
|
69
69
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
70
70
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
71
71
|
},
|
|
72
|
+
"typesVersions": {
|
|
73
|
+
"*": {
|
|
74
|
+
"package.json": [
|
|
75
|
+
"package.json"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
72
79
|
"module": "./dist/index.esm.js"
|
|
73
80
|
}
|