@backstage/plugin-kubernetes-react 0.5.5 → 0.5.6-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/components/Cluster/Cluster.esm.js +64 -39
- package/dist/components/Cluster/Cluster.esm.js.map +1 -1
- package/dist/components/CronJobsAccordions/CronJobsAccordions.esm.js +44 -32
- package/dist/components/CronJobsAccordions/CronJobsAccordions.esm.js.map +1 -1
- package/dist/components/CronJobsAccordions/CronJobsDrawer.esm.js +20 -17
- package/dist/components/CronJobsAccordions/CronJobsDrawer.esm.js.map +1 -1
- package/dist/components/CustomResources/ArgoRollouts/Rollout.esm.js +149 -100
- package/dist/components/CustomResources/ArgoRollouts/Rollout.esm.js.map +1 -1
- package/dist/components/CustomResources/ArgoRollouts/RolloutDrawer.esm.js +20 -17
- package/dist/components/CustomResources/ArgoRollouts/RolloutDrawer.esm.js.map +1 -1
- package/dist/components/CustomResources/ArgoRollouts/StepsProgress.esm.js +8 -5
- package/dist/components/CustomResources/ArgoRollouts/StepsProgress.esm.js.map +1 -1
- package/dist/components/CustomResources/CustomResources.esm.js +8 -7
- package/dist/components/CustomResources/CustomResources.esm.js.map +1 -1
- package/dist/components/CustomResources/DefaultCustomResource.esm.js +41 -39
- package/dist/components/CustomResources/DefaultCustomResource.esm.js.map +1 -1
- package/dist/components/CustomResources/DefaultCustomResourceDrawer.esm.js +19 -16
- package/dist/components/CustomResources/DefaultCustomResourceDrawer.esm.js.map +1 -1
- package/dist/components/DaemonSetsAccordions/DaemonSetsAccordions.esm.js +59 -43
- package/dist/components/DaemonSetsAccordions/DaemonSetsAccordions.esm.js.map +1 -1
- package/dist/components/DaemonSetsAccordions/DaemonSetsDrawer.esm.js +19 -16
- package/dist/components/DaemonSetsAccordions/DaemonSetsDrawer.esm.js.map +1 -1
- package/dist/components/DeploymentsAccordions/DeploymentDrawer.esm.js +19 -16
- package/dist/components/DeploymentsAccordions/DeploymentDrawer.esm.js.map +1 -1
- package/dist/components/DeploymentsAccordions/DeploymentsAccordions.esm.js +102 -70
- package/dist/components/DeploymentsAccordions/DeploymentsAccordions.esm.js.map +1 -1
- package/dist/components/ErrorPanel/ErrorPanel.esm.js +21 -9
- package/dist/components/ErrorPanel/ErrorPanel.esm.js.map +1 -1
- package/dist/components/ErrorReporting/ErrorReporting.esm.js +7 -4
- package/dist/components/ErrorReporting/ErrorReporting.esm.js.map +1 -1
- package/dist/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.esm.js +6 -5
- package/dist/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.esm.js.map +1 -1
- package/dist/components/IngressesAccordions/IngressDrawer.esm.js +19 -16
- package/dist/components/IngressesAccordions/IngressDrawer.esm.js.map +1 -1
- package/dist/components/IngressesAccordions/IngressesAccordions.esm.js +15 -11
- package/dist/components/IngressesAccordions/IngressesAccordions.esm.js.map +1 -1
- package/dist/components/JobsAccordions/JobsAccordions.esm.js +49 -31
- package/dist/components/JobsAccordions/JobsAccordions.esm.js.map +1 -1
- package/dist/components/JobsAccordions/JobsDrawer.esm.js +18 -15
- package/dist/components/JobsAccordions/JobsDrawer.esm.js.map +1 -1
- package/dist/components/KubernetesDialog/KubernetesDialog.esm.js +40 -31
- package/dist/components/KubernetesDialog/KubernetesDialog.esm.js.map +1 -1
- package/dist/components/KubernetesDrawer/KubernetesDrawer.esm.js +57 -42
- package/dist/components/KubernetesDrawer/KubernetesDrawer.esm.js.map +1 -1
- package/dist/components/KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.esm.js +95 -75
- package/dist/components/KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.esm.js.map +1 -1
- package/dist/components/KubernetesDrawer/ManifestYaml.esm.js +36 -32
- package/dist/components/KubernetesDrawer/ManifestYaml.esm.js.map +1 -1
- package/dist/components/PodExecTerminal/PodExecTerminal.esm.js +4 -3
- package/dist/components/PodExecTerminal/PodExecTerminal.esm.js.map +1 -1
- package/dist/components/PodExecTerminal/PodExecTerminalDialog.esm.js +7 -6
- package/dist/components/PodExecTerminal/PodExecTerminalDialog.esm.js.map +1 -1
- package/dist/components/Pods/ErrorList/ErrorList.esm.js +27 -21
- package/dist/components/Pods/ErrorList/ErrorList.esm.js.map +1 -1
- package/dist/components/Pods/Events/Events.esm.js +30 -23
- package/dist/components/Pods/Events/Events.esm.js.map +1 -1
- package/dist/components/Pods/FixDialog/FixDialog.esm.js +85 -51
- package/dist/components/Pods/FixDialog/FixDialog.esm.js.map +1 -1
- package/dist/components/Pods/PodDelete/PodDeleteButton.esm.js +25 -21
- package/dist/components/Pods/PodDelete/PodDeleteButton.esm.js.map +1 -1
- package/dist/components/Pods/PodDrawer/ContainerCard.esm.js +137 -95
- package/dist/components/Pods/PodDrawer/ContainerCard.esm.js.map +1 -1
- package/dist/components/Pods/PodDrawer/PendingPodContent.esm.js +36 -9
- package/dist/components/Pods/PodDrawer/PendingPodContent.esm.js.map +1 -1
- package/dist/components/Pods/PodDrawer/PodDrawer.esm.js +89 -64
- package/dist/components/Pods/PodDrawer/PodDrawer.esm.js.map +1 -1
- package/dist/components/Pods/PodLogs/PodLogs.esm.js +30 -25
- package/dist/components/Pods/PodLogs/PodLogs.esm.js.map +1 -1
- package/dist/components/Pods/PodLogs/PodLogsDialog.esm.js +6 -6
- package/dist/components/Pods/PodLogs/PodLogsDialog.esm.js.map +1 -1
- package/dist/components/Pods/PodsTable.esm.js +12 -11
- package/dist/components/Pods/PodsTable.esm.js.map +1 -1
- package/dist/components/ResourceUtilization/ResourceUtilization.esm.js +24 -15
- package/dist/components/ResourceUtilization/ResourceUtilization.esm.js.map +1 -1
- package/dist/components/ServicesAccordions/ServiceDrawer.esm.js +19 -16
- package/dist/components/ServicesAccordions/ServiceDrawer.esm.js.map +1 -1
- package/dist/components/ServicesAccordions/ServicesAccordions.esm.js +21 -12
- package/dist/components/ServicesAccordions/ServicesAccordions.esm.js.map +1 -1
- package/dist/components/StatefulSetsAccordions/StatefulSetDrawer.esm.js +19 -16
- package/dist/components/StatefulSetsAccordions/StatefulSetDrawer.esm.js.map +1 -1
- package/dist/components/StatefulSetsAccordions/StatefulSetsAccordions.esm.js +98 -66
- package/dist/components/StatefulSetsAccordions/StatefulSetsAccordions.esm.js.map +1 -1
- package/dist/hooks/Cluster.esm.js +2 -2
- package/dist/hooks/Cluster.esm.js.map +1 -1
- package/dist/hooks/GroupedResponses.esm.js +2 -2
- package/dist/hooks/GroupedResponses.esm.js.map +1 -1
- package/dist/hooks/PodNamesWithErrors.esm.js +2 -2
- package/dist/hooks/PodNamesWithErrors.esm.js.map +1 -1
- package/dist/hooks/PodNamesWithMetrics.esm.js +2 -2
- package/dist/hooks/PodNamesWithMetrics.esm.js.map +1 -1
- package/dist/hooks/useMatchingErrors.esm.js +2 -2
- package/dist/hooks/useMatchingErrors.esm.js.map +1 -1
- package/dist/hooks/usePodMetrics.esm.js +4 -2
- package/dist/hooks/usePodMetrics.esm.js.map +1 -1
- package/dist/index.d.ts +47 -46
- package/dist/utils/pod.esm.js +25 -15
- package/dist/utils/pod.esm.js.map +1 -1
- package/package.json +13 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import Accordion from '@material-ui/core/Accordion';
|
|
3
3
|
import AccordionDetails from '@material-ui/core/AccordionDetails';
|
|
4
4
|
import AccordionSummary from '@material-ui/core/AccordionSummary';
|
|
@@ -11,22 +11,22 @@ const DefaultCustomResourceSummary = ({
|
|
|
11
11
|
customResource,
|
|
12
12
|
customResourceName
|
|
13
13
|
}) => {
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
15
|
Grid,
|
|
16
16
|
{
|
|
17
17
|
container: true,
|
|
18
18
|
direction: "row",
|
|
19
19
|
justifyContent: "space-between",
|
|
20
20
|
alignItems: "center",
|
|
21
|
-
spacing: 0
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
21
|
+
spacing: 0,
|
|
22
|
+
children: /* @__PURE__ */ jsx(Grid, { xs: 12, item: true, children: /* @__PURE__ */ jsx(
|
|
23
|
+
DefaultCustomResourceDrawer,
|
|
24
|
+
{
|
|
25
|
+
customResource,
|
|
26
|
+
customResourceName
|
|
27
|
+
}
|
|
28
|
+
) })
|
|
29
|
+
}
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
const DefaultCustomResourceAccordion = ({
|
|
@@ -34,27 +34,29 @@ const DefaultCustomResourceAccordion = ({
|
|
|
34
34
|
customResourceName,
|
|
35
35
|
defaultExpanded
|
|
36
36
|
}) => {
|
|
37
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsxs(
|
|
38
38
|
Accordion,
|
|
39
39
|
{
|
|
40
40
|
defaultExpanded,
|
|
41
41
|
TransitionProps: { unmountOnExit: true },
|
|
42
|
-
variant: "outlined"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
variant: "outlined",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(AccordionSummary, { expandIcon: /* @__PURE__ */ jsx(ExpandMoreIcon, {}), children: /* @__PURE__ */ jsx(
|
|
45
|
+
DefaultCustomResourceSummary,
|
|
46
|
+
{
|
|
47
|
+
customResource,
|
|
48
|
+
customResourceName
|
|
49
|
+
}
|
|
50
|
+
) }),
|
|
51
|
+
/* @__PURE__ */ jsx(AccordionDetails, { children: Object.prototype.hasOwnProperty.call(customResource, "status") && /* @__PURE__ */ jsx(
|
|
52
|
+
StructuredMetadataTable,
|
|
53
|
+
{
|
|
54
|
+
metadata: customResource.status,
|
|
55
|
+
options: { nestedValuesAsYaml: true }
|
|
56
|
+
}
|
|
57
|
+
) })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
58
60
|
);
|
|
59
61
|
};
|
|
60
62
|
const DefaultCustomResourceAccordions = ({
|
|
@@ -62,22 +64,22 @@ const DefaultCustomResourceAccordions = ({
|
|
|
62
64
|
customResourceName,
|
|
63
65
|
defaultExpanded = false
|
|
64
66
|
}) => {
|
|
65
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ jsx(
|
|
66
68
|
Grid,
|
|
67
69
|
{
|
|
68
70
|
container: true,
|
|
69
71
|
direction: "column",
|
|
70
72
|
justifyContent: "flex-start",
|
|
71
|
-
alignItems: "flex-start"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
73
|
+
alignItems: "flex-start",
|
|
74
|
+
children: customResources.map((cr, i) => /* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: true, children: /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
75
|
+
DefaultCustomResourceAccordion,
|
|
76
|
+
{
|
|
77
|
+
defaultExpanded,
|
|
78
|
+
customResource: cr,
|
|
79
|
+
customResourceName
|
|
80
|
+
}
|
|
81
|
+
) }) }, i))
|
|
82
|
+
}
|
|
81
83
|
);
|
|
82
84
|
};
|
|
83
85
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultCustomResource.esm.js","sources":["../../../src/components/CustomResources/DefaultCustomResource.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":"DefaultCustomResource.esm.js","sources":["../../../src/components/CustomResources/DefaultCustomResource.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 { ReactNode } 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 { DefaultCustomResourceDrawer } from './DefaultCustomResourceDrawer';\nimport { StructuredMetadataTable } from '@backstage/core-components';\n\ntype DefaultCustomResourceAccordionsProps = {\n customResources: any[];\n customResourceName: string;\n defaultExpanded?: boolean;\n children?: ReactNode;\n};\n\ntype DefaultCustomResourceAccordionProps = {\n customResource: any;\n customResourceName: string;\n defaultExpanded?: boolean;\n children?: ReactNode;\n};\n\ntype DefaultCustomResourceSummaryProps = {\n customResource: any;\n customResourceName: string;\n children?: ReactNode;\n};\n\nconst DefaultCustomResourceSummary = ({\n customResource,\n customResourceName,\n}: DefaultCustomResourceSummaryProps) => {\n return (\n <Grid\n container\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={0}\n >\n <Grid xs={12} item>\n <DefaultCustomResourceDrawer\n customResource={customResource}\n customResourceName={customResourceName}\n />\n </Grid>\n </Grid>\n );\n};\n\nconst DefaultCustomResourceAccordion = ({\n customResource,\n customResourceName,\n defaultExpanded,\n}: DefaultCustomResourceAccordionProps) => {\n return (\n <Accordion\n defaultExpanded={defaultExpanded}\n TransitionProps={{ unmountOnExit: true }}\n variant=\"outlined\"\n >\n <AccordionSummary expandIcon={<ExpandMoreIcon />}>\n <DefaultCustomResourceSummary\n customResource={customResource}\n customResourceName={customResourceName}\n />\n </AccordionSummary>\n <AccordionDetails>\n {Object.prototype.hasOwnProperty.call(customResource, 'status') && (\n <StructuredMetadataTable\n metadata={customResource.status}\n options={{ nestedValuesAsYaml: true }}\n />\n )}\n </AccordionDetails>\n </Accordion>\n );\n};\n\nexport const DefaultCustomResourceAccordions = ({\n customResources,\n customResourceName,\n defaultExpanded = false,\n}: DefaultCustomResourceAccordionsProps) => {\n return (\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {customResources.map((cr, i) => (\n <Grid container item key={i} xs>\n <Grid item xs>\n <DefaultCustomResourceAccordion\n defaultExpanded={defaultExpanded}\n customResource={cr}\n customResourceName={customResourceName}\n />\n </Grid>\n </Grid>\n ))}\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA6CA,MAAM,+BAA+B,CAAC;AAAA,EACpC,cAAA;AAAA,EACA;AACF,CAAyC,KAAA;AACvC,EACE,uBAAA,GAAA;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,MAET,QAAC,kBAAA,GAAA,CAAA,IAAA,EAAA,EAAK,EAAI,EAAA,EAAA,EAAI,MAAI,IAChB,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,2BAAA;AAAA,QAAA;AAAA,UACC,cAAA;AAAA,UACA;AAAA;AAAA,OAEJ,EAAA;AAAA;AAA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,kBAAA,GAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAE,IACX,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,8BAAA;AAAA,QAAA;AAAA,UACC,eAAA;AAAA,UACA,cAAgB,EAAA,EAAA;AAAA,UAChB;AAAA;AAAA,OACF,EACF,CAPwB,EAAA,EAAA,CAQ1B,CACD;AAAA;AAAA,GACH;AAEJ;;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.esm.js';
|
|
3
3
|
import '../KubernetesDrawer/KubernetesDrawer.esm.js';
|
|
4
4
|
import '@backstage/core-components';
|
|
5
5
|
import '@material-ui/core/FormControlLabel';
|
|
6
6
|
import '@material-ui/core/Switch';
|
|
7
7
|
import 'js-yaml';
|
|
8
|
+
import 'react';
|
|
8
9
|
import Typography from '@material-ui/core/Typography';
|
|
9
10
|
import Grid from '@material-ui/core/Grid';
|
|
10
11
|
|
|
@@ -15,26 +16,28 @@ const DefaultCustomResourceDrawer = ({
|
|
|
15
16
|
expanded
|
|
16
17
|
}) => {
|
|
17
18
|
const capitalizedName = capitalize(customResourceName);
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
19
20
|
KubernetesStructuredMetadataTableDrawer,
|
|
20
21
|
{
|
|
21
22
|
object: customResource,
|
|
22
23
|
expanded,
|
|
23
24
|
kind: capitalizedName,
|
|
24
|
-
renderObject: (cr) => cr
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
renderObject: (cr) => cr,
|
|
26
|
+
children: /* @__PURE__ */ jsxs(
|
|
27
|
+
Grid,
|
|
28
|
+
{
|
|
29
|
+
container: true,
|
|
30
|
+
direction: "column",
|
|
31
|
+
justifyContent: "flex-start",
|
|
32
|
+
alignItems: "flex-start",
|
|
33
|
+
spacing: 0,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Typography, { variant: "body1", children: customResource.metadata?.name ?? "unknown object" }) }),
|
|
36
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Typography, { color: "textSecondary", variant: "subtitle1", children: capitalizedName }) })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
}
|
|
38
41
|
);
|
|
39
42
|
};
|
|
40
43
|
|
|
@@ -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
|
|
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 { 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":[],"mappings":";;;;;;;;;;;AAoBA,MAAM,UAAa,GAAA,CAAC,GAClB,KAAA,GAAA,CAAI,MAAO,CAAA,CAAC,CAAE,CAAA,iBAAA,CAAkB,OAAO,CAAA,GAAI,GAAI,CAAA,KAAA,CAAM,CAAC,CAAA;AAEjD,MAAM,8BAA8B,CAAC;AAAA,EAC1C,cAAA;AAAA,EACA,kBAAA;AAAA,EACA;AACF,CAIM,KAAA;AACJ,EAAM,MAAA,eAAA,GAAkB,WAAW,kBAAkB,CAAA;AAErD,EACE,uBAAA,GAAA;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,MAEpB,QAAA,kBAAA,IAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,SAAS,EAAA,IAAA;AAAA,UACT,SAAU,EAAA,QAAA;AAAA,UACV,cAAe,EAAA,YAAA;AAAA,UACf,UAAW,EAAA,YAAA;AAAA,UACX,OAAS,EAAA,CAAA;AAAA,UAET,QAAA,EAAA;AAAA,4BAAC,GAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EACR,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EACjB,QAAe,EAAA,cAAA,CAAA,QAAA,EAAU,IAAQ,IAAA,gBAAA,EACpC,CACF,EAAA,CAAA;AAAA,4BACA,GAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAI,IACR,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAM,eAAgB,EAAA,OAAA,EAAQ,WACvC,EAAA,QAAA,EAAA,eAAA,EACH,CACF,EAAA;AAAA;AAAA;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useContext } from 'react';
|
|
2
3
|
import Accordion from '@material-ui/core/Accordion';
|
|
3
4
|
import AccordionDetails from '@material-ui/core/AccordionDetails';
|
|
4
5
|
import AccordionSummary from '@material-ui/core/AccordionSummary';
|
|
@@ -50,30 +51,42 @@ const DaemonSetSummary = ({
|
|
|
50
51
|
numberOfCurrentPods,
|
|
51
52
|
numberOfPodsWithErrors
|
|
52
53
|
}) => {
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ jsxs(
|
|
54
55
|
Grid,
|
|
55
56
|
{
|
|
56
57
|
container: true,
|
|
57
58
|
direction: "row",
|
|
58
59
|
justifyContent: "space-between",
|
|
59
60
|
alignItems: "center",
|
|
60
|
-
spacing: 0
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
spacing: 0,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx(Grid, { xs: 4, item: true, children: /* @__PURE__ */ jsx(DaemonSetDrawer, { daemonset }) }),
|
|
64
|
+
/* @__PURE__ */ jsxs(
|
|
65
|
+
Grid,
|
|
66
|
+
{
|
|
67
|
+
item: true,
|
|
68
|
+
container: true,
|
|
69
|
+
xs: 4,
|
|
70
|
+
direction: "column",
|
|
71
|
+
justifyContent: "flex-start",
|
|
72
|
+
alignItems: "flex-end",
|
|
73
|
+
spacing: 0,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsxs(StatusOK, { children: [
|
|
76
|
+
numberOfCurrentPods,
|
|
77
|
+
" pods"
|
|
78
|
+
] }) }),
|
|
79
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: numberOfPodsWithErrors > 0 ? /* @__PURE__ */ jsxs(StatusError, { children: [
|
|
80
|
+
numberOfPodsWithErrors,
|
|
81
|
+
" pod",
|
|
82
|
+
numberOfPodsWithErrors > 1 ? "s" : "",
|
|
83
|
+
" with errors"
|
|
84
|
+
] }) : /* @__PURE__ */ jsx(StatusOK, { children: "No pods with errors" }) })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
77
90
|
);
|
|
78
91
|
};
|
|
79
92
|
const DaemonSetAccordion = ({
|
|
@@ -84,38 +97,41 @@ const DaemonSetAccordion = ({
|
|
|
84
97
|
const podsWithErrors = ownedPods.filter(
|
|
85
98
|
(p) => podNamesWithErrors.has(p.metadata?.name ?? "")
|
|
86
99
|
);
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
return /* @__PURE__ */ jsxs(Accordion, { TransitionProps: { unmountOnExit: true }, variant: "outlined", children: [
|
|
101
|
+
/* @__PURE__ */ jsx(AccordionSummary, { expandIcon: /* @__PURE__ */ jsx(ExpandMoreIcon, {}), children: /* @__PURE__ */ jsx(
|
|
102
|
+
DaemonSetSummary,
|
|
103
|
+
{
|
|
104
|
+
daemonset,
|
|
105
|
+
numberOfCurrentPods: ownedPods.length,
|
|
106
|
+
numberOfPodsWithErrors: podsWithErrors.length
|
|
107
|
+
}
|
|
108
|
+
) }),
|
|
109
|
+
/* @__PURE__ */ jsx(AccordionDetails, { children: /* @__PURE__ */ jsx(
|
|
110
|
+
PodsTable,
|
|
111
|
+
{
|
|
112
|
+
pods: ownedPods,
|
|
113
|
+
extraColumns: [READY_COLUMNS, RESOURCE_COLUMNS]
|
|
114
|
+
}
|
|
115
|
+
) })
|
|
116
|
+
] });
|
|
101
117
|
};
|
|
102
118
|
const DaemonSetsAccordions = ({}) => {
|
|
103
119
|
const groupedResponses = useContext(GroupedResponsesContext);
|
|
104
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ jsx(
|
|
105
121
|
Grid,
|
|
106
122
|
{
|
|
107
123
|
container: true,
|
|
108
124
|
direction: "column",
|
|
109
125
|
justifyContent: "flex-start",
|
|
110
|
-
alignItems: "flex-start"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
126
|
+
alignItems: "flex-start",
|
|
127
|
+
children: groupedResponses.daemonSets.map((daemonset, i) => /* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: true, children: /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
128
|
+
DaemonSetAccordion,
|
|
129
|
+
{
|
|
130
|
+
ownedPods: getOwnedResources(daemonset, groupedResponses.pods),
|
|
131
|
+
daemonset
|
|
132
|
+
}
|
|
133
|
+
) }) }, i))
|
|
134
|
+
}
|
|
119
135
|
);
|
|
120
136
|
};
|
|
121
137
|
|
|
@@ -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
|
|
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 { ReactNode, 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?: ReactNode;\n};\n\ntype DaemonSetAccordionProps = {\n daemonset: V1DaemonSet;\n ownedPods: V1Pod[];\n children?: ReactNode;\n};\n\ntype DaemonSetSummaryProps = {\n daemonset: V1DaemonSet;\n numberOfCurrentPods: number;\n numberOfPodsWithErrors: number;\n children?: 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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,MAAM,mBAAmB,CAAC;AAAA,EACxB,SAAA;AAAA,EACA,mBAAA;AAAA,EACA;AACF,CAA6B,KAAA;AAC3B,EACE,uBAAA,IAAA;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,MAET,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,IAAA,EAAA,EAAK,IAAI,CAAG,EAAA,IAAA,EAAI,MACf,QAAC,kBAAA,GAAA,CAAA,eAAA,EAAA,EAAgB,WAAsB,CACzC,EAAA,CAAA;AAAA,wBACA,IAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,IAAI,EAAA,IAAA;AAAA,YACJ,SAAS,EAAA,IAAA;AAAA,YACT,EAAI,EAA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BAAA;AAAA,MAAA;AAAA,QACC,SAAA;AAAA,QACA,qBAAqB,SAAU,CAAA,MAAA;AAAA,QAC/B,wBAAwB,cAAe,CAAA;AAAA;AAAA,KAE3C,EAAA,CAAA;AAAA,wBACC,gBACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,IAAM,EAAA,SAAA;AAAA,QACN,YAAA,EAAc,CAAC,aAAA,EAAe,gBAAgB;AAAA;AAAA,KAElD,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ,CAAA;AAEa,MAAA,oBAAA,GAAuB,CAAC,EAAkC,KAAA;AACrE,EAAM,MAAA,gBAAA,GAAmB,WAAW,uBAAuB,CAAA;AAE3D,EACE,uBAAA,GAAA;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,MAEV,2BAAiB,UAAW,CAAA,GAAA,CAAI,CAAC,SAAW,EAAA,CAAA,yBAC1C,IAAK,EAAA,EAAA,SAAA,EAAS,MAAC,IAAI,EAAA,IAAA,EAAS,IAAE,IAC7B,EAAA,QAAA,kBAAA,GAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAE,IACX,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,kBAAA;AAAA,QAAA;AAAA,UACC,SAAW,EAAA,iBAAA,CAAkB,SAAW,EAAA,gBAAA,CAAiB,IAAI,CAAA;AAAA,UAC7D;AAAA;AAAA,OACF,EACF,CANwB,EAAA,EAAA,CAO1B,CACD;AAAA;AAAA,GACH;AAEJ;;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.esm.js';
|
|
3
3
|
import '../KubernetesDrawer/KubernetesDrawer.esm.js';
|
|
4
4
|
import '@backstage/core-components';
|
|
5
5
|
import '@material-ui/core/FormControlLabel';
|
|
6
6
|
import '@material-ui/core/Switch';
|
|
7
7
|
import 'js-yaml';
|
|
8
|
+
import 'react';
|
|
8
9
|
import Typography from '@material-ui/core/Typography';
|
|
9
10
|
import Grid from '@material-ui/core/Grid';
|
|
10
11
|
import Chip from '@material-ui/core/Chip';
|
|
@@ -14,7 +15,7 @@ const DaemonSetDrawer = ({
|
|
|
14
15
|
expanded
|
|
15
16
|
}) => {
|
|
16
17
|
const namespace = daemonset.metadata?.namespace;
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
18
19
|
KubernetesStructuredMetadataTableDrawer,
|
|
19
20
|
{
|
|
20
21
|
object: daemonset,
|
|
@@ -31,21 +32,23 @@ const DaemonSetDrawer = ({
|
|
|
31
32
|
numberMisscheduled: daemonsetObj.status?.numberMisscheduled ?? "???",
|
|
32
33
|
numberReady: daemonsetObj.status?.numberReady ?? "???"
|
|
33
34
|
};
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
/* @__PURE__ */ React__default.createElement(
|
|
37
|
-
Grid,
|
|
38
|
-
{
|
|
39
|
-
container: true,
|
|
40
|
-
direction: "column",
|
|
41
|
-
justifyContent: "flex-start",
|
|
42
|
-
alignItems: "flex-start",
|
|
43
|
-
spacing: 0
|
|
44
35
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
children: /* @__PURE__ */ jsxs(
|
|
37
|
+
Grid,
|
|
38
|
+
{
|
|
39
|
+
container: true,
|
|
40
|
+
direction: "column",
|
|
41
|
+
justifyContent: "flex-start",
|
|
42
|
+
alignItems: "flex-start",
|
|
43
|
+
spacing: 0,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Typography, { variant: "body1", children: daemonset.metadata?.name ?? "unknown object" }) }),
|
|
46
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Typography, { color: "textSecondary", variant: "subtitle1", children: "DaemonSet" }) }),
|
|
47
|
+
namespace && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Chip, { size: "small", label: `namespace: ${namespace}` }) })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
49
52
|
);
|
|
50
53
|
};
|
|
51
54
|
|
|
@@ -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
|
|
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 { 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":[],"mappings":";;;;;;;;;;;;AAsBO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,SAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAM,MAAA,SAAA,GAAY,UAAU,QAAU,EAAA,SAAA;AACtC,EACE,uBAAA,GAAA;AAAA,IAAC,uCAAA;AAAA,IAAA;AAAA,MACC,MAA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,GAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAM,eAAgB,EAAA,OAAA,EAAQ,WAAY,EAAA,QAAA,EAAA,WAAA,EAEtD,CACF,EAAA,CAAA;AAAA,YACC,SACC,oBAAA,GAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAI,IACR,EAAA,QAAA,kBAAA,GAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAK,OAAQ,EAAA,KAAA,EAAO,CAAc,WAAA,EAAA,SAAS,IAAI,CACvD,EAAA;AAAA;AAAA;AAAA;AAEJ;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.esm.js';
|
|
3
3
|
import '../KubernetesDrawer/KubernetesDrawer.esm.js';
|
|
4
4
|
import '@backstage/core-components';
|
|
5
5
|
import '@material-ui/core/FormControlLabel';
|
|
6
6
|
import '@material-ui/core/Switch';
|
|
7
7
|
import 'js-yaml';
|
|
8
|
+
import 'react';
|
|
8
9
|
import { renderCondition } from '../../utils/pod.esm.js';
|
|
9
10
|
import Typography from '@material-ui/core/Typography';
|
|
10
11
|
import Grid from '@material-ui/core/Grid';
|
|
@@ -15,7 +16,7 @@ const DeploymentDrawer = ({
|
|
|
15
16
|
expanded
|
|
16
17
|
}) => {
|
|
17
18
|
const namespace = deployment.metadata?.namespace;
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
19
20
|
KubernetesStructuredMetadataTableDrawer,
|
|
20
21
|
{
|
|
21
22
|
object: deployment,
|
|
@@ -32,21 +33,23 @@ const DeploymentDrawer = ({
|
|
|
32
33
|
progressDeadlineSeconds: deploymentObj.spec?.progressDeadlineSeconds ?? "???",
|
|
33
34
|
...conditions
|
|
34
35
|
};
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
/* @__PURE__ */ React__default.createElement(
|
|
38
|
-
Grid,
|
|
39
|
-
{
|
|
40
|
-
container: true,
|
|
41
|
-
direction: "column",
|
|
42
|
-
justifyContent: "flex-start",
|
|
43
|
-
alignItems: "flex-start",
|
|
44
|
-
spacing: 0
|
|
45
36
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
children: /* @__PURE__ */ jsxs(
|
|
38
|
+
Grid,
|
|
39
|
+
{
|
|
40
|
+
container: true,
|
|
41
|
+
direction: "column",
|
|
42
|
+
justifyContent: "flex-start",
|
|
43
|
+
alignItems: "flex-start",
|
|
44
|
+
spacing: 0,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Typography, { variant: "body1", children: deployment.metadata?.name ?? "unknown object" }) }),
|
|
47
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Typography, { color: "textSecondary", variant: "subtitle1", children: "Deployment" }) }),
|
|
48
|
+
namespace && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Chip, { size: "small", label: `namespace: ${namespace}` }) })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
}
|
|
50
53
|
);
|
|
51
54
|
};
|
|
52
55
|
|
|
@@ -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
|
|
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 { ReactNode } 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]: 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":[],"mappings":";;;;;;;;;;;;;AAwBO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,UAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAM,MAAA,SAAA,GAAY,WAAW,QAAU,EAAA,SAAA;AACvC,EACE,uBAAA,GAAA;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;AACvB,UAAO,OAAA,KAAA;AAAA,SACT,EAAG,EAAkC,CAAA;AAEvC,QAAO,OAAA;AAAA,UACL,QAAA,EAAU,aAAc,CAAA,IAAA,EAAM,QAAY,IAAA,KAAA;AAAA,UAC1C,eAAA,EAAiB,aAAc,CAAA,IAAA,EAAM,eAAmB,IAAA,KAAA;AAAA,UACxD,uBAAA,EACE,aAAc,CAAA,IAAA,EAAM,uBAA2B,IAAA,KAAA;AAAA,UACjD,GAAG;AAAA,SACL;AAAA,OACF;AAAA,MAEA,QAAA,kBAAA,IAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,SAAS,EAAA,IAAA;AAAA,UACT,SAAU,EAAA,QAAA;AAAA,UACV,cAAe,EAAA,YAAA;AAAA,UACf,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