@galaxy-io/filament-ui 0.6.0 → 0.7.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.
@@ -1,10 +1,11 @@
1
1
  import KeyValueList from "../../../components/KeyValueList.js";
2
2
  import KeyValueListRow from "../../../components/KeyValueListRow.js";
3
3
  import { formatTimestamp } from "../../../utils/format.js";
4
+ import PipelineRunRecords from "../../../components/runs/PipelineRunRecords.js";
5
+ import PipelineRunVolume from "../../../components/runs/PipelineRunVolume.js";
4
6
  import PipelineRunStatus from "../../../components/runs/PipelineRunStatus.js";
5
7
  import { jsx, jsxs } from "react/jsx-runtime";
6
8
  import Text, { TextSize } from "@galaxy-io/dls/text/Text";
7
- import { formatBytes, formatNumber } from "@galaxy-io/dls/utils/format";
8
9
  //#region src/pages/pipelines/history/PipelineHistoryRunContinuousSummary.tsx
9
10
  var PipelineHistoryRunContinuousSummary = ({ run }) => {
10
11
  const lastCommittedAt = run.executionStatus?.lastCommittedAt;
@@ -20,15 +21,12 @@ var PipelineHistoryRunContinuousSummary = ({ run }) => {
20
21
  })
21
22
  }),
22
23
  /* @__PURE__ */ jsx(KeyValueListRow, {
23
- label: "Committed",
24
- value: /* @__PURE__ */ jsxs(Text, {
25
- size: TextSize.BODY_SM,
26
- children: [
27
- formatNumber(run.records),
28
- " records · ",
29
- formatBytes(run.bytes)
30
- ]
31
- })
24
+ label: "Records",
25
+ value: /* @__PURE__ */ jsx(PipelineRunRecords, { run })
26
+ }),
27
+ /* @__PURE__ */ jsx(KeyValueListRow, {
28
+ label: "Volume",
29
+ value: /* @__PURE__ */ jsx(PipelineRunVolume, { run })
32
30
  }),
33
31
  /* @__PURE__ */ jsx(KeyValueListRow, {
34
32
  label: "Last commit",
@@ -6,13 +6,14 @@ import PipelineHistoryRunInfoConnectionColumn from "./components/PipelineHistory
6
6
  import PipelineHistoryRunContinuousSummary from "./PipelineHistoryRunContinuousSummary.js";
7
7
  import { useMemo } from "react";
8
8
  import { create } from "@bufbuild/protobuf";
9
- import { jsx } from "react/jsx-runtime";
9
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
10
  import Flex, { AlignItems } from "@galaxy-io/dls/layout/Flex";
11
11
  import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
12
12
  import Skeleton from "@galaxy-io/dls/feedback/Skeleton";
13
13
  import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
14
14
  import { formatBytes, formatNumber } from "@galaxy-io/dls/utils/format";
15
15
  import { FontFamily } from "@galaxy-io/dls/theme/enums";
16
+ import Divider from "@galaxy-io/dls/layout/Divider";
16
17
  import InfiniteTable, { InfiniteTableSize } from "@galaxy-io/dls/table/InfiniteTable";
17
18
  //#region src/pages/pipelines/history/PipelineHistoryRunInfo.tsx
18
19
  var PipelineHistoryRunInfo = ({ runId }) => {
@@ -60,6 +61,14 @@ var PipelineHistoryRunInfo = ({ runId }) => {
60
61
  ], [sourceConnectionId, sinkConnectionId]);
61
62
  const resources = data?.snapshot?.resources ?? [];
62
63
  const isEmpty = resources.length === 0;
64
+ const table = /* @__PURE__ */ jsx(InfiniteTable, {
65
+ ariaLabel: "Run resources",
66
+ columns,
67
+ data: resources,
68
+ getRowId: (resource) => resource.resourceName,
69
+ size: InfiniteTableSize.SMALL,
70
+ inset: 4
71
+ });
63
72
  const renderBody = () => {
64
73
  if (isError) return /* @__PURE__ */ jsx(Flex, {
65
74
  alignItems: AlignItems.START,
@@ -79,7 +88,7 @@ var PipelineHistoryRunInfo = ({ runId }) => {
79
88
  children: /* @__PURE__ */ jsx(Skeleton, {})
80
89
  })
81
90
  });
82
- if (data?.snapshot?.run?.executionMode === ExecutionMode.CONTINUOUS) return /* @__PURE__ */ jsx(PipelineHistoryRunContinuousSummary, { run: data.snapshot.run });
91
+ if (data?.snapshot?.run?.executionMode === ExecutionMode.CONTINUOUS) return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(PipelineHistoryRunContinuousSummary, { run: data.snapshot.run }), !isEmpty && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Divider, {}), table] })] });
83
92
  if (data?.snapshot?.run?.status === RunStatus.CANCELED && !data.snapshot.run.startedAt) {
84
93
  const canceledAt = data.snapshot.run.endedAt;
85
94
  return /* @__PURE__ */ jsx(Flex, {
@@ -101,14 +110,7 @@ var PipelineHistoryRunInfo = ({ runId }) => {
101
110
  children: "The run did not record any resource activity."
102
111
  })
103
112
  });
104
- return /* @__PURE__ */ jsx(InfiniteTable, {
105
- ariaLabel: "Run resources",
106
- columns,
107
- data: resources,
108
- getRowId: (resource) => resource.resourceName,
109
- size: InfiniteTableSize.SMALL,
110
- inset: 4
111
- });
113
+ return table;
112
114
  };
113
115
  return /* @__PURE__ */ jsx(Box, {
114
116
  variant: BoxVariant.PRIMARY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galaxy-io/filament-ui",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Filament's web UI as a Galaxy module a host app mounts",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {