@backstage/plugin-kubernetes 0.7.5-next.2 → 0.7.5-next.4

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,32 @@
1
1
  # @backstage/plugin-kubernetes
2
2
 
3
+ ## 0.7.5-next.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 365f887717: Removed rendering for ErrorEmptyState in ErrorReporting component, so nothing is rendered when there are no errors. Also removed Divider on Kubernetes page.
8
+ - Updated dependencies
9
+ - @backstage/core-components@0.12.1-next.4
10
+ - @backstage/plugin-catalog-react@1.2.2-next.4
11
+ - @backstage/catalog-model@1.1.4-next.1
12
+ - @backstage/config@1.0.5-next.1
13
+ - @backstage/core-plugin-api@1.2.0-next.2
14
+ - @backstage/theme@0.2.16
15
+ - @backstage/plugin-kubernetes-common@0.4.5-next.1
16
+
17
+ ## 0.7.5-next.3
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+ - @backstage/core-components@0.12.1-next.3
23
+ - @backstage/catalog-model@1.1.4-next.1
24
+ - @backstage/config@1.0.5-next.1
25
+ - @backstage/core-plugin-api@1.2.0-next.2
26
+ - @backstage/theme@0.2.16
27
+ - @backstage/plugin-catalog-react@1.2.2-next.3
28
+ - @backstage/plugin-kubernetes-common@0.4.5-next.1
29
+
3
30
  ## 0.7.5-next.2
4
31
 
5
32
  ### 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) {
@@ -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,