@backstage/plugin-kubernetes-react 0.1.0-next.1 → 0.1.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @backstage/plugin-kubernetes-react
2
2
 
3
+ ## 0.1.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 6c2b872153: Add official support for React 18.
8
+ - Updated dependencies
9
+ - @backstage/core-components@0.13.7-next.0
10
+ - @backstage/core-plugin-api@1.8.0-next.0
11
+ - @backstage/catalog-model@1.4.3
12
+ - @backstage/errors@1.2.3
13
+ - @backstage/types@1.1.1
14
+ - @backstage/plugin-kubernetes-common@0.7.1-next.0
15
+
16
+ ## 0.1.0
17
+
18
+ ### Minor Changes
19
+
20
+ - 2d8151061c: Refactor Kubernetes plugins in line with ADR 11, no breaking changes yet
21
+
22
+ ### Patch Changes
23
+
24
+ - 4262e12921: Handle mixed decimals and bigint when calculating k8s resource usage
25
+ - 9a1fce352e: Updated dependency `@testing-library/jest-dom` to `^6.0.0`.
26
+ - 95518765ee: Add Kubernetes cluster plugin. Viewing Kubernetes clusters as an Admin from Backstage
27
+ - 5dac12e435: The kubernetes APIs invokes Authentication Strategies when Backstage-Kubernetes-Authorization-X-X headers are provided, this enable the possibility to invoke strategies that executes additional steps to get a kubernetes token like on pinniped or custom strategies
28
+ - Updated dependencies
29
+ - @backstage/core-plugin-api@1.7.0
30
+ - @backstage/core-components@0.13.6
31
+ - @backstage/catalog-model@1.4.3
32
+ - @backstage/errors@1.2.3
33
+ - @backstage/plugin-kubernetes-common@0.7.0
34
+ - @backstage/types@1.1.1
35
+
3
36
  ## 0.1.0-next.1
4
37
 
5
38
  ### Patch Changes
package/dist/index.esm.js CHANGED
@@ -1914,8 +1914,12 @@ const currentToDeclaredResourceToPerc = (current, resource) => {
1914
1914
  if (typeof current === "number" && typeof resource === "number") {
1915
1915
  return `${Math.round(current / resource * 100)}%`;
1916
1916
  }
1917
- const numerator = BigInt(current);
1918
- const denominator = BigInt(resource);
1917
+ const numerator = BigInt(
1918
+ typeof current === "number" ? Math.round(current) : current
1919
+ );
1920
+ const denominator = BigInt(
1921
+ typeof resource === "number" ? Math.round(resource) : resource
1922
+ );
1919
1923
  return `${numerator * BigInt(100) / denominator}%`;
1920
1924
  };
1921
1925
  const podStatusToCpuUtil = (podStatus) => {