@backstage/plugin-kubernetes-react 0.4.0 → 0.4.1-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 +20 -0
- package/dist/api/KubernetesBackendClient.esm.js +1 -2
- package/dist/api/KubernetesBackendClient.esm.js.map +1 -1
- package/dist/components/CustomResources/ArgoRollouts/RolloutDrawer.esm.js +4 -1
- package/dist/components/CustomResources/ArgoRollouts/RolloutDrawer.esm.js.map +1 -1
- package/dist/utils/pod.esm.js +1 -2
- package/dist/utils/pod.esm.js.map +1 -1
- package/dist/utils/resources.esm.js +1 -2
- package/dist/utils/resources.esm.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-react
|
|
2
2
|
|
|
3
|
+
## 0.4.1-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e3cb6ab: Add a namespace label to RolloutDrawer
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/core-components@0.14.9-next.1
|
|
10
|
+
|
|
11
|
+
## 0.4.1-next.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/core-components@0.14.9-next.0
|
|
17
|
+
- @backstage/core-plugin-api@1.9.3
|
|
18
|
+
- @backstage/catalog-model@1.5.0
|
|
19
|
+
- @backstage/errors@1.2.4
|
|
20
|
+
- @backstage/types@1.1.1
|
|
21
|
+
- @backstage/plugin-kubernetes-common@0.8.0
|
|
22
|
+
|
|
3
23
|
## 0.4.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -107,8 +107,7 @@ class KubernetesBackendClient {
|
|
|
107
107
|
static getKubernetesAuthHeaderByAuthProvider(authProvider, oidcTokenProvider) {
|
|
108
108
|
let header = "Backstage-Kubernetes-Authorization";
|
|
109
109
|
header = header.concat("-", authProvider);
|
|
110
|
-
if (oidcTokenProvider)
|
|
111
|
-
header = header.concat("-", oidcTokenProvider);
|
|
110
|
+
if (oidcTokenProvider) header = header.concat("-", oidcTokenProvider);
|
|
112
111
|
return header;
|
|
113
112
|
}
|
|
114
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KubernetesBackendClient.esm.js","sources":["../../src/api/KubernetesBackendClient.ts"],"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 { KubernetesApi } from './types';\nimport {\n KubernetesRequestBody,\n ObjectsByEntityResponse,\n WorkloadsByEntityRequest,\n CustomObjectsByEntityRequest,\n} from '@backstage/plugin-kubernetes-common';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { KubernetesAuthProvidersApi } from '../kubernetes-auth-provider';\nimport { NotFoundError } from '@backstage/errors';\n\n/** @public */\nexport class KubernetesBackendClient implements KubernetesApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n private readonly kubernetesAuthProvidersApi: KubernetesAuthProvidersApi;\n\n constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n kubernetesAuthProvidersApi: KubernetesAuthProvidersApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n this.kubernetesAuthProvidersApi = options.kubernetesAuthProvidersApi;\n }\n\n private async handleResponse(response: Response): Promise<any> {\n if (!response.ok) {\n const payload = await response.text();\n let message;\n switch (response.status) {\n case 404:\n message =\n 'Could not find the Kubernetes Backend (HTTP 404). Make sure the plugin has been fully installed.';\n break;\n default:\n message = `Request failed with ${response.status} ${response.statusText}, ${payload}`;\n }\n throw new Error(message);\n }\n\n return await response.json();\n }\n\n private async postRequired(path: string, requestBody: any): Promise<any> {\n const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}${path}`;\n const response = await this.fetchApi.fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(requestBody),\n });\n\n return this.handleResponse(response);\n }\n\n public async getCluster(clusterName: string): Promise<{\n name: string;\n authProvider: string;\n oidcTokenProvider?: string;\n }> {\n const cluster = await this.getClusters().then(clusters =>\n clusters.find(c => c.name === clusterName),\n );\n if (!cluster) {\n throw new NotFoundError(`Cluster ${clusterName} not found`);\n }\n\n return cluster;\n }\n\n private async getCredentials(\n authProvider: string,\n oidcTokenProvider?: string,\n ): Promise<{ token?: string }> {\n return await this.kubernetesAuthProvidersApi.getCredentials(\n authProvider === 'oidc'\n ? `${authProvider}.${oidcTokenProvider}`\n : authProvider,\n );\n }\n\n async getObjectsByEntity(\n requestBody: KubernetesRequestBody,\n ): Promise<ObjectsByEntityResponse> {\n return await this.postRequired(\n `/services/${requestBody.entity.metadata.name}`,\n requestBody,\n );\n }\n\n async getWorkloadsByEntity(\n request: WorkloadsByEntityRequest,\n ): Promise<ObjectsByEntityResponse> {\n return await this.postRequired('/resources/workloads/query', {\n auth: request.auth,\n entityRef: stringifyEntityRef(request.entity),\n });\n }\n\n async getCustomObjectsByEntity(\n request: CustomObjectsByEntityRequest,\n ): Promise<ObjectsByEntityResponse> {\n return await this.postRequired(`/resources/custom/query`, {\n entityRef: stringifyEntityRef(request.entity),\n auth: request.auth,\n customResources: request.customResources,\n });\n }\n\n async getClusters(): Promise<{ name: string; authProvider: string }[]> {\n const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}/clusters`;\n const response = await this.fetchApi.fetch(url);\n\n return (await this.handleResponse(response)).items;\n }\n\n async proxy(options: {\n clusterName: string;\n path: string;\n init?: RequestInit;\n }): Promise<Response> {\n const { authProvider, oidcTokenProvider } = await this.getCluster(\n options.clusterName,\n );\n const kubernetesCredentials = await this.getCredentials(\n authProvider,\n oidcTokenProvider,\n );\n const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}/proxy${\n options.path\n }`;\n const headers = KubernetesBackendClient.getKubernetesHeaders(\n options,\n kubernetesCredentials?.token,\n authProvider,\n oidcTokenProvider,\n );\n return await this.fetchApi.fetch(url, { ...options.init, headers });\n }\n\n private static getKubernetesHeaders(\n options: {\n clusterName: string;\n path: string;\n init?: RequestInit;\n },\n k8sToken: string | undefined,\n authProvider: string,\n oidcTokenProvider: string | undefined,\n ) {\n const kubernetesAuthHeader =\n KubernetesBackendClient.getKubernetesAuthHeaderByAuthProvider(\n authProvider,\n oidcTokenProvider,\n );\n return {\n ...options.init?.headers,\n [`Backstage-Kubernetes-Cluster`]: options.clusterName,\n ...(k8sToken && {\n [kubernetesAuthHeader]: k8sToken,\n }),\n };\n }\n\n private static getKubernetesAuthHeaderByAuthProvider(\n authProvider: string,\n oidcTokenProvider: string | undefined,\n ): string {\n let header: string = 'Backstage-Kubernetes-Authorization';\n\n header = header.concat('-', authProvider);\n\n if (oidcTokenProvider) header = header.concat('-', oidcTokenProvider);\n\n return header;\n }\n}\n"],"names":[],"mappings":";;;AA6BO,MAAM,uBAAiD,CAAA;AAAA,EAC3C,YAAA,CAAA;AAAA,EACA,QAAA,CAAA;AAAA,EACA,0BAAA,CAAA;AAAA,EAEjB,YAAY,OAIT,EAAA;AACD,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA,CAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAQ,CAAA,QAAA,CAAA;AACxB,IAAA,IAAA,CAAK,6BAA6B,OAAQ,CAAA,0BAAA,CAAA;AAAA,GAC5C;AAAA,EAEA,MAAc,eAAe,QAAkC,EAAA;AAC7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C1C,GAAI,QAAY,IAAA;AAAA,QACd,CAAC,oBAAoB,GAAG,QAAA;AAAA,OAC1B;AAAA,KACF,CAAA;AAAA,GACF;AAAA,EAEA,OAAe,qCACb,CAAA,YAAA,EACA,iBACQ,EAAA;AACR,IAAA,IAAI,MAAiB,GAAA,oCAAA,CAAA;AAErB,IAAS,MAAA,GAAA,MAAA,CAAO,MAAO,CAAA,GAAA,EAAK,YAAY,CAAA,CAAA;AAExC,IAAI,IAAA,iBAAA;AAAmB,MAAS,MAAA,GAAA,MAAA,CAAO,MAAO,CAAA,GAAA,EAAK,iBAAiB,CAAA,CAAA;AAEpE,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"KubernetesBackendClient.esm.js","sources":["../../src/api/KubernetesBackendClient.ts"],"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 { KubernetesApi } from './types';\nimport {\n KubernetesRequestBody,\n ObjectsByEntityResponse,\n WorkloadsByEntityRequest,\n CustomObjectsByEntityRequest,\n} from '@backstage/plugin-kubernetes-common';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { KubernetesAuthProvidersApi } from '../kubernetes-auth-provider';\nimport { NotFoundError } from '@backstage/errors';\n\n/** @public */\nexport class KubernetesBackendClient implements KubernetesApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n private readonly kubernetesAuthProvidersApi: KubernetesAuthProvidersApi;\n\n constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n kubernetesAuthProvidersApi: KubernetesAuthProvidersApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n this.kubernetesAuthProvidersApi = options.kubernetesAuthProvidersApi;\n }\n\n private async handleResponse(response: Response): Promise<any> {\n if (!response.ok) {\n const payload = await response.text();\n let message;\n switch (response.status) {\n case 404:\n message =\n 'Could not find the Kubernetes Backend (HTTP 404). Make sure the plugin has been fully installed.';\n break;\n default:\n message = `Request failed with ${response.status} ${response.statusText}, ${payload}`;\n }\n throw new Error(message);\n }\n\n return await response.json();\n }\n\n private async postRequired(path: string, requestBody: any): Promise<any> {\n const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}${path}`;\n const response = await this.fetchApi.fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(requestBody),\n });\n\n return this.handleResponse(response);\n }\n\n public async getCluster(clusterName: string): Promise<{\n name: string;\n authProvider: string;\n oidcTokenProvider?: string;\n }> {\n const cluster = await this.getClusters().then(clusters =>\n clusters.find(c => c.name === clusterName),\n );\n if (!cluster) {\n throw new NotFoundError(`Cluster ${clusterName} not found`);\n }\n\n return cluster;\n }\n\n private async getCredentials(\n authProvider: string,\n oidcTokenProvider?: string,\n ): Promise<{ token?: string }> {\n return await this.kubernetesAuthProvidersApi.getCredentials(\n authProvider === 'oidc'\n ? `${authProvider}.${oidcTokenProvider}`\n : authProvider,\n );\n }\n\n async getObjectsByEntity(\n requestBody: KubernetesRequestBody,\n ): Promise<ObjectsByEntityResponse> {\n return await this.postRequired(\n `/services/${requestBody.entity.metadata.name}`,\n requestBody,\n );\n }\n\n async getWorkloadsByEntity(\n request: WorkloadsByEntityRequest,\n ): Promise<ObjectsByEntityResponse> {\n return await this.postRequired('/resources/workloads/query', {\n auth: request.auth,\n entityRef: stringifyEntityRef(request.entity),\n });\n }\n\n async getCustomObjectsByEntity(\n request: CustomObjectsByEntityRequest,\n ): Promise<ObjectsByEntityResponse> {\n return await this.postRequired(`/resources/custom/query`, {\n entityRef: stringifyEntityRef(request.entity),\n auth: request.auth,\n customResources: request.customResources,\n });\n }\n\n async getClusters(): Promise<{ name: string; authProvider: string }[]> {\n const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}/clusters`;\n const response = await this.fetchApi.fetch(url);\n\n return (await this.handleResponse(response)).items;\n }\n\n async proxy(options: {\n clusterName: string;\n path: string;\n init?: RequestInit;\n }): Promise<Response> {\n const { authProvider, oidcTokenProvider } = await this.getCluster(\n options.clusterName,\n );\n const kubernetesCredentials = await this.getCredentials(\n authProvider,\n oidcTokenProvider,\n );\n const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}/proxy${\n options.path\n }`;\n const headers = KubernetesBackendClient.getKubernetesHeaders(\n options,\n kubernetesCredentials?.token,\n authProvider,\n oidcTokenProvider,\n );\n return await this.fetchApi.fetch(url, { ...options.init, headers });\n }\n\n private static getKubernetesHeaders(\n options: {\n clusterName: string;\n path: string;\n init?: RequestInit;\n },\n k8sToken: string | undefined,\n authProvider: string,\n oidcTokenProvider: string | undefined,\n ) {\n const kubernetesAuthHeader =\n KubernetesBackendClient.getKubernetesAuthHeaderByAuthProvider(\n authProvider,\n oidcTokenProvider,\n );\n return {\n ...options.init?.headers,\n [`Backstage-Kubernetes-Cluster`]: options.clusterName,\n ...(k8sToken && {\n [kubernetesAuthHeader]: k8sToken,\n }),\n };\n }\n\n private static getKubernetesAuthHeaderByAuthProvider(\n authProvider: string,\n oidcTokenProvider: string | undefined,\n ): string {\n let header: string = 'Backstage-Kubernetes-Authorization';\n\n header = header.concat('-', authProvider);\n\n if (oidcTokenProvider) header = header.concat('-', oidcTokenProvider);\n\n return header;\n }\n}\n"],"names":[],"mappings":";;;AA6BO,MAAM,uBAAiD,CAAA;AAAA,EAC3C,YAAA,CAAA;AAAA,EACA,QAAA,CAAA;AAAA,EACA,0BAAA,CAAA;AAAA,EAEjB,YAAY,OAIT,EAAA;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IAAA,MAAM,uBACJ,uBAAwB,CAAA,qCAAA;AAAA,MACtB,YAAA;AAAA,MACA,iBAAA;AAAA,KACF,CAAA;AACF,IAAO,OAAA;AAAA,MACL,GAAG,QAAQ,IAAM,EAAA,OAAA;AAAA,MACjB,CAAC,CAA8B,4BAAA,CAAA,GAAG,OAAQ,CAAA,WAAA;AAAA,MAC1C,GAAI,QAAY,IAAA;AAAA,QACd,CAAC,oBAAoB,GAAG,QAAA;AAAA,OAC1B;AAAA,KACF,CAAA;AAAA,GACF;AAAA,EAEA,OAAe,qCACb,CAAA,YAAA,EACA,iBACQ,EAAA;AACR,IAAA,IAAI,MAAiB,GAAA,oCAAA,CAAA;AAErB,IAAS,MAAA,GAAA,MAAA,CAAO,MAAO,CAAA,GAAA,EAAK,YAAY,CAAA,CAAA;AAExC,IAAA,IAAI,iBAAmB,EAAA,MAAA,GAAS,MAAO,CAAA,MAAA,CAAO,KAAK,iBAAiB,CAAA,CAAA;AAEpE,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AACF;;;;"}
|
|
@@ -7,11 +7,13 @@ import '@material-ui/core/Switch';
|
|
|
7
7
|
import 'js-yaml';
|
|
8
8
|
import Typography from '@material-ui/core/Typography';
|
|
9
9
|
import Grid from '@material-ui/core/Grid';
|
|
10
|
+
import Chip from '@material-ui/core/Chip';
|
|
10
11
|
|
|
11
12
|
const RolloutDrawer = ({
|
|
12
13
|
rollout,
|
|
13
14
|
expanded
|
|
14
15
|
}) => {
|
|
16
|
+
const namespace = rollout.metadata?.namespace;
|
|
15
17
|
return /* @__PURE__ */ React__default.createElement(
|
|
16
18
|
KubernetesStructuredMetadataTableDrawer,
|
|
17
19
|
{
|
|
@@ -30,7 +32,8 @@ const RolloutDrawer = ({
|
|
|
30
32
|
spacing: 0
|
|
31
33
|
},
|
|
32
34
|
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" }, rollout.metadata?.name ?? "unknown object")),
|
|
33
|
-
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { color: "textSecondary", variant: "subtitle1" }, "Rollout"))
|
|
35
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { color: "textSecondary", variant: "subtitle1" }, "Rollout")),
|
|
36
|
+
namespace && /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Chip, { size: "small", label: `namespace: ${namespace}` }))
|
|
34
37
|
)
|
|
35
38
|
);
|
|
36
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RolloutDrawer.esm.js","sources":["../../../../src/components/CustomResources/ArgoRollouts/RolloutDrawer.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { KubernetesStructuredMetadataTableDrawer } from '../../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\n\nexport const RolloutDrawer = ({\n rollout,\n expanded,\n}: {\n rollout: any;\n expanded?: boolean;\n}) => {\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={rollout}\n expanded={expanded}\n kind=\"Rollout\"\n renderObject={() => ({})}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {rollout.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n Rollout\n </Typography>\n </Grid>\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"RolloutDrawer.esm.js","sources":["../../../../src/components/CustomResources/ArgoRollouts/RolloutDrawer.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { KubernetesStructuredMetadataTableDrawer } from '../../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\nimport Chip from '@material-ui/core/Chip';\n\nexport const RolloutDrawer = ({\n rollout,\n expanded,\n}: {\n rollout: any;\n expanded?: boolean;\n}) => {\n const namespace = rollout.metadata?.namespace;\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={rollout}\n expanded={expanded}\n kind=\"Rollout\"\n renderObject={() => ({})}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {rollout.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n Rollout\n </Typography>\n </Grid>\n {namespace && (\n <Grid item>\n <Chip size=\"small\" label={`namespace: ${namespace}`} />\n </Grid>\n )}\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;AAsBO,MAAM,gBAAgB,CAAC;AAAA,EAC5B,OAAA;AAAA,EACA,QAAA;AACF,CA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(condition) => {
|
|
|
59
59
|
return [condition.type, /* @__PURE__ */ React__default.createElement(StatusAborted, null)];
|
|
60
60
|
};
|
|
61
61
|
const currentToDeclaredResourceToPerc = (current, resource) => {
|
|
62
|
-
if (Number(resource) === 0)
|
|
63
|
-
return `0%`;
|
|
62
|
+
if (Number(resource) === 0) return `0%`;
|
|
64
63
|
if (typeof current === "number" && typeof resource === "number") {
|
|
65
64
|
return `${Math.round(current / resource * 100)}%`;
|
|
66
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pod.esm.js","sources":["../../src/utils/pod.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 {\n V1Pod,\n V1PodCondition,\n V1DeploymentCondition,\n} from '@kubernetes/client-node';\nimport React, { Fragment, ReactNode } from 'react';\nimport Chip from '@material-ui/core/Chip';\nimport {\n StatusAborted,\n StatusError,\n StatusOK,\n SubvalueCell,\n} from '@backstage/core-components';\nimport { ClientPodStatus } from '@backstage/plugin-kubernetes-common';\nimport { Pod } from 'kubernetes-models/v1/Pod';\nimport { bytesToMiB, formatMillicores } from './resources';\n\nexport const imageChips = (pod: V1Pod): ReactNode => {\n const containerStatuses = pod.status?.containerStatuses ?? [];\n const images = containerStatuses.map((cs, i) => {\n return <Chip key={i} label={`${cs.name}=${cs.image}`} size=\"small\" />;\n });\n\n return <div>{images}</div>;\n};\n\nexport const containersReady = (pod: Pod): string => {\n const containerStatuses = pod.status?.containerStatuses ?? [];\n const containersReadyItem = containerStatuses.filter(cs => cs.ready).length;\n\n return `${containersReadyItem}/${containerStatuses.length}`;\n};\n\nexport const totalRestarts = (pod: Pod): number => {\n const containerStatuses = pod.status?.containerStatuses ?? [];\n return containerStatuses?.reduce((a, b) => a + b.restartCount, 0);\n};\n\nexport const containerStatuses = (pod: Pod): ReactNode => {\n const containerStatusesItem = pod.status?.containerStatuses ?? [];\n const errors = containerStatusesItem.reduce((accum, next) => {\n if (next.state === undefined) {\n return accum;\n }\n\n const waiting = next.state.waiting;\n const terminated = next.state.terminated;\n\n const renderCell = (reason: string | undefined) => (\n <Fragment key={`${pod.metadata?.name}-${next.name}`}>\n <SubvalueCell\n value={\n reason === 'Completed' ? (\n <StatusOK>Container: {next.name}</StatusOK>\n ) : (\n <StatusError>Container: {next.name}</StatusError>\n )\n }\n subvalue={reason}\n />\n <br />\n </Fragment>\n );\n\n if (waiting) {\n accum.push(renderCell(waiting.reason));\n }\n\n if (terminated) {\n accum.push(renderCell(terminated.reason));\n }\n\n return accum;\n }, [] as React.ReactNode[]);\n\n if (errors.length === 0) {\n return <StatusOK>OK</StatusOK>;\n }\n\n return errors;\n};\n\nexport const renderCondition = (\n condition: V1PodCondition | V1DeploymentCondition,\n): [string, ReactNode] => {\n const status = condition.status;\n\n if (status === 'True') {\n return [condition.type, <StatusOK>True</StatusOK>];\n } else if (status === 'False') {\n return [\n condition.type,\n <SubvalueCell\n value={<StatusError>False</StatusError>}\n subvalue={condition.message ?? ''}\n />,\n ];\n }\n return [condition.type, <StatusAborted />];\n};\n\n// visible for testing\nexport const currentToDeclaredResourceToPerc = (\n current: number | string,\n resource: number | string,\n): string => {\n if (Number(resource) === 0) return `0%`;\n\n if (typeof current === 'number' && typeof resource === 'number') {\n return `${Math.round((current / resource) * 100)}%`;\n }\n\n const numerator: bigint = BigInt(\n typeof current === 'number' ? Math.round(current) : current,\n );\n const denominator: bigint = BigInt(\n typeof resource === 'number' ? Math.round(resource) : resource,\n );\n\n return `${(numerator * BigInt(100)) / denominator}%`;\n};\n\nexport const podStatusToCpuUtil = (podStatus: ClientPodStatus): ReactNode => {\n const cpuUtil = podStatus.cpu;\n\n let currentUsage: number | string = cpuUtil.currentUsage;\n\n // current usage number for CPU is a different unit than request/limit total\n // this might be a bug in the k8s library\n if (typeof cpuUtil.currentUsage === 'number') {\n currentUsage = cpuUtil.currentUsage / 10;\n }\n\n return (\n <SubvalueCell\n value={`requests: ${currentToDeclaredResourceToPerc(\n currentUsage,\n cpuUtil.requestTotal,\n )} of ${formatMillicores(cpuUtil.requestTotal)}`}\n subvalue={`limits: ${currentToDeclaredResourceToPerc(\n currentUsage,\n cpuUtil.limitTotal,\n )} of ${formatMillicores(cpuUtil.limitTotal)}`}\n />\n );\n};\n\nexport const podStatusToMemoryUtil = (\n podStatus: ClientPodStatus,\n): ReactNode => {\n const memUtil = podStatus.memory;\n\n return (\n <SubvalueCell\n value={`requests: ${currentToDeclaredResourceToPerc(\n memUtil.currentUsage,\n memUtil.requestTotal,\n )} of ${bytesToMiB(memUtil.requestTotal)}`}\n subvalue={`limits: ${currentToDeclaredResourceToPerc(\n memUtil.currentUsage,\n memUtil.limitTotal,\n )} of ${bytesToMiB(memUtil.limitTotal)}`}\n />\n );\n};\n"],"names":["containerStatuses","React"],"mappings":";;;;;AA0Ca,MAAA,eAAA,GAAkB,CAAC,GAAqB,KAAA;AACnD,EAAA,MAAMA,kBAAoB,GAAA,GAAA,CAAI,MAAQ,EAAA,iBAAA,IAAqB,EAAC,CAAA;AAC5D,EAAA,MAAM,sBAAsBA,kBAAkB,CAAA,MAAA,CAAO,CAAM,EAAA,KAAA,EAAA,CAAG,KAAK,CAAE,CAAA,MAAA,CAAA;AAErE,EAAA,OAAO,CAAG,EAAA,mBAAmB,CAAIA,CAAAA,EAAAA,kBAAAA,CAAkB,MAAM,CAAA,CAAA,CAAA;AAC3D,EAAA;AAEa,MAAA,aAAA,GAAgB,CAAC,GAAqB,KAAA;AACjD,EAAA,MAAMA,kBAAoB,GAAA,GAAA,CAAI,MAAQ,EAAA,iBAAA,IAAqB,EAAC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ils/pod.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 {\n V1Pod,\n V1PodCondition,\n V1DeploymentCondition,\n} from '@kubernetes/client-node';\nimport React, { Fragment, ReactNode } from 'react';\nimport Chip from '@material-ui/core/Chip';\nimport {\n StatusAborted,\n StatusError,\n StatusOK,\n SubvalueCell,\n} from '@backstage/core-components';\nimport { ClientPodStatus } from '@backstage/plugin-kubernetes-common';\nimport { Pod } from 'kubernetes-models/v1/Pod';\nimport { bytesToMiB, formatMillicores } from './resources';\n\nexport const imageChips = (pod: V1Pod): ReactNode => {\n const containerStatuses = pod.status?.containerStatuses ?? [];\n const images = containerStatuses.map((cs, i) => {\n return <Chip key={i} label={`${cs.name}=${cs.image}`} size=\"small\" />;\n });\n\n return <div>{images}</div>;\n};\n\nexport const containersReady = (pod: Pod): string => {\n const containerStatuses = pod.status?.containerStatuses ?? [];\n const containersReadyItem = containerStatuses.filter(cs => cs.ready).length;\n\n return `${containersReadyItem}/${containerStatuses.length}`;\n};\n\nexport const totalRestarts = (pod: Pod): number => {\n const containerStatuses = pod.status?.containerStatuses ?? [];\n return containerStatuses?.reduce((a, b) => a + b.restartCount, 0);\n};\n\nexport const containerStatuses = (pod: Pod): ReactNode => {\n const containerStatusesItem = pod.status?.containerStatuses ?? [];\n const errors = containerStatusesItem.reduce((accum, next) => {\n if (next.state === undefined) {\n return accum;\n }\n\n const waiting = next.state.waiting;\n const terminated = next.state.terminated;\n\n const renderCell = (reason: string | undefined) => (\n <Fragment key={`${pod.metadata?.name}-${next.name}`}>\n <SubvalueCell\n value={\n reason === 'Completed' ? (\n <StatusOK>Container: {next.name}</StatusOK>\n ) : (\n <StatusError>Container: {next.name}</StatusError>\n )\n }\n subvalue={reason}\n />\n <br />\n </Fragment>\n );\n\n if (waiting) {\n accum.push(renderCell(waiting.reason));\n }\n\n if (terminated) {\n accum.push(renderCell(terminated.reason));\n }\n\n return accum;\n }, [] as React.ReactNode[]);\n\n if (errors.length === 0) {\n return <StatusOK>OK</StatusOK>;\n }\n\n return errors;\n};\n\nexport const renderCondition = (\n condition: V1PodCondition | V1DeploymentCondition,\n): [string, ReactNode] => {\n const status = condition.status;\n\n if (status === 'True') {\n return [condition.type, <StatusOK>True</StatusOK>];\n } else if (status === 'False') {\n return [\n condition.type,\n <SubvalueCell\n value={<StatusError>False</StatusError>}\n subvalue={condition.message ?? ''}\n />,\n ];\n }\n return [condition.type, <StatusAborted />];\n};\n\n// visible for testing\nexport const currentToDeclaredResourceToPerc = (\n current: number | string,\n resource: number | string,\n): string => {\n if (Number(resource) === 0) return `0%`;\n\n if (typeof current === 'number' && typeof resource === 'number') {\n return `${Math.round((current / resource) * 100)}%`;\n }\n\n const numerator: bigint = BigInt(\n typeof current === 'number' ? Math.round(current) : current,\n );\n const denominator: bigint = BigInt(\n typeof resource === 'number' ? Math.round(resource) : resource,\n );\n\n return `${(numerator * BigInt(100)) / denominator}%`;\n};\n\nexport const podStatusToCpuUtil = (podStatus: ClientPodStatus): ReactNode => {\n const cpuUtil = podStatus.cpu;\n\n let currentUsage: number | string = cpuUtil.currentUsage;\n\n // current usage number for CPU is a different unit than request/limit total\n // this might be a bug in the k8s library\n if (typeof cpuUtil.currentUsage === 'number') {\n currentUsage = cpuUtil.currentUsage / 10;\n }\n\n return (\n <SubvalueCell\n value={`requests: ${currentToDeclaredResourceToPerc(\n currentUsage,\n cpuUtil.requestTotal,\n )} of ${formatMillicores(cpuUtil.requestTotal)}`}\n subvalue={`limits: ${currentToDeclaredResourceToPerc(\n currentUsage,\n cpuUtil.limitTotal,\n )} of ${formatMillicores(cpuUtil.limitTotal)}`}\n />\n );\n};\n\nexport const podStatusToMemoryUtil = (\n podStatus: ClientPodStatus,\n): ReactNode => {\n const memUtil = podStatus.memory;\n\n return (\n <SubvalueCell\n value={`requests: ${currentToDeclaredResourceToPerc(\n memUtil.currentUsage,\n memUtil.requestTotal,\n )} of ${bytesToMiB(memUtil.requestTotal)}`}\n subvalue={`limits: ${currentToDeclaredResourceToPerc(\n memUtil.currentUsage,\n memUtil.limitTotal,\n )} of ${bytesToMiB(memUtil.limitTotal)}`}\n />\n );\n};\n"],"names":["containerStatuses","React"],"mappings":";;;;;AA0Ca,MAAA,eAAA,GAAkB,CAAC,GAAqB,KAAA;AACnD,EAAA,MAAMA,kBAAoB,GAAA,GAAA,CAAI,MAAQ,EAAA,iBAAA,IAAqB,EAAC,CAAA;AAC5D,EAAA,MAAM,sBAAsBA,kBAAkB,CAAA,MAAA,CAAO,CAAM,EAAA,KAAA,EAAA,CAAG,KAAK,CAAE,CAAA,MAAA,CAAA;AAErE,EAAA,OAAO,CAAG,EAAA,mBAAmB,CAAIA,CAAAA,EAAAA,kBAAAA,CAAkB,MAAM,CAAA,CAAA,CAAA;AAC3D,EAAA;AAEa,MAAA,aAAA,GAAgB,CAAC,GAAqB,KAAA;AACjD,EAAA,MAAMA,kBAAoB,GAAA,GAAA,CAAI,MAAQ,EAAA,iBAAA,IAAqB,EAAC,CAAA;AAC5D,EAAOA,OAAAA,kBAAAA,EAAmB,OAAO,CAAC,CAAA,EAAG,MAAM,CAAI,GAAA,CAAA,CAAE,cAAc,CAAC,CAAA,CAAA;AAClE,EAAA;AAEa,MAAA,iBAAA,GAAoB,CAAC,GAAwB,KAAA;AACxD,EAAA,MAAM,qBAAwB,GAAA,GAAA,CAAI,MAAQ,EAAA,iBAAA,IAAqB,EAAC,CAAA;AAChE,EAAA,MAAM,MAAS,GAAA,qBAAA,CAAsB,MAAO,CAAA,CAAC,OAAO,IAAS,KAAA;AAC3D,IAAI,IAAA,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YAAA;AAAA,QACR,OAAQ,CAAA,YAAA;AAAA,OACT,CAAA,IAAA,EAAO,UAAW,CAAA,OAAA,CAAQ,YAAY,CAAC,CAAA,CAAA;AAAA,MACxC,UAAU,CAAW,QAAA,EAAA,+BAAA;AAAA,QACnB,OAAQ,CAAA,YAAA;AAAA,QACR,OAAQ,CAAA,UAAA;AAAA,OACT,CAAA,IAAA,EAAO,UAAW,CAAA,OAAA,CAAQ,UAAU,CAAC,CAAA,CAAA;AAAA,KAAA;AAAA,GACxC,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.esm.js","sources":["../../src/utils/resources.ts"],"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 */\nexport const currentToDeclaredResourceToPerc = (\n current: number | string,\n resource: number | string,\n): number => {\n if (Number(resource) === 0) return 0;\n\n if (typeof current === 'number' && typeof resource === 'number') {\n return Math.round((current / resource) * 100);\n }\n\n const numerator: bigint = BigInt(current);\n const denominator: bigint = BigInt(resource);\n\n return Number((numerator * BigInt(100)) / denominator);\n};\n\nexport const bytesToMiB = (value: string | number): string => {\n return `${(parseFloat(value.toString()) / 1024 / 1024).toFixed(0)}MiB`;\n};\n\nexport const formatMillicores = (value: string | number): string => {\n return `${(parseFloat(value.toString()) * 1000).toFixed(0)}m`;\n};\n"],"names":[],"mappings":"AAea,MAAA,+BAAA,GAAkC,CAC7C,OAAA,EACA,QACW,KAAA;AACX,
|
|
1
|
+
{"version":3,"file":"resources.esm.js","sources":["../../src/utils/resources.ts"],"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 */\nexport const currentToDeclaredResourceToPerc = (\n current: number | string,\n resource: number | string,\n): number => {\n if (Number(resource) === 0) return 0;\n\n if (typeof current === 'number' && typeof resource === 'number') {\n return Math.round((current / resource) * 100);\n }\n\n const numerator: bigint = BigInt(current);\n const denominator: bigint = BigInt(resource);\n\n return Number((numerator * BigInt(100)) / denominator);\n};\n\nexport const bytesToMiB = (value: string | number): string => {\n return `${(parseFloat(value.toString()) / 1024 / 1024).toFixed(0)}MiB`;\n};\n\nexport const formatMillicores = (value: string | number): string => {\n return `${(parseFloat(value.toString()) * 1000).toFixed(0)}m`;\n};\n"],"names":[],"mappings":"AAea,MAAA,+BAAA,GAAkC,CAC7C,OAAA,EACA,QACW,KAAA;AACX,EAAA,IAAI,MAAO,CAAA,QAAQ,CAAM,KAAA,CAAA,EAAU,OAAA,CAAA,CAAA;AAEnC,EAAA,IAAI,OAAO,OAAA,KAAY,QAAY,IAAA,OAAO,aAAa,QAAU,EAAA;AAC/D,IAAA,OAAO,IAAK,CAAA,KAAA,CAAO,OAAU,GAAA,QAAA,GAAY,GAAG,CAAA,CAAA;AAAA,GAC9C;AAEA,EAAM,MAAA,SAAA,GAAoB,OAAO,OAAO,CAAA,CAAA;AACxC,EAAM,MAAA,WAAA,GAAsB,OAAO,QAAQ,CAAA,CAAA;AAE3C,EAAA,OAAO,MAAQ,CAAA,SAAA,GAAY,MAAO,CAAA,GAAG,IAAK,WAAW,CAAA,CAAA;AACvD,EAAA;AAEa,MAAA,UAAA,GAAa,CAAC,KAAmC,KAAA;AAC5D,EAAO,OAAA,CAAA,EAAA,CAAI,UAAW,CAAA,KAAA,CAAM,QAAS,EAAC,IAAI,IAAO,GAAA,IAAA,EAAM,OAAQ,CAAA,CAAC,CAAC,CAAA,GAAA,CAAA,CAAA;AACnE,EAAA;AAEa,MAAA,gBAAA,GAAmB,CAAC,KAAmC,KAAA;AAClE,EAAO,OAAA,CAAA,EAAA,CAAI,WAAW,KAAM,CAAA,QAAA,EAAU,CAAI,GAAA,GAAA,EAAM,OAAQ,CAAA,CAAC,CAAC,CAAA,CAAA,CAAA,CAAA;AAC5D;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-kubernetes-react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1-next.1",
|
|
4
4
|
"description": "Web library for the kubernetes-react plugin",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@backstage/catalog-model": "^1.5.0",
|
|
45
|
-
"@backstage/core-components": "^0.14.
|
|
45
|
+
"@backstage/core-components": "^0.14.9-next.1",
|
|
46
46
|
"@backstage/core-plugin-api": "^1.9.3",
|
|
47
47
|
"@backstage/errors": "^1.2.4",
|
|
48
48
|
"@backstage/plugin-kubernetes-common": "^0.8.0",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"xterm-addon-fit": "^0.8.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@backstage/cli": "^0.26.
|
|
69
|
-
"@backstage/core-app-api": "^1.
|
|
70
|
-
"@backstage/test-utils": "^1.5.
|
|
68
|
+
"@backstage/cli": "^0.26.11-next.1",
|
|
69
|
+
"@backstage/core-app-api": "^1.13.1-next.1",
|
|
70
|
+
"@backstage/test-utils": "^1.5.8-next.1",
|
|
71
71
|
"@testing-library/jest-dom": "^6.0.0",
|
|
72
72
|
"@testing-library/react": "^15.0.0",
|
|
73
73
|
"jest-websocket-mock": "^2.5.0",
|