@backstage/plugin-kubernetes 0.12.10-next.2 → 0.12.10-next.3
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
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes
|
|
2
2
|
|
|
3
|
+
## 0.12.10-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3025cf5: Removed the kubernetes content padding to avoid double padding on k8s entity page
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/frontend-plugin-api@0.11.0-next.2
|
|
10
|
+
- @backstage/core-compat-api@0.5.0-next.3
|
|
11
|
+
- @backstage/core-components@0.17.5-next.2
|
|
12
|
+
|
|
3
13
|
## 0.12.10-next.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@ import Grid from '@material-ui/core/Grid';
|
|
|
3
3
|
import Typography from '@material-ui/core/Typography';
|
|
4
4
|
import { useKubernetesObjects, DetectedErrorsContext, ErrorPanel, ErrorReporting, Cluster } from '@backstage/plugin-kubernetes-react';
|
|
5
5
|
import { detectErrors } from '@backstage/plugin-kubernetes-common';
|
|
6
|
-
import {
|
|
6
|
+
import { Progress, EmptyState } from '@backstage/core-components';
|
|
7
7
|
import { RequireKubernetesPermissions } from './RequireKubernetesPermissions.esm.js';
|
|
8
8
|
|
|
9
9
|
const KubernetesContent = ({
|
|
@@ -17,7 +17,7 @@ const KubernetesContent = ({
|
|
|
17
17
|
const clusters = kubernetesObjects?.items.map((item) => item.cluster) ?? [];
|
|
18
18
|
const clustersWithErrors = kubernetesObjects?.items.filter((r) => r.errors.length > 0) ?? [];
|
|
19
19
|
const detectedErrors = kubernetesObjects !== void 0 ? detectErrors(kubernetesObjects) : /* @__PURE__ */ new Map();
|
|
20
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
+
return /* @__PURE__ */ jsx(RequireKubernetesPermissions, { children: /* @__PURE__ */ jsxs(
|
|
21
21
|
DetectedErrorsContext.Provider,
|
|
22
22
|
{
|
|
23
23
|
value: [...detectedErrors.values()].flat(),
|
|
@@ -81,7 +81,7 @@ const KubernetesContent = ({
|
|
|
81
81
|
] })
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
|
-
) })
|
|
84
|
+
) });
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
export { KubernetesContent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KubernetesContent.esm.js","sources":["../src/KubernetesContent.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 Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n ErrorPanel,\n ErrorReporting,\n Cluster,\n useKubernetesObjects,\n DetectedErrorsContext,\n} from '@backstage/plugin-kubernetes-react';\nimport {\n DetectedError,\n detectErrors,\n} from '@backstage/plugin-kubernetes-common';\nimport {
|
|
1
|
+
{"version":3,"file":"KubernetesContent.esm.js","sources":["../src/KubernetesContent.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 Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n ErrorPanel,\n ErrorReporting,\n Cluster,\n useKubernetesObjects,\n DetectedErrorsContext,\n} from '@backstage/plugin-kubernetes-react';\nimport {\n DetectedError,\n detectErrors,\n} from '@backstage/plugin-kubernetes-common';\nimport { EmptyState, Progress } from '@backstage/core-components';\nimport { RequireKubernetesPermissions } from './RequireKubernetesPermissions';\n\ntype KubernetesContentProps = {\n entity: Entity;\n refreshIntervalMs?: number;\n children?: ReactNode;\n};\n\nexport const KubernetesContent = ({\n entity,\n refreshIntervalMs,\n}: KubernetesContentProps) => {\n const { kubernetesObjects, error } = useKubernetesObjects(\n entity,\n refreshIntervalMs,\n );\n\n const clusters = kubernetesObjects?.items.map(item => item.cluster) ?? [];\n\n const clustersWithErrors =\n kubernetesObjects?.items.filter(r => r.errors.length > 0) ?? [];\n\n const detectedErrors =\n kubernetesObjects !== undefined\n ? detectErrors(kubernetesObjects)\n : new Map<string, DetectedError[]>();\n\n return (\n <RequireKubernetesPermissions>\n <DetectedErrorsContext.Provider\n value={[...detectedErrors.values()].flat()}\n >\n {kubernetesObjects === undefined && error === undefined && <Progress />}\n\n {/* errors retrieved from the kubernetes clusters */}\n {clustersWithErrors.length > 0 && (\n <Grid container spacing={3} direction=\"column\">\n <Grid item>\n <ErrorPanel\n entityName={entity.metadata.name}\n clustersWithErrors={clustersWithErrors}\n />\n </Grid>\n </Grid>\n )}\n\n {/* other errors */}\n {error !== undefined && (\n <Grid container spacing={3} direction=\"column\">\n <Grid item>\n <ErrorPanel\n entityName={entity.metadata.name}\n errorMessage={error}\n />\n </Grid>\n </Grid>\n )}\n\n {kubernetesObjects && (\n <Grid container spacing={3} direction=\"column\">\n <Grid item>\n <ErrorReporting\n detectedErrors={detectedErrors}\n clusters={clusters}\n />\n </Grid>\n <Grid item>\n <Typography variant=\"h3\">Your Clusters</Typography>\n </Grid>\n <Grid item container>\n {kubernetesObjects?.items.length <= 0 && (\n <Grid\n container\n justifyContent=\"space-around\"\n direction=\"row\"\n alignItems=\"center\"\n spacing={2}\n >\n <Grid item xs={8}>\n <EmptyState\n missing=\"data\"\n title=\"No Kubernetes resources\"\n description={`No resources on any known clusters for ${entity.metadata.name}`}\n />\n </Grid>\n </Grid>\n )}\n {kubernetesObjects?.items.length > 0 &&\n kubernetesObjects?.items.map((item, i) => {\n const podsWithErrors = new Set<string>(\n detectedErrors\n .get(item.cluster.name)\n ?.filter(de => de.sourceRef.kind === 'Pod')\n .map(de => de.sourceRef.name),\n );\n\n return (\n <Grid item key={i} xs={12}>\n <Cluster\n clusterObjects={item}\n podsWithErrors={podsWithErrors}\n />\n </Grid>\n );\n })}\n </Grid>\n </Grid>\n )}\n </DetectedErrorsContext.Provider>\n </RequireKubernetesPermissions>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAwCO,MAAM,oBAAoB,CAAC;AAAA,EAChC,MAAA;AAAA,EACA;AACF,CAA8B,KAAA;AAC5B,EAAM,MAAA,EAAE,iBAAmB,EAAA,KAAA,EAAU,GAAA,oBAAA;AAAA,IACnC,MAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAM,MAAA,QAAA,GAAW,mBAAmB,KAAM,CAAA,GAAA,CAAI,UAAQ,IAAK,CAAA,OAAO,KAAK,EAAC;AAExE,EAAM,MAAA,kBAAA,GACJ,iBAAmB,EAAA,KAAA,CAAM,MAAO,CAAA,CAAA,CAAA,KAAK,EAAE,MAAO,CAAA,MAAA,GAAS,CAAC,CAAA,IAAK,EAAC;AAEhE,EAAA,MAAM,iBACJ,iBAAsB,KAAA,KAAA,CAAA,GAClB,aAAa,iBAAiB,CAAA,uBAC1B,GAA6B,EAAA;AAEvC,EAAA,2BACG,4BACC,EAAA,EAAA,QAAA,kBAAA,IAAA;AAAA,IAAC,qBAAsB,CAAA,QAAA;A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AI,EACrB,EAAA,QAAA,kBAAA,GAAA;AAAA,gBAAC,OAAA;AAAA,gBAAA;AAAA,kBACC,cAAgB,EAAA,IAAA;AAAA,kBAChB;AAAA;AAAA,mBAHY,CAKhB,CAAA;AAAA,aAEH;AAAA,WACL,EAAA;AAAA,SACF,EAAA;AAAA;AAAA;AAAA,GAGN,EAAA,CAAA;AAEJ;;;;"}
|
package/dist/package.json.esm.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-kubernetes",
|
|
3
|
-
"version": "0.12.10-next.
|
|
3
|
+
"version": "0.12.10-next.3",
|
|
4
4
|
"description": "A Backstage plugin that integrates towards Kubernetes",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@backstage/catalog-model": "1.7.5",
|
|
74
|
-
"@backstage/core-compat-api": "0.5.0-next.
|
|
75
|
-
"@backstage/core-components": "0.17.5-next.
|
|
74
|
+
"@backstage/core-compat-api": "0.5.0-next.3",
|
|
75
|
+
"@backstage/core-components": "0.17.5-next.2",
|
|
76
76
|
"@backstage/core-plugin-api": "1.10.9",
|
|
77
|
-
"@backstage/frontend-plugin-api": "0.11.0-next.
|
|
77
|
+
"@backstage/frontend-plugin-api": "0.11.0-next.2",
|
|
78
78
|
"@backstage/plugin-catalog-react": "1.20.0-next.2",
|
|
79
79
|
"@backstage/plugin-kubernetes-common": "0.9.6",
|
|
80
80
|
"@backstage/plugin-kubernetes-react": "0.5.10-next.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"luxon": "^3.0.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@backstage/cli": "0.34.0-next.
|
|
96
|
+
"@backstage/cli": "0.34.0-next.2",
|
|
97
97
|
"@backstage/dev-utils": "1.1.13-next.1",
|
|
98
98
|
"@backstage/test-utils": "1.7.11-next.0",
|
|
99
99
|
"@testing-library/dom": "^10.0.0",
|