@backstage/plugin-kubernetes 0.7.5-next.3 → 0.7.5

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,36 @@
1
1
  # @backstage/plugin-kubernetes
2
2
 
3
+ ## 0.7.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 2db8acffe7: Kubernetes plugin now gracefully surfaces transport-level errors (like DNS or timeout, or other socket errors) occurring while fetching data. This will be merged into any data that is fetched successfully, fixing a bug where the whole page would be empty if any fetch operation encountered such an error.
8
+ - 365f887717: Removed rendering for ErrorEmptyState in ErrorReporting component, so nothing is rendered when there are no errors. Also removed Divider on Kubernetes page.
9
+ - 3280711113: Updated dependency `msw` to `^0.49.0`.
10
+ - 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`.
11
+ - Updated dependencies
12
+ - @backstage/plugin-kubernetes-common@0.5.0
13
+ - @backstage/core-plugin-api@1.2.0
14
+ - @backstage/core-components@0.12.1
15
+ - @backstage/plugin-catalog-react@1.2.2
16
+ - @backstage/catalog-model@1.1.4
17
+ - @backstage/config@1.0.5
18
+ - @backstage/theme@0.2.16
19
+
20
+ ## 0.7.5-next.4
21
+
22
+ ### Patch Changes
23
+
24
+ - 365f887717: Removed rendering for ErrorEmptyState in ErrorReporting component, so nothing is rendered when there are no errors. Also removed Divider on Kubernetes page.
25
+ - Updated dependencies
26
+ - @backstage/core-components@0.12.1-next.4
27
+ - @backstage/plugin-catalog-react@1.2.2-next.4
28
+ - @backstage/catalog-model@1.1.4-next.1
29
+ - @backstage/config@1.0.5-next.1
30
+ - @backstage/core-plugin-api@1.2.0-next.2
31
+ - @backstage/theme@0.2.16
32
+ - @backstage/plugin-kubernetes-common@0.4.5-next.1
33
+
3
34
  ## 0.7.5-next.3
4
35
 
5
36
  ### Patch Changes
package/dist/index.esm.js CHANGED
@@ -4,9 +4,8 @@ import * as React from 'react';
4
4
  import React__default, { Fragment, useCallback, useState, useContext } from 'react';
5
5
  import { useEntity } from '@backstage/plugin-catalog-react';
6
6
  import { Routes, Route } from 'react-router-dom';
7
- import { Typography, Chip, Grid, makeStyles, createStyles, Button, Drawer, IconButton, FormControlLabel, Switch, Accordion, AccordionSummary, AccordionDetails, Divider, Stepper, Step, StepLabel } from '@material-ui/core';
8
- import { WarningPanel, InfoCard, Table, StatusOK, SubvalueCell, StatusError, StatusAborted, Button as Button$1, CodeSnippet, StructuredMetadataTable, StatusPending, Page, Content, Progress, MissingAnnotationEmptyState } from '@backstage/core-components';
9
- import EmptyStateImage from './assets/emptystate.svg';
7
+ import { Typography, Chip, makeStyles, createStyles, Button, Drawer, Grid, IconButton, FormControlLabel, Switch, Accordion, AccordionSummary, AccordionDetails, Divider, Stepper, Step, StepLabel } from '@material-ui/core';
8
+ import { WarningPanel, Table, StatusOK, SubvalueCell, StatusError, StatusAborted, Button as Button$1, CodeSnippet, StructuredMetadataTable, StatusPending, Page, Content, Progress, MissingAnnotationEmptyState } from '@backstage/core-components';
10
9
  import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
11
10
  import Close from '@material-ui/icons/Close';
12
11
  import OpenInNewIcon from '@material-ui/icons/OpenInNew';
@@ -19,6 +18,7 @@ import lodash from 'lodash';
19
18
  import PauseIcon from '@material-ui/icons/Pause';
20
19
  import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';
21
20
  import { DateTime } from 'luxon';
21
+ import EmptyStateImage from './assets/emptystate.svg';
22
22
 
23
23
  class KubernetesBackendClient {
24
24
  constructor(options) {
@@ -244,7 +244,7 @@ const EntityKubernetesContent = kubernetesPlugin.provide(
244
244
  const clustersWithErrorsToErrorMessage = (clustersWithErrors) => {
245
245
  return clustersWithErrors.map((c, i) => {
246
246
  return /* @__PURE__ */ React__default.createElement("div", { key: i }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body2" }, `Cluster: ${c.cluster.name}`), c.errors.map((e, j) => {
247
- return /* @__PURE__ */ React__default.createElement(Typography, { variant: "body2", key: j }, `Error fetching Kubernetes resource: '${e.resourcePath}', error: ${e.errorType}, status code: ${e.statusCode}`);
247
+ return /* @__PURE__ */ React__default.createElement(Typography, { variant: "body2", key: j }, e.errorType === "FETCH_ERROR" ? `Error communicating with Kubernetes: ${e.errorType}, message: ${e.message}` : `Error fetching Kubernetes resource: '${e.resourcePath}', error: ${e.errorType}, status code: ${e.statusCode}`);
248
248
  }), /* @__PURE__ */ React__default.createElement("br", null));
249
249
  });
250
250
  };
@@ -311,30 +311,9 @@ const sortBySeverity = (a, b) => {
311
311
  }
312
312
  return 0;
313
313
  };
314
- const ErrorEmptyState = () => {
315
- return /* @__PURE__ */ React.createElement(
316
- Grid,
317
- {
318
- container: true,
319
- justifyContent: "space-around",
320
- direction: "row",
321
- alignItems: "center",
322
- spacing: 2
323
- },
324
- /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 4 }, /* @__PURE__ */ React.createElement(Typography, { variant: "h5" }, "Nice! There are no errors to report!")),
325
- /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 4 }, /* @__PURE__ */ React.createElement(
326
- "img",
327
- {
328
- src: EmptyStateImage,
329
- alt: "EmptyState",
330
- "data-testid": "emptyStateImg"
331
- }
332
- ))
333
- );
334
- };
335
314
  const ErrorReporting = ({ detectedErrors }) => {
336
315
  const errors = Array.from(detectedErrors.values()).flat().sort(sortBySeverity);
337
- return /* @__PURE__ */ React.createElement(React.Fragment, null, errors.length === 0 ? /* @__PURE__ */ React.createElement(InfoCard, { title: "Error Reporting" }, /* @__PURE__ */ React.createElement(ErrorEmptyState, null)) : /* @__PURE__ */ React.createElement(
316
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, errors.length !== 0 && /* @__PURE__ */ React.createElement(
338
317
  Table,
339
318
  {
340
319
  title: "Error Reporting",
@@ -2455,7 +2434,7 @@ const KubernetesContent = ({
2455
2434
  entityName: entity.metadata.name,
2456
2435
  errorMessage: error
2457
2436
  }
2458
- ))), kubernetesObjects && /* @__PURE__ */ React__default.createElement(Grid, { container: true, spacing: 3, direction: "column" }, /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(ErrorReporting, { detectedErrors })), /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Divider, null)), /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h3" }, "Your Clusters")), /* @__PURE__ */ React__default.createElement(Grid, { item: true, container: true }, (kubernetesObjects == null ? void 0 : kubernetesObjects.items.length) <= 0 && /* @__PURE__ */ React__default.createElement(
2437
+ ))), kubernetesObjects && /* @__PURE__ */ React__default.createElement(Grid, { container: true, spacing: 3, direction: "column" }, /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(ErrorReporting, { detectedErrors })), /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h3" }, "Your Clusters")), /* @__PURE__ */ React__default.createElement(Grid, { item: true, container: true }, (kubernetesObjects == null ? void 0 : kubernetesObjects.items.length) <= 0 && /* @__PURE__ */ React__default.createElement(
2459
2438
  Grid,
2460
2439
  {
2461
2440
  container: true,