@malloy-publisher/sdk 0.3.0 → 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 +22 -9
- package/dist/DocumentStorageProvider-CyOJ0hqf.es.js +24443 -0
- package/dist/DocumentStorageProvider-DGPQEd_l.cjs.js +134 -0
- package/dist/RenderedResult-BnPzJ9Jf.es.js +549 -0
- package/dist/RenderedResult-Dp22kZsQ.cjs.js +115 -0
- package/dist/{ServerProvider-DSK9rfSY.es.js → ServerProvider-BWOEKg0O.es.js} +1256 -1318
- package/dist/ServerProvider-Cc489A3f.cjs.js +1 -0
- package/dist/builder/index.cjs.js +105 -0
- package/dist/builder/index.d.ts +2 -0
- package/dist/builder/index.es.js +9482 -0
- package/dist/builder-entry.d.ts +8 -0
- 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/Dashboard.d.ts +19 -14
- package/dist/components/Dashboard/DashboardBar.d.ts +21 -0
- package/dist/components/Dashboard/DashboardGrid.d.ts +67 -0
- package/dist/components/Dashboard/DashboardTile.d.ts +6 -1
- package/dist/components/Dashboard/ExploreDialog.d.ts +18 -0
- package/dist/components/Dashboard/RowsDialog.d.ts +47 -0
- package/dist/components/Dashboard/TileCard.d.ts +44 -0
- package/dist/components/Dashboard/index.d.ts +2 -0
- package/dist/components/Dashboard/promoteMeasureRow.d.ts +7 -3
- package/dist/components/Dashboard/telemetry.d.ts +48 -0
- package/dist/components/DashboardBuilder/AddTileDialog.d.ts +35 -0
- package/dist/components/DashboardBuilder/BuilderToolbar.d.ts +31 -0
- package/dist/components/DashboardBuilder/DashboardBuilder.d.ts +118 -0
- package/dist/components/DashboardBuilder/DashboardEditor.d.ts +30 -0
- package/dist/components/DashboardBuilder/DiffDialog.d.ts +15 -0
- package/dist/components/DashboardBuilder/DrillDialog.d.ts +15 -0
- package/dist/components/DashboardBuilder/FilterDialog.d.ts +54 -0
- package/dist/components/DashboardBuilder/FilterStrip.d.ts +17 -0
- package/dist/components/DashboardBuilder/SettingsPopover.d.ts +20 -0
- package/dist/components/DashboardBuilder/TileFrame.d.ts +42 -0
- package/dist/components/DashboardBuilder/TileMenu.d.ts +24 -0
- package/dist/components/DashboardBuilder/catalog.d.ts +62 -0
- package/dist/components/DashboardBuilder/controls.d.ts +157 -0
- package/dist/components/DashboardBuilder/diff.d.ts +35 -0
- package/dist/components/DashboardBuilder/document.d.ts +218 -0
- package/dist/components/DashboardBuilder/layout.d.ts +71 -0
- package/dist/components/DashboardBuilder/malloyText.d.ts +45 -0
- package/dist/components/DashboardBuilder/newDashboard.d.ts +17 -0
- package/dist/components/DashboardBuilder/preview.d.ts +60 -0
- package/dist/components/DashboardBuilder/readDocument.d.ts +106 -0
- package/dist/components/DashboardBuilder/sortable.d.ts +51 -0
- package/dist/components/DashboardBuilder/spliceDocument.d.ts +53 -0
- package/dist/components/DashboardBuilder/testing/fixtures.d.ts +10 -0
- package/dist/components/DashboardBuilder/useBuilderShortcuts.d.ts +22 -0
- package/dist/components/DashboardBuilder/useDashboardEditor.d.ts +63 -0
- package/dist/components/DashboardBuilder/useDraft.d.ts +13 -0
- package/dist/components/DashboardBuilder/useFilterForm.d.ts +65 -0
- package/dist/components/DashboardBuilder/useTileReorder.d.ts +22 -0
- package/dist/components/DashboardBuilder/useTileResize.d.ts +29 -0
- package/dist/components/DocumentStorage/DocumentStorageProvider.d.ts +7 -0
- package/dist/components/DocumentStorage/index.d.ts +1 -1
- package/dist/components/FloatingIconButton.d.ts +16 -0
- 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/Prose.d.ts +46 -0
- package/dist/components/RenderedResult/ResultPanel.d.ts +30 -0
- package/dist/components/RenderedResult/index.d.ts +1 -0
- package/dist/components/buttons.d.ts +53 -0
- package/dist/components/drill/index.d.ts +1 -1
- package/dist/components/drill/resolveDrill.d.ts +22 -0
- package/dist/components/drill/useDrill.d.ts +11 -2
- package/dist/components/index.d.ts +6 -0
- package/dist/components/styles.d.ts +49 -44
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useCrudMutation.d.ts +42 -0
- package/dist/hooks/useDocumentControls.d.ts +70 -0
- package/dist/hooks/useQueryResult.d.ts +40 -0
- package/dist/index.cjs.js +22 -273
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +16888 -44451
- package/dist/telemetry/consoleEvents.d.ts +60 -0
- package/dist/utils/malloyLiteral.d.ts +11 -0
- package/dist/utils/sha256.d.ts +2 -0
- package/package.json +24 -9
- package/src/builder-entry.ts +55 -0
- 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/Dashboard.spec.tsx +7 -10
- package/src/components/Dashboard/Dashboard.tsx +165 -175
- package/src/components/Dashboard/DashboardBar.tsx +88 -0
- package/src/components/Dashboard/DashboardGrid.tsx +124 -0
- package/src/components/Dashboard/DashboardTile.spec.tsx +30 -6
- package/src/components/Dashboard/DashboardTile.tsx +66 -123
- package/src/components/Dashboard/ExploreDialog.tsx +84 -0
- package/src/components/Dashboard/RowsDialog.spec.ts +42 -0
- package/src/components/Dashboard/RowsDialog.tsx +234 -0
- package/src/components/Dashboard/TileCard.tsx +120 -0
- package/src/components/Dashboard/index.ts +2 -0
- package/src/components/Dashboard/promoteMeasureRow.spec.ts +70 -0
- package/src/components/Dashboard/promoteMeasureRow.ts +33 -2
- package/src/components/Dashboard/telemetry.ts +51 -0
- package/src/components/Dashboard/tileGridColumn.spec.ts +1 -1
- package/src/components/DashboardBuilder/AddTileDialog.tsx +247 -0
- package/src/components/DashboardBuilder/BuilderToolbar.tsx +162 -0
- package/src/components/DashboardBuilder/DashboardBuilder.spec.tsx +852 -0
- package/src/components/DashboardBuilder/DashboardBuilder.tsx +666 -0
- package/src/components/DashboardBuilder/DashboardEditor.package.spec.tsx +163 -0
- package/src/components/DashboardBuilder/DashboardEditor.spec.tsx +188 -0
- package/src/components/DashboardBuilder/DashboardEditor.tsx +567 -0
- package/src/components/DashboardBuilder/DiffDialog.tsx +122 -0
- package/src/components/DashboardBuilder/DrillDialog.tsx +269 -0
- package/src/components/DashboardBuilder/FilterDialog.tsx +562 -0
- package/src/components/DashboardBuilder/FilterStrip.tsx +126 -0
- package/src/components/DashboardBuilder/SettingsPopover.tsx +168 -0
- package/src/components/DashboardBuilder/TileFrame.tsx +380 -0
- package/src/components/DashboardBuilder/TileMenu.tsx +188 -0
- package/src/components/DashboardBuilder/catalog.spec.ts +215 -0
- package/src/components/DashboardBuilder/catalog.ts +225 -0
- package/src/components/DashboardBuilder/controls.spec.ts +243 -0
- package/src/components/DashboardBuilder/controls.ts +398 -0
- package/src/components/DashboardBuilder/diff.spec.ts +44 -0
- package/src/components/DashboardBuilder/diff.ts +93 -0
- package/src/components/DashboardBuilder/document.ts +209 -0
- package/src/components/DashboardBuilder/keepRowStructure.spec.ts +84 -0
- package/src/components/DashboardBuilder/layout.ts +143 -0
- package/src/components/DashboardBuilder/malloyText.spec.ts +84 -0
- package/src/components/DashboardBuilder/malloyText.ts +151 -0
- package/src/components/DashboardBuilder/moveIntoGap.spec.ts +90 -0
- package/src/components/DashboardBuilder/newDashboard.spec.ts +40 -0
- package/src/components/DashboardBuilder/newDashboard.ts +48 -0
- package/src/components/DashboardBuilder/preview.spec.ts +149 -0
- package/src/components/DashboardBuilder/preview.ts +172 -0
- package/src/components/DashboardBuilder/readDocument.spec.ts +375 -0
- package/src/components/DashboardBuilder/readDocument.ts +467 -0
- package/src/components/DashboardBuilder/sortable.tsx +151 -0
- package/src/components/DashboardBuilder/spliceDocument.spec.ts +1161 -0
- package/src/components/DashboardBuilder/spliceDocument.ts +1135 -0
- package/src/components/DashboardBuilder/testing/fixtures.ts +48 -0
- package/src/components/DashboardBuilder/useBuilderShortcuts.ts +88 -0
- package/src/components/DashboardBuilder/useDashboardEditor.spec.ts +311 -0
- package/src/components/DashboardBuilder/useDashboardEditor.ts +201 -0
- package/src/components/DashboardBuilder/useDraft.ts +43 -0
- package/src/components/DashboardBuilder/useFilterForm.spec.tsx +144 -0
- package/src/components/DashboardBuilder/useFilterForm.ts +352 -0
- package/src/components/DashboardBuilder/useTileReorder.spec.tsx +97 -0
- package/src/components/DashboardBuilder/useTileReorder.ts +115 -0
- package/src/components/DashboardBuilder/useTileResize.spec.tsx +121 -0
- package/src/components/DashboardBuilder/useTileResize.ts +110 -0
- package/src/components/DashboardBuilder/withGaps.spec.ts +96 -0
- package/src/components/DocumentStorage/DocumentStorageProvider.tsx +12 -0
- package/src/components/DocumentStorage/index.ts +1 -0
- package/src/components/Environment/About.tsx +16 -62
- 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/FloatingIconButton.tsx +41 -0
- 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/Model/Model.tsx +6 -23
- package/src/components/Model/ModelCell.tsx +33 -72
- package/src/components/Notebook/Notebook.tsx +25 -88
- package/src/components/Notebook/NotebookCell.tsx +35 -183
- 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/Prose.spec.tsx +85 -0
- package/src/components/Prose.tsx +179 -0
- package/src/components/QueryResult/QueryResult.tsx +15 -43
- package/src/components/RenderedResult/RenderedResult.lifecycle.spec.tsx +198 -0
- package/src/components/RenderedResult/RenderedResult.tsx +22 -8
- package/src/components/RenderedResult/ResultContainer.tsx +4 -12
- package/src/components/RenderedResult/ResultPanel.spec.tsx +49 -0
- package/src/components/RenderedResult/ResultPanel.tsx +73 -0
- package/src/components/RenderedResult/index.ts +1 -0
- 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/drill/index.ts +1 -0
- package/src/components/drill/resolveDrill.ts +22 -1
- package/src/components/drill/useDrill.spec.tsx +94 -0
- package/src/components/drill/useDrill.tsx +52 -12
- package/src/components/given/GivensPanel.tsx +1 -1
- package/src/components/given/paramCodec.spec.ts +1 -1
- package/src/components/index.ts +16 -0
- package/src/components/styles.ts +49 -122
- package/src/hooks/index.ts +13 -0
- package/src/hooks/useCrudMutation.spec.tsx +119 -0
- package/src/hooks/useCrudMutation.tsx +85 -0
- package/src/hooks/useDocumentControls.ts +170 -0
- package/src/hooks/useQueryResult.ts +82 -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/malloyLiteral.spec.ts +43 -0
- package/src/utils/malloyLiteral.ts +76 -0
- package/src/utils/sha256.ts +13 -0
- package/test/README.md +1 -1
- package/test/serverProvider.tsx +5 -2
- package/vite.config.ts +5 -0
- package/dist/ServerProvider-CGnLjzag.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
|
@@ -5,14 +5,10 @@ import AddIcon from "@mui/icons-material/Add";
|
|
|
5
5
|
import DeleteIcon from "@mui/icons-material/Delete";
|
|
6
6
|
import Box from "@mui/material/Box";
|
|
7
7
|
import Button from "@mui/material/Button";
|
|
8
|
-
import Dialog from "@mui/material/Dialog";
|
|
9
|
-
import DialogActions from "@mui/material/DialogActions";
|
|
10
|
-
import DialogContent from "@mui/material/DialogContent";
|
|
11
|
-
import DialogContentText from "@mui/material/DialogContentText";
|
|
12
|
-
import DialogTitle from "@mui/material/DialogTitle";
|
|
13
8
|
import IconButton from "@mui/material/IconButton";
|
|
14
9
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
15
10
|
import ListItemText from "@mui/material/ListItemText";
|
|
11
|
+
import Stack from "@mui/material/Stack";
|
|
16
12
|
import TextField from "@mui/material/TextField";
|
|
17
13
|
import Typography from "@mui/material/Typography";
|
|
18
14
|
import React, { useState } from "react";
|
|
@@ -35,6 +31,8 @@ import {
|
|
|
35
31
|
s3AttachedDatabaseFields,
|
|
36
32
|
uiCreatableConnectionTypes,
|
|
37
33
|
} from "./common";
|
|
34
|
+
import { AppDialog } from "../AppDialog";
|
|
35
|
+
import { SecondaryButton } from "../buttons";
|
|
38
36
|
|
|
39
37
|
/**
|
|
40
38
|
* Credential fields the API deliberately never returns, so an edit form can
|
|
@@ -520,42 +518,53 @@ export default function EditConnectionDialog({
|
|
|
520
518
|
</ListItemIcon>
|
|
521
519
|
<ListItemText>Edit</ListItemText>
|
|
522
520
|
</MenuItem>
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
521
|
+
{/* The `Menu` this is rendered inside already stops its own clicks
|
|
522
|
+
reaching the row behind it, so the dialog needs no per-section
|
|
523
|
+
stopPropagation of its own — it had one on each of the title,
|
|
524
|
+
the body and the actions. */}
|
|
525
|
+
<AppDialog
|
|
526
|
+
open={open}
|
|
527
|
+
onClose={handleClose}
|
|
528
|
+
title="Edit connection"
|
|
529
|
+
description="Change how packages in this environment reach your database."
|
|
530
|
+
actions={
|
|
531
|
+
<>
|
|
532
|
+
<Button disabled={isSubmitting} onClick={handleClose}>
|
|
533
|
+
Cancel
|
|
534
|
+
</Button>
|
|
535
|
+
<Button
|
|
536
|
+
type="submit"
|
|
537
|
+
form="connection-form"
|
|
538
|
+
variant="contained"
|
|
539
|
+
loading={isSubmitting}
|
|
540
|
+
>
|
|
541
|
+
Save changes
|
|
542
|
+
</Button>
|
|
543
|
+
</>
|
|
544
|
+
}
|
|
545
|
+
>
|
|
546
|
+
<form onSubmit={handleSubmit} id="connection-form">
|
|
547
|
+
{/* One column, one gap. The fields carry no margin of
|
|
548
|
+
their own, so without this they sit flush and their
|
|
549
|
+
borders overlap. */}
|
|
550
|
+
<Stack sx={{ gap: 2 }}>
|
|
540
551
|
<TextField
|
|
541
552
|
autoFocus
|
|
542
553
|
required
|
|
543
|
-
margin="dense"
|
|
544
554
|
id="name"
|
|
545
555
|
name="name"
|
|
546
|
-
label="
|
|
556
|
+
label="Name"
|
|
547
557
|
type="text"
|
|
548
558
|
fullWidth
|
|
549
|
-
|
|
559
|
+
size="small"
|
|
550
560
|
defaultValue={connection.name}
|
|
551
561
|
/>
|
|
552
562
|
<TextField
|
|
553
|
-
margin="dense"
|
|
554
563
|
id="type"
|
|
555
564
|
name="type"
|
|
556
565
|
label="Connection Type"
|
|
557
566
|
fullWidth
|
|
558
|
-
|
|
567
|
+
size="small"
|
|
559
568
|
value={type}
|
|
560
569
|
select
|
|
561
570
|
onChange={(event) =>
|
|
@@ -587,11 +596,10 @@ export default function EditConnectionDialog({
|
|
|
587
596
|
Catalog
|
|
588
597
|
</Typography>
|
|
589
598
|
<TextField
|
|
590
|
-
margin="dense"
|
|
591
599
|
id="ducklake_catalogType"
|
|
592
600
|
label="Catalog Type"
|
|
593
601
|
fullWidth
|
|
594
|
-
|
|
602
|
+
size="small"
|
|
595
603
|
value={ducklakeCatalogType}
|
|
596
604
|
select
|
|
597
605
|
onChange={(event) =>
|
|
@@ -606,13 +614,12 @@ export default function EditConnectionDialog({
|
|
|
606
614
|
(field) => (
|
|
607
615
|
<TextField
|
|
608
616
|
key={`pg_${field.name}`}
|
|
609
|
-
margin="dense"
|
|
610
617
|
id={`ducklake_pg_${field.name}`}
|
|
611
618
|
name={`ducklake_pg_${field.name}`}
|
|
612
619
|
label={field.label}
|
|
613
620
|
type={field.type}
|
|
614
621
|
fullWidth
|
|
615
|
-
|
|
622
|
+
size="small"
|
|
616
623
|
defaultValue={getDucklakeDefault(
|
|
617
624
|
`pg_${field.name}`,
|
|
618
625
|
)}
|
|
@@ -639,11 +646,10 @@ export default function EditConnectionDialog({
|
|
|
639
646
|
Storage
|
|
640
647
|
</Typography>
|
|
641
648
|
<TextField
|
|
642
|
-
margin="dense"
|
|
643
649
|
id="ducklake_storageType"
|
|
644
650
|
label="Storage Type"
|
|
645
651
|
fullWidth
|
|
646
|
-
|
|
652
|
+
size="small"
|
|
647
653
|
value={ducklakeStorageType}
|
|
648
654
|
select
|
|
649
655
|
onChange={(event) =>
|
|
@@ -654,7 +660,6 @@ export default function EditConnectionDialog({
|
|
|
654
660
|
<MenuItem value="gcs">GCS</MenuItem>
|
|
655
661
|
</TextField>
|
|
656
662
|
<TextField
|
|
657
|
-
margin="dense"
|
|
658
663
|
required
|
|
659
664
|
id="ducklake_bucketUrl"
|
|
660
665
|
name="ducklake_bucketUrl"
|
|
@@ -665,7 +670,7 @@ export default function EditConnectionDialog({
|
|
|
665
670
|
}
|
|
666
671
|
type="text"
|
|
667
672
|
fullWidth
|
|
668
|
-
|
|
673
|
+
size="small"
|
|
669
674
|
defaultValue={getDucklakeDefault("bucketUrl")}
|
|
670
675
|
/>
|
|
671
676
|
{ducklakeStorageType === "s3" && (
|
|
@@ -687,7 +692,6 @@ export default function EditConnectionDialog({
|
|
|
687
692
|
.map((field) => (
|
|
688
693
|
<TextField
|
|
689
694
|
key={`s3_${field.name}`}
|
|
690
|
-
margin="dense"
|
|
691
695
|
id={`ducklake_s3_${field.name}`}
|
|
692
696
|
name={`ducklake_s3_${field.name}`}
|
|
693
697
|
label={field.label}
|
|
@@ -697,7 +701,7 @@ export default function EditConnectionDialog({
|
|
|
697
701
|
: field.type
|
|
698
702
|
}
|
|
699
703
|
fullWidth
|
|
700
|
-
|
|
704
|
+
size="small"
|
|
701
705
|
required={
|
|
702
706
|
field.required &&
|
|
703
707
|
field.name !== "secretAccessKey"
|
|
@@ -756,13 +760,12 @@ export default function EditConnectionDialog({
|
|
|
756
760
|
{gcsAttachedDatabaseFields.map((field) => (
|
|
757
761
|
<TextField
|
|
758
762
|
key={`gcs_${field.name}`}
|
|
759
|
-
margin="dense"
|
|
760
763
|
id={`ducklake_gcs_${field.name}`}
|
|
761
764
|
name={`ducklake_gcs_${field.name}`}
|
|
762
765
|
label={field.label}
|
|
763
766
|
type={field.type}
|
|
764
767
|
fullWidth
|
|
765
|
-
|
|
768
|
+
size="small"
|
|
766
769
|
required={
|
|
767
770
|
field.required &&
|
|
768
771
|
field.name !== "secret"
|
|
@@ -797,14 +800,12 @@ export default function EditConnectionDialog({
|
|
|
797
800
|
<Typography variant="subtitle1" fontWeight={500}>
|
|
798
801
|
Attached Databases
|
|
799
802
|
</Typography>
|
|
800
|
-
<
|
|
801
|
-
|
|
803
|
+
<SecondaryButton
|
|
804
|
+
label="Database"
|
|
805
|
+
icon={<AddIcon />}
|
|
802
806
|
onClick={addAttachedDatabase}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
>
|
|
806
|
-
Add Database
|
|
807
|
-
</Button>
|
|
807
|
+
ariaLabel="Add database"
|
|
808
|
+
/>
|
|
808
809
|
</Box>
|
|
809
810
|
{attachedDatabases.length === 0 && (
|
|
810
811
|
<Typography
|
|
@@ -855,23 +856,21 @@ export default function EditConnectionDialog({
|
|
|
855
856
|
</IconButton>
|
|
856
857
|
</Box>
|
|
857
858
|
<TextField
|
|
858
|
-
margin="dense"
|
|
859
859
|
required
|
|
860
860
|
id={`attachedDb_${index}_name`}
|
|
861
861
|
name={`attachedDb_${index}_name`}
|
|
862
862
|
label="Database Name"
|
|
863
863
|
type="text"
|
|
864
864
|
fullWidth
|
|
865
|
-
|
|
865
|
+
size="small"
|
|
866
866
|
defaultValue={db.name}
|
|
867
867
|
/>
|
|
868
868
|
<TextField
|
|
869
|
-
margin="dense"
|
|
870
869
|
id={`attachedDb_${index}_type`}
|
|
871
870
|
name={`attachedDb_${index}_type`}
|
|
872
871
|
label="Database Type"
|
|
873
872
|
fullWidth
|
|
874
|
-
|
|
873
|
+
size="small"
|
|
875
874
|
value={db.dbType}
|
|
876
875
|
select
|
|
877
876
|
onChange={(event) =>
|
|
@@ -912,7 +911,6 @@ export default function EditConnectionDialog({
|
|
|
912
911
|
.map((field) => (
|
|
913
912
|
<TextField
|
|
914
913
|
key={field.name}
|
|
915
|
-
margin="dense"
|
|
916
914
|
id={`attachedDb_${index}_${field.name}`}
|
|
917
915
|
name={`attachedDb_${index}_${field.name}`}
|
|
918
916
|
label={field.label}
|
|
@@ -922,7 +920,7 @@ export default function EditConnectionDialog({
|
|
|
922
920
|
: field.type
|
|
923
921
|
}
|
|
924
922
|
fullWidth
|
|
925
|
-
|
|
923
|
+
size="small"
|
|
926
924
|
required={field.required}
|
|
927
925
|
select={!!field.selectOptions}
|
|
928
926
|
defaultValue={
|
|
@@ -992,13 +990,12 @@ export default function EditConnectionDialog({
|
|
|
992
990
|
return (
|
|
993
991
|
<TextField
|
|
994
992
|
key={field.name}
|
|
995
|
-
margin="dense"
|
|
996
993
|
id={field.name}
|
|
997
994
|
name={field.name}
|
|
998
995
|
label={field.label}
|
|
999
996
|
type={field.type}
|
|
1000
997
|
fullWidth
|
|
1001
|
-
|
|
998
|
+
size="small"
|
|
1002
999
|
required={
|
|
1003
1000
|
field.required &&
|
|
1004
1001
|
!isPasswordField &&
|
|
@@ -1021,25 +1018,9 @@ export default function EditConnectionDialog({
|
|
|
1021
1018
|
);
|
|
1022
1019
|
})
|
|
1023
1020
|
)}
|
|
1024
|
-
</
|
|
1025
|
-
</
|
|
1026
|
-
|
|
1027
|
-
onClick={(event) => {
|
|
1028
|
-
event.stopPropagation();
|
|
1029
|
-
}}
|
|
1030
|
-
>
|
|
1031
|
-
<Button disabled={isSubmitting} onClick={handleClose}>
|
|
1032
|
-
Cancel
|
|
1033
|
-
</Button>
|
|
1034
|
-
<Button
|
|
1035
|
-
type="submit"
|
|
1036
|
-
form="connection-form"
|
|
1037
|
-
loading={isSubmitting}
|
|
1038
|
-
>
|
|
1039
|
-
Edit Connection
|
|
1040
|
-
</Button>
|
|
1041
|
-
</DialogActions>
|
|
1042
|
-
</Dialog>
|
|
1021
|
+
</Stack>
|
|
1022
|
+
</form>
|
|
1023
|
+
</AppDialog>
|
|
1043
1024
|
</React.Fragment>
|
|
1044
1025
|
);
|
|
1045
1026
|
}
|
|
@@ -151,9 +151,9 @@ describe("the version reaches what the manifest drives", () => {
|
|
|
151
151
|
it("runs the tile's query against the same version", async () => {
|
|
152
152
|
render(dashboardAt("v2"), { wrapper: serverWrapper });
|
|
153
153
|
|
|
154
|
-
await waitFor(() => expect(cacheKeys("
|
|
154
|
+
await waitFor(() => expect(cacheKeys("queryResult").length).toBe(1));
|
|
155
155
|
expect(tileRequest()?.versionId).toBe("v2");
|
|
156
|
-
expect(cacheKeys("
|
|
156
|
+
expect(cacheKeys("queryResult")[0]).toContain('"v2"');
|
|
157
157
|
});
|
|
158
158
|
|
|
159
159
|
it("runs every composite tile against the same version", async () => {
|
|
@@ -171,9 +171,8 @@ describe("the version reaches what the manifest drives", () => {
|
|
|
171
171
|
|
|
172
172
|
render(dashboardAt("v2"), { wrapper: serverWrapper });
|
|
173
173
|
|
|
174
|
-
await waitFor(() => expect(cacheKeys("
|
|
175
|
-
for (const key of cacheKeys("
|
|
176
|
-
expect(key).toContain('"v2"');
|
|
174
|
+
await waitFor(() => expect(cacheKeys("queryResult").length).toBe(2));
|
|
175
|
+
for (const key of cacheKeys("queryResult")) expect(key).toContain('"v2"');
|
|
177
176
|
});
|
|
178
177
|
|
|
179
178
|
it("runs the control's suggest query against the same version", async () => {
|
|
@@ -195,7 +194,7 @@ describe("the version reaches what the manifest drives", () => {
|
|
|
195
194
|
const { rerender } = render(dashboardAt("v1"), {
|
|
196
195
|
wrapper: serverWrapper,
|
|
197
196
|
});
|
|
198
|
-
await waitFor(() => expect(cacheKeys("
|
|
197
|
+
await waitFor(() => expect(cacheKeys("queryResult").length).toBe(1));
|
|
199
198
|
|
|
200
199
|
fireEvent.change(await screen.findByLabelText("REGION"), {
|
|
201
200
|
target: { value: "CA" },
|
|
@@ -206,10 +205,8 @@ describe("the version reaches what the manifest drives", () => {
|
|
|
206
205
|
|
|
207
206
|
rerender(dashboardAt("v2"));
|
|
208
207
|
|
|
209
|
-
await waitFor(() => expect(cacheKeys("
|
|
210
|
-
const v2 = cacheKeys("
|
|
211
|
-
key.includes('"v2"'),
|
|
212
|
-
);
|
|
208
|
+
await waitFor(() => expect(cacheKeys("queryResult").length).toBe(3));
|
|
209
|
+
const v2 = cacheKeys("queryResult").filter((key) => key.includes('"v2"'));
|
|
213
210
|
expect(v2).toHaveLength(1);
|
|
214
211
|
expect(v2[0]).not.toContain("CA");
|
|
215
212
|
});
|