@backstage/plugin-kubernetes-react 0.3.5 → 0.3.6-next.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/api/KubernetesBackendClient.esm.js +5 -12
- package/dist/api/KubernetesBackendClient.esm.js.map +1 -1
- package/dist/api/KubernetesClusterLinkFormatter.esm.js +3 -10
- package/dist/api/KubernetesClusterLinkFormatter.esm.js.map +1 -1
- package/dist/api/KubernetesProxyClient.esm.js +1 -7
- package/dist/api/KubernetesProxyClient.esm.js.map +1 -1
- package/dist/api/formatters/GkeClusterLinksFormatter.esm.js +3 -4
- package/dist/api/formatters/GkeClusterLinksFormatter.esm.js.map +1 -1
- package/dist/api/formatters/OpenshiftClusterLinksFormatter.esm.js +2 -3
- package/dist/api/formatters/OpenshiftClusterLinksFormatter.esm.js.map +1 -1
- package/dist/api/formatters/RancherClusterLinksFormatter.esm.js +2 -3
- package/dist/api/formatters/RancherClusterLinksFormatter.esm.js.map +1 -1
- package/dist/api/formatters/StandardClusterLinksFormatter.esm.js +2 -3
- package/dist/api/formatters/StandardClusterLinksFormatter.esm.js.map +1 -1
- package/dist/components/CronJobsAccordions/CronJobsAccordions.esm.js +2 -3
- package/dist/components/CronJobsAccordions/CronJobsAccordions.esm.js.map +1 -1
- package/dist/components/CronJobsAccordions/CronJobsDrawer.esm.js +8 -12
- package/dist/components/CronJobsAccordions/CronJobsDrawer.esm.js.map +1 -1
- package/dist/components/CustomResources/ArgoRollouts/Rollout.esm.js +31 -42
- package/dist/components/CustomResources/ArgoRollouts/Rollout.esm.js.map +1 -1
- package/dist/components/CustomResources/ArgoRollouts/RolloutDrawer.esm.js +1 -2
- package/dist/components/CustomResources/ArgoRollouts/RolloutDrawer.esm.js.map +1 -1
- package/dist/components/CustomResources/DefaultCustomResourceDrawer.esm.js +1 -2
- package/dist/components/CustomResources/DefaultCustomResourceDrawer.esm.js.map +1 -1
- package/dist/components/DaemonSetsAccordions/DaemonSetsAccordions.esm.js +1 -4
- package/dist/components/DaemonSetsAccordions/DaemonSetsAccordions.esm.js.map +1 -1
- package/dist/components/DaemonSetsAccordions/DaemonSetsDrawer.esm.js +10 -12
- package/dist/components/DaemonSetsAccordions/DaemonSetsDrawer.esm.js.map +1 -1
- package/dist/components/DeploymentsAccordions/DeploymentDrawer.esm.js +6 -8
- package/dist/components/DeploymentsAccordions/DeploymentDrawer.esm.js.map +1 -1
- package/dist/components/DeploymentsAccordions/DeploymentsAccordions.esm.js +23 -30
- package/dist/components/DeploymentsAccordions/DeploymentsAccordions.esm.js.map +1 -1
- package/dist/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.esm.js +6 -7
- package/dist/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.esm.js.map +1 -1
- package/dist/components/IngressesAccordions/IngressDrawer.esm.js +2 -3
- package/dist/components/IngressesAccordions/IngressDrawer.esm.js.map +1 -1
- package/dist/components/JobsAccordions/JobsAccordions.esm.js +3 -4
- package/dist/components/JobsAccordions/JobsAccordions.esm.js.map +1 -1
- package/dist/components/JobsAccordions/JobsDrawer.esm.js +5 -7
- package/dist/components/JobsAccordions/JobsDrawer.esm.js.map +1 -1
- package/dist/components/KubernetesDrawer/KubernetesDrawer.esm.js +2 -3
- package/dist/components/KubernetesDrawer/KubernetesDrawer.esm.js.map +1 -1
- package/dist/components/KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.esm.js +2 -4
- package/dist/components/KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.esm.js.map +1 -1
- package/dist/components/PodExecTerminal/PodExecTerminal.esm.js +4 -4
- package/dist/components/PodExecTerminal/PodExecTerminal.esm.js.map +1 -1
- package/dist/components/PodExecTerminal/PodExecTerminalAttachAddon.esm.js +2 -17
- package/dist/components/PodExecTerminal/PodExecTerminalAttachAddon.esm.js.map +1 -1
- package/dist/components/Pods/ErrorList/ErrorList.esm.js +2 -3
- package/dist/components/Pods/ErrorList/ErrorList.esm.js.map +1 -1
- package/dist/components/Pods/Events/Events.esm.js +1 -2
- package/dist/components/Pods/Events/Events.esm.js.map +1 -1
- package/dist/components/Pods/FixDialog/FixDialog.esm.js +7 -10
- package/dist/components/Pods/FixDialog/FixDialog.esm.js.map +1 -1
- package/dist/components/Pods/PodDrawer/ContainerCard.esm.js +7 -11
- package/dist/components/Pods/PodDrawer/ContainerCard.esm.js.map +1 -1
- package/dist/components/Pods/PodDrawer/PendingPodContent.esm.js +4 -5
- package/dist/components/Pods/PodDrawer/PendingPodContent.esm.js.map +1 -1
- package/dist/components/Pods/PodDrawer/PodDrawer.esm.js +8 -11
- package/dist/components/Pods/PodDrawer/PodDrawer.esm.js.map +1 -1
- package/dist/components/Pods/PodsTable.esm.js +5 -11
- package/dist/components/Pods/PodsTable.esm.js.map +1 -1
- package/dist/components/ServicesAccordions/ServiceDrawer.esm.js +2 -3
- package/dist/components/ServicesAccordions/ServiceDrawer.esm.js.map +1 -1
- package/dist/components/ServicesAccordions/ServicesAccordions.esm.js +7 -9
- package/dist/components/ServicesAccordions/ServicesAccordions.esm.js.map +1 -1
- package/dist/components/StatefulSetsAccordions/StatefulSetDrawer.esm.js +8 -10
- package/dist/components/StatefulSetsAccordions/StatefulSetDrawer.esm.js.map +1 -1
- package/dist/components/StatefulSetsAccordions/StatefulSetsAccordions.esm.js +19 -26
- package/dist/components/StatefulSetsAccordions/StatefulSetsAccordions.esm.js.map +1 -1
- package/dist/hooks/auth.esm.js +1 -2
- package/dist/hooks/auth.esm.js.map +1 -1
- package/dist/hooks/useCustomResources.esm.js +1 -1
- package/dist/hooks/useCustomResources.esm.js.map +1 -1
- package/dist/hooks/useKubernetesObjects.esm.js +1 -1
- package/dist/hooks/useKubernetesObjects.esm.js.map +1 -1
- package/dist/hooks/useMatchingErrors.esm.js +2 -3
- package/dist/hooks/useMatchingErrors.esm.js.map +1 -1
- package/dist/hooks/usePodMetrics.esm.js +4 -6
- package/dist/hooks/usePodMetrics.esm.js.map +1 -1
- package/dist/kubernetes-auth-provider/GoogleKubernetesAuthProvider.esm.js +1 -7
- package/dist/kubernetes-auth-provider/GoogleKubernetesAuthProvider.esm.js.map +1 -1
- package/dist/kubernetes-auth-provider/KubernetesAuthProviders.esm.js +1 -7
- package/dist/kubernetes-auth-provider/KubernetesAuthProviders.esm.js.map +1 -1
- package/dist/kubernetes-auth-provider/OidcKubernetesAuthProvider.esm.js +2 -8
- package/dist/kubernetes-auth-provider/OidcKubernetesAuthProvider.esm.js.map +1 -1
- package/dist/utils/owner.esm.js +4 -11
- package/dist/utils/owner.esm.js.map +1 -1
- package/dist/utils/pod.esm.js +12 -19
- package/dist/utils/pod.esm.js.map +1 -1
- package/package.json +4 -4
|
@@ -61,22 +61,18 @@ const AbortedTitle = /* @__PURE__ */ React__default.createElement(
|
|
|
61
61
|
/* @__PURE__ */ React__default.createElement(ErrorOutlineIcon, null),
|
|
62
62
|
/* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle1" }, "Aborted")
|
|
63
63
|
);
|
|
64
|
-
const findAbortedMessage = (rollout) =>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
(c) => c.type === "Progressing" && c.status === "False" && c.reason === "RolloutAborted"
|
|
68
|
-
)) == null ? void 0 : _c.message;
|
|
69
|
-
};
|
|
64
|
+
const findAbortedMessage = (rollout) => rollout.status?.conditions?.find(
|
|
65
|
+
(c) => c.type === "Progressing" && c.status === "False" && c.reason === "RolloutAborted"
|
|
66
|
+
)?.message;
|
|
70
67
|
const RolloutSummary = ({
|
|
71
68
|
rollout,
|
|
72
69
|
numberOfCurrentPods,
|
|
73
70
|
numberOfPodsWithErrors,
|
|
74
71
|
hpa
|
|
75
72
|
}) => {
|
|
76
|
-
|
|
77
|
-
const pauseTime = (_c = (_b = (_a = rollout.status) == null ? void 0 : _a.pauseConditions) == null ? void 0 : _b.find(
|
|
73
|
+
const pauseTime = rollout.status?.pauseConditions?.find(
|
|
78
74
|
(p) => p.reason === "CanaryPauseStep"
|
|
79
|
-
)
|
|
75
|
+
)?.startTime;
|
|
80
76
|
const abortedMessage = findAbortedMessage(rollout);
|
|
81
77
|
return /* @__PURE__ */ React__default.createElement(
|
|
82
78
|
Grid,
|
|
@@ -98,9 +94,9 @@ const RolloutSummary = ({
|
|
|
98
94
|
alignItems: "flex-start",
|
|
99
95
|
spacing: 0
|
|
100
96
|
},
|
|
101
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "min replicas ",
|
|
102
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "current CPU usage:", " ",
|
|
103
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "target CPU usage:", " ",
|
|
97
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "min replicas ", hpa.spec?.minReplicas ?? "?", " / max replicas", " ", hpa.spec?.maxReplicas ?? "?")),
|
|
98
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "current CPU usage:", " ", hpa.status?.currentCPUUtilizationPercentage ?? "?", "%")),
|
|
99
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "target CPU usage:", " ", hpa.spec?.targetCPUUtilizationPercentage ?? "?", "%"))
|
|
104
100
|
))),
|
|
105
101
|
/* @__PURE__ */ React__default.createElement(
|
|
106
102
|
Grid,
|
|
@@ -137,15 +133,11 @@ const RolloutAccordion = ({
|
|
|
137
133
|
matchingHpa,
|
|
138
134
|
defaultExpanded
|
|
139
135
|
}) => {
|
|
140
|
-
var _a, _b, _c, _d, _e, _f;
|
|
141
136
|
const podNamesWithErrors = useContext(PodNamesWithErrorsContext);
|
|
142
137
|
const podsWithErrors = ownedPods.filter(
|
|
143
|
-
(p) =>
|
|
144
|
-
var _a2, _b2;
|
|
145
|
-
return podNamesWithErrors.has((_b2 = (_a2 = p.metadata) == null ? void 0 : _a2.name) != null ? _b2 : "");
|
|
146
|
-
}
|
|
138
|
+
(p) => podNamesWithErrors.has(p.metadata?.name ?? "")
|
|
147
139
|
);
|
|
148
|
-
const currentStepIndex =
|
|
140
|
+
const currentStepIndex = rollout.status?.currentStepIndex ?? 0;
|
|
149
141
|
const abortedMessage = findAbortedMessage(rollout);
|
|
150
142
|
return /* @__PURE__ */ React__default.createElement(
|
|
151
143
|
Accordion,
|
|
@@ -167,7 +159,7 @@ const RolloutAccordion = ({
|
|
|
167
159
|
StepsProgress,
|
|
168
160
|
{
|
|
169
161
|
aborted: abortedMessage !== void 0,
|
|
170
|
-
steps:
|
|
162
|
+
steps: rollout.spec?.strategy?.canary?.steps ?? [],
|
|
171
163
|
currentStepIndex
|
|
172
164
|
}
|
|
173
165
|
)), /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(
|
|
@@ -192,29 +184,26 @@ const RolloutAccordions = ({
|
|
|
192
184
|
justifyContent: "flex-start",
|
|
193
185
|
alignItems: "flex-start"
|
|
194
186
|
},
|
|
195
|
-
rollouts.map((rollout, i) => {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
)));
|
|
217
|
-
})
|
|
187
|
+
rollouts.map((rollout, i) => /* @__PURE__ */ React__default.createElement(Grid, { container: true, item: true, key: i, xs: true }, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: true }, /* @__PURE__ */ React__default.createElement(
|
|
188
|
+
RolloutAccordion,
|
|
189
|
+
{
|
|
190
|
+
defaultExpanded,
|
|
191
|
+
matchingHpa: getMatchingHpa(
|
|
192
|
+
{
|
|
193
|
+
name: rollout.metadata?.name,
|
|
194
|
+
namespace: rollout.metadata?.namespace,
|
|
195
|
+
kind: "rollout"
|
|
196
|
+
},
|
|
197
|
+
groupedResponses.horizontalPodAutoscalers
|
|
198
|
+
),
|
|
199
|
+
ownedPods: getOwnedPodsThroughReplicaSets(
|
|
200
|
+
rollout,
|
|
201
|
+
groupedResponses.replicaSets,
|
|
202
|
+
groupedResponses.pods
|
|
203
|
+
),
|
|
204
|
+
rollout
|
|
205
|
+
}
|
|
206
|
+
))))
|
|
218
207
|
);
|
|
219
208
|
};
|
|
220
209
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rollout.esm.js","sources":["../../../../src/components/CustomResources/ArgoRollouts/Rollout.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 React, { useContext } from 'react';\nimport Accordion from '@material-ui/core/Accordion';\nimport AccordionDetails from '@material-ui/core/AccordionDetails';\nimport AccordionSummary from '@material-ui/core/AccordionSummary';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport { V1Pod, V1HorizontalPodAutoscaler } from '@kubernetes/client-node';\nimport { PodsTable } from '../../Pods';\nimport { HorizontalPodAutoscalerDrawer } from '../../HorizontalPodAutoscalers';\nimport { RolloutDrawer } from './RolloutDrawer';\nimport PauseIcon from '@material-ui/icons/Pause';\nimport ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';\nimport { DateTime } from 'luxon';\nimport { StepsProgress } from './StepsProgress';\nimport {\n PodNamesWithErrorsContext,\n GroupedResponsesContext,\n} from '../../../hooks';\nimport {\n getMatchingHpa,\n getOwnedPodsThroughReplicaSets,\n} from '../../../utils/owner';\nimport { StatusError, StatusOK } from '@backstage/core-components';\nimport { READY_COLUMNS, RESOURCE_COLUMNS } from '../../Pods/PodsTable';\n\ntype RolloutAccordionsProps = {\n rollouts: any[];\n defaultExpanded?: boolean;\n children?: React.ReactNode;\n};\n\ntype RolloutAccordionProps = {\n rollout: any;\n ownedPods: V1Pod[];\n defaultExpanded?: boolean;\n matchingHpa?: V1HorizontalPodAutoscaler;\n children?: React.ReactNode;\n};\n\ntype RolloutSummaryProps = {\n rollout: any;\n numberOfCurrentPods: number;\n numberOfPodsWithErrors: number;\n hpa?: V1HorizontalPodAutoscaler;\n children?: React.ReactNode;\n};\n\nconst AbortedTitle = (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n }}\n >\n <ErrorOutlineIcon />\n <Typography variant=\"subtitle1\">Aborted</Typography>\n </div>\n);\n\nconst findAbortedMessage = (rollout: any): string | undefined =>\n rollout.status?.conditions?.find(\n (c: any) =>\n c.type === 'Progressing' &&\n c.status === 'False' &&\n c.reason === 'RolloutAborted',\n )?.message;\n\nconst RolloutSummary = ({\n rollout,\n numberOfCurrentPods,\n numberOfPodsWithErrors,\n hpa,\n}: RolloutSummaryProps) => {\n const pauseTime: string | undefined = rollout.status?.pauseConditions?.find(\n (p: any) => p.reason === 'CanaryPauseStep',\n )?.startTime;\n const abortedMessage = findAbortedMessage(rollout);\n\n return (\n <Grid\n container\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={0}\n >\n <Grid xs={6} item>\n <RolloutDrawer rollout={rollout} />\n </Grid>\n {hpa && (\n <Grid item xs={3}>\n <HorizontalPodAutoscalerDrawer hpa={hpa}>\n <Grid\n item\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"subtitle2\">\n min replicas {hpa.spec?.minReplicas ?? '?'} / max replicas{' '}\n {hpa.spec?.maxReplicas ?? '?'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography variant=\"subtitle2\">\n current CPU usage:{' '}\n {hpa.status?.currentCPUUtilizationPercentage ?? '?'}%\n </Typography>\n </Grid>\n <Grid item>\n <Typography variant=\"subtitle2\">\n target CPU usage:{' '}\n {hpa.spec?.targetCPUUtilizationPercentage ?? '?'}%\n </Typography>\n </Grid>\n </Grid>\n </HorizontalPodAutoscalerDrawer>\n </Grid>\n )}\n <Grid\n item\n container\n xs={3}\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-end\"\n spacing={0}\n >\n <Grid item>\n <StatusOK>{numberOfCurrentPods} pods</StatusOK>\n </Grid>\n <Grid item>\n {numberOfPodsWithErrors > 0 ? (\n <StatusError>\n {numberOfPodsWithErrors} pod\n {numberOfPodsWithErrors > 1 ? 's' : ''} with errors\n </StatusError>\n ) : (\n <StatusOK>No pods with errors</StatusOK>\n )}\n </Grid>\n </Grid>\n {pauseTime && (\n <Grid item xs={3}>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n }}\n >\n <PauseIcon />\n <Typography variant=\"subtitle1\">\n Paused ({DateTime.fromISO(pauseTime).toRelative({ locale: 'en' })}\n )\n </Typography>\n </div>\n </Grid>\n )}\n {abortedMessage && (\n <Grid item xs={3}>\n {AbortedTitle}\n </Grid>\n )}\n </Grid>\n );\n};\n\nconst RolloutAccordion = ({\n rollout,\n ownedPods,\n matchingHpa,\n defaultExpanded,\n}: RolloutAccordionProps) => {\n const podNamesWithErrors = useContext(PodNamesWithErrorsContext);\n\n const podsWithErrors = ownedPods.filter(p =>\n podNamesWithErrors.has(p.metadata?.name ?? ''),\n );\n\n const currentStepIndex = rollout.status?.currentStepIndex ?? 0;\n const abortedMessage = findAbortedMessage(rollout);\n\n return (\n <Accordion\n defaultExpanded={defaultExpanded}\n TransitionProps={{ unmountOnExit: true }}\n variant=\"outlined\"\n >\n <AccordionSummary expandIcon={<ExpandMoreIcon />}>\n <RolloutSummary\n rollout={rollout}\n numberOfCurrentPods={ownedPods.length}\n numberOfPodsWithErrors={podsWithErrors.length}\n hpa={matchingHpa}\n />\n </AccordionSummary>\n <AccordionDetails>\n <div style={{ width: '100%' }}>\n <div>\n <Typography variant=\"h6\">Rollout status</Typography>\n </div>\n <div style={{ margin: '1rem' }}>\n {abortedMessage && (\n <>\n {AbortedTitle}\n <Typography variant=\"subtitle2\">{abortedMessage}</Typography>\n </>\n )}\n <StepsProgress\n aborted={abortedMessage !== undefined}\n steps={rollout.spec?.strategy?.canary?.steps ?? []}\n currentStepIndex={currentStepIndex}\n />\n </div>\n <div>\n <PodsTable\n pods={ownedPods}\n extraColumns={[READY_COLUMNS, RESOURCE_COLUMNS]}\n />\n </div>\n </div>\n </AccordionDetails>\n </Accordion>\n );\n};\n\nexport const RolloutAccordions = ({\n rollouts,\n defaultExpanded = false,\n}: RolloutAccordionsProps) => {\n const groupedResponses = useContext(GroupedResponsesContext);\n\n return (\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {rollouts.map((rollout, i) => (\n <Grid container item key={i} xs>\n <Grid item xs>\n <RolloutAccordion\n defaultExpanded={defaultExpanded}\n matchingHpa={getMatchingHpa(\n {\n name: rollout.metadata?.name,\n namespace: rollout.metadata?.namespace,\n kind: 'rollout',\n },\n groupedResponses.horizontalPodAutoscalers,\n )}\n ownedPods={getOwnedPodsThroughReplicaSets(\n rollout,\n groupedResponses.replicaSets,\n groupedResponses.pods,\n )}\n rollout={rollout}\n />\n </Grid>\n </Grid>\n ))}\n </Grid>\n );\n};\n"],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AAAA,UACA,OAAA;AAAA,SAAA;AAAA,OAEJ,CACF,CAAA,CAAA;AAAA,KACD,CAAA;AAAA,GACH,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"Rollout.esm.js","sources":["../../../../src/components/CustomResources/ArgoRollouts/Rollout.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 React, { useContext } from 'react';\nimport Accordion from '@material-ui/core/Accordion';\nimport AccordionDetails from '@material-ui/core/AccordionDetails';\nimport AccordionSummary from '@material-ui/core/AccordionSummary';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport { V1Pod, V1HorizontalPodAutoscaler } from '@kubernetes/client-node';\nimport { PodsTable } from '../../Pods';\nimport { HorizontalPodAutoscalerDrawer } from '../../HorizontalPodAutoscalers';\nimport { RolloutDrawer } from './RolloutDrawer';\nimport PauseIcon from '@material-ui/icons/Pause';\nimport ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';\nimport { DateTime } from 'luxon';\nimport { StepsProgress } from './StepsProgress';\nimport {\n PodNamesWithErrorsContext,\n GroupedResponsesContext,\n} from '../../../hooks';\nimport {\n getMatchingHpa,\n getOwnedPodsThroughReplicaSets,\n} from '../../../utils/owner';\nimport { StatusError, StatusOK } from '@backstage/core-components';\nimport { READY_COLUMNS, RESOURCE_COLUMNS } from '../../Pods/PodsTable';\n\ntype RolloutAccordionsProps = {\n rollouts: any[];\n defaultExpanded?: boolean;\n children?: React.ReactNode;\n};\n\ntype RolloutAccordionProps = {\n rollout: any;\n ownedPods: V1Pod[];\n defaultExpanded?: boolean;\n matchingHpa?: V1HorizontalPodAutoscaler;\n children?: React.ReactNode;\n};\n\ntype RolloutSummaryProps = {\n rollout: any;\n numberOfCurrentPods: number;\n numberOfPodsWithErrors: number;\n hpa?: V1HorizontalPodAutoscaler;\n children?: React.ReactNode;\n};\n\nconst AbortedTitle = (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n }}\n >\n <ErrorOutlineIcon />\n <Typography variant=\"subtitle1\">Aborted</Typography>\n </div>\n);\n\nconst findAbortedMessage = (rollout: any): string | undefined =>\n rollout.status?.conditions?.find(\n (c: any) =>\n c.type === 'Progressing' &&\n c.status === 'False' &&\n c.reason === 'RolloutAborted',\n )?.message;\n\nconst RolloutSummary = ({\n rollout,\n numberOfCurrentPods,\n numberOfPodsWithErrors,\n hpa,\n}: RolloutSummaryProps) => {\n const pauseTime: string | undefined = rollout.status?.pauseConditions?.find(\n (p: any) => p.reason === 'CanaryPauseStep',\n )?.startTime;\n const abortedMessage = findAbortedMessage(rollout);\n\n return (\n <Grid\n container\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={0}\n >\n <Grid xs={6} item>\n <RolloutDrawer rollout={rollout} />\n </Grid>\n {hpa && (\n <Grid item xs={3}>\n <HorizontalPodAutoscalerDrawer hpa={hpa}>\n <Grid\n item\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"subtitle2\">\n min replicas {hpa.spec?.minReplicas ?? '?'} / max replicas{' '}\n {hpa.spec?.maxReplicas ?? '?'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography variant=\"subtitle2\">\n current CPU usage:{' '}\n {hpa.status?.currentCPUUtilizationPercentage ?? '?'}%\n </Typography>\n </Grid>\n <Grid item>\n <Typography variant=\"subtitle2\">\n target CPU usage:{' '}\n {hpa.spec?.targetCPUUtilizationPercentage ?? '?'}%\n </Typography>\n </Grid>\n </Grid>\n </HorizontalPodAutoscalerDrawer>\n </Grid>\n )}\n <Grid\n item\n container\n xs={3}\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-end\"\n spacing={0}\n >\n <Grid item>\n <StatusOK>{numberOfCurrentPods} pods</StatusOK>\n </Grid>\n <Grid item>\n {numberOfPodsWithErrors > 0 ? (\n <StatusError>\n {numberOfPodsWithErrors} pod\n {numberOfPodsWithErrors > 1 ? 's' : ''} with errors\n </StatusError>\n ) : (\n <StatusOK>No pods with errors</StatusOK>\n )}\n </Grid>\n </Grid>\n {pauseTime && (\n <Grid item xs={3}>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n }}\n >\n <PauseIcon />\n <Typography variant=\"subtitle1\">\n Paused ({DateTime.fromISO(pauseTime).toRelative({ locale: 'en' })}\n )\n </Typography>\n </div>\n </Grid>\n )}\n {abortedMessage && (\n <Grid item xs={3}>\n {AbortedTitle}\n </Grid>\n )}\n </Grid>\n );\n};\n\nconst RolloutAccordion = ({\n rollout,\n ownedPods,\n matchingHpa,\n defaultExpanded,\n}: RolloutAccordionProps) => {\n const podNamesWithErrors = useContext(PodNamesWithErrorsContext);\n\n const podsWithErrors = ownedPods.filter(p =>\n podNamesWithErrors.has(p.metadata?.name ?? ''),\n );\n\n const currentStepIndex = rollout.status?.currentStepIndex ?? 0;\n const abortedMessage = findAbortedMessage(rollout);\n\n return (\n <Accordion\n defaultExpanded={defaultExpanded}\n TransitionProps={{ unmountOnExit: true }}\n variant=\"outlined\"\n >\n <AccordionSummary expandIcon={<ExpandMoreIcon />}>\n <RolloutSummary\n rollout={rollout}\n numberOfCurrentPods={ownedPods.length}\n numberOfPodsWithErrors={podsWithErrors.length}\n hpa={matchingHpa}\n />\n </AccordionSummary>\n <AccordionDetails>\n <div style={{ width: '100%' }}>\n <div>\n <Typography variant=\"h6\">Rollout status</Typography>\n </div>\n <div style={{ margin: '1rem' }}>\n {abortedMessage && (\n <>\n {AbortedTitle}\n <Typography variant=\"subtitle2\">{abortedMessage}</Typography>\n </>\n )}\n <StepsProgress\n aborted={abortedMessage !== undefined}\n steps={rollout.spec?.strategy?.canary?.steps ?? []}\n currentStepIndex={currentStepIndex}\n />\n </div>\n <div>\n <PodsTable\n pods={ownedPods}\n extraColumns={[READY_COLUMNS, RESOURCE_COLUMNS]}\n />\n </div>\n </div>\n </AccordionDetails>\n </Accordion>\n );\n};\n\nexport const RolloutAccordions = ({\n rollouts,\n defaultExpanded = false,\n}: RolloutAccordionsProps) => {\n const groupedResponses = useContext(GroupedResponsesContext);\n\n return (\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {rollouts.map((rollout, i) => (\n <Grid container item key={i} xs>\n <Grid item xs>\n <RolloutAccordion\n defaultExpanded={defaultExpanded}\n matchingHpa={getMatchingHpa(\n {\n name: rollout.metadata?.name,\n namespace: rollout.metadata?.namespace,\n kind: 'rollout',\n },\n groupedResponses.horizontalPodAutoscalers,\n )}\n ownedPods={getOwnedPodsThroughReplicaSets(\n rollout,\n groupedResponses.replicaSets,\n groupedResponses.pods,\n )}\n rollout={rollout}\n />\n </Grid>\n </Grid>\n ))}\n </Grid>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,MAAM,YACJ,mBAAAA,cAAA,CAAA,aAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,KAAO,EAAA;AAAA,MACL,OAAS,EAAA,MAAA;AAAA,MACT,UAAY,EAAA,QAAA;AAAA,MACZ,QAAU,EAAA,MAAA;AAAA,KACZ;AAAA,GAAA;AAAA,+CAEC,gBAAiB,EAAA,IAAA,CAAA;AAAA,kBACjBA,cAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,WAAA,EAAA,EAAY,S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ACE,IAAA,EAAM,QAAQ,QAAU,EAAA,IAAA;AAAA,YACxB,SAAA,EAAW,QAAQ,QAAU,EAAA,SAAA;AAAA,YAC7B,IAAM,EAAA,SAAA;AAAA,WACR;AAAA,UACA,gBAAiB,CAAA,wBAAA;AAAA,SACnB;AAAA,QACA,SAAW,EAAA,8BAAA;AAAA,UACT,OAAA;AAAA,UACA,gBAAiB,CAAA,WAAA;AAAA,UACjB,gBAAiB,CAAA,IAAA;AAAA,SACnB;AAAA,QACA,OAAA;AAAA,OAAA;AAAA,KAEJ,CACF,CACD,CAAA;AAAA,GACH,CAAA;AAEJ;;;;"}
|
|
@@ -12,7 +12,6 @@ const RolloutDrawer = ({
|
|
|
12
12
|
rollout,
|
|
13
13
|
expanded
|
|
14
14
|
}) => {
|
|
15
|
-
var _a, _b;
|
|
16
15
|
return /* @__PURE__ */ React__default.createElement(
|
|
17
16
|
KubernetesStructuredMetadataTableDrawer,
|
|
18
17
|
{
|
|
@@ -30,7 +29,7 @@ const RolloutDrawer = ({
|
|
|
30
29
|
alignItems: "flex-start",
|
|
31
30
|
spacing: 0
|
|
32
31
|
},
|
|
33
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" },
|
|
32
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" }, rollout.metadata?.name ?? "unknown object")),
|
|
34
33
|
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { color: "textSecondary", variant: "subtitle1" }, "Rollout"))
|
|
35
34
|
)
|
|
36
35
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RolloutDrawer.esm.js","sources":["../../../../src/components/CustomResources/ArgoRollouts/RolloutDrawer.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 React from 'react';\nimport { KubernetesStructuredMetadataTableDrawer } from '../../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\n\nexport const RolloutDrawer = ({\n rollout,\n expanded,\n}: {\n rollout: any;\n expanded?: boolean;\n}) => {\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={rollout}\n expanded={expanded}\n kind=\"Rollout\"\n renderObject={() => ({})}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {rollout.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n Rollout\n </Typography>\n </Grid>\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;AAqBO,MAAM,gBAAgB,CAAC;AAAA,EAC5B,OAAA;AAAA,EACA,QAAA;AACF,CAGM,KAAA;
|
|
1
|
+
{"version":3,"file":"RolloutDrawer.esm.js","sources":["../../../../src/components/CustomResources/ArgoRollouts/RolloutDrawer.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 React from 'react';\nimport { KubernetesStructuredMetadataTableDrawer } from '../../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\n\nexport const RolloutDrawer = ({\n rollout,\n expanded,\n}: {\n rollout: any;\n expanded?: boolean;\n}) => {\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={rollout}\n expanded={expanded}\n kind=\"Rollout\"\n renderObject={() => ({})}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {rollout.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n Rollout\n </Typography>\n </Grid>\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;AAqBO,MAAM,gBAAgB,CAAC;AAAA,EAC5B,OAAA;AAAA,EACA,QAAA;AACF,CAGM,KAAA;AACJ,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,uCAAA;AAAA,IAAA;AAAA,MACC,MAAQ,EAAA,OAAA;AAAA,MACR,QAAA;AAAA,MACA,IAAK,EAAA,SAAA;AAAA,MACL,YAAA,EAAc,OAAO,EAAC,CAAA;AAAA,KAAA;AAAA,oBAEtBA,cAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,SAAS,EAAA,IAAA;AAAA,QACT,SAAU,EAAA,QAAA;AAAA,QACV,cAAe,EAAA,YAAA;AAAA,QACf,UAAW,EAAA,YAAA;AAAA,QACX,OAAS,EAAA,CAAA;AAAA,OAAA;AAAA,sBAERA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAA,kBACPA,cAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAA,EACjB,OAAQ,CAAA,QAAA,EAAU,IAAQ,IAAA,gBAC7B,CACF,CAAA;AAAA,sBACAA,cAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAI,IACR,EAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAM,eAAgB,EAAA,OAAA,EAAQ,WAAY,EAAA,EAAA,SAEtD,CACF,CAAA;AAAA,KACF;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -14,7 +14,6 @@ const DefaultCustomResourceDrawer = ({
|
|
|
14
14
|
customResourceName,
|
|
15
15
|
expanded
|
|
16
16
|
}) => {
|
|
17
|
-
var _a, _b;
|
|
18
17
|
const capitalizedName = capitalize(customResourceName);
|
|
19
18
|
return /* @__PURE__ */ React__default.createElement(
|
|
20
19
|
KubernetesStructuredMetadataTableDrawer,
|
|
@@ -33,7 +32,7 @@ const DefaultCustomResourceDrawer = ({
|
|
|
33
32
|
alignItems: "flex-start",
|
|
34
33
|
spacing: 0
|
|
35
34
|
},
|
|
36
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" },
|
|
35
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" }, customResource.metadata?.name ?? "unknown object")),
|
|
37
36
|
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { color: "textSecondary", variant: "subtitle1" }, capitalizedName))
|
|
38
37
|
)
|
|
39
38
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultCustomResourceDrawer.esm.js","sources":["../../../src/components/CustomResources/DefaultCustomResourceDrawer.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 React from 'react';\nimport { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\n\nconst capitalize = (str: string) =>\n str.charAt(0).toLocaleUpperCase('en-US') + str.slice(1);\n\nexport const DefaultCustomResourceDrawer = ({\n customResource,\n customResourceName,\n expanded,\n}: {\n customResource: any;\n customResourceName: string;\n expanded?: boolean;\n}) => {\n const capitalizedName = capitalize(customResourceName);\n\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={customResource}\n expanded={expanded}\n kind={capitalizedName}\n renderObject={cr => cr}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {customResource.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n {capitalizedName}\n </Typography>\n </Grid>\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;AAqBA,MAAM,UAAa,GAAA,CAAC,GAClB,KAAA,GAAA,CAAI,MAAO,CAAA,CAAC,CAAE,CAAA,iBAAA,CAAkB,OAAO,CAAA,GAAI,GAAI,CAAA,KAAA,CAAM,CAAC,CAAA,CAAA;AAEjD,MAAM,8BAA8B,CAAC;AAAA,EAC1C,cAAA;AAAA,EACA,kBAAA;AAAA,EACA,QAAA;AACF,CAIM,KAAA;
|
|
1
|
+
{"version":3,"file":"DefaultCustomResourceDrawer.esm.js","sources":["../../../src/components/CustomResources/DefaultCustomResourceDrawer.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 React from 'react';\nimport { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\n\nconst capitalize = (str: string) =>\n str.charAt(0).toLocaleUpperCase('en-US') + str.slice(1);\n\nexport const DefaultCustomResourceDrawer = ({\n customResource,\n customResourceName,\n expanded,\n}: {\n customResource: any;\n customResourceName: string;\n expanded?: boolean;\n}) => {\n const capitalizedName = capitalize(customResourceName);\n\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={customResource}\n expanded={expanded}\n kind={capitalizedName}\n renderObject={cr => cr}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {customResource.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n {capitalizedName}\n </Typography>\n </Grid>\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;AAqBA,MAAM,UAAa,GAAA,CAAC,GAClB,KAAA,GAAA,CAAI,MAAO,CAAA,CAAC,CAAE,CAAA,iBAAA,CAAkB,OAAO,CAAA,GAAI,GAAI,CAAA,KAAA,CAAM,CAAC,CAAA,CAAA;AAEjD,MAAM,8BAA8B,CAAC;AAAA,EAC1C,cAAA;AAAA,EACA,kBAAA;AAAA,EACA,QAAA;AACF,CAIM,KAAA;AACJ,EAAM,MAAA,eAAA,GAAkB,WAAW,kBAAkB,CAAA,CAAA;AAErD,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,uCAAA;AAAA,IAAA;AAAA,MACC,MAAQ,EAAA,cAAA;AAAA,MACR,QAAA;AAAA,MACA,IAAM,EAAA,eAAA;AAAA,MACN,cAAc,CAAM,EAAA,KAAA,EAAA;AAAA,KAAA;AAAA,oBAEpBA,cAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,SAAS,EAAA,IAAA;AAAA,QACT,SAAU,EAAA,QAAA;AAAA,QACV,cAAe,EAAA,YAAA;AAAA,QACf,UAAW,EAAA,YAAA;AAAA,QACX,OAAS,EAAA,CAAA;AAAA,OAAA;AAAA,sBAERA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAA,kBACPA,cAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAA,EACjB,cAAe,CAAA,QAAA,EAAU,IAAQ,IAAA,gBACpC,CACF,CAAA;AAAA,sBACAA,cAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAI,IACR,EAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAM,eAAgB,EAAA,OAAA,EAAQ,WACvC,EAAA,EAAA,eACH,CACF,CAAA;AAAA,KACF;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -82,10 +82,7 @@ const DaemonSetAccordion = ({
|
|
|
82
82
|
}) => {
|
|
83
83
|
const podNamesWithErrors = useContext(PodNamesWithErrorsContext);
|
|
84
84
|
const podsWithErrors = ownedPods.filter(
|
|
85
|
-
(p) =>
|
|
86
|
-
var _a, _b;
|
|
87
|
-
return podNamesWithErrors.has((_b = (_a = p.metadata) == null ? void 0 : _a.name) != null ? _b : "");
|
|
88
|
-
}
|
|
85
|
+
(p) => podNamesWithErrors.has(p.metadata?.name ?? "")
|
|
89
86
|
);
|
|
90
87
|
return /* @__PURE__ */ React__default.createElement(Accordion, { TransitionProps: { unmountOnExit: true }, variant: "outlined" }, /* @__PURE__ */ React__default.createElement(AccordionSummary, { expandIcon: /* @__PURE__ */ React__default.createElement(ExpandMoreIcon, null) }, /* @__PURE__ */ React__default.createElement(
|
|
91
88
|
DaemonSetSummary,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaemonSetsAccordions.esm.js","sources":["../../../src/components/DaemonSetsAccordions/DaemonSetsAccordions.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 React, { useContext } from 'react';\nimport Accordion from '@material-ui/core/Accordion';\nimport AccordionDetails from '@material-ui/core/AccordionDetails';\nimport AccordionSummary from '@material-ui/core/AccordionSummary';\nimport Grid from '@material-ui/core/Grid';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport { V1Pod, V1DaemonSet } from '@kubernetes/client-node';\nimport { PodsTable } from '../Pods';\nimport { DaemonSetDrawer } from './DaemonSetsDrawer';\nimport { getOwnedResources } from '../../utils/owner';\nimport {\n GroupedResponsesContext,\n PodNamesWithErrorsContext,\n} from '../../hooks';\nimport { StatusError, StatusOK } from '@backstage/core-components';\nimport { READY_COLUMNS, RESOURCE_COLUMNS } from '../Pods/PodsTable';\n\ntype DaemonSetsAccordionsProps = {\n children?: React.ReactNode;\n};\n\ntype DaemonSetAccordionProps = {\n daemonset: V1DaemonSet;\n ownedPods: V1Pod[];\n children?: React.ReactNode;\n};\n\ntype DaemonSetSummaryProps = {\n daemonset: V1DaemonSet;\n numberOfCurrentPods: number;\n numberOfPodsWithErrors: number;\n children?: React.ReactNode;\n};\n\nconst DaemonSetSummary = ({\n daemonset,\n numberOfCurrentPods,\n numberOfPodsWithErrors,\n}: DaemonSetSummaryProps) => {\n return (\n <Grid\n container\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={0}\n >\n <Grid xs={4} item>\n <DaemonSetDrawer daemonset={daemonset} />\n </Grid>\n <Grid\n item\n container\n xs={4}\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-end\"\n spacing={0}\n >\n <Grid item>\n <StatusOK>{numberOfCurrentPods} pods</StatusOK>\n </Grid>\n <Grid item>\n {numberOfPodsWithErrors > 0 ? (\n <StatusError>\n {numberOfPodsWithErrors} pod\n {numberOfPodsWithErrors > 1 ? 's' : ''} with errors\n </StatusError>\n ) : (\n <StatusOK>No pods with errors</StatusOK>\n )}\n </Grid>\n </Grid>\n </Grid>\n );\n};\n\nconst DaemonSetAccordion = ({\n daemonset,\n ownedPods,\n}: DaemonSetAccordionProps) => {\n const podNamesWithErrors = useContext(PodNamesWithErrorsContext);\n\n const podsWithErrors = ownedPods.filter(p =>\n podNamesWithErrors.has(p.metadata?.name ?? ''),\n );\n\n return (\n <Accordion TransitionProps={{ unmountOnExit: true }} variant=\"outlined\">\n <AccordionSummary expandIcon={<ExpandMoreIcon />}>\n <DaemonSetSummary\n daemonset={daemonset}\n numberOfCurrentPods={ownedPods.length}\n numberOfPodsWithErrors={podsWithErrors.length}\n />\n </AccordionSummary>\n <AccordionDetails>\n <PodsTable\n pods={ownedPods}\n extraColumns={[READY_COLUMNS, RESOURCE_COLUMNS]}\n />\n </AccordionDetails>\n </Accordion>\n );\n};\n\nexport const DaemonSetsAccordions = ({}: DaemonSetsAccordionsProps) => {\n const groupedResponses = useContext(GroupedResponsesContext);\n\n return (\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {groupedResponses.daemonSets.map((daemonset, i) => (\n <Grid container item key={i} xs>\n <Grid item xs>\n <DaemonSetAccordion\n ownedPods={getOwnedResources(daemonset, groupedResponses.pods)}\n daemonset={daemonset}\n />\n </Grid>\n </Grid>\n ))}\n </Grid>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,MAAM,mBAAmB,CAAC;AAAA,EACxB,SAAA;AAAA,EACA,mBAAA;AAAA,EACA,sBAAA;AACF,CAA6B,KAAA;AAC3B,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAS,EAAA,IAAA;AAAA,MACT,SAAU,EAAA,KAAA;AAAA,MACV,cAAe,EAAA,eAAA;AAAA,MACf,UAAW,EAAA,QAAA;AAAA,MACX,OAAS,EAAA,CAAA;AAAA,KAAA;AAAA,oBAETA,cAAA,CAAA,aAAA,CAAC,QAAK,EAAI,EAAA,CAAA,EAAG,MAAI,IACf,EAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,eAAgB,EAAA,EAAA,SAAA,EAAsB,CACzC,CAAA;AAAA,oBACAA,cAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,IAAI,EAAA,IAAA;AAAA,QACJ,SAAS,EAAA,IAAA;AAAA,QACT,EAAI,EAAA,CAAA;AAAA,QACJ,SAAU,EAAA,QAAA;AAAA,QACV,cAAe,EAAA,YAAA;AAAA,QACf,UAAW,EAAA,UAAA;AAAA,QACX,OAAS,EAAA,CAAA;AAAA,OAAA;AAAA,sBAETA,cAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAA,+CACP,QAAU,EAAA,IAAA,EAAA,mBAAA,EAAoB,OAAK,CACtC,CAAA;AAAA,mDACC,IAAK,EAAA,EAAA,IAAA,EAAI,QACP,sBAAyB,GAAA,CAAA,gDACvB,WACE,EAAA,IAAA,EAAA,sBAAA,EAAuB,QACvB,sBAAyB,GAAA,CAAA,GAAI,MAAM,EAAG,EAAA,cACzC,oBAECA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAA,EAAS,qBAAmB,CAEjC,CAAA;AAAA,KACF;AAAA,GACF,CAAA;AAEJ,CAAA,CAAA;AAEA,MAAM,qBAAqB,CAAC;AAAA,EAC1B,SAAA;AAAA,EACA,SAAA;AACF,CAA+B,KAAA;AAC7B,EAAM,MAAA,kBAAA,GAAqB,WAAW,yBAAyB,CAAA,CAAA;AAE/D,EAAA,MAAM,iBAAiB,SAAU,CAAA,MAAA;AAAA,IAAO,
|
|
1
|
+
{"version":3,"file":"DaemonSetsAccordions.esm.js","sources":["../../../src/components/DaemonSetsAccordions/DaemonSetsAccordions.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 React, { useContext } from 'react';\nimport Accordion from '@material-ui/core/Accordion';\nimport AccordionDetails from '@material-ui/core/AccordionDetails';\nimport AccordionSummary from '@material-ui/core/AccordionSummary';\nimport Grid from '@material-ui/core/Grid';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport { V1Pod, V1DaemonSet } from '@kubernetes/client-node';\nimport { PodsTable } from '../Pods';\nimport { DaemonSetDrawer } from './DaemonSetsDrawer';\nimport { getOwnedResources } from '../../utils/owner';\nimport {\n GroupedResponsesContext,\n PodNamesWithErrorsContext,\n} from '../../hooks';\nimport { StatusError, StatusOK } from '@backstage/core-components';\nimport { READY_COLUMNS, RESOURCE_COLUMNS } from '../Pods/PodsTable';\n\ntype DaemonSetsAccordionsProps = {\n children?: React.ReactNode;\n};\n\ntype DaemonSetAccordionProps = {\n daemonset: V1DaemonSet;\n ownedPods: V1Pod[];\n children?: React.ReactNode;\n};\n\ntype DaemonSetSummaryProps = {\n daemonset: V1DaemonSet;\n numberOfCurrentPods: number;\n numberOfPodsWithErrors: number;\n children?: React.ReactNode;\n};\n\nconst DaemonSetSummary = ({\n daemonset,\n numberOfCurrentPods,\n numberOfPodsWithErrors,\n}: DaemonSetSummaryProps) => {\n return (\n <Grid\n container\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={0}\n >\n <Grid xs={4} item>\n <DaemonSetDrawer daemonset={daemonset} />\n </Grid>\n <Grid\n item\n container\n xs={4}\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-end\"\n spacing={0}\n >\n <Grid item>\n <StatusOK>{numberOfCurrentPods} pods</StatusOK>\n </Grid>\n <Grid item>\n {numberOfPodsWithErrors > 0 ? (\n <StatusError>\n {numberOfPodsWithErrors} pod\n {numberOfPodsWithErrors > 1 ? 's' : ''} with errors\n </StatusError>\n ) : (\n <StatusOK>No pods with errors</StatusOK>\n )}\n </Grid>\n </Grid>\n </Grid>\n );\n};\n\nconst DaemonSetAccordion = ({\n daemonset,\n ownedPods,\n}: DaemonSetAccordionProps) => {\n const podNamesWithErrors = useContext(PodNamesWithErrorsContext);\n\n const podsWithErrors = ownedPods.filter(p =>\n podNamesWithErrors.has(p.metadata?.name ?? ''),\n );\n\n return (\n <Accordion TransitionProps={{ unmountOnExit: true }} variant=\"outlined\">\n <AccordionSummary expandIcon={<ExpandMoreIcon />}>\n <DaemonSetSummary\n daemonset={daemonset}\n numberOfCurrentPods={ownedPods.length}\n numberOfPodsWithErrors={podsWithErrors.length}\n />\n </AccordionSummary>\n <AccordionDetails>\n <PodsTable\n pods={ownedPods}\n extraColumns={[READY_COLUMNS, RESOURCE_COLUMNS]}\n />\n </AccordionDetails>\n </Accordion>\n );\n};\n\nexport const DaemonSetsAccordions = ({}: DaemonSetsAccordionsProps) => {\n const groupedResponses = useContext(GroupedResponsesContext);\n\n return (\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {groupedResponses.daemonSets.map((daemonset, i) => (\n <Grid container item key={i} xs>\n <Grid item xs>\n <DaemonSetAccordion\n ownedPods={getOwnedResources(daemonset, groupedResponses.pods)}\n daemonset={daemonset}\n />\n </Grid>\n </Grid>\n ))}\n </Grid>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,MAAM,mBAAmB,CAAC;AAAA,EACxB,SAAA;AAAA,EACA,mBAAA;AAAA,EACA,sBAAA;AACF,CAA6B,KAAA;AAC3B,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAS,EAAA,IAAA;AAAA,MACT,SAAU,EAAA,KAAA;AAAA,MACV,cAAe,EAAA,eAAA;AAAA,MACf,UAAW,EAAA,QAAA;AAAA,MACX,OAAS,EAAA,CAAA;AAAA,KAAA;AAAA,oBAETA,cAAA,CAAA,aAAA,CAAC,QAAK,EAAI,EAAA,CAAA,EAAG,MAAI,IACf,EAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,eAAgB,EAAA,EAAA,SAAA,EAAsB,CACzC,CAAA;AAAA,oBACAA,cAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,IAAI,EAAA,IAAA;AAAA,QACJ,SAAS,EAAA,IAAA;AAAA,QACT,EAAI,EAAA,CAAA;AAAA,QACJ,SAAU,EAAA,QAAA;AAAA,QACV,cAAe,EAAA,YAAA;AAAA,QACf,UAAW,EAAA,UAAA;AAAA,QACX,OAAS,EAAA,CAAA;AAAA,OAAA;AAAA,sBAETA,cAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAA,+CACP,QAAU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,EAAe,gBAAgB,CAAA;AAAA,KAAA;AAAA,GAElD,CACF,CAAA,CAAA;AAEJ,CAAA,CAAA;AAEa,MAAA,oBAAA,GAAuB,CAAC,EAAkC,KAAA;AACrE,EAAM,MAAA,gBAAA,GAAmB,WAAW,uBAAuB,CAAA,CAAA;AAE3D,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAS,EAAA,IAAA;AAAA,MACT,SAAU,EAAA,QAAA;AAAA,MACV,cAAe,EAAA,YAAA;AAAA,MACf,UAAW,EAAA,YAAA;AAAA,KAAA;AAAA,IAEV,gBAAA,CAAiB,WAAW,GAAI,CAAA,CAAC,WAAW,CAC3C,qBAAAA,cAAA,CAAA,aAAA,CAAC,QAAK,SAAS,EAAA,IAAA,EAAC,MAAI,IAAC,EAAA,GAAA,EAAK,GAAG,EAAE,EAAA,IAAA,EAAA,+CAC5B,IAAK,EAAA,EAAA,IAAA,EAAI,IAAC,EAAA,EAAA,EAAE,IACX,EAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACC,SAAW,EAAA,iBAAA,CAAkB,SAAW,EAAA,gBAAA,CAAiB,IAAI,CAAA;AAAA,QAC7D,SAAA;AAAA,OAAA;AAAA,KAEJ,CACF,CACD,CAAA;AAAA,GACH,CAAA;AAEJ;;;;"}
|
|
@@ -13,8 +13,7 @@ const DaemonSetDrawer = ({
|
|
|
13
13
|
daemonset,
|
|
14
14
|
expanded
|
|
15
15
|
}) => {
|
|
16
|
-
|
|
17
|
-
const namespace = (_a = daemonset.metadata) == null ? void 0 : _a.namespace;
|
|
16
|
+
const namespace = daemonset.metadata?.namespace;
|
|
18
17
|
return /* @__PURE__ */ React__default.createElement(
|
|
19
18
|
KubernetesStructuredMetadataTableDrawer,
|
|
20
19
|
{
|
|
@@ -22,16 +21,15 @@ const DaemonSetDrawer = ({
|
|
|
22
21
|
expanded,
|
|
23
22
|
kind: "DaemonSet",
|
|
24
23
|
renderObject: (daemonsetObj) => {
|
|
25
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
26
24
|
return {
|
|
27
|
-
updateStrategyType:
|
|
28
|
-
minReadySeconds:
|
|
29
|
-
revisionHistoryLimit:
|
|
30
|
-
currentNumberScheduled:
|
|
31
|
-
desiredNumberScheduled:
|
|
32
|
-
numberAvailable:
|
|
33
|
-
numberMisscheduled:
|
|
34
|
-
numberReady:
|
|
25
|
+
updateStrategyType: daemonsetObj.spec?.updateStrategy?.type ?? "???",
|
|
26
|
+
minReadySeconds: daemonsetObj.spec?.minReadySeconds ?? "???",
|
|
27
|
+
revisionHistoryLimit: daemonsetObj.spec?.revisionHistoryLimit ?? "???",
|
|
28
|
+
currentNumberScheduled: daemonsetObj.status?.currentNumberScheduled ?? "???",
|
|
29
|
+
desiredNumberScheduled: daemonsetObj.status?.desiredNumberScheduled ?? "???",
|
|
30
|
+
numberAvailable: daemonsetObj.status?.numberAvailable ?? "???",
|
|
31
|
+
numberMisscheduled: daemonsetObj.status?.numberMisscheduled ?? "???",
|
|
32
|
+
numberReady: daemonsetObj.status?.numberReady ?? "???"
|
|
35
33
|
};
|
|
36
34
|
}
|
|
37
35
|
},
|
|
@@ -44,7 +42,7 @@ const DaemonSetDrawer = ({
|
|
|
44
42
|
alignItems: "flex-start",
|
|
45
43
|
spacing: 0
|
|
46
44
|
},
|
|
47
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" },
|
|
45
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" }, daemonset.metadata?.name ?? "unknown object")),
|
|
48
46
|
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { color: "textSecondary", variant: "subtitle1" }, "DaemonSet")),
|
|
49
47
|
namespace && /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Chip, { size: "small", label: `namespace: ${namespace}` }))
|
|
50
48
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaemonSetsDrawer.esm.js","sources":["../../../src/components/DaemonSetsAccordions/DaemonSetsDrawer.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 React from 'react';\nimport { V1DaemonSet } from '@kubernetes/client-node';\nimport { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\nimport Chip from '@material-ui/core/Chip';\n\nexport const DaemonSetDrawer = ({\n daemonset,\n expanded,\n}: {\n daemonset: V1DaemonSet;\n expanded?: boolean;\n}) => {\n const namespace = daemonset.metadata?.namespace;\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={daemonset}\n expanded={expanded}\n kind=\"DaemonSet\"\n renderObject={(daemonsetObj: V1DaemonSet) => {\n return {\n updateStrategyType: daemonsetObj.spec?.updateStrategy?.type ?? '???',\n minReadySeconds: daemonsetObj.spec?.minReadySeconds ?? '???',\n revisionHistoryLimit:\n daemonsetObj.spec?.revisionHistoryLimit ?? '???',\n currentNumberScheduled:\n daemonsetObj.status?.currentNumberScheduled ?? '???',\n desiredNumberScheduled:\n daemonsetObj.status?.desiredNumberScheduled ?? '???',\n numberAvailable: daemonsetObj.status?.numberAvailable ?? '???',\n numberMisscheduled: daemonsetObj.status?.numberMisscheduled ?? '???',\n numberReady: daemonsetObj.status?.numberReady ?? '???',\n };\n }}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {daemonset.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n DaemonSet\n </Typography>\n </Grid>\n {namespace && (\n <Grid item>\n <Chip size=\"small\" label={`namespace: ${namespace}`} />\n </Grid>\n )}\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"
|
|
1
|
+
{"version":3,"file":"DaemonSetsDrawer.esm.js","sources":["../../../src/components/DaemonSetsAccordions/DaemonSetsDrawer.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 React from 'react';\nimport { V1DaemonSet } from '@kubernetes/client-node';\nimport { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\nimport Chip from '@material-ui/core/Chip';\n\nexport const DaemonSetDrawer = ({\n daemonset,\n expanded,\n}: {\n daemonset: V1DaemonSet;\n expanded?: boolean;\n}) => {\n const namespace = daemonset.metadata?.namespace;\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={daemonset}\n expanded={expanded}\n kind=\"DaemonSet\"\n renderObject={(daemonsetObj: V1DaemonSet) => {\n return {\n updateStrategyType: daemonsetObj.spec?.updateStrategy?.type ?? '???',\n minReadySeconds: daemonsetObj.spec?.minReadySeconds ?? '???',\n revisionHistoryLimit:\n daemonsetObj.spec?.revisionHistoryLimit ?? '???',\n currentNumberScheduled:\n daemonsetObj.status?.currentNumberScheduled ?? '???',\n desiredNumberScheduled:\n daemonsetObj.status?.desiredNumberScheduled ?? '???',\n numberAvailable: daemonsetObj.status?.numberAvailable ?? '???',\n numberMisscheduled: daemonsetObj.status?.numberMisscheduled ?? '???',\n numberReady: daemonsetObj.status?.numberReady ?? '???',\n };\n }}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {daemonset.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n DaemonSet\n </Typography>\n </Grid>\n {namespace && (\n <Grid item>\n <Chip size=\"small\" label={`namespace: ${namespace}`} />\n </Grid>\n )}\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;AAuBO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,SAAA;AAAA,EACA,QAAA;AACF,CAGM,KAAA;AACJ,EAAM,MAAA,SAAA,GAAY,UAAU,QAAU,EAAA,SAAA,CAAA;AACtC,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,uCAAA;AAAA,IAAA;AAAA,MACC,MAAQ,EAAA,SAAA;AAAA,MACR,QAAA;AAAA,MACA,IAAK,EAAA,WAAA;AAAA,MACL,YAAA,EAAc,CAAC,YAA8B,KAAA;AAC3C,QAAO,OAAA;AAAA,UACL,kBAAoB,EAAA,YAAA,CAAa,IAAM,EAAA,cAAA,EAAgB,IAAQ,IAAA,KAAA;AAAA,UAC/D,eAAA,EAAiB,YAAa,CAAA,IAAA,EAAM,eAAmB,IAAA,KAAA;AAAA,UACvD,oBAAA,EACE,YAAa,CAAA,IAAA,EAAM,oBAAwB,IAAA,KAAA;AAAA,U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ACvD,CAAA;AAAA,KAEJ;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -14,8 +14,7 @@ const DeploymentDrawer = ({
|
|
|
14
14
|
deployment,
|
|
15
15
|
expanded
|
|
16
16
|
}) => {
|
|
17
|
-
|
|
18
|
-
const namespace = (_a = deployment.metadata) == null ? void 0 : _a.namespace;
|
|
17
|
+
const namespace = deployment.metadata?.namespace;
|
|
19
18
|
return /* @__PURE__ */ React__default.createElement(
|
|
20
19
|
KubernetesStructuredMetadataTableDrawer,
|
|
21
20
|
{
|
|
@@ -23,15 +22,14 @@ const DeploymentDrawer = ({
|
|
|
23
22
|
expanded,
|
|
24
23
|
kind: "Deployment",
|
|
25
24
|
renderObject: (deploymentObj) => {
|
|
26
|
-
|
|
27
|
-
const conditions = ((_b2 = (_a2 = deploymentObj.status) == null ? void 0 : _a2.conditions) != null ? _b2 : []).map(renderCondition).reduce((accum, next) => {
|
|
25
|
+
const conditions = (deploymentObj.status?.conditions ?? []).map(renderCondition).reduce((accum, next) => {
|
|
28
26
|
accum[next[0]] = next[1];
|
|
29
27
|
return accum;
|
|
30
28
|
}, {});
|
|
31
29
|
return {
|
|
32
|
-
strategy:
|
|
33
|
-
minReadySeconds:
|
|
34
|
-
progressDeadlineSeconds:
|
|
30
|
+
strategy: deploymentObj.spec?.strategy ?? "???",
|
|
31
|
+
minReadySeconds: deploymentObj.spec?.minReadySeconds ?? "???",
|
|
32
|
+
progressDeadlineSeconds: deploymentObj.spec?.progressDeadlineSeconds ?? "???",
|
|
35
33
|
...conditions
|
|
36
34
|
};
|
|
37
35
|
}
|
|
@@ -45,7 +43,7 @@ const DeploymentDrawer = ({
|
|
|
45
43
|
alignItems: "flex-start",
|
|
46
44
|
spacing: 0
|
|
47
45
|
},
|
|
48
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" },
|
|
46
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" }, deployment.metadata?.name ?? "unknown object")),
|
|
49
47
|
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { color: "textSecondary", variant: "subtitle1" }, "Deployment")),
|
|
50
48
|
namespace && /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Chip, { size: "small", label: `namespace: ${namespace}` }))
|
|
51
49
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeploymentDrawer.esm.js","sources":["../../../src/components/DeploymentsAccordions/DeploymentDrawer.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 React from 'react';\nimport { V1Deployment } from '@kubernetes/client-node';\nimport { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer';\nimport { renderCondition } from '../../utils/pod';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\nimport Chip from '@material-ui/core/Chip';\n\nexport const DeploymentDrawer = ({\n deployment,\n expanded,\n}: {\n deployment: V1Deployment;\n expanded?: boolean;\n}) => {\n const namespace = deployment.metadata?.namespace;\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={deployment}\n expanded={expanded}\n kind=\"Deployment\"\n renderObject={(deploymentObj: V1Deployment) => {\n const conditions = (deploymentObj.status?.conditions ?? [])\n .map(renderCondition)\n .reduce((accum, next) => {\n accum[next[0]] = next[1];\n return accum;\n }, {} as { [key: string]: React.ReactNode });\n\n return {\n strategy: deploymentObj.spec?.strategy ?? '???',\n minReadySeconds: deploymentObj.spec?.minReadySeconds ?? '???',\n progressDeadlineSeconds:\n deploymentObj.spec?.progressDeadlineSeconds ?? '???',\n ...conditions,\n };\n }}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {deployment.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n Deployment\n </Typography>\n </Grid>\n {namespace && (\n <Grid item>\n <Chip size=\"small\" label={`namespace: ${namespace}`} />\n </Grid>\n )}\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"
|
|
1
|
+
{"version":3,"file":"DeploymentDrawer.esm.js","sources":["../../../src/components/DeploymentsAccordions/DeploymentDrawer.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 React from 'react';\nimport { V1Deployment } from '@kubernetes/client-node';\nimport { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer';\nimport { renderCondition } from '../../utils/pod';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\nimport Chip from '@material-ui/core/Chip';\n\nexport const DeploymentDrawer = ({\n deployment,\n expanded,\n}: {\n deployment: V1Deployment;\n expanded?: boolean;\n}) => {\n const namespace = deployment.metadata?.namespace;\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={deployment}\n expanded={expanded}\n kind=\"Deployment\"\n renderObject={(deploymentObj: V1Deployment) => {\n const conditions = (deploymentObj.status?.conditions ?? [])\n .map(renderCondition)\n .reduce((accum, next) => {\n accum[next[0]] = next[1];\n return accum;\n }, {} as { [key: string]: React.ReactNode });\n\n return {\n strategy: deploymentObj.spec?.strategy ?? '???',\n minReadySeconds: deploymentObj.spec?.minReadySeconds ?? '???',\n progressDeadlineSeconds:\n deploymentObj.spec?.progressDeadlineSeconds ?? '???',\n ...conditions,\n };\n }}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {deployment.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n Deployment\n </Typography>\n </Grid>\n {namespace && (\n <Grid item>\n <Chip size=\"small\" label={`namespace: ${namespace}`} />\n </Grid>\n )}\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;AAwBO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,UAAA;AAAA,EACA,QAAA;AACF,CAGM,KAAA;AACJ,EAAM,MAAA,SAAA,GAAY,WAAW,QAAU,EAAA,SAAA,CAAA;AACvC,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,uCAAA;AAAA,IAAA;AAAA,MACC,MAAQ,EAAA,UAAA;AAAA,MACR,QAAA;AAAA,MACA,IAAK,EAAA,YAAA;AAAA,MACL,YAAA,EAAc,CAAC,aAAgC,KAAA;AAC7C,QAAA,MAAM,UAAc,GAAA,CAAA,aAAA,CAAc,MAAQ,EAAA,UAAA,IAAc,EAAC,EACtD,GAAI,CAAA,eAAe,CACnB,CAAA,MAAA,CAAO,CAAC,KAAA,EAAO,IAAS,KAAA;AACvB,UAAA,KAAA,CAAM,IAAK,CAAA,CAAC,CAAC,CAAA,GAAI,KAAK,CAAC,CAAA,CAAA;AACvB,UAAO,OAAA,KAAA,CAAA;AA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,7 +52,6 @@ const DeploymentSummary = ({
|
|
|
52
52
|
numberOfPodsWithErrors,
|
|
53
53
|
hpa
|
|
54
54
|
}) => {
|
|
55
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
56
55
|
return /* @__PURE__ */ React__default.createElement(
|
|
57
56
|
Grid,
|
|
58
57
|
{
|
|
@@ -73,9 +72,9 @@ const DeploymentSummary = ({
|
|
|
73
72
|
alignItems: "flex-start",
|
|
74
73
|
spacing: 0
|
|
75
74
|
},
|
|
76
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "min replicas ",
|
|
77
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "current CPU usage:", " ",
|
|
78
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "target CPU usage:", " ",
|
|
75
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "min replicas ", hpa.spec?.minReplicas ?? "?", " / max replicas", " ", hpa.spec?.maxReplicas ?? "?")),
|
|
76
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "current CPU usage:", " ", hpa.status?.currentCPUUtilizationPercentage ?? "?", "%")),
|
|
77
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "subtitle2" }, "target CPU usage:", " ", hpa.spec?.targetCPUUtilizationPercentage ?? "?", "%"))
|
|
79
78
|
))),
|
|
80
79
|
/* @__PURE__ */ React__default.createElement(
|
|
81
80
|
Grid,
|
|
@@ -100,10 +99,7 @@ const DeploymentAccordion = ({
|
|
|
100
99
|
}) => {
|
|
101
100
|
const podNamesWithErrors = useContext(PodNamesWithErrorsContext);
|
|
102
101
|
const podsWithErrors = ownedPods.filter(
|
|
103
|
-
(p) =>
|
|
104
|
-
var _a, _b;
|
|
105
|
-
return podNamesWithErrors.has((_b = (_a = p.metadata) == null ? void 0 : _a.name) != null ? _b : "");
|
|
106
|
-
}
|
|
102
|
+
(p) => podNamesWithErrors.has(p.metadata?.name ?? "")
|
|
107
103
|
);
|
|
108
104
|
return /* @__PURE__ */ React__default.createElement(Accordion, { TransitionProps: { unmountOnExit: true }, variant: "outlined" }, /* @__PURE__ */ React__default.createElement(AccordionSummary, { expandIcon: /* @__PURE__ */ React__default.createElement(ExpandMoreIcon, null) }, /* @__PURE__ */ React__default.createElement(
|
|
109
105
|
DeploymentSummary,
|
|
@@ -131,28 +127,25 @@ const DeploymentsAccordions = ({}) => {
|
|
|
131
127
|
justifyContent: "flex-start",
|
|
132
128
|
alignItems: "flex-start"
|
|
133
129
|
},
|
|
134
|
-
groupedResponses.deployments.map((deployment, i) => {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
)));
|
|
155
|
-
})
|
|
130
|
+
groupedResponses.deployments.map((deployment, i) => /* @__PURE__ */ React__default.createElement(Grid, { container: true, item: true, key: i, xs: true }, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: true }, /* @__PURE__ */ React__default.createElement(
|
|
131
|
+
DeploymentAccordion,
|
|
132
|
+
{
|
|
133
|
+
matchingHpa: getMatchingHpa(
|
|
134
|
+
{
|
|
135
|
+
name: deployment.metadata?.name,
|
|
136
|
+
namespace: deployment.metadata?.namespace,
|
|
137
|
+
kind: "deployment"
|
|
138
|
+
},
|
|
139
|
+
groupedResponses.horizontalPodAutoscalers
|
|
140
|
+
),
|
|
141
|
+
ownedPods: getOwnedPodsThroughReplicaSets(
|
|
142
|
+
deployment,
|
|
143
|
+
groupedResponses.replicaSets,
|
|
144
|
+
groupedResponses.pods
|
|
145
|
+
),
|
|
146
|
+
deployment
|
|
147
|
+
}
|
|
148
|
+
))))
|
|
156
149
|
);
|
|
157
150
|
};
|
|
158
151
|
|