@backstage/plugin-kubernetes-react 0.3.4-next.0 → 0.3.4
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 +28 -0
- package/dist/index.esm.js +43 -19
- package/dist/index.esm.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-react
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e6d474f: Fixed ResourceUtilization component for POD Memory Limits
|
|
8
|
+
- 58800ba: Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5
|
|
9
|
+
- abfbcfc: Updated dependency `@testing-library/react` to `^15.0.0`.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- @backstage/core-components@0.14.4
|
|
12
|
+
- @backstage/core-plugin-api@1.9.2
|
|
13
|
+
- @backstage/catalog-model@1.4.5
|
|
14
|
+
- @backstage/errors@1.2.4
|
|
15
|
+
- @backstage/types@1.1.1
|
|
16
|
+
- @backstage/plugin-kubernetes-common@0.7.5
|
|
17
|
+
|
|
18
|
+
## 0.3.4-next.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- e6d474f: Fixed ResourceUtilization component for POD Memory Limits
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/catalog-model@1.4.5
|
|
25
|
+
- @backstage/core-components@0.14.4-next.0
|
|
26
|
+
- @backstage/core-plugin-api@1.9.1
|
|
27
|
+
- @backstage/errors@1.2.4
|
|
28
|
+
- @backstage/types@1.1.1
|
|
29
|
+
- @backstage/plugin-kubernetes-common@0.7.5
|
|
30
|
+
|
|
3
31
|
## 0.3.4-next.0
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/dist/index.esm.js
CHANGED
|
@@ -6,35 +6,59 @@ import useInterval from 'react-use/esm/useInterval';
|
|
|
6
6
|
import useAsyncRetry from 'react-use/esm/useAsyncRetry';
|
|
7
7
|
import { stringifyEntityRef } from '@backstage/catalog-model';
|
|
8
8
|
import { NotFoundError } from '@backstage/errors';
|
|
9
|
-
import
|
|
9
|
+
import Accordion from '@material-ui/core/Accordion';
|
|
10
|
+
import AccordionDetails from '@material-ui/core/AccordionDetails';
|
|
11
|
+
import AccordionSummary from '@material-ui/core/AccordionSummary';
|
|
12
|
+
import Grid from '@material-ui/core/Grid';
|
|
13
|
+
import Typography from '@material-ui/core/Typography';
|
|
10
14
|
import { groupResponses } from '@backstage/plugin-kubernetes-common';
|
|
11
15
|
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
|
|
12
16
|
import { LinearGauge, DismissableBanner, EmptyState, LogViewer, StructuredMetadataTable, CodeSnippet, WarningPanel, LinkButton, StatusError, StatusOK, StatusWarning, ItemCardGrid, SubvalueCell, StatusAborted, Table, StatusPending } from '@backstage/core-components';
|
|
17
|
+
import { makeStyles, createStyles, withStyles } from '@material-ui/core/styles';
|
|
18
|
+
import Card from '@material-ui/core/Card';
|
|
19
|
+
import CardActions from '@material-ui/core/CardActions';
|
|
20
|
+
import CardContent from '@material-ui/core/CardContent';
|
|
21
|
+
import CardHeader from '@material-ui/core/CardHeader';
|
|
13
22
|
import { DateTime } from 'luxon';
|
|
14
23
|
import OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';
|
|
24
|
+
import Button from '@material-ui/core/Button';
|
|
25
|
+
import Dialog from '@material-ui/core/Dialog';
|
|
26
|
+
import DialogContent from '@material-ui/core/DialogContent';
|
|
27
|
+
import DialogTitle from '@material-ui/core/DialogTitle';
|
|
28
|
+
import IconButton from '@material-ui/core/IconButton';
|
|
15
29
|
import CloseIcon from '@material-ui/icons/Close';
|
|
16
30
|
import 'xterm/css/xterm.css';
|
|
17
31
|
import { Terminal } from 'xterm';
|
|
18
32
|
import { FitAddon } from 'xterm-addon-fit';
|
|
19
33
|
import { AttachAddon } from 'xterm-addon-attach';
|
|
20
|
-
import
|
|
34
|
+
import Paper from '@material-ui/core/Paper';
|
|
35
|
+
import Skeleton from '@material-ui/lab/Skeleton';
|
|
21
36
|
import SubjectIcon from '@material-ui/icons/Subject';
|
|
37
|
+
import Drawer from '@material-ui/core/Drawer';
|
|
38
|
+
import Switch from '@material-ui/core/Switch';
|
|
39
|
+
import FormControlLabel from '@material-ui/core/FormControlLabel';
|
|
22
40
|
import OpenInNewIcon from '@material-ui/icons/OpenInNew';
|
|
23
|
-
import { withStyles, makeStyles as makeStyles$1, createStyles as createStyles$1 } from '@material-ui/core/styles';
|
|
24
41
|
import jsyaml from 'js-yaml';
|
|
25
|
-
import
|
|
42
|
+
import List from '@material-ui/core/List';
|
|
43
|
+
import ListItem from '@material-ui/core/ListItem';
|
|
44
|
+
import ListItemText from '@material-ui/core/ListItemText';
|
|
45
|
+
import Divider from '@material-ui/core/Divider';
|
|
26
46
|
import DialogActions from '@material-ui/core/DialogActions';
|
|
27
|
-
import DialogContent$1 from '@material-ui/core/DialogContent';
|
|
28
|
-
import DialogTitle$1 from '@material-ui/core/DialogTitle';
|
|
29
|
-
import IconButton$1 from '@material-ui/core/IconButton';
|
|
30
|
-
import Typography$1 from '@material-ui/core/Typography';
|
|
31
47
|
import HelpIcon from '@material-ui/icons/Help';
|
|
48
|
+
import Avatar from '@material-ui/core/Avatar';
|
|
49
|
+
import Container from '@material-ui/core/Container';
|
|
50
|
+
import ListItemAvatar from '@material-ui/core/ListItemAvatar';
|
|
51
|
+
import Tooltip from '@material-ui/core/Tooltip';
|
|
32
52
|
import InfoIcon from '@material-ui/icons/Info';
|
|
33
53
|
import WarningIcon from '@material-ui/icons/Warning';
|
|
54
|
+
import Chip from '@material-ui/core/Chip';
|
|
34
55
|
import cronstrue from 'cronstrue';
|
|
35
56
|
import lodash from 'lodash';
|
|
36
57
|
import PauseIcon from '@material-ui/icons/Pause';
|
|
37
58
|
import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';
|
|
59
|
+
import Step from '@material-ui/core/Step';
|
|
60
|
+
import StepLabel from '@material-ui/core/StepLabel';
|
|
61
|
+
import Stepper from '@material-ui/core/Stepper';
|
|
38
62
|
|
|
39
63
|
const useIsPodExecTerminalEnabled = () => {
|
|
40
64
|
const configApi = useApi(configApiRef);
|
|
@@ -1549,7 +1573,7 @@ const useDrawerStyles = makeStyles(
|
|
|
1549
1573
|
}
|
|
1550
1574
|
})
|
|
1551
1575
|
);
|
|
1552
|
-
const DrawerButton = withStyles
|
|
1576
|
+
const DrawerButton = withStyles({
|
|
1553
1577
|
root: {
|
|
1554
1578
|
padding: "6px 5px"
|
|
1555
1579
|
},
|
|
@@ -1683,8 +1707,8 @@ const Events = ({
|
|
|
1683
1707
|
), loading && /* @__PURE__ */ React__default.createElement(Skeleton, { variant: "rect", width: "100%", height: "100%" }), !loading && value !== void 0 && /* @__PURE__ */ React__default.createElement(EventsContent, { warningEventsOnly, events: value }));
|
|
1684
1708
|
};
|
|
1685
1709
|
|
|
1686
|
-
const useStyles$1 = makeStyles
|
|
1687
|
-
(theme) => createStyles
|
|
1710
|
+
const useStyles$1 = makeStyles(
|
|
1711
|
+
(theme) => createStyles({
|
|
1688
1712
|
closeButton: {
|
|
1689
1713
|
position: "absolute",
|
|
1690
1714
|
right: theme.spacing(1),
|
|
@@ -1711,10 +1735,10 @@ const FixDialog = ({
|
|
|
1711
1735
|
const pf = error.proposedFix;
|
|
1712
1736
|
const dialogContent = () => {
|
|
1713
1737
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1714
|
-
return /* @__PURE__ */ React__default.createElement(Grid, { container: true }, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography
|
|
1738
|
+
return /* @__PURE__ */ React__default.createElement(Grid, { container: true }, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h6" }, "Detected error:"), /* @__PURE__ */ React__default.createElement(Typography, null, error.message)), /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h6" }, "Cause explanation:"), /* @__PURE__ */ React__default.createElement(Typography, null, (_b = (_a2 = error.proposedFix) == null ? void 0 : _a2.rootCauseExplanation) != null ? _b : "unknown")), /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h6" }, "Fix:"), /* @__PURE__ */ React__default.createElement(Typography, null, /* @__PURE__ */ React__default.createElement("ul", null, ((_d = (_c = error.proposedFix) == null ? void 0 : _c.actions) != null ? _d : []).map((fix, i) => {
|
|
1715
1739
|
var _a3, _b2;
|
|
1716
1740
|
return /* @__PURE__ */ React__default.createElement("li", { key: `${(_b2 = (_a3 = pod.metadata) == null ? void 0 : _a3.name) != null ? _b2 : "unknown"}-pf-${i}` }, fix);
|
|
1717
|
-
})))), pf && pf.type === "logs" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography
|
|
1741
|
+
})))), pf && pf.type === "logs" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h6" }, "Crash logs:")), /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 9 }, /* @__PURE__ */ React__default.createElement(
|
|
1718
1742
|
PodLogs,
|
|
1719
1743
|
{
|
|
1720
1744
|
previous: true,
|
|
@@ -1725,7 +1749,7 @@ const FixDialog = ({
|
|
|
1725
1749
|
containerName: pf.container
|
|
1726
1750
|
}
|
|
1727
1751
|
}
|
|
1728
|
-
))), pf && pf.type === "events" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography
|
|
1752
|
+
))), pf && pf.type === "events" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h6" }, "Events:")), /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 9 }, /* @__PURE__ */ React__default.createElement(
|
|
1729
1753
|
Events,
|
|
1730
1754
|
{
|
|
1731
1755
|
warningEventsOnly: true,
|
|
@@ -1745,15 +1769,15 @@ const FixDialog = ({
|
|
|
1745
1769
|
startIcon: /* @__PURE__ */ React__default.createElement(HelpIcon, null)
|
|
1746
1770
|
},
|
|
1747
1771
|
"Help"
|
|
1748
|
-
), /* @__PURE__ */ React__default.createElement(Dialog
|
|
1749
|
-
IconButton
|
|
1772
|
+
), /* @__PURE__ */ React__default.createElement(Dialog, { maxWidth: "xl", fullWidth: true, open: isOpen, onClose: closeDialog }, /* @__PURE__ */ React__default.createElement(DialogTitle, { id: "dialog-title" }, (_a = pod.metadata) == null ? void 0 : _a.name, " - ", error.type, /* @__PURE__ */ React__default.createElement(
|
|
1773
|
+
IconButton,
|
|
1750
1774
|
{
|
|
1751
1775
|
"aria-label": "close",
|
|
1752
1776
|
className: classes.closeButton,
|
|
1753
1777
|
onClick: closeDialog
|
|
1754
1778
|
},
|
|
1755
1779
|
/* @__PURE__ */ React__default.createElement(CloseIcon, null)
|
|
1756
|
-
)), /* @__PURE__ */ React__default.createElement(DialogContent
|
|
1780
|
+
)), /* @__PURE__ */ React__default.createElement(DialogContent, null, dialogContent()), /* @__PURE__ */ React__default.createElement(DialogActions, null, pf && pf.type === "docs" && /* @__PURE__ */ React__default.createElement(
|
|
1757
1781
|
LinkButton,
|
|
1758
1782
|
{
|
|
1759
1783
|
to: pf.docsLink,
|
|
@@ -1872,7 +1896,7 @@ const PodDrawer = ({ podAndErrors, open }) => {
|
|
|
1872
1896
|
title: "Memory limits",
|
|
1873
1897
|
usage: podMetrics.memory.currentUsage,
|
|
1874
1898
|
total: podMetrics.memory.limitTotal,
|
|
1875
|
-
totalFormatted: bytesToMiB(podMetrics.memory.
|
|
1899
|
+
totalFormatted: bytesToMiB(podMetrics.memory.limitTotal)
|
|
1876
1900
|
}
|
|
1877
1901
|
))), ((_e = podAndErrors.pod.status) == null ? void 0 : _e.phase) === "Pending" && /* @__PURE__ */ React__default.createElement(PendingPodContent, { pod: podAndErrors.pod }), ((_g = (_f = podAndErrors.pod.status) == null ? void 0 : _f.containerStatuses) == null ? void 0 : _g.length) && /* @__PURE__ */ React__default.createElement(Grid, { container: true, spacing: 2 }, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h5" }, "Containers")), /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(ItemCardGrid, null, (_i = (_h = podAndErrors.pod.status) == null ? void 0 : _h.containerStatuses) == null ? void 0 : _i.map(
|
|
1878
1902
|
(containerStatus, i) => {
|
|
@@ -2875,7 +2899,7 @@ const createLabelForStep = (step) => {
|
|
|
2875
2899
|
} else if (isPauseStep(step)) {
|
|
2876
2900
|
return step.pause.duration === void 0 ? "infinite pause" : `pause for ${step.pause.duration}`;
|
|
2877
2901
|
} else if (isAnalysisStep(step)) {
|
|
2878
|
-
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Typography
|
|
2902
|
+
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Typography, { paragraph: true }, "analysis templates:"), step.analysis.templates.map((t, i) => /* @__PURE__ */ React__default.createElement(Typography, { paragraph: true, key: i }, `${t.templateName}${t.clusterScope ? " (cluster scoped)" : ""}`)));
|
|
2879
2903
|
}
|
|
2880
2904
|
return "unknown step";
|
|
2881
2905
|
};
|