@malloy-publisher/sdk 0.0.118 → 0.0.120
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/dist/ServerProvider-49yj-aFb.cjs.js +1 -0
- package/dist/{ServerProvider-v0TajMUn.es.js → ServerProvider-BDgL8SVP.es.js} +355 -429
- package/dist/client/api.d.ts +285 -276
- package/dist/client/configuration.d.ts +1 -1
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.es.js +43 -46
- package/dist/components/ServerProvider.d.ts +1 -3
- package/dist/index.cjs.js +111 -111
- package/dist/index.es.js +33143 -30265
- package/package.json +1 -1
- package/src/components/Connections/common.ts +2 -0
- package/src/components/Home/DeleteProjectDialog.tsx +10 -0
- package/src/components/Home/Home.tsx +1 -1
- package/src/components/Model/Model.tsx +19 -13
- package/src/components/Model/ModelCell.tsx +10 -8
- package/src/components/Model/ModelExplorer.tsx +91 -56
- package/src/components/Model/SourcesExplorer.tsx +7 -6
- package/src/components/Notebook/NotebookCell.tsx +4 -4
- package/src/components/Package/FileTreeView.tsx +3 -3
- package/src/components/Package/Package.tsx +7 -11
- package/src/components/Project/About.tsx +63 -8
- package/src/components/Project/ConnectionExplorer.tsx +123 -160
- package/src/components/Project/DeletePackageDialog.tsx +10 -0
- package/src/components/QueryResult/QueryResult.tsx +9 -7
- package/src/components/ServerProvider.tsx +0 -4
- package/src/hooks/useRawQueryData.ts +8 -6
- package/src/utils/formatting.ts +2 -1
- package/src/utils/parsing.ts +1 -1
- package/dist/ServerProvider-Bx3fsDOb.cjs.js +0 -1
- package/dist/components/Package/Schedules.d.ts +0 -5
- package/src/components/Package/Schedules.tsx +0 -114
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Box,
|
|
3
|
-
Paper,
|
|
4
|
-
Table,
|
|
5
|
-
TableBody,
|
|
6
|
-
TableCell,
|
|
7
|
-
TableContainer,
|
|
8
|
-
TableHead,
|
|
9
|
-
TableRow,
|
|
10
|
-
} from "@mui/material";
|
|
11
|
-
import {
|
|
12
|
-
PackageCard,
|
|
13
|
-
PackageCardContent,
|
|
14
|
-
PackageSectionTitle,
|
|
15
|
-
} from "../styles";
|
|
16
|
-
import { ApiErrorDisplay } from "../ApiErrorDisplay";
|
|
17
|
-
import { Loading } from "../Loading";
|
|
18
|
-
import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
|
|
19
|
-
import { parseResourceUri } from "../../utils/formatting";
|
|
20
|
-
import { useServer } from "../ServerProvider";
|
|
21
|
-
|
|
22
|
-
type Props = {
|
|
23
|
-
resourceUri: string;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default function Schedules({ resourceUri }: Props) {
|
|
27
|
-
const { apiClients } = useServer();
|
|
28
|
-
const {
|
|
29
|
-
projectName: projectName,
|
|
30
|
-
packageName: packageName,
|
|
31
|
-
versionId: versionId,
|
|
32
|
-
} = parseResourceUri(resourceUri);
|
|
33
|
-
|
|
34
|
-
const { data, isError, isLoading, error } = useQueryWithApiError({
|
|
35
|
-
queryKey: ["schedules", projectName, packageName, versionId],
|
|
36
|
-
queryFn: () =>
|
|
37
|
-
apiClients.schedules.listSchedules(
|
|
38
|
-
projectName,
|
|
39
|
-
packageName,
|
|
40
|
-
versionId,
|
|
41
|
-
),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
if (isLoading) {
|
|
45
|
-
return <Loading text="Fetching Schedules..." />;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (isError) {
|
|
49
|
-
return (
|
|
50
|
-
<ApiErrorDisplay
|
|
51
|
-
error={error}
|
|
52
|
-
context={`${projectName} > ${packageName} > Schedules`}
|
|
53
|
-
/>
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (!data.data.length) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<PackageCard>
|
|
63
|
-
<PackageCardContent>
|
|
64
|
-
<PackageSectionTitle>Scheduler</PackageSectionTitle>
|
|
65
|
-
<Box
|
|
66
|
-
sx={{
|
|
67
|
-
maxHeight: "200px",
|
|
68
|
-
overflowY: "auto",
|
|
69
|
-
}}
|
|
70
|
-
>
|
|
71
|
-
<TableContainer component={Paper}>
|
|
72
|
-
<Table sx={{ minWidth: 300 }} size="small">
|
|
73
|
-
<TableHead>
|
|
74
|
-
<TableRow>
|
|
75
|
-
<TableCell align="left">Resource</TableCell>
|
|
76
|
-
<TableCell align="left">Schedule</TableCell>
|
|
77
|
-
<TableCell align="left">Action</TableCell>
|
|
78
|
-
<TableCell align="left">Connection</TableCell>
|
|
79
|
-
<TableCell align="left">Last Run</TableCell>
|
|
80
|
-
<TableCell align="left">Status</TableCell>
|
|
81
|
-
</TableRow>
|
|
82
|
-
</TableHead>
|
|
83
|
-
<TableBody>
|
|
84
|
-
{data.data.map((m) => (
|
|
85
|
-
<TableRow
|
|
86
|
-
key={m.resource}
|
|
87
|
-
sx={{
|
|
88
|
-
"&:last-child td, &:last-child th": {
|
|
89
|
-
border: 0,
|
|
90
|
-
},
|
|
91
|
-
}}
|
|
92
|
-
>
|
|
93
|
-
<TableCell align="left">{m.resource}</TableCell>
|
|
94
|
-
<TableCell align="left">{m.schedule}</TableCell>
|
|
95
|
-
<TableCell align="left">{m.action}</TableCell>
|
|
96
|
-
<TableCell align="left">{m.connection}</TableCell>
|
|
97
|
-
<TableCell align="left">
|
|
98
|
-
{m.lastRunTime
|
|
99
|
-
? new Date(m.lastRunTime).toLocaleString()
|
|
100
|
-
: "n/a"}
|
|
101
|
-
</TableCell>
|
|
102
|
-
<TableCell align="left">
|
|
103
|
-
{m.lastRunStatus}
|
|
104
|
-
</TableCell>
|
|
105
|
-
</TableRow>
|
|
106
|
-
))}
|
|
107
|
-
</TableBody>
|
|
108
|
-
</Table>
|
|
109
|
-
</TableContainer>
|
|
110
|
-
</Box>
|
|
111
|
-
</PackageCardContent>
|
|
112
|
-
</PackageCard>
|
|
113
|
-
);
|
|
114
|
-
}
|