@backstage/plugin-kubernetes 0.7.1-next.1 → 0.7.2-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,37 @@
1
1
  # @backstage/plugin-kubernetes
2
2
 
3
+ ## 0.7.2-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - bf5e9030eb: Updated dependency `msw` to `^0.45.0`.
8
+ - ef9ab322de: Minor API signatures cleanup
9
+ - Updated dependencies
10
+ - @backstage/core-plugin-api@1.0.6-next.0
11
+ - @backstage/core-components@0.11.1-next.0
12
+ - @backstage/plugin-catalog-react@1.1.4-next.0
13
+
14
+ ## 0.7.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 860ed68343: Fixed bug in CronJobsAccordions component that causes an error when cronjobs use a kubernetes alias, such as `@hourly` or `@daily` instead of standard cron syntax.
19
+ - f563b86a5b: Adds namespace column to Kubernetes error reporting table
20
+ - Updated dependencies
21
+ - @backstage/plugin-kubernetes-common@0.4.1
22
+ - @backstage/core-components@0.11.0
23
+ - @backstage/core-plugin-api@1.0.5
24
+ - @backstage/plugin-catalog-react@1.1.3
25
+
26
+ ## 0.7.1-next.2
27
+
28
+ ### Patch Changes
29
+
30
+ - f563b86a5b: Adds namespace column to Kubernetes error reporting table
31
+ - Updated dependencies
32
+ - @backstage/plugin-catalog-react@1.1.3-next.2
33
+ - @backstage/core-components@0.11.0-next.2
34
+
3
35
  ## 0.7.1-next.1
4
36
 
5
37
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -173,6 +173,7 @@ declare type DetectedErrorsByCluster = Map<string, DetectedError[]>;
173
173
  interface DetectedError {
174
174
  severity: ErrorSeverity;
175
175
  cluster: string;
176
+ namespace: string;
176
177
  kind: ErrorDetectableKind;
177
178
  names: string[];
178
179
  message: string[];
@@ -191,9 +192,10 @@ declare type ErrorReportingProps = {
191
192
  };
192
193
  declare const ErrorReporting: ({ detectedErrors }: ErrorReportingProps) => JSX.Element;
193
194
 
194
- declare const HorizontalPodAutoscalerDrawer: ({ hpa, expanded, children, }: {
195
+ /** @public */
196
+ declare const HorizontalPodAutoscalerDrawer: (props: {
195
197
  hpa: V1HorizontalPodAutoscaler;
196
- expanded?: boolean | undefined;
198
+ expanded?: boolean;
197
199
  children?: React.ReactNode;
198
200
  }) => JSX.Element;
199
201
 
@@ -219,9 +221,10 @@ interface KubernetesDrawerProps<T extends KubernetesDrawerable> {
219
221
  }
220
222
  declare const KubernetesDrawer: <T extends KubernetesDrawerable>({ object, renderObject, kind, buttonVariant, expanded, children, }: KubernetesDrawerProps<T>) => JSX.Element;
221
223
 
222
- declare const PodDrawer: ({ pod, expanded, }: {
224
+ /** @public */
225
+ declare const PodDrawer: (props: {
223
226
  pod: V1Pod;
224
- expanded?: boolean | undefined;
227
+ expanded?: boolean;
225
228
  }) => JSX.Element;
226
229
 
227
230
  declare type PodColumns = 'READY' | 'RESOURCE';
package/dist/index.esm.js CHANGED
@@ -254,12 +254,17 @@ const ErrorPanel$1 = ({
254
254
  const columns = [
255
255
  {
256
256
  title: "cluster",
257
- width: "15%",
257
+ width: "10%",
258
258
  render: (detectedError) => detectedError.cluster
259
259
  },
260
+ {
261
+ title: "namespace",
262
+ width: "10%",
263
+ render: (detectedError) => detectedError.namespace
264
+ },
260
265
  {
261
266
  title: "kind",
262
- width: "15%",
267
+ width: "10%",
263
268
  render: (detectedError) => detectedError.kind
264
269
  },
265
270
  {
@@ -501,7 +506,7 @@ const podStatusToMemoryUtil = (podStatus) => {
501
506
  };
502
507
 
503
508
  const detectErrorsInObjects = (objects, kind, clusterName, errorMappers) => {
504
- var _a, _b;
509
+ var _a, _b, _c, _d;
505
510
  const errors = /* @__PURE__ */ new Map();
506
511
  for (const object of objects) {
507
512
  for (const errorMapper of errorMappers) {
@@ -510,6 +515,7 @@ const detectErrorsInObjects = (objects, kind, clusterName, errorMappers) => {
510
515
  const dedupKey = message.join("");
511
516
  const value = errors.get(dedupKey);
512
517
  const name = (_b = (_a = object.metadata) == null ? void 0 : _a.name) != null ? _b : "unknown";
518
+ const namespace = (_d = (_c = object.metadata) == null ? void 0 : _c.namespace) != null ? _d : "unknown";
513
519
  if (value !== void 0) {
514
520
  value.names.push(name);
515
521
  errors.set(dedupKey, value);
@@ -519,7 +525,8 @@ const detectErrorsInObjects = (objects, kind, clusterName, errorMappers) => {
519
525
  kind,
520
526
  names: [name],
521
527
  message,
522
- severity: errorMapper.severity
528
+ severity: errorMapper.severity,
529
+ namespace
523
530
  });
524
531
  }
525
532
  }
@@ -1152,10 +1159,8 @@ const KubernetesDrawer = ({
1152
1159
  })));
1153
1160
  };
1154
1161
 
1155
- const PodDrawer = ({
1156
- pod,
1157
- expanded
1158
- }) => {
1162
+ const PodDrawer = (props) => {
1163
+ const { pod, expanded } = props;
1159
1164
  return /* @__PURE__ */ React__default.createElement(KubernetesDrawer, {
1160
1165
  object: pod,
1161
1166
  expanded,
@@ -1312,11 +1317,8 @@ const DeploymentDrawer = ({
1312
1317
  }))));
1313
1318
  };
1314
1319
 
1315
- const HorizontalPodAutoscalerDrawer = ({
1316
- hpa,
1317
- expanded,
1318
- children
1319
- }) => {
1320
+ const HorizontalPodAutoscalerDrawer = (props) => {
1321
+ const { hpa, expanded, children } = props;
1320
1322
  return /* @__PURE__ */ React__default.createElement(KubernetesDrawer, {
1321
1323
  kind: "HorizontalPodAutoscaler",
1322
1324
  object: hpa,