@backstage/plugin-kubernetes-cluster 0.0.24-next.1 → 0.0.24-next.2
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 +17 -0
- package/dist/Router.esm.js +4 -4
- package/dist/Router.esm.js.map +1 -1
- package/dist/components/ApiResources/ApiResources.esm.js +4 -3
- package/dist/components/ApiResources/ApiResources.esm.js.map +1 -1
- package/dist/components/ClusterOverview/ClusterOverview.esm.js +17 -13
- package/dist/components/ClusterOverview/ClusterOverview.esm.js.map +1 -1
- package/dist/components/KubernetesClusterContent/KubernetesClusterContent.esm.js +12 -7
- package/dist/components/KubernetesClusterContent/KubernetesClusterContent.esm.js.map +1 -1
- package/dist/components/KubernetesClusterErrorContext/KubernetesClusterErrorContext.esm.js +4 -3
- package/dist/components/KubernetesClusterErrorContext/KubernetesClusterErrorContext.esm.js.map +1 -1
- package/dist/components/Nodes/Nodes.esm.js +45 -31
- package/dist/components/Nodes/Nodes.esm.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-cluster
|
|
2
2
|
|
|
3
|
+
## 0.0.24-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a47fd39: Removes instances of default React imports, a necessary update for the upcoming React 19 migration.
|
|
8
|
+
|
|
9
|
+
<https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html>
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/core-components@0.17.1-next.1
|
|
13
|
+
- @backstage/core-plugin-api@1.10.6-next.0
|
|
14
|
+
- @backstage/plugin-kubernetes-react@0.5.6-next.1
|
|
15
|
+
- @backstage/plugin-permission-react@0.4.33-next.0
|
|
16
|
+
- @backstage/plugin-catalog-react@1.17.0-next.2
|
|
17
|
+
- @backstage/catalog-model@1.7.3
|
|
18
|
+
- @backstage/plugin-kubernetes-common@0.9.4
|
|
19
|
+
|
|
3
20
|
## 0.0.24-next.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/Router.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useEntity, MissingAnnotationEmptyState } from '@backstage/plugin-catalog-react';
|
|
3
3
|
import { Routes, Route } from 'react-router-dom';
|
|
4
4
|
import { ANNOTATION_KUBERNETES_API_SERVER } from '@backstage/plugin-kubernetes-common';
|
|
@@ -8,14 +8,14 @@ const isKubernetesClusterAvailable = (entity) => Boolean(entity.metadata.annotat
|
|
|
8
8
|
const Router = () => {
|
|
9
9
|
const { entity } = useEntity();
|
|
10
10
|
if (isKubernetesClusterAvailable(entity)) {
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(Routes, { children: /* @__PURE__ */ jsx(Route, { path: "/", element: /* @__PURE__ */ jsx(KubernetesClusterContent, {}) }) });
|
|
12
12
|
}
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
14
14
|
MissingAnnotationEmptyState,
|
|
15
15
|
{
|
|
16
16
|
annotation: ANNOTATION_KUBERNETES_API_SERVER
|
|
17
17
|
}
|
|
18
|
-
));
|
|
18
|
+
) });
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export { Router, isKubernetesClusterAvailable };
|
package/dist/Router.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Router.esm.js","sources":["../src/Router.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":"Router.esm.js","sources":["../src/Router.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 { Entity } from '@backstage/catalog-model';\nimport {\n useEntity,\n MissingAnnotationEmptyState,\n} from '@backstage/plugin-catalog-react';\nimport { Route, Routes } from 'react-router-dom';\nimport { ANNOTATION_KUBERNETES_API_SERVER } from '@backstage/plugin-kubernetes-common';\nimport { KubernetesClusterContent } from './components/KubernetesClusterContent';\n\n/**\n *\n *\n * @public\n */\nexport const isKubernetesClusterAvailable = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[ANNOTATION_KUBERNETES_API_SERVER]);\n\n/**\n *\n *\n * @public\n */\nexport const Router = () => {\n const { entity } = useEntity();\n\n if (isKubernetesClusterAvailable(entity)) {\n return (\n <Routes>\n <Route path=\"/\" element={<KubernetesClusterContent />} />\n </Routes>\n );\n }\n\n return (\n <>\n <MissingAnnotationEmptyState\n annotation={ANNOTATION_KUBERNETES_API_SERVER}\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;AA8Ba,MAAA,4BAAA,GAA+B,CAAC,MAC3C,KAAA,OAAA,CAAQ,OAAO,QAAS,CAAA,WAAA,GAAc,gCAAgC,CAAC;AAOlE,MAAM,SAAS,MAAM;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAE7B,EAAI,IAAA,4BAAA,CAA6B,MAAM,CAAG,EAAA;AACxC,IACE,uBAAA,GAAA,CAAC,MACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAM,EAAA,EAAA,IAAA,EAAK,KAAI,OAAS,kBAAA,GAAA,CAAC,wBAAyB,EAAA,EAAA,CAAA,EAAI,CACzD,EAAA,CAAA;AAAA;AAIJ,EAAA,uBAEI,GAAA,CAAA,QAAA,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,2BAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA;AAAA;AAAA,GAEhB,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { useApiResources } from './useApiResources.esm.js';
|
|
2
|
-
import
|
|
3
|
+
import { useCallback, useEffect } from 'react';
|
|
3
4
|
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
4
5
|
import { Table } from '@backstage/core-components';
|
|
5
6
|
import { useKubernetesClusterError } from '../KubernetesClusterErrorContext/KubernetesClusterErrorContext.esm.js';
|
|
@@ -41,14 +42,14 @@ const ApiResources = () => {
|
|
|
41
42
|
setErrorCallback(error.message);
|
|
42
43
|
}
|
|
43
44
|
}, [error, setErrorCallback]);
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
45
46
|
Table,
|
|
46
47
|
{
|
|
47
48
|
title: "API Resources",
|
|
48
49
|
options: { paging: true, search: false, emptyRowsWhenPaging: false },
|
|
49
50
|
isLoading: !value && loading,
|
|
50
51
|
data: value?.groups ?? [],
|
|
51
|
-
emptyContent: /* @__PURE__ */
|
|
52
|
+
emptyContent: /* @__PURE__ */ jsx("div", { className: classes.empty, children: error !== void 0 ? "Error loading API Resources" : "No API Resources found" }),
|
|
52
53
|
columns: defaultColumns
|
|
53
54
|
}
|
|
54
55
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiResources.esm.js","sources":["../../../src/components/ApiResources/ApiResources.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useApiResources } from './useApiResources';\nimport
|
|
1
|
+
{"version":3,"file":"ApiResources.esm.js","sources":["../../../src/components/ApiResources/ApiResources.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useApiResources } from './useApiResources';\nimport { useCallback, useEffect } from 'react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { Table, TableColumn } from '@backstage/core-components';\nimport { IAPIGroup } from '@kubernetes-models/apimachinery/apis/meta/v1';\nimport { useKubernetesClusterError } from '../KubernetesClusterErrorContext/KubernetesClusterErrorContext';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\nconst defaultColumns: TableColumn<IAPIGroup>[] = [\n {\n title: 'Name',\n highlight: true,\n render: (apiGroup: IAPIGroup) => {\n return apiGroup.name;\n },\n },\n {\n title: 'Preferred Version',\n highlight: true,\n render: (apiGroup: IAPIGroup) => {\n return apiGroup.preferredVersion?.groupVersion;\n },\n },\n];\n\nexport const ApiResources = () => {\n const classes = useStyles();\n const { entity } = useEntity();\n const { setError } = useKubernetesClusterError();\n const setErrorCallback = useCallback(setError, [setError]);\n const { value, error, loading } = useApiResources({\n clusterName: entity.metadata.name,\n });\n\n useEffect(() => {\n if (error) {\n setErrorCallback(error.message);\n }\n }, [error, setErrorCallback]);\n\n return (\n <Table\n title=\"API Resources\"\n options={{ paging: true, search: false, emptyRowsWhenPaging: false }}\n isLoading={!value && loading}\n data={value?.groups ?? []}\n emptyContent={\n <div className={classes.empty}>\n {error !== undefined\n ? 'Error loading API Resources'\n : 'No API Resources found'}\n </div>\n }\n columns={defaultColumns}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAuBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,KAAO,EAAA;AAAA,IACL,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,OAAS,EAAA,MAAA;AAAA,IACT,cAAgB,EAAA;AAAA;AAEpB,CAAE,CAAA,CAAA;AAEF,MAAM,cAA2C,GAAA;AAAA,EAC/C;AAAA,IACE,KAAO,EAAA,MAAA;AAAA,IACP,SAAW,EAAA,IAAA;AAAA,IACX,MAAA,EAAQ,CAAC,QAAwB,KAAA;AAC/B,MAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAClB,GACF;AAAA,EACA;AAAA,IACE,KAAO,EAAA,mBAAA;AAAA,IACP,SAAW,EAAA,IAAA;AAAA,IACX,MAAA,EAAQ,CAAC,QAAwB,KAAA;AAC/B,MAAA,OAAO,SAAS,gBAAkB,EAAA,YAAA;AAAA;AACpC;AAEJ,CAAA;AAEO,MAAM,eAAe,MAAM;AAChC,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAM,MAAA,EAAE,QAAS,EAAA,GAAI,yBAA0B,EAAA;AAC/C,EAAA,MAAM,gBAAmB,GAAA,WAAA,CAAY,QAAU,EAAA,CAAC,QAAQ,CAAC,CAAA;AACzD,EAAA,MAAM,EAAE,KAAA,EAAO,KAAO,EAAA,OAAA,KAAY,eAAgB,CAAA;AAAA,IAChD,WAAA,EAAa,OAAO,QAAS,CAAA;AAAA,GAC9B,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,KAAO,EAAA;AACT,MAAA,gBAAA,CAAiB,MAAM,OAAO,CAAA;AAAA;AAChC,GACC,EAAA,CAAC,KAAO,EAAA,gBAAgB,CAAC,CAAA;AAE5B,EACE,uBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,eAAA;AAAA,MACN,SAAS,EAAE,MAAA,EAAQ,MAAM,MAAQ,EAAA,KAAA,EAAO,qBAAqB,KAAM,EAAA;AAAA,MACnE,SAAA,EAAW,CAAC,KAAS,IAAA,OAAA;AAAA,MACrB,IAAA,EAAM,KAAO,EAAA,MAAA,IAAU,EAAC;AAAA,MACxB,YAAA,sBACG,KAAI,EAAA,EAAA,SAAA,EAAW,QAAQ,KACrB,EAAA,QAAA,EAAA,KAAA,KAAU,KACP,CAAA,GAAA,6BAAA,GACA,wBACN,EAAA,CAAA;AAAA,MAEF,OAAS,EAAA;AAAA;AAAA,GACX;AAEJ;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useCallback, useEffect } from 'react';
|
|
2
3
|
import { InfoCard, StructuredMetadataTable } from '@backstage/core-components';
|
|
3
4
|
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
4
5
|
import { useCluster } from './useCluster.esm.js';
|
|
@@ -26,18 +27,21 @@ const ClusterOverview = () => {
|
|
|
26
27
|
setErrorCallback(error.message);
|
|
27
28
|
}
|
|
28
29
|
}, [error, setErrorCallback]);
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
return /* @__PURE__ */ jsxs(InfoCard, { title: "Cluster Overview", className: classes.root, children: [
|
|
31
|
+
!value && loading && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Skeleton, { height: "35rem" }) }),
|
|
32
|
+
value && /* @__PURE__ */ jsx(
|
|
33
|
+
StructuredMetadataTable,
|
|
34
|
+
{
|
|
35
|
+
metadata: {
|
|
36
|
+
name: value.name,
|
|
37
|
+
"Backstage auth provider": value.authProvider,
|
|
38
|
+
"OIDC Token Provider": value.oidcTokenProvider ?? "N/A",
|
|
39
|
+
"Dashboard Link": value.dashboardUrl ?? "N/A"
|
|
40
|
+
},
|
|
41
|
+
options: { nestedValuesAsYaml: true }
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
export { ClusterOverview };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterOverview.esm.js","sources":["../../../src/components/ClusterOverview/ClusterOverview.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport
|
|
1
|
+
{"version":3,"file":"ClusterOverview.esm.js","sources":["../../../src/components/ClusterOverview/ClusterOverview.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useCallback, useEffect } from 'react';\nimport { InfoCard, StructuredMetadataTable } from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useCluster } from './useCluster';\nimport Skeleton from '@material-ui/lab/Skeleton';\nimport { Theme, createStyles, makeStyles } from '@material-ui/core/styles';\nimport { useKubernetesClusterError } from '../KubernetesClusterErrorContext/KubernetesClusterErrorContext';\n\nconst useStyles = makeStyles((_theme: Theme) =>\n createStyles({\n root: {\n height: '100%',\n },\n }),\n);\n\nexport const ClusterOverview = () => {\n const classes = useStyles();\n const { entity } = useEntity();\n const { value, loading, error } = useCluster({\n clusterName: entity.metadata.name,\n });\n const { setError } = useKubernetesClusterError();\n const setErrorCallback = useCallback(setError, [setError]);\n useEffect(() => {\n if (error) {\n setErrorCallback(error.message);\n }\n }, [error, setErrorCallback]);\n\n return (\n <InfoCard title=\"Cluster Overview\" className={classes.root}>\n {!value && loading && (\n <>\n <Skeleton height=\"35rem\" />\n </>\n )}\n {value && (\n <StructuredMetadataTable\n metadata={{\n name: value.name,\n 'Backstage auth provider': value.authProvider,\n 'OIDC Token Provider': value.oidcTokenProvider ?? 'N/A',\n 'Dashboard Link': value.dashboardUrl ?? 'N/A',\n }}\n options={{ nestedValuesAsYaml: true }}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAuBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAAW,CAAC,WAC5B,YAAa,CAAA;AAAA,IACX,IAAM,EAAA;AAAA,MACJ,MAAQ,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import
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { ApiResources } from '../ApiResources/ApiResources.esm.js';
|
|
3
3
|
import Grid from '@material-ui/core/Grid';
|
|
4
4
|
import Typography from '@material-ui/core/Typography';
|
|
@@ -13,23 +13,28 @@ import { kubernetesClusterTranslationRef } from '../../translation.esm.js';
|
|
|
13
13
|
|
|
14
14
|
const ContentGrid = () => {
|
|
15
15
|
const { error } = useKubernetesClusterError();
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
17
|
+
error && /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(WarningPanel, { title: "Error loading Kubernetes Cluster Plugin", children: /* @__PURE__ */ jsx(Typography, { children: error }) }) }),
|
|
18
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(ClusterOverview, {}) }),
|
|
19
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(ApiResources, {}) }),
|
|
20
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Nodes, {}) })
|
|
21
|
+
] }) });
|
|
17
22
|
};
|
|
18
23
|
const KubernetesClusterContent = () => {
|
|
19
24
|
const { t } = useTranslationRef(kubernetesClusterTranslationRef);
|
|
20
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
21
26
|
RequirePermission,
|
|
22
27
|
{
|
|
23
28
|
permission: kubernetesClustersReadPermission,
|
|
24
|
-
errorPage: /* @__PURE__ */
|
|
29
|
+
errorPage: /* @__PURE__ */ jsx(
|
|
25
30
|
WarningPanel,
|
|
26
31
|
{
|
|
27
32
|
title: t("kubernetesClusterContentPage.permissionAlert.title"),
|
|
28
33
|
message: t("kubernetesClusterContentPage.permissionAlert.message")
|
|
29
34
|
}
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
),
|
|
36
|
+
children: /* @__PURE__ */ jsx(KubernetesClusterErrorProvider, { children: /* @__PURE__ */ jsx(ContentGrid, {}) })
|
|
37
|
+
}
|
|
33
38
|
);
|
|
34
39
|
};
|
|
35
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KubernetesClusterContent.esm.js","sources":["../../../src/components/KubernetesClusterContent/KubernetesClusterContent.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport
|
|
1
|
+
{"version":3,"file":"KubernetesClusterContent.esm.js","sources":["../../../src/components/KubernetesClusterContent/KubernetesClusterContent.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApiResources } from '../ApiResources/ApiResources';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { Nodes } from '../Nodes/Nodes';\nimport { ClusterOverview } from '../ClusterOverview';\nimport {\n KubernetesClusterErrorProvider,\n useKubernetesClusterError,\n} from '../KubernetesClusterErrorContext/KubernetesClusterErrorContext';\nimport { WarningPanel } from '@backstage/core-components';\nimport { kubernetesClustersReadPermission } from '@backstage/plugin-kubernetes-common';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { kubernetesClusterTranslationRef } from '../../translation';\n\nconst ContentGrid = () => {\n const { error } = useKubernetesClusterError();\n return (\n <>\n <Grid container>\n {error && (\n <Grid item xs={12}>\n <WarningPanel title=\"Error loading Kubernetes Cluster Plugin\">\n <Typography>{error}</Typography>\n </WarningPanel>\n </Grid>\n )}\n <Grid item xs={6}>\n <ClusterOverview />\n </Grid>\n <Grid item xs={6}>\n <ApiResources />\n </Grid>\n <Grid item xs={12}>\n <Nodes />\n </Grid>\n </Grid>\n </>\n );\n};\n\n/**\n *\n *\n * @public\n */\nexport const KubernetesClusterContent = () => {\n const { t } = useTranslationRef(kubernetesClusterTranslationRef);\n\n return (\n <RequirePermission\n permission={kubernetesClustersReadPermission}\n errorPage={\n <WarningPanel\n title={t('kubernetesClusterContentPage.permissionAlert.title')}\n message={t('kubernetesClusterContentPage.permissionAlert.message')}\n />\n }\n >\n <KubernetesClusterErrorProvider>\n <ContentGrid />\n </KubernetesClusterErrorProvider>\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA8BA,MAAM,cAAc,MAAM;AACxB,EAAM,MAAA,EAAE,KAAM,EAAA,GAAI,yBAA0B,EAAA;AAC5C,EAAA,uBAEI,GAAA,CAAA,QAAA,EAAA,EAAA,QAAA,kBAAA,IAAA,CAAC,IAAK,EAAA,EAAA,SAAA,EAAS,IACZ,EAAA,QAAA,EAAA;AAAA,IAAA,KAAA,oBACE,GAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,IAAI,EACb,EAAA,QAAA,kBAAA,GAAA,CAAC,YAAa,EAAA,EAAA,KAAA,EAAM,yCAClB,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAY,EAAA,EAAA,QAAA,EAAA,KAAA,EAAM,GACrB,CACF,EAAA,CAAA;AAAA,oBAEF,GAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAI,CACb,EAAA,QAAA,kBAAA,GAAA,CAAC,mBAAgB,CACnB,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAI,CACb,EAAA,QAAA,kBAAA,GAAA,CAAC,gBAAa,CAChB,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAI,EACb,EAAA,QAAA,kBAAA,GAAA,CAAC,SAAM,CACT,EAAA;AAAA,GAAA,EACF,CACF,EAAA,CAAA;AAEJ,CAAA;AAOO,MAAM,2BAA2B,MAAM;AAC5C,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,+BAA+B,CAAA;AAE/D,EACE,uBAAA,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,gCAAA;AAAA,MACZ,SACE,kBAAA,GAAA;AAAA,QAAC,YAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,EAAE,oDAAoD,CAAA;AAAA,UAC7D,OAAA,EAAS,EAAE,sDAAsD;AAAA;AAAA,OACnE;AAAA,MAGF,QAAC,kBAAA,GAAA,CAAA,8BAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,WAAA,EAAA,EAAY,CACf,EAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, useState, useCallback, useContext } from 'react';
|
|
2
3
|
|
|
3
|
-
const KubernetesClusterErrorContext =
|
|
4
|
+
const KubernetesClusterErrorContext = createContext({
|
|
4
5
|
setError: (_) => {
|
|
5
6
|
}
|
|
6
7
|
});
|
|
@@ -12,7 +13,7 @@ const KubernetesClusterErrorProvider = ({
|
|
|
12
13
|
error,
|
|
13
14
|
setError: useCallback((message) => setError(message), [])
|
|
14
15
|
};
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(KubernetesClusterErrorContext.Provider, { value: contextValue, children });
|
|
16
17
|
};
|
|
17
18
|
const useKubernetesClusterError = () => {
|
|
18
19
|
return useContext(KubernetesClusterErrorContext);
|
package/dist/components/KubernetesClusterErrorContext/KubernetesClusterErrorContext.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KubernetesClusterErrorContext.esm.js","sources":["../../../src/components/KubernetesClusterErrorContext/KubernetesClusterErrorContext.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport
|
|
1
|
+
{"version":3,"file":"KubernetesClusterErrorContext.esm.js","sources":["../../../src/components/KubernetesClusterErrorContext/KubernetesClusterErrorContext.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ReactNode,\n createContext,\n useCallback,\n useContext,\n useState,\n} from 'react';\n\nexport interface ErrorContext {\n error?: string;\n setError: (message: string) => void;\n}\n\nexport const KubernetesClusterErrorContext = createContext<ErrorContext>({\n setError: (_: string) => {},\n});\n\nexport interface KubernetesClusterErrorProviderProps {\n children: ReactNode;\n}\n\nexport const KubernetesClusterErrorProvider = ({\n children,\n}: KubernetesClusterErrorProviderProps) => {\n const [error, setError] = useState<string | undefined>(undefined);\n\n const contextValue: ErrorContext = {\n error,\n setError: useCallback((message: string) => setError(message), []),\n };\n\n return (\n <KubernetesClusterErrorContext.Provider value={contextValue}>\n {children}\n </KubernetesClusterErrorContext.Provider>\n );\n};\n\nexport const useKubernetesClusterError = () => {\n return useContext(KubernetesClusterErrorContext);\n};\n"],"names":[],"mappings":";;;AA4BO,MAAM,gCAAgC,aAA4B,CAAA;AAAA,EACvE,QAAA,EAAU,CAAC,CAAc,KAAA;AAAA;AAC3B,CAAC;AAMM,MAAM,iCAAiC,CAAC;AAAA,EAC7C;AACF,CAA2C,KAAA;AACzC,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAA6B,KAAS,CAAA,CAAA;AAEhE,EAAA,MAAM,YAA6B,GAAA;AAAA,IACjC,KAAA;AAAA,IACA,QAAA,EAAU,YAAY,CAAC,OAAA,KAAoB,SAAS,OAAO,CAAA,EAAG,EAAE;AAAA,GAClE;AAEA,EAAA,2BACG,6BAA8B,CAAA,QAAA,EAA9B,EAAuC,KAAA,EAAO,cAC5C,QACH,EAAA,CAAA;AAEJ;AAEO,MAAM,4BAA4B,MAAM;AAC7C,EAAA,OAAO,WAAW,6BAA6B,CAAA;AACjD;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import { useNodes } from './useNodes.esm.js';
|
|
2
|
-
import
|
|
3
|
+
import { useCallback, useEffect } from 'react';
|
|
3
4
|
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
4
5
|
import { Table, StructuredMetadataTable } from '@backstage/core-components';
|
|
5
6
|
import Grid from '@material-ui/core/Grid';
|
|
@@ -21,37 +22,50 @@ const defaultColumns = [
|
|
|
21
22
|
highlight: true,
|
|
22
23
|
width: "auto",
|
|
23
24
|
render: (node) => {
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
25
26
|
KubernetesDrawer,
|
|
26
27
|
{
|
|
27
28
|
kubernetesObject: node,
|
|
28
|
-
label: node.metadata?.name ?? "unknown-node"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
29
|
+
label: node.metadata?.name ?? "unknown-node",
|
|
30
|
+
children: /* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
31
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, xs: 12, children: [
|
|
32
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Node Info" }),
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
StructuredMetadataTable,
|
|
35
|
+
{
|
|
36
|
+
metadata: node.status?.nodeInfo ?? {},
|
|
37
|
+
options: { nestedValuesAsYaml: true }
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, xs: 12, children: [
|
|
42
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Addresses" }),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
StructuredMetadataTable,
|
|
45
|
+
{
|
|
46
|
+
metadata: node.status?.addresses?.reduce((accum, next) => {
|
|
47
|
+
accum[next.type] = next.address;
|
|
48
|
+
return accum;
|
|
49
|
+
}, {}) ?? {},
|
|
50
|
+
options: { nestedValuesAsYaml: true }
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, xs: 12, children: [
|
|
55
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Taints" }),
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
StructuredMetadataTable,
|
|
58
|
+
{
|
|
59
|
+
metadata: node.spec?.taints?.reduce((accum, next) => {
|
|
60
|
+
accum[`${next.effect}`] = `${next.key} (${next.value})`;
|
|
61
|
+
return accum;
|
|
62
|
+
}, {}) ?? {},
|
|
63
|
+
options: { nestedValuesAsYaml: true }
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] })
|
|
67
|
+
] })
|
|
68
|
+
}
|
|
55
69
|
);
|
|
56
70
|
}
|
|
57
71
|
},
|
|
@@ -100,14 +114,14 @@ const Nodes = () => {
|
|
|
100
114
|
setErrorCallback(error.message);
|
|
101
115
|
}
|
|
102
116
|
}, [error, setErrorCallback]);
|
|
103
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ jsx(
|
|
104
118
|
Table,
|
|
105
119
|
{
|
|
106
120
|
title: "Nodes",
|
|
107
121
|
options: { paging: true, search: false, emptyRowsWhenPaging: false },
|
|
108
122
|
isLoading: !value && loading,
|
|
109
123
|
data: value?.items ?? [],
|
|
110
|
-
emptyContent: /* @__PURE__ */
|
|
124
|
+
emptyContent: /* @__PURE__ */ jsx("div", { className: classes.empty, children: error !== void 0 ? "Error loading nodes" : "No nodes found" }),
|
|
111
125
|
columns: defaultColumns
|
|
112
126
|
}
|
|
113
127
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Nodes.esm.js","sources":["../../../src/components/Nodes/Nodes.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useNodes } from './useNodes';\nimport
|
|
1
|
+
{"version":3,"file":"Nodes.esm.js","sources":["../../../src/components/Nodes/Nodes.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useNodes } from './useNodes';\nimport { useCallback, useEffect } from 'react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport {\n StructuredMetadataTable,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { INode } from 'kubernetes-models/v1';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useKubernetesClusterError } from '../KubernetesClusterErrorContext/KubernetesClusterErrorContext';\nimport { KubernetesDrawer } from '@backstage/plugin-kubernetes-react';\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\nconst defaultColumns: TableColumn<INode>[] = [\n {\n title: 'Name',\n highlight: true,\n width: 'auto',\n render: (node: INode) => {\n return (\n <KubernetesDrawer\n kubernetesObject={node}\n label={node.metadata?.name ?? 'unknown-node'}\n >\n <Grid container>\n <Grid item xs={12}>\n <Typography variant=\"h5\">Node Info</Typography>\n <StructuredMetadataTable\n metadata={node.status?.nodeInfo ?? {}}\n options={{ nestedValuesAsYaml: true }}\n />\n </Grid>\n <Grid item xs={12}>\n <Typography variant=\"h5\">Addresses</Typography>\n <StructuredMetadataTable\n metadata={\n node.status?.addresses?.reduce((accum, next) => {\n accum[next.type] = next.address;\n return accum;\n }, {} as any) ?? {}\n }\n options={{ nestedValuesAsYaml: true }}\n />\n </Grid>\n <Grid item xs={12}>\n <Typography variant=\"h5\">Taints</Typography>\n <StructuredMetadataTable\n metadata={\n node.spec?.taints?.reduce((accum, next) => {\n accum[`${next.effect}`] = `${next.key} (${next.value})`;\n return accum;\n }, {} as any) ?? {}\n }\n options={{ nestedValuesAsYaml: true }}\n />\n </Grid>\n </Grid>\n </KubernetesDrawer>\n );\n },\n },\n {\n title: 'Schedulable',\n align: 'center',\n width: 'auto',\n render: (node: INode) => {\n if (node.spec?.unschedulable) {\n return '❌';\n }\n return '✅';\n },\n },\n {\n title: 'Status',\n width: 'auto',\n render: (node: INode) => {\n // TODO add an icon\n const readyCondition = node.status?.conditions?.find(c => {\n return c.type === 'Ready';\n });\n if (!readyCondition) {\n return 'Unknown';\n }\n return readyCondition.status === 'True' ? 'Ready' : 'Not Ready';\n },\n },\n {\n title: 'OS',\n width: 'auto',\n render: (node: INode) => {\n return `${node.status?.nodeInfo?.operatingSystem ?? 'unknown'} (${\n node.status?.nodeInfo?.architecture ?? '?'\n })`;\n },\n },\n];\n\nexport const Nodes = () => {\n const classes = useStyles();\n const { entity } = useEntity();\n const { value, error, loading } = useNodes({\n clusterName: entity.metadata.name,\n });\n const { setError } = useKubernetesClusterError();\n const setErrorCallback = useCallback(setError, [setError]);\n useEffect(() => {\n if (error) {\n setErrorCallback(error.message);\n }\n }, [error, setErrorCallback]);\n\n return (\n <Table\n title=\"Nodes\"\n options={{ paging: true, search: false, emptyRowsWhenPaging: false }}\n isLoading={!value && loading}\n data={value?.items ?? []}\n emptyContent={\n <div className={classes.empty}>\n {error !== undefined ? 'Error loading nodes' : 'No nodes found'}\n </div>\n }\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AU,EAAA,CAAC,QAAQ,CAAC,CAAA;AACzD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,KAAO,EAAA;AACT,MAAA,gBAAA,CAAiB,MAAM,OAAO,CAAA;AAAA;AAChC,GACC,EAAA,CAAC,KAAO,EAAA,gBAAgB,CAAC,CAAA;AAE5B,EACE,uBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,OAAA;AAAA,MACN,SAAS,EAAE,MAAA,EAAQ,MAAM,MAAQ,EAAA,KAAA,EAAO,qBAAqB,KAAM,EAAA;AAAA,MACnE,SAAA,EAAW,CAAC,KAAS,IAAA,OAAA;AAAA,MACrB,IAAA,EAAM,KAAO,EAAA,KAAA,IAAS,EAAC;AAAA,MACvB,YAAA,sBACG,KAAI,EAAA,EAAA,SAAA,EAAW,QAAQ,KACrB,EAAA,QAAA,EAAA,KAAA,KAAU,KAAY,CAAA,GAAA,qBAAA,GAAwB,gBACjD,EAAA,CAAA;AAAA,MAEF,OAAS,EAAA;AAAA;AAAA,GACX;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Entity } from '@backstage/catalog-model';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -25,6 +25,6 @@ declare const isKubernetesClusterAvailable: (entity: Entity) => boolean;
|
|
|
25
25
|
*
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
declare const Router: () =>
|
|
28
|
+
declare const Router: () => react_jsx_runtime.JSX.Element;
|
|
29
29
|
|
|
30
30
|
export { EntityKubernetesClusterContent, type EntityKubernetesClusterContentProps, Router, isKubernetesClusterAvailable };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-kubernetes-cluster",
|
|
3
|
-
"version": "0.0.24-next.
|
|
3
|
+
"version": "0.0.24-next.2",
|
|
4
4
|
"description": "A Backstage plugin that shows details of Kubernetes clusters",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"types": "./dist/index.d.ts",
|
|
42
42
|
"typesVersions": {
|
|
43
43
|
"*": {
|
|
44
|
-
"*": [
|
|
45
|
-
"dist/index.d.ts"
|
|
46
|
-
],
|
|
47
44
|
"alpha": [
|
|
48
45
|
"dist/alpha.d.ts"
|
|
46
|
+
],
|
|
47
|
+
"package.json": [
|
|
48
|
+
"package.json"
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
},
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@backstage/catalog-model": "1.7.3",
|
|
66
|
-
"@backstage/core-components": "0.17.1-next.
|
|
67
|
-
"@backstage/core-plugin-api": "1.10.
|
|
68
|
-
"@backstage/plugin-catalog-react": "1.
|
|
66
|
+
"@backstage/core-components": "0.17.1-next.1",
|
|
67
|
+
"@backstage/core-plugin-api": "1.10.6-next.0",
|
|
68
|
+
"@backstage/plugin-catalog-react": "1.17.0-next.2",
|
|
69
69
|
"@backstage/plugin-kubernetes-common": "0.9.4",
|
|
70
|
-
"@backstage/plugin-kubernetes-react": "0.5.6-next.
|
|
71
|
-
"@backstage/plugin-permission-react": "0.4.
|
|
70
|
+
"@backstage/plugin-kubernetes-react": "0.5.6-next.1",
|
|
71
|
+
"@backstage/plugin-permission-react": "0.4.33-next.0",
|
|
72
72
|
"@kubernetes-models/apimachinery": "^2.0.0",
|
|
73
73
|
"@kubernetes-models/base": "^5.0.0",
|
|
74
74
|
"@material-ui/core": "^4.12.2",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"react-use": "^17.2.4"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@backstage/cli": "0.32.0-next.
|
|
85
|
-
"@backstage/test-utils": "1.7.
|
|
84
|
+
"@backstage/cli": "0.32.0-next.2",
|
|
85
|
+
"@backstage/test-utils": "1.7.7-next.0",
|
|
86
86
|
"@testing-library/dom": "^10.0.0",
|
|
87
87
|
"@testing-library/jest-dom": "^6.0.0",
|
|
88
88
|
"@testing-library/react": "^16.0.0",
|