@malloy-publisher/sdk 0.3.1 → 0.4.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/README.md +14 -9
- package/dist/{DocumentStorageProvider-tGvodI8f.es.js → DocumentStorageProvider-CyOJ0hqf.es.js} +7114 -6939
- package/dist/DocumentStorageProvider-DGPQEd_l.cjs.js +134 -0
- package/dist/{RenderedResult-mDE-4u8S.es.js → RenderedResult-BnPzJ9Jf.es.js} +64 -57
- package/dist/{RenderedResult-CPi6uQWq.cjs.js → RenderedResult-Dp22kZsQ.cjs.js} +2 -2
- package/dist/{ServerProvider-X2Ma0HRs.es.js → ServerProvider-BWOEKg0O.es.js} +1217 -1244
- package/dist/ServerProvider-Cc489A3f.cjs.js +1 -0
- package/dist/builder/index.cjs.js +41 -41
- package/dist/builder/index.es.js +2752 -2831
- package/dist/client/api.d.ts +100 -42
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/components/AppDialog.d.ts +30 -0
- package/dist/components/BackLink.d.ts +32 -0
- package/dist/components/Dashboard/DashboardBar.d.ts +21 -0
- package/dist/components/Dashboard/telemetry.d.ts +10 -5
- package/dist/components/DashboardBuilder/BuilderToolbar.d.ts +12 -10
- package/dist/components/DashboardBuilder/DashboardBuilder.d.ts +8 -2
- package/dist/components/DashboardBuilder/DashboardEditor.d.ts +8 -10
- package/dist/components/DashboardBuilder/newDashboard.d.ts +17 -0
- package/dist/components/DashboardBuilder/spliceDocument.d.ts +10 -1
- package/dist/components/ItemRow.d.ts +38 -0
- package/dist/components/Materializations/MaterializationDetailDialog.d.ts +1 -2
- package/dist/components/Materializations/MaterializationRunsList.d.ts +1 -5
- package/dist/components/Materializations/Materializations.d.ts +7 -3
- package/dist/components/Materializations/ScopeButton.d.ts +18 -0
- package/dist/components/Materializations/SectionLabel.d.ts +7 -4
- package/dist/components/Materializations/TriggerLabel.d.ts +14 -0
- package/dist/components/Materializations/index.d.ts +0 -1
- package/dist/components/Package/ContentTypeIcon.d.ts +3 -5
- package/dist/components/Package/NewDashboardDialog.d.ts +18 -0
- package/dist/components/Package/index.d.ts +0 -1
- package/dist/components/PackageSection.d.ts +23 -0
- package/dist/components/buttons.d.ts +53 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/styles.d.ts +49 -40
- package/dist/hooks/useCrudMutation.d.ts +42 -0
- package/dist/index.cjs.js +22 -26
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +17425 -20672
- package/dist/telemetry/consoleEvents.d.ts +60 -0
- package/dist/utils/sha256.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/AppDialog.tsx +115 -0
- package/src/components/BackLink.tsx +83 -0
- package/src/components/Connections/AddConnectionDialog.tsx +50 -70
- package/src/components/Connections/DeleteConnectionDialog.tsx +23 -50
- package/src/components/Connections/EditConnectionDialog.tsx +54 -73
- package/src/components/Dashboard/DashboardBar.tsx +88 -0
- package/src/components/Dashboard/telemetry.ts +10 -3
- package/src/components/DashboardBuilder/AddTileDialog.tsx +141 -143
- package/src/components/DashboardBuilder/BuilderToolbar.tsx +110 -218
- package/src/components/DashboardBuilder/DashboardBuilder.spec.tsx +5 -11
- package/src/components/DashboardBuilder/DashboardBuilder.tsx +184 -171
- package/src/components/DashboardBuilder/DashboardEditor.package.spec.tsx +163 -0
- package/src/components/DashboardBuilder/DashboardEditor.spec.tsx +2 -25
- package/src/components/DashboardBuilder/DashboardEditor.tsx +135 -61
- package/src/components/DashboardBuilder/DiffDialog.tsx +75 -82
- package/src/components/DashboardBuilder/DrillDialog.tsx +144 -156
- package/src/components/DashboardBuilder/FilterDialog.tsx +276 -295
- package/src/components/DashboardBuilder/FilterStrip.tsx +11 -10
- package/src/components/DashboardBuilder/newDashboard.spec.ts +40 -0
- package/src/components/DashboardBuilder/newDashboard.ts +48 -0
- package/src/components/DashboardBuilder/spliceDocument.spec.ts +53 -0
- package/src/components/DashboardBuilder/spliceDocument.ts +45 -8
- package/src/components/DashboardBuilder/useDashboardEditor.spec.ts +56 -0
- package/src/components/DashboardBuilder/useDashboardEditor.ts +12 -4
- package/src/components/Environment/About.tsx +14 -28
- package/src/components/Environment/AddPackageDialog.tsx +85 -154
- package/src/components/Environment/Connections.tsx +125 -205
- package/src/components/Environment/DeletePackageDialog.tsx +32 -77
- package/src/components/Environment/EditPackageDialog.tsx +46 -58
- package/src/components/Environment/Environment.tsx +34 -36
- package/src/components/Environment/Packages.tsx +63 -128
- package/src/components/Home/AddEnvironmentDialog.tsx +47 -70
- package/src/components/Home/DeleteEnvironmentDialog.tsx +32 -77
- package/src/components/Home/EditEnvironmentDialog.tsx +47 -61
- package/src/components/Home/Home.tsx +101 -214
- package/src/components/ItemRow.tsx +165 -0
- package/src/components/Materializations/CreateMaterializationDialog.tsx +34 -51
- package/src/components/Materializations/DeleteMaterializationDialog.tsx +31 -53
- package/src/components/Materializations/MaterializationDetailDialog.tsx +60 -69
- package/src/components/Materializations/MaterializationRunsList.tsx +29 -42
- package/src/components/Materializations/Materializations.tsx +137 -140
- package/src/components/Materializations/ScopeButton.tsx +85 -0
- package/src/components/Materializations/SectionLabel.tsx +7 -4
- package/src/components/Materializations/SetScheduleDialog.tsx +48 -89
- package/src/components/Materializations/TriggerLabel.tsx +36 -0
- package/src/components/Materializations/cron.spec.ts +113 -0
- package/src/components/Materializations/index.ts +0 -1
- package/src/components/Materializations/utils.spec.ts +182 -0
- package/src/components/Package/ContentTypeIcon.spec.ts +22 -37
- package/src/components/Package/ContentTypeIcon.tsx +10 -12
- package/src/components/Package/NewDashboardDialog.spec.tsx +129 -0
- package/src/components/Package/NewDashboardDialog.tsx +265 -0
- package/src/components/Package/Package.tsx +179 -238
- package/src/components/Package/index.ts +0 -1
- package/src/components/PackageSection.tsx +85 -0
- package/src/components/RenderedResult/RenderedResult.lifecycle.spec.tsx +198 -0
- package/src/components/RenderedResult/RenderedResult.tsx +22 -8
- package/src/components/ResultsDialog.tsx +8 -32
- package/src/components/buttons.tsx +114 -0
- package/src/components/designSystem.spec.tsx +316 -0
- package/src/components/given/paramCodec.spec.ts +1 -1
- package/src/components/index.ts +10 -0
- package/src/components/styles.ts +49 -85
- package/src/hooks/useCrudMutation.spec.tsx +119 -0
- package/src/hooks/useCrudMutation.tsx +85 -0
- package/src/index.ts +9 -0
- package/src/telemetry/consoleEvents.spec.ts +130 -0
- package/src/telemetry/consoleEvents.ts +124 -0
- package/src/theme/defaults.ts +34 -23
- package/src/theme/resolveTheme.spec.ts +9 -4
- package/src/theme/resolveTheme.ts +12 -8
- package/src/utils/sha256.ts +13 -0
- package/test/README.md +1 -1
- package/test/serverProvider.tsx +5 -2
- package/dist/DocumentStorageProvider-BeBD0uWc.cjs.js +0 -134
- package/dist/ServerProvider-CH71GsoL.cjs.js +0 -1
- package/dist/components/Materializations/CreateEnvMaterializationDialog.d.ts +0 -14
- package/dist/components/Materializations/EnvironmentMaterializations.d.ts +0 -7
- package/dist/components/Materializations/ScheduleCard.d.ts +0 -20
- package/dist/components/Materializations/TriggerChip.d.ts +0 -10
- package/dist/components/Package/Models.d.ts +0 -6
- package/src/components/Materializations/CreateEnvMaterializationDialog.tsx +0 -179
- package/src/components/Materializations/EnvironmentMaterializations.tsx +0 -267
- package/src/components/Materializations/ScheduleCard.tsx +0 -231
- package/src/components/Materializations/TriggerChip.tsx +0 -44
- package/src/components/Package/Models.tsx +0 -71
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
// Copyright (c) Credible Data Inc.
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
|
-
import AddIcon from "@mui/icons-material/Add";
|
|
5
4
|
import {
|
|
6
5
|
Button,
|
|
7
|
-
Dialog,
|
|
8
|
-
DialogActions,
|
|
9
|
-
DialogContent,
|
|
10
|
-
DialogContentText,
|
|
11
|
-
DialogTitle,
|
|
12
6
|
FormControlLabel,
|
|
13
7
|
FormGroup,
|
|
14
8
|
Switch,
|
|
15
9
|
Tooltip,
|
|
16
10
|
} from "@mui/material";
|
|
17
11
|
import { useState } from "react";
|
|
12
|
+
import { AppDialog } from "../AppDialog";
|
|
13
|
+
import { AddButton } from "../buttons";
|
|
18
14
|
|
|
19
15
|
type CreateMaterializationDialogProps = {
|
|
20
16
|
onSubmit: (opts: { forceRefresh: boolean }) => Promise<unknown>;
|
|
@@ -46,15 +42,11 @@ export default function CreateMaterializationDialog({
|
|
|
46
42
|
|
|
47
43
|
const button = (
|
|
48
44
|
<span>
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
startIcon={<AddIcon />}
|
|
45
|
+
<AddButton
|
|
46
|
+
label="Materialization"
|
|
52
47
|
onClick={() => setOpen(true)}
|
|
53
48
|
disabled={disabled}
|
|
54
|
-
|
|
55
|
-
>
|
|
56
|
-
New materialization
|
|
57
|
-
</Button>
|
|
49
|
+
/>
|
|
58
50
|
</span>
|
|
59
51
|
);
|
|
60
52
|
|
|
@@ -66,47 +58,38 @@ export default function CreateMaterializationDialog({
|
|
|
66
58
|
button
|
|
67
59
|
)}
|
|
68
60
|
|
|
69
|
-
<
|
|
61
|
+
<AppDialog
|
|
70
62
|
open={open}
|
|
71
63
|
onClose={handleClose}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
title="New materialization"
|
|
65
|
+
description="Compile the package, build a table for every persist source, and load them so queries serve from the tables."
|
|
66
|
+
actions={
|
|
67
|
+
<>
|
|
68
|
+
<Button onClick={handleClose}>Cancel</Button>
|
|
69
|
+
<Button
|
|
70
|
+
variant="contained"
|
|
71
|
+
loading={isSubmitting}
|
|
72
|
+
onClick={handleRun}
|
|
73
|
+
>
|
|
74
|
+
Materialize
|
|
75
|
+
</Button>
|
|
76
|
+
</>
|
|
77
|
+
}
|
|
75
78
|
>
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
onChange={(event) =>
|
|
91
|
-
setForceRefresh(event.target.checked)
|
|
92
|
-
}
|
|
93
|
-
/>
|
|
94
|
-
}
|
|
95
|
-
label="Force refresh (rebuild even if unchanged)"
|
|
96
|
-
/>
|
|
97
|
-
</FormGroup>
|
|
98
|
-
</DialogContent>
|
|
99
|
-
<DialogActions>
|
|
100
|
-
<Button onClick={handleClose}>Cancel</Button>
|
|
101
|
-
<Button
|
|
102
|
-
variant="contained"
|
|
103
|
-
loading={isSubmitting}
|
|
104
|
-
onClick={handleRun}
|
|
105
|
-
>
|
|
106
|
-
Materialize
|
|
107
|
-
</Button>
|
|
108
|
-
</DialogActions>
|
|
109
|
-
</Dialog>
|
|
79
|
+
<FormGroup>
|
|
80
|
+
<FormControlLabel
|
|
81
|
+
control={
|
|
82
|
+
<Switch
|
|
83
|
+
checked={forceRefresh}
|
|
84
|
+
onChange={(event) =>
|
|
85
|
+
setForceRefresh(event.target.checked)
|
|
86
|
+
}
|
|
87
|
+
/>
|
|
88
|
+
}
|
|
89
|
+
label="Force refresh (rebuild even if unchanged)"
|
|
90
|
+
/>
|
|
91
|
+
</FormGroup>
|
|
92
|
+
</AppDialog>
|
|
110
93
|
</>
|
|
111
94
|
);
|
|
112
95
|
}
|
|
@@ -2,21 +2,16 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
import { Delete } from "@mui/icons-material";
|
|
5
|
-
import CloseIcon from "@mui/icons-material/Close";
|
|
6
5
|
import Button from "@mui/material/Button";
|
|
7
6
|
import Checkbox from "@mui/material/Checkbox";
|
|
8
|
-
import Dialog from "@mui/material/Dialog";
|
|
9
|
-
import DialogActions from "@mui/material/DialogActions";
|
|
10
|
-
import DialogContent from "@mui/material/DialogContent";
|
|
11
|
-
import DialogTitle from "@mui/material/DialogTitle";
|
|
12
7
|
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
13
|
-
import IconButton from "@mui/material/IconButton";
|
|
14
8
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
15
9
|
import ListItemText from "@mui/material/ListItemText";
|
|
16
10
|
import MenuItem from "@mui/material/MenuItem";
|
|
17
11
|
import Typography from "@mui/material/Typography";
|
|
18
12
|
import React, { useState } from "react";
|
|
19
13
|
import { Materialization } from "../../client";
|
|
14
|
+
import { AppDialog } from "../AppDialog";
|
|
20
15
|
|
|
21
16
|
export default function DeleteMaterializationDialog({
|
|
22
17
|
materialization,
|
|
@@ -55,55 +50,38 @@ export default function DeleteMaterializationDialog({
|
|
|
55
50
|
<ListItemText>Delete</ListItemText>
|
|
56
51
|
</MenuItem>
|
|
57
52
|
|
|
58
|
-
<
|
|
59
|
-
onClose={handleClose}
|
|
53
|
+
<AppDialog
|
|
60
54
|
open={open}
|
|
61
|
-
|
|
55
|
+
onClose={handleClose}
|
|
56
|
+
title="Delete materialization"
|
|
57
|
+
actions={
|
|
58
|
+
<>
|
|
59
|
+
<Button onClick={handleClose}>Cancel</Button>
|
|
60
|
+
<Button
|
|
61
|
+
variant="contained"
|
|
62
|
+
color="error"
|
|
63
|
+
autoFocus
|
|
64
|
+
onClick={() => onDelete(dropTables)}
|
|
65
|
+
loading={isMutating}
|
|
66
|
+
>
|
|
67
|
+
Delete run
|
|
68
|
+
</Button>
|
|
69
|
+
</>
|
|
70
|
+
}
|
|
62
71
|
>
|
|
63
|
-
<
|
|
64
|
-
Delete
|
|
65
|
-
</
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
<CloseIcon />
|
|
77
|
-
</IconButton>
|
|
78
|
-
<DialogContent dividers>
|
|
79
|
-
<Typography gutterBottom>
|
|
80
|
-
Are you sure you want to delete this materialization record?
|
|
81
|
-
This action cannot be undone.
|
|
82
|
-
</Typography>
|
|
83
|
-
<FormControlLabel
|
|
84
|
-
control={
|
|
85
|
-
<Checkbox
|
|
86
|
-
checked={dropTables}
|
|
87
|
-
onChange={(event) =>
|
|
88
|
-
setDropTables(event.target.checked)
|
|
89
|
-
}
|
|
90
|
-
/>
|
|
91
|
-
}
|
|
92
|
-
label="Also drop the materialized table(s) this run produced"
|
|
93
|
-
/>
|
|
94
|
-
</DialogContent>
|
|
95
|
-
<DialogActions>
|
|
96
|
-
<Button
|
|
97
|
-
loading={isMutating}
|
|
98
|
-
variant="contained"
|
|
99
|
-
autoFocus
|
|
100
|
-
onClick={() => onDelete(dropTables)}
|
|
101
|
-
color="error"
|
|
102
|
-
>
|
|
103
|
-
Delete
|
|
104
|
-
</Button>
|
|
105
|
-
</DialogActions>
|
|
106
|
-
</Dialog>
|
|
72
|
+
<Typography variant="body2">
|
|
73
|
+
Delete this run's record? This cannot be undone.
|
|
74
|
+
</Typography>
|
|
75
|
+
<FormControlLabel
|
|
76
|
+
control={
|
|
77
|
+
<Checkbox
|
|
78
|
+
checked={dropTables}
|
|
79
|
+
onChange={(event) => setDropTables(event.target.checked)}
|
|
80
|
+
/>
|
|
81
|
+
}
|
|
82
|
+
label="Also drop the materialized tables this run produced"
|
|
83
|
+
/>
|
|
84
|
+
</AppDialog>
|
|
107
85
|
</React.Fragment>
|
|
108
86
|
);
|
|
109
87
|
}
|
|
@@ -21,7 +21,7 @@ import { BuildPlan, Materialization } from "../../client";
|
|
|
21
21
|
import { MONO_FONT_FAMILY } from "../styles";
|
|
22
22
|
import ManifestView from "./ManifestView";
|
|
23
23
|
import SectionLabel from "./SectionLabel";
|
|
24
|
-
import
|
|
24
|
+
import TriggerLabel from "./TriggerLabel";
|
|
25
25
|
import {
|
|
26
26
|
formatDuration,
|
|
27
27
|
formatTimestamp,
|
|
@@ -34,23 +34,16 @@ import {
|
|
|
34
34
|
type MaterializationDetailDialogProps = {
|
|
35
35
|
materialization: Materialization | null;
|
|
36
36
|
// The compiled package's current build plan (Package.buildPlan), shown for
|
|
37
|
-
// context. It is a property of the package version, not the historical run
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
// `showBuildPlan`.
|
|
37
|
+
// context. It is a property of the package version, not the historical run,
|
|
38
|
+
// and it is null for a package with no persist sources — which is why the
|
|
39
|
+
// section renders an empty state rather than disappearing.
|
|
41
40
|
buildPlan: BuildPlan | null;
|
|
42
|
-
// Whether to render the Build plan section. The package view shows it (with a
|
|
43
|
-
// "no persist sources" empty state when the plan is empty); the
|
|
44
|
-
// environment-scoped view, which spans packages and has no single plan, omits
|
|
45
|
-
// it entirely.
|
|
46
|
-
showBuildPlan?: boolean;
|
|
47
41
|
onClose: () => void;
|
|
48
42
|
};
|
|
49
43
|
|
|
50
44
|
export default function MaterializationDetailDialog({
|
|
51
45
|
materialization,
|
|
52
46
|
buildPlan,
|
|
53
|
-
showBuildPlan = true,
|
|
54
47
|
onClose,
|
|
55
48
|
}: MaterializationDetailDialogProps) {
|
|
56
49
|
const meta = materialization ? parseMetadata(materialization) : {};
|
|
@@ -86,7 +79,7 @@ export default function MaterializationDetailDialog({
|
|
|
86
79
|
: "outlined"
|
|
87
80
|
}
|
|
88
81
|
/>
|
|
89
|
-
<
|
|
82
|
+
<TriggerLabel meta={meta} />
|
|
90
83
|
</Stack>
|
|
91
84
|
<Typography variant="subtitle1" sx={{ fontWeight: 600 }}>
|
|
92
85
|
{materialization.packageName ?? "Materialization"}
|
|
@@ -177,64 +170,62 @@ export default function MaterializationDetailDialog({
|
|
|
177
170
|
</Box>
|
|
178
171
|
)}
|
|
179
172
|
|
|
180
|
-
{
|
|
181
|
-
<
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
<
|
|
193
|
-
<
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
173
|
+
<Box sx={{ mb: 3 }}>
|
|
174
|
+
<SectionLabel>Build plan</SectionLabel>
|
|
175
|
+
{planSources.length === 0 ? (
|
|
176
|
+
<Typography
|
|
177
|
+
variant="body2"
|
|
178
|
+
color="text.secondary"
|
|
179
|
+
sx={{ fontStyle: "italic" }}
|
|
180
|
+
>
|
|
181
|
+
This package has no persist sources.
|
|
182
|
+
</Typography>
|
|
183
|
+
) : (
|
|
184
|
+
<Table size="small">
|
|
185
|
+
<TableHead>
|
|
186
|
+
<TableRow>
|
|
187
|
+
<TableCell>Source</TableCell>
|
|
188
|
+
<TableCell>Connection</TableCell>
|
|
189
|
+
<TableCell>Dialect</TableCell>
|
|
190
|
+
<TableCell align="right">Columns</TableCell>
|
|
191
|
+
<TableCell>Source Entity ID</TableCell>
|
|
192
|
+
</TableRow>
|
|
193
|
+
</TableHead>
|
|
194
|
+
<TableBody>
|
|
195
|
+
{planSources.map((source) => (
|
|
196
|
+
<TableRow key={source.sourceID}>
|
|
197
|
+
<TableCell
|
|
198
|
+
sx={{ fontFamily: MONO_FONT_FAMILY }}
|
|
199
|
+
>
|
|
200
|
+
{source.name}
|
|
201
|
+
</TableCell>
|
|
202
|
+
<TableCell
|
|
203
|
+
sx={{ fontFamily: MONO_FONT_FAMILY }}
|
|
204
|
+
>
|
|
205
|
+
{source.connectionName}
|
|
206
|
+
</TableCell>
|
|
207
|
+
<TableCell>
|
|
208
|
+
{source.dialect ?? "-"}
|
|
209
|
+
</TableCell>
|
|
210
|
+
<TableCell align="right">
|
|
211
|
+
{source.columns?.length ?? 0}
|
|
212
|
+
</TableCell>
|
|
213
|
+
<TableCell
|
|
214
|
+
sx={{
|
|
215
|
+
fontFamily: MONO_FONT_FAMILY,
|
|
216
|
+
fontSize: "0.75rem",
|
|
217
|
+
wordBreak: "break-all",
|
|
218
|
+
maxWidth: 220,
|
|
219
|
+
}}
|
|
220
|
+
>
|
|
221
|
+
{source.sourceEntityId}
|
|
222
|
+
</TableCell>
|
|
200
223
|
</TableRow>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
sx={{ fontFamily: MONO_FONT_FAMILY }}
|
|
207
|
-
>
|
|
208
|
-
{source.name}
|
|
209
|
-
</TableCell>
|
|
210
|
-
<TableCell
|
|
211
|
-
sx={{ fontFamily: MONO_FONT_FAMILY }}
|
|
212
|
-
>
|
|
213
|
-
{source.connectionName}
|
|
214
|
-
</TableCell>
|
|
215
|
-
<TableCell>
|
|
216
|
-
{source.dialect ?? "-"}
|
|
217
|
-
</TableCell>
|
|
218
|
-
<TableCell align="right">
|
|
219
|
-
{source.columns?.length ?? 0}
|
|
220
|
-
</TableCell>
|
|
221
|
-
<TableCell
|
|
222
|
-
sx={{
|
|
223
|
-
fontFamily: MONO_FONT_FAMILY,
|
|
224
|
-
fontSize: "0.75rem",
|
|
225
|
-
wordBreak: "break-all",
|
|
226
|
-
maxWidth: 220,
|
|
227
|
-
}}
|
|
228
|
-
>
|
|
229
|
-
{source.sourceEntityId}
|
|
230
|
-
</TableCell>
|
|
231
|
-
</TableRow>
|
|
232
|
-
))}
|
|
233
|
-
</TableBody>
|
|
234
|
-
</Table>
|
|
235
|
-
)}
|
|
236
|
-
</Box>
|
|
237
|
-
)}
|
|
224
|
+
))}
|
|
225
|
+
</TableBody>
|
|
226
|
+
</Table>
|
|
227
|
+
)}
|
|
228
|
+
</Box>
|
|
238
229
|
|
|
239
230
|
<ManifestView
|
|
240
231
|
entries={materialization.manifest?.entries}
|
|
@@ -6,9 +6,7 @@ import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
|
|
|
6
6
|
import StopIcon from "@mui/icons-material/Stop";
|
|
7
7
|
import {
|
|
8
8
|
Box,
|
|
9
|
-
Chip,
|
|
10
9
|
IconButton,
|
|
11
|
-
Link,
|
|
12
10
|
ListItemIcon,
|
|
13
11
|
ListItemText,
|
|
14
12
|
Menu,
|
|
@@ -24,7 +22,7 @@ import {
|
|
|
24
22
|
import { useState } from "react";
|
|
25
23
|
import { Materialization } from "../../client";
|
|
26
24
|
import DeleteMaterializationDialog from "./DeleteMaterializationDialog";
|
|
27
|
-
import
|
|
25
|
+
import TriggerLabel from "./TriggerLabel";
|
|
28
26
|
import {
|
|
29
27
|
formatDuration,
|
|
30
28
|
formatRelativeTime,
|
|
@@ -39,10 +37,6 @@ type MaterializationRunsListProps = {
|
|
|
39
37
|
materializations: Materialization[];
|
|
40
38
|
mutable: boolean;
|
|
41
39
|
isMutating: boolean;
|
|
42
|
-
/** Show a Package column — for the environment-scoped view spanning packages. */
|
|
43
|
-
showPackage?: boolean;
|
|
44
|
-
/** Navigate to a package (used by the Package column links). */
|
|
45
|
-
onClickPackage?: (packageName: string) => void;
|
|
46
40
|
onStop: (materialization: Materialization) => void;
|
|
47
41
|
onDelete: (materialization: Materialization, dropTables: boolean) => void;
|
|
48
42
|
onViewDetails: (materialization: Materialization) => void;
|
|
@@ -52,8 +46,6 @@ export default function MaterializationRunsList({
|
|
|
52
46
|
materializations,
|
|
53
47
|
mutable,
|
|
54
48
|
isMutating,
|
|
55
|
-
showPackage = false,
|
|
56
|
-
onClickPackage,
|
|
57
49
|
onStop,
|
|
58
50
|
onDelete,
|
|
59
51
|
onViewDetails,
|
|
@@ -71,10 +63,20 @@ export default function MaterializationRunsList({
|
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
return (
|
|
74
|
-
<Table
|
|
66
|
+
<Table
|
|
67
|
+
size="small"
|
|
68
|
+
// The section's rows start at its left edge and end at its right, so
|
|
69
|
+
// the table does too: MUI's own 16px on the outer cells put this one
|
|
70
|
+
// table a thumb's width inside every list above it.
|
|
71
|
+
sx={{
|
|
72
|
+
"& td, & th": { borderColor: "divider" },
|
|
73
|
+
"& td:first-of-type, & th:first-of-type": { pl: 0 },
|
|
74
|
+
"& td:last-of-type, & th:last-of-type": { pr: 0 },
|
|
75
|
+
"& th": { color: "text.secondary", fontWeight: 600 },
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
75
78
|
<TableHead>
|
|
76
79
|
<TableRow>
|
|
77
|
-
{showPackage && <TableCell>Package</TableCell>}
|
|
78
80
|
<TableCell>Status</TableCell>
|
|
79
81
|
<TableCell>Trigger</TableCell>
|
|
80
82
|
<TableCell>Started</TableCell>
|
|
@@ -90,8 +92,6 @@ export default function MaterializationRunsList({
|
|
|
90
92
|
materialization={materialization}
|
|
91
93
|
mutable={mutable}
|
|
92
94
|
isMutating={isMutating}
|
|
93
|
-
showPackage={showPackage}
|
|
94
|
-
onClickPackage={onClickPackage}
|
|
95
95
|
onStop={onStop}
|
|
96
96
|
onDelete={onDelete}
|
|
97
97
|
onViewDetails={onViewDetails}
|
|
@@ -106,8 +106,6 @@ function MaterializationRow({
|
|
|
106
106
|
materialization,
|
|
107
107
|
mutable,
|
|
108
108
|
isMutating,
|
|
109
|
-
showPackage,
|
|
110
|
-
onClickPackage,
|
|
111
109
|
onStop,
|
|
112
110
|
onDelete,
|
|
113
111
|
onViewDetails,
|
|
@@ -115,8 +113,6 @@ function MaterializationRow({
|
|
|
115
113
|
materialization: Materialization;
|
|
116
114
|
mutable: boolean;
|
|
117
115
|
isMutating: boolean;
|
|
118
|
-
showPackage?: boolean;
|
|
119
|
-
onClickPackage?: (packageName: string) => void;
|
|
120
116
|
onStop: (materialization: Materialization) => void;
|
|
121
117
|
onDelete: (materialization: Materialization, dropTables: boolean) => void;
|
|
122
118
|
onViewDetails: (materialization: Materialization) => void;
|
|
@@ -157,32 +153,23 @@ function MaterializationRow({
|
|
|
157
153
|
tabIndex={0}
|
|
158
154
|
aria-label={`View materialization ${materialization.id ?? ""} details`.trim()}
|
|
159
155
|
>
|
|
160
|
-
{showPackage && (
|
|
161
|
-
<TableCell onClick={(event) => event.stopPropagation()}>
|
|
162
|
-
{onClickPackage ? (
|
|
163
|
-
<Link
|
|
164
|
-
component="button"
|
|
165
|
-
underline="hover"
|
|
166
|
-
onClick={() =>
|
|
167
|
-
onClickPackage(materialization.packageName ?? "")
|
|
168
|
-
}
|
|
169
|
-
sx={{ fontWeight: 500 }}
|
|
170
|
-
>
|
|
171
|
-
{materialization.packageName}
|
|
172
|
-
</Link>
|
|
173
|
-
) : (
|
|
174
|
-
materialization.packageName
|
|
175
|
-
)}
|
|
176
|
-
</TableCell>
|
|
177
|
-
)}
|
|
178
156
|
<TableCell>
|
|
179
157
|
<Box sx={{ display: "flex", alignItems: "center", gap: 0.5 }}>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
variant=
|
|
185
|
-
|
|
158
|
+
{/* The word, in the colour the state already carries. A pill
|
|
159
|
+
around one word of a six-word row was the only chip on the
|
|
160
|
+
page, and it read as a control rather than as a value. */}
|
|
161
|
+
<Typography
|
|
162
|
+
variant="body2"
|
|
163
|
+
sx={{
|
|
164
|
+
fontWeight: 500,
|
|
165
|
+
color:
|
|
166
|
+
statusColor(materialization.status) === "default"
|
|
167
|
+
? "text.primary"
|
|
168
|
+
: `${statusColor(materialization.status)}.main`,
|
|
169
|
+
}}
|
|
170
|
+
>
|
|
171
|
+
{statusLabel(materialization.status)}
|
|
172
|
+
</Typography>
|
|
186
173
|
{error && (
|
|
187
174
|
<Tooltip title={error}>
|
|
188
175
|
<InfoOutlinedIcon fontSize="small" color="error" />
|
|
@@ -191,7 +178,7 @@ function MaterializationRow({
|
|
|
191
178
|
</Box>
|
|
192
179
|
</TableCell>
|
|
193
180
|
<TableCell>
|
|
194
|
-
<
|
|
181
|
+
<TriggerLabel meta={meta} />
|
|
195
182
|
</TableCell>
|
|
196
183
|
<TableCell>
|
|
197
184
|
{formatRelativeTime(
|