@datarecce/ui 0.1.27 → 0.1.28
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/api.d.mts +1 -1
- package/dist/{components-DoLZeY_e.mjs → components-Bt0G4cpr.mjs} +274 -239
- package/dist/components-Bt0G4cpr.mjs.map +1 -0
- package/dist/{components-Chaffojm.js → components-Cvfq_6t4.js} +274 -239
- package/dist/components-Cvfq_6t4.js.map +1 -0
- package/dist/components.d.mts +1 -1
- package/dist/components.js +1 -1
- package/dist/components.mjs +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/index-CUtFlKOo.d.ts.map +1 -1
- package/dist/{index-BbISJwin.d.mts → index-OJCzYajo.d.mts} +70 -70
- package/dist/index-OJCzYajo.d.mts.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +1 -1
- package/dist/components-Chaffojm.js.map +0 -1
- package/dist/components-DoLZeY_e.mjs.map +0 -1
- package/dist/index-BbISJwin.d.mts.map +0 -1
package/dist/api.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { $n as CreateCheckBody, $r as RowCount, A as connectToCloud, Ai as CatalogMetadata, B as submitQueryBase, Bi as ServerInfoResult, Br as ValueDiffDetailParams, C as SchemaDiffViewParams, Ci as submitRunFromCheck, D as markOnboardingCompleted, Di as ColumnLineageData, E as getServerFlag, Ei as CllNodeData, F as QueryPreviewChangeParams, Fi as ManifestMetadata, Gi as getServerInfo, Gr as submitValueDiff, Hi as getLineageDiff, Hr as ValueDiffDetailViewOptions, I as QueryResult, Ii as ModelInfoResult, Ji as stateMetadata, Jr as RowCountDiffResult, Ki as gitInfo, Kr as submitValueDiffDetail, L as QueryRunParams, Li as NodeColumnData, M as QueryDiffResult, Mi as LineageDataFromMetadata, N as QueryDiffViewOptions, Ni as LineageDiffData, O as markRelaunchHintCompleted, Oi as ImpactRadiusParams, P as QueryParams, Pi as LineageDiffResult, Qn as Check, Qr as QueryRowCountResult, R as QueryViewOptions, Ri as NodeData, S as select, Si as submitRun, T as RecceServerFlags, Ti as CllInput, Ui as getLineageWithError, Ur as ValueDiffParams, V as submitQueryDiff, Vi as getLineage, Vr as ValueDiffDetailResult, Wi as getModelInfo, Wr as ValueDiffResult, Xn as LineageDiffViewOptions, Xr as RowCountResult, Yr as RowCountParams, Zn as createLineageDiffCheck, Zr as submitRowCountDiff, _ as saveAs, _i as aggregateRuns, a as User, aa as reactQueryClient, ai as HistogramDiffResult, ar as markAsPresetCheck, b as SelectInput, bi as listRuns, c as ImportedState, ci as ProfileDiffResult, cr as useChecks, d as SyncStateInput, di as TopKDiffResult, ei as RowCountDiff, er as createCheckByRun, f as SyncStateResponse, fi as TopKResult, g as rename, gi as SubmitRunTrackProps, h as isStateSyncing, hi as SubmitOptions, i as useVersionNumber, ia as axiosClient, ii as HistogramDiffParams, ir as listChecks, j as QueryDiffParams, ji as LineageData, k as ConnectToCloud, ki as getCll, l as SaveAsInput, li as ProfileDiffViewOptions, m as importState, mi as RunsAggregated, n as localStorageKeys, ni as queryModelRowCount, nr as deleteCheck, o as fetchGitHubAvatar, oi as HistogramResult, or as reorderChecks, p as exportState, pi as submitProfileDiff, qi as pullRequestInfo, qr as RowCountDiffParams, r as getVersion, ri as queryRowCount, rr as getCheck, s as fetchUser, si as ProfileDiffParams, sr as updateCheck, t as sessionStorageKeys, ti as fetchModelRowCount, tr as createSimpleCheck, u as ShareStateResponse, ui as TopKDiffParams, v as shareState, vi as cancelRun, w as createSchemaDiffCheck, wi as waitRun, x as SelectOutput, xi as searchRuns, y as syncState, yi as getRun, z as submitQuery, zi as SQLMeshInfo } from "./index-
|
|
2
|
+
import { $n as CreateCheckBody, $r as RowCount, A as connectToCloud, Ai as CatalogMetadata, B as submitQueryBase, Bi as ServerInfoResult, Br as ValueDiffDetailParams, C as SchemaDiffViewParams, Ci as submitRunFromCheck, D as markOnboardingCompleted, Di as ColumnLineageData, E as getServerFlag, Ei as CllNodeData, F as QueryPreviewChangeParams, Fi as ManifestMetadata, Gi as getServerInfo, Gr as submitValueDiff, Hi as getLineageDiff, Hr as ValueDiffDetailViewOptions, I as QueryResult, Ii as ModelInfoResult, Ji as stateMetadata, Jr as RowCountDiffResult, Ki as gitInfo, Kr as submitValueDiffDetail, L as QueryRunParams, Li as NodeColumnData, M as QueryDiffResult, Mi as LineageDataFromMetadata, N as QueryDiffViewOptions, Ni as LineageDiffData, O as markRelaunchHintCompleted, Oi as ImpactRadiusParams, P as QueryParams, Pi as LineageDiffResult, Qn as Check, Qr as QueryRowCountResult, R as QueryViewOptions, Ri as NodeData, S as select, Si as submitRun, T as RecceServerFlags, Ti as CllInput, Ui as getLineageWithError, Ur as ValueDiffParams, V as submitQueryDiff, Vi as getLineage, Vr as ValueDiffDetailResult, Wi as getModelInfo, Wr as ValueDiffResult, Xn as LineageDiffViewOptions, Xr as RowCountResult, Yr as RowCountParams, Zn as createLineageDiffCheck, Zr as submitRowCountDiff, _ as saveAs, _i as aggregateRuns, a as User, aa as reactQueryClient, ai as HistogramDiffResult, ar as markAsPresetCheck, b as SelectInput, bi as listRuns, c as ImportedState, ci as ProfileDiffResult, cr as useChecks, d as SyncStateInput, di as TopKDiffResult, ei as RowCountDiff, er as createCheckByRun, f as SyncStateResponse, fi as TopKResult, g as rename, gi as SubmitRunTrackProps, h as isStateSyncing, hi as SubmitOptions, i as useVersionNumber, ia as axiosClient, ii as HistogramDiffParams, ir as listChecks, j as QueryDiffParams, ji as LineageData, k as ConnectToCloud, ki as getCll, l as SaveAsInput, li as ProfileDiffViewOptions, m as importState, mi as RunsAggregated, n as localStorageKeys, ni as queryModelRowCount, nr as deleteCheck, o as fetchGitHubAvatar, oi as HistogramResult, or as reorderChecks, p as exportState, pi as submitProfileDiff, qi as pullRequestInfo, qr as RowCountDiffParams, r as getVersion, ri as queryRowCount, rr as getCheck, s as fetchUser, si as ProfileDiffParams, sr as updateCheck, t as sessionStorageKeys, ti as fetchModelRowCount, tr as createSimpleCheck, u as ShareStateResponse, ui as TopKDiffParams, v as shareState, vi as cancelRun, w as createSchemaDiffCheck, wi as waitRun, x as SelectOutput, xi as searchRuns, y as syncState, yi as getRun, z as submitQuery, zi as SQLMeshInfo } from "./index-OJCzYajo.mjs";
|
|
3
3
|
export { CatalogMetadata, Check, CllInput, CllNodeData, ColumnLineageData, ConnectToCloud, CreateCheckBody, HistogramDiffParams, HistogramDiffResult, HistogramResult, ImpactRadiusParams, ImportedState, LineageData, LineageDataFromMetadata, LineageDiffData, LineageDiffResult, LineageDiffViewOptions, ManifestMetadata, ModelInfoResult, NodeColumnData, NodeData, ProfileDiffParams, ProfileDiffResult, ProfileDiffViewOptions, QueryDiffParams, QueryDiffResult, QueryDiffViewOptions, QueryParams, QueryPreviewChangeParams, QueryResult, QueryRowCountResult, QueryRunParams, QueryViewOptions, RecceServerFlags, RowCount, RowCountDiff, RowCountDiffParams, RowCountDiffResult, RowCountParams, RowCountResult, RunsAggregated, SQLMeshInfo, SaveAsInput, SchemaDiffViewParams, SelectInput, SelectOutput, ServerInfoResult, ShareStateResponse, SubmitOptions, SubmitRunTrackProps, SyncStateInput, SyncStateResponse, TopKDiffParams, TopKDiffResult, TopKResult, User, ValueDiffDetailParams, ValueDiffDetailResult, ValueDiffDetailViewOptions, ValueDiffParams, ValueDiffResult, aggregateRuns, axiosClient, cancelRun, connectToCloud, createCheckByRun, createLineageDiffCheck, createSchemaDiffCheck, createSimpleCheck, deleteCheck, exportState, fetchGitHubAvatar, fetchModelRowCount, fetchUser, getCheck, getCll, getLineage, getLineageDiff, getLineageWithError, getModelInfo, getRun, getServerFlag, getServerInfo, getVersion, gitInfo, importState, isStateSyncing, listChecks, listRuns, localStorageKeys, markAsPresetCheck, markOnboardingCompleted, markRelaunchHintCompleted, pullRequestInfo, queryModelRowCount, queryRowCount, reactQueryClient, rename, reorderChecks, saveAs, searchRuns, select, sessionStorageKeys, shareState, stateMetadata, submitProfileDiff, submitQuery, submitQueryBase, submitQueryDiff, submitRowCountDiff, submitRun, submitRunFromCheck, submitValueDiff, submitValueDiffDetail, syncState, updateCheck, useChecks, useVersionNumber, waitRun };
|
|
@@ -5478,11 +5478,12 @@ function NodeView({ node, onCloseNode }) {
|
|
|
5478
5478
|
};
|
|
5479
5479
|
const baseColumns = Object.keys(node.data.data.base?.columns ?? {});
|
|
5480
5480
|
const currentColumns = Object.keys(node.data.data.current?.columns ?? {});
|
|
5481
|
+
const isModelSeedOrSnapshot = node.data.resourceType === "model" || node.data.resourceType === "seed" || node.data.resourceType === "snapshot";
|
|
5481
5482
|
return /* @__PURE__ */ jsxs(Box, {
|
|
5482
5483
|
sx: {
|
|
5483
5484
|
height: "100%",
|
|
5484
5485
|
display: "grid",
|
|
5485
|
-
gridTemplateRows: "auto auto 1fr"
|
|
5486
|
+
gridTemplateRows: "auto auto auto 1fr"
|
|
5486
5487
|
},
|
|
5487
5488
|
children: [
|
|
5488
5489
|
/* @__PURE__ */ jsxs(Stack, {
|
|
@@ -5502,18 +5503,8 @@ function NodeView({ node, onCloseNode }) {
|
|
|
5502
5503
|
})
|
|
5503
5504
|
}),
|
|
5504
5505
|
/* @__PURE__ */ jsx(Box, { sx: { flexGrow: 1 } }),
|
|
5505
|
-
isSingleEnvOnboarding
|
|
5506
|
+
!isSingleEnvOnboarding && isModelSeedOrSnapshot && /* @__PURE__ */ jsx(ExploreHeaderButtons, {
|
|
5506
5507
|
node,
|
|
5507
|
-
baseColumns,
|
|
5508
|
-
currentColumns,
|
|
5509
|
-
refetchRowCount,
|
|
5510
|
-
disableReason
|
|
5511
|
-
}) : /* @__PURE__ */ jsx(ExploreChangeMenuButton, {
|
|
5512
|
-
node,
|
|
5513
|
-
baseColumns,
|
|
5514
|
-
currentColumns,
|
|
5515
|
-
disableReason,
|
|
5516
|
-
refetchRowCountDiff,
|
|
5517
5508
|
onSandboxOpen: () => setIsSandboxOpen(true)
|
|
5518
5509
|
}),
|
|
5519
5510
|
/* @__PURE__ */ jsx(Box, {
|
|
@@ -5534,7 +5525,7 @@ function NodeView({ node, onCloseNode }) {
|
|
|
5534
5525
|
children: /* @__PURE__ */ jsxs(Stack, {
|
|
5535
5526
|
direction: "row",
|
|
5536
5527
|
spacing: 1,
|
|
5537
|
-
children: [/* @__PURE__ */ jsx(ResourceTypeTag, { node }),
|
|
5528
|
+
children: [/* @__PURE__ */ jsx(ResourceTypeTag, { node }), isModelSeedOrSnapshot && (isSingleEnvOnboarding ? /* @__PURE__ */ jsx(RowCountTag, {
|
|
5538
5529
|
node,
|
|
5539
5530
|
onRefresh: refetchRowCount
|
|
5540
5531
|
}) : /* @__PURE__ */ jsx(RowCountDiffTag, {
|
|
@@ -5543,6 +5534,25 @@ function NodeView({ node, onCloseNode }) {
|
|
|
5543
5534
|
}))]
|
|
5544
5535
|
})
|
|
5545
5536
|
}),
|
|
5537
|
+
isModelSeedOrSnapshot && /* @__PURE__ */ jsx(Box, {
|
|
5538
|
+
sx: {
|
|
5539
|
+
pl: 2,
|
|
5540
|
+
py: 1
|
|
5541
|
+
},
|
|
5542
|
+
children: isSingleEnvOnboarding ? /* @__PURE__ */ jsx(SingleEnvActionButtons, {
|
|
5543
|
+
node,
|
|
5544
|
+
baseColumns,
|
|
5545
|
+
currentColumns,
|
|
5546
|
+
refetchRowCount,
|
|
5547
|
+
disableReason
|
|
5548
|
+
}) : /* @__PURE__ */ jsx(DiffActionButtons, {
|
|
5549
|
+
node,
|
|
5550
|
+
baseColumns,
|
|
5551
|
+
currentColumns,
|
|
5552
|
+
disableReason,
|
|
5553
|
+
refetchRowCountDiff
|
|
5554
|
+
})
|
|
5555
|
+
}),
|
|
5546
5556
|
withColumns && /* @__PURE__ */ jsxs(Box, {
|
|
5547
5557
|
sx: {
|
|
5548
5558
|
overflow: "auto",
|
|
@@ -5611,9 +5621,7 @@ function NodeView({ node, onCloseNode }) {
|
|
|
5611
5621
|
]
|
|
5612
5622
|
});
|
|
5613
5623
|
}
|
|
5614
|
-
function
|
|
5615
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
5616
|
-
const open = Boolean(anchorEl);
|
|
5624
|
+
function SingleEnvActionButtons({ node, baseColumns, currentColumns, refetchRowCount, disableReason }) {
|
|
5617
5625
|
const [, setLocation] = useAppLocation();
|
|
5618
5626
|
const { setSqlQuery } = useRecceQueryContext();
|
|
5619
5627
|
const { runAction } = useRecceActionContext();
|
|
@@ -5622,81 +5630,77 @@ function SingleEnvironmentMenuButton({ node, baseColumns, currentColumns, refetc
|
|
|
5622
5630
|
const formattedColumns = formatSelectColumns(baseColumns, currentColumns);
|
|
5623
5631
|
let query = `select * from {{ ref("${node.data.name}") }}`;
|
|
5624
5632
|
if (formattedColumns.length) query = `select \n ${formattedColumns.join("\n ")}\nfrom {{ ref("${node.data.name}") }}`;
|
|
5625
|
-
const
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
const
|
|
5629
|
-
|
|
5633
|
+
const QueryIcon = findByRunType("query").icon;
|
|
5634
|
+
const RowCountIcon = findByRunType("row_count").icon;
|
|
5635
|
+
const ProfileIcon = findByRunType("profile").icon;
|
|
5636
|
+
const handleQueryClick = () => {
|
|
5637
|
+
if (envInfo?.adapterType === "dbt") setSqlQuery(query);
|
|
5638
|
+
else if (envInfo?.adapterType === "sqlmesh") setSqlQuery(`select * from ${node.data.name}`);
|
|
5639
|
+
setLocation("/query");
|
|
5640
|
+
};
|
|
5641
|
+
const handleRowCountClick = () => {
|
|
5642
|
+
refetchRowCount();
|
|
5643
|
+
};
|
|
5644
|
+
const handleProfileClick = () => {
|
|
5645
|
+
trackExploreAction({
|
|
5646
|
+
action: EXPLORE_ACTION.PROFILE,
|
|
5647
|
+
source: EXPLORE_SOURCE.NODE_SIDEBAR_SINGLE_ENV,
|
|
5648
|
+
node_count: 1
|
|
5649
|
+
});
|
|
5650
|
+
runAction("profile", { model: node.data.name }, {
|
|
5651
|
+
showForm: true,
|
|
5652
|
+
showLast: false
|
|
5653
|
+
});
|
|
5630
5654
|
};
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
children:
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
source: EXPLORE_SOURCE.NODE_SIDEBAR_SINGLE_ENV,
|
|
5672
|
-
node_count: 1
|
|
5673
|
-
});
|
|
5674
|
-
runAction("profile", { model: node.data.name }, {
|
|
5675
|
-
showForm: true,
|
|
5676
|
-
showLast: false
|
|
5677
|
-
});
|
|
5678
|
-
handleClose();
|
|
5679
|
-
},
|
|
5680
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(ProfileIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Profile" })]
|
|
5681
|
-
}) })
|
|
5682
|
-
})
|
|
5683
|
-
]
|
|
5684
|
-
})] });
|
|
5685
|
-
}
|
|
5686
|
-
return null;
|
|
5655
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
5656
|
+
direction: "row",
|
|
5657
|
+
alignItems: "center",
|
|
5658
|
+
flexWrap: "wrap",
|
|
5659
|
+
gap: 1,
|
|
5660
|
+
children: [
|
|
5661
|
+
/* @__PURE__ */ jsx(Button, {
|
|
5662
|
+
size: "xsmall",
|
|
5663
|
+
variant: "outlined",
|
|
5664
|
+
color: "neutral",
|
|
5665
|
+
startIcon: /* @__PURE__ */ jsx(QueryIcon, { fontSize: "small" }),
|
|
5666
|
+
onClick: handleQueryClick,
|
|
5667
|
+
sx: { textTransform: "none" },
|
|
5668
|
+
children: "Query"
|
|
5669
|
+
}),
|
|
5670
|
+
/* @__PURE__ */ jsx(Button, {
|
|
5671
|
+
size: "xsmall",
|
|
5672
|
+
variant: "outlined",
|
|
5673
|
+
color: "neutral",
|
|
5674
|
+
startIcon: /* @__PURE__ */ jsx(RowCountIcon, { fontSize: "small" }),
|
|
5675
|
+
onClick: handleRowCountClick,
|
|
5676
|
+
sx: { textTransform: "none" },
|
|
5677
|
+
children: "Row Count"
|
|
5678
|
+
}),
|
|
5679
|
+
/* @__PURE__ */ jsx(MuiTooltip, {
|
|
5680
|
+
title: disableReason(isAddedOrRemoved, "profile"),
|
|
5681
|
+
placement: "top",
|
|
5682
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Button, {
|
|
5683
|
+
size: "xsmall",
|
|
5684
|
+
variant: "outlined",
|
|
5685
|
+
color: "neutral",
|
|
5686
|
+
startIcon: /* @__PURE__ */ jsx(ProfileIcon, { fontSize: "small" }),
|
|
5687
|
+
onClick: handleProfileClick,
|
|
5688
|
+
disabled: isAddedOrRemoved,
|
|
5689
|
+
sx: { textTransform: "none" },
|
|
5690
|
+
children: "Profile"
|
|
5691
|
+
}) })
|
|
5692
|
+
})
|
|
5693
|
+
]
|
|
5694
|
+
});
|
|
5687
5695
|
}
|
|
5688
|
-
function
|
|
5689
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
5690
|
-
const open = Boolean(anchorEl);
|
|
5696
|
+
function ExploreHeaderButtons({ node, onSandboxOpen }) {
|
|
5691
5697
|
const [, setLocation] = useAppLocation();
|
|
5692
|
-
const { runAction } = useRecceActionContext();
|
|
5693
|
-
const { setSqlQuery, setPrimaryKeys } = useRecceQueryContext();
|
|
5694
|
-
const { envInfo, isActionAvailable } = useLineageGraphContext();
|
|
5695
5698
|
const { featureToggles } = useRecceInstanceContext();
|
|
5699
|
+
const { isActionAvailable } = useLineageGraphContext();
|
|
5700
|
+
const { setPrimaryKeys } = useRecceQueryContext();
|
|
5696
5701
|
const { primaryKey } = useModelColumns_default(node.data.name);
|
|
5697
5702
|
const { apiClient } = useApiConfig();
|
|
5698
5703
|
const metadataOnly = featureToggles.mode === "metadata only";
|
|
5699
|
-
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
5700
5704
|
const addSchemaCheck = useCallback(async () => {
|
|
5701
5705
|
const nodeId = node.id;
|
|
5702
5706
|
setLocation(`/checks/?id=${(await createSchemaDiffCheck({ node_id: nodeId }, apiClient)).check_id}`);
|
|
@@ -5705,186 +5709,217 @@ function ExploreChangeMenuButton({ node, baseColumns, currentColumns, disableRea
|
|
|
5705
5709
|
setLocation,
|
|
5706
5710
|
apiClient
|
|
5707
5711
|
]);
|
|
5712
|
+
const SchemaDiffIcon = findByRunType("schema_diff").icon;
|
|
5713
|
+
const SandboxIcon = findByRunType("sandbox").icon;
|
|
5714
|
+
const handleAddSchemaCheck = () => {
|
|
5715
|
+
addSchemaCheck();
|
|
5716
|
+
};
|
|
5717
|
+
const handleSandboxOpen = () => {
|
|
5718
|
+
if (isActionAvailable("query_diff_with_primary_key")) setPrimaryKeys(primaryKey !== void 0 ? [primaryKey] : void 0);
|
|
5719
|
+
onSandboxOpen();
|
|
5720
|
+
trackPreviewChange({
|
|
5721
|
+
action: "explore",
|
|
5722
|
+
node: node.data.name
|
|
5723
|
+
});
|
|
5724
|
+
};
|
|
5725
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
5726
|
+
direction: "row",
|
|
5727
|
+
alignItems: "center",
|
|
5728
|
+
sx: { mr: 1 },
|
|
5729
|
+
flexWrap: "wrap",
|
|
5730
|
+
gap: 1,
|
|
5731
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
5732
|
+
size: "xsmall",
|
|
5733
|
+
variant: "outlined",
|
|
5734
|
+
color: "neutral",
|
|
5735
|
+
startIcon: /* @__PURE__ */ jsx(SchemaDiffIcon, { fontSize: "small" }),
|
|
5736
|
+
onClick: handleAddSchemaCheck,
|
|
5737
|
+
sx: { textTransform: "none" },
|
|
5738
|
+
children: "Add schema diff to checklist"
|
|
5739
|
+
}), /* @__PURE__ */ jsx(SetupConnectionPopover, {
|
|
5740
|
+
display: metadataOnly,
|
|
5741
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
5742
|
+
size: "xsmall",
|
|
5743
|
+
variant: "outlined",
|
|
5744
|
+
color: "neutral",
|
|
5745
|
+
startIcon: /* @__PURE__ */ jsx(SandboxIcon, { fontSize: "small" }),
|
|
5746
|
+
onClick: handleSandboxOpen,
|
|
5747
|
+
disabled: featureToggles.disableDatabaseQuery,
|
|
5748
|
+
sx: { textTransform: "none" },
|
|
5749
|
+
children: "Sandbox"
|
|
5750
|
+
})
|
|
5751
|
+
})]
|
|
5752
|
+
});
|
|
5753
|
+
}
|
|
5754
|
+
function DiffActionButtons({ node, baseColumns, currentColumns, disableReason, refetchRowCountDiff }) {
|
|
5755
|
+
const [, setLocation] = useAppLocation();
|
|
5756
|
+
const { runAction } = useRecceActionContext();
|
|
5757
|
+
const { setSqlQuery, setPrimaryKeys } = useRecceQueryContext();
|
|
5758
|
+
const { envInfo, isActionAvailable } = useLineageGraphContext();
|
|
5759
|
+
const { featureToggles } = useRecceInstanceContext();
|
|
5760
|
+
const { primaryKey } = useModelColumns_default(node.data.name);
|
|
5761
|
+
const metadataOnly = featureToggles.mode === "metadata only";
|
|
5762
|
+
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
5708
5763
|
const formattedColumns = formatSelectColumns(baseColumns, currentColumns);
|
|
5709
5764
|
let query = `select * from {{ ref("${node.data.name}") }}`;
|
|
5710
5765
|
if (formattedColumns.length) query = `select \n ${formattedColumns.join("\n ")}\nfrom {{ ref("${node.data.name}") }}`;
|
|
5711
|
-
const
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
const
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
const
|
|
5766
|
+
const QueryDiffIcon = findByRunType("query_diff").icon;
|
|
5767
|
+
const RowCountDiffIcon = findByRunType("row_count_diff").icon;
|
|
5768
|
+
const ProfileDiffIcon = findByRunType("profile_diff").icon;
|
|
5769
|
+
const ValueDiffIcon = findByRunType("value_diff").icon;
|
|
5770
|
+
const TopKDiffIcon = findByRunType("top_k_diff").icon;
|
|
5771
|
+
const HistogramDiffIcon = findByRunType("histogram_diff").icon;
|
|
5772
|
+
const wrapButton = (button, runType) => {
|
|
5718
5773
|
if (metadataOnly) return /* @__PURE__ */ jsx(SetupConnectionPopover, {
|
|
5719
5774
|
display: true,
|
|
5720
|
-
children:
|
|
5775
|
+
children: button
|
|
5721
5776
|
});
|
|
5722
5777
|
return /* @__PURE__ */ jsx(MuiTooltip, {
|
|
5723
5778
|
title: disableReason(isAddedOrRemoved, runType),
|
|
5724
|
-
placement: "
|
|
5725
|
-
children: /* @__PURE__ */ jsx("span", { children:
|
|
5779
|
+
placement: "top",
|
|
5780
|
+
children: /* @__PURE__ */ jsx("span", { children: button })
|
|
5726
5781
|
});
|
|
5727
5782
|
};
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5783
|
+
const handleRowCountClick = () => {
|
|
5784
|
+
refetchRowCountDiff();
|
|
5785
|
+
};
|
|
5786
|
+
const handleProfileClick = () => {
|
|
5787
|
+
trackExploreAction({
|
|
5788
|
+
action: EXPLORE_ACTION.PROFILE_DIFF,
|
|
5789
|
+
source: EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
5790
|
+
node_count: 1
|
|
5791
|
+
});
|
|
5792
|
+
runAction("profile_diff", { model: node.data.name }, {
|
|
5793
|
+
showForm: true,
|
|
5794
|
+
showLast: false
|
|
5795
|
+
});
|
|
5796
|
+
};
|
|
5797
|
+
const handleValueClick = () => {
|
|
5798
|
+
trackExploreAction({
|
|
5799
|
+
action: EXPLORE_ACTION.VALUE_DIFF,
|
|
5800
|
+
source: EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
5801
|
+
node_count: 1
|
|
5802
|
+
});
|
|
5803
|
+
runAction("value_diff", { model: node.data.name }, {
|
|
5804
|
+
showForm: true,
|
|
5805
|
+
showLast: false
|
|
5806
|
+
});
|
|
5807
|
+
};
|
|
5808
|
+
const handleTopKClick = () => {
|
|
5809
|
+
trackExploreAction({
|
|
5810
|
+
action: EXPLORE_ACTION.TOP_K_DIFF,
|
|
5811
|
+
source: EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
5812
|
+
node_count: 1
|
|
5813
|
+
});
|
|
5814
|
+
runAction("top_k_diff", {
|
|
5815
|
+
model: node.data.name,
|
|
5816
|
+
column_name: "",
|
|
5817
|
+
k: 50
|
|
5818
|
+
}, { showForm: true });
|
|
5819
|
+
};
|
|
5820
|
+
const handleHistogramClick = () => {
|
|
5821
|
+
trackExploreAction({
|
|
5822
|
+
action: EXPLORE_ACTION.HISTOGRAM_DIFF,
|
|
5823
|
+
source: EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
5824
|
+
node_count: 1
|
|
5825
|
+
});
|
|
5826
|
+
runAction("histogram_diff", {
|
|
5827
|
+
model: node.data.name,
|
|
5828
|
+
column_name: "",
|
|
5829
|
+
column_type: ""
|
|
5830
|
+
}, { showForm: true });
|
|
5831
|
+
};
|
|
5832
|
+
const handleQueryClick = () => {
|
|
5833
|
+
if (envInfo?.adapterType === "dbt") setSqlQuery(query);
|
|
5834
|
+
else if (envInfo?.adapterType === "sqlmesh") setSqlQuery(`select * from ${node.data.name}`);
|
|
5835
|
+
if (isActionAvailable("query_diff_with_primary_key")) setPrimaryKeys(primaryKey !== void 0 ? [primaryKey] : void 0);
|
|
5836
|
+
setLocation("/query");
|
|
5837
|
+
};
|
|
5838
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
5839
|
+
direction: "row",
|
|
5840
|
+
alignItems: "center",
|
|
5841
|
+
flexWrap: "wrap",
|
|
5842
|
+
gap: 2,
|
|
5843
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
5844
|
+
variant: "caption",
|
|
5845
|
+
fontWeight: "bold",
|
|
5846
|
+
children: "Diff"
|
|
5847
|
+
}), /* @__PURE__ */ jsxs(Stack, {
|
|
5848
|
+
direction: "row",
|
|
5849
|
+
alignItems: "center",
|
|
5850
|
+
flexWrap: "wrap",
|
|
5851
|
+
gap: 1,
|
|
5852
|
+
width: "93%",
|
|
5753
5853
|
children: [
|
|
5754
5854
|
/* @__PURE__ */ jsx(SetupConnectionPopover, {
|
|
5755
5855
|
display: metadataOnly,
|
|
5756
|
-
children: /* @__PURE__ */
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
setLocation("/query");
|
|
5763
|
-
handleClose();
|
|
5764
|
-
},
|
|
5765
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(QueryDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Query" })]
|
|
5766
|
-
})
|
|
5767
|
-
}),
|
|
5768
|
-
/* @__PURE__ */ jsx(SetupConnectionPopover, {
|
|
5769
|
-
display: metadataOnly,
|
|
5770
|
-
children: /* @__PURE__ */ jsxs(MenuItem, {
|
|
5771
|
-
disabled: featureToggles.disableDatabaseQuery,
|
|
5772
|
-
onClick: () => {
|
|
5773
|
-
if (isActionAvailable("query_diff_with_primary_key")) setPrimaryKeys(primaryKey !== void 0 ? [primaryKey] : void 0);
|
|
5774
|
-
onSandboxOpen();
|
|
5775
|
-
trackPreviewChange({
|
|
5776
|
-
action: "explore",
|
|
5777
|
-
node: node.data.name
|
|
5778
|
-
});
|
|
5779
|
-
handleClose();
|
|
5780
|
-
},
|
|
5781
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(SandboxIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Sandbox (Experiment)" })]
|
|
5782
|
-
})
|
|
5783
|
-
}),
|
|
5784
|
-
/* @__PURE__ */ jsx(Divider, {}),
|
|
5785
|
-
/* @__PURE__ */ jsx(ListSubheader, {
|
|
5786
|
-
sx: {
|
|
5787
|
-
lineHeight: "32px",
|
|
5788
|
-
bgcolor: "transparent"
|
|
5789
|
-
},
|
|
5790
|
-
children: "Diff"
|
|
5791
|
-
}),
|
|
5792
|
-
/* @__PURE__ */ jsx(SetupConnectionPopover, {
|
|
5793
|
-
display: metadataOnly,
|
|
5794
|
-
children: /* @__PURE__ */ jsxs(MenuItem, {
|
|
5856
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
5857
|
+
size: "xsmall",
|
|
5858
|
+
variant: "outlined",
|
|
5859
|
+
color: "neutral",
|
|
5860
|
+
startIcon: /* @__PURE__ */ jsx(RowCountDiffIcon, { fontSize: "small" }),
|
|
5861
|
+
onClick: handleRowCountClick,
|
|
5795
5862
|
disabled: featureToggles.disableDatabaseQuery,
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
handleClose();
|
|
5799
|
-
},
|
|
5800
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(RowCountDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Row Count Diff" })]
|
|
5863
|
+
sx: { textTransform: "none" },
|
|
5864
|
+
children: "Row Count"
|
|
5801
5865
|
})
|
|
5802
5866
|
}),
|
|
5803
|
-
|
|
5867
|
+
wrapButton(/* @__PURE__ */ jsx(Button, {
|
|
5868
|
+
size: "xsmall",
|
|
5869
|
+
variant: "outlined",
|
|
5870
|
+
color: "neutral",
|
|
5871
|
+
startIcon: /* @__PURE__ */ jsx(ProfileDiffIcon, { fontSize: "small" }),
|
|
5872
|
+
onClick: handleProfileClick,
|
|
5804
5873
|
disabled: isAddedOrRemoved || featureToggles.disableDatabaseQuery,
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
action: EXPLORE_ACTION.PROFILE_DIFF,
|
|
5808
|
-
source: EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
5809
|
-
node_count: 1
|
|
5810
|
-
});
|
|
5811
|
-
runAction("profile_diff", { model: node.data.name }, {
|
|
5812
|
-
showForm: true,
|
|
5813
|
-
showLast: false
|
|
5814
|
-
});
|
|
5815
|
-
handleClose();
|
|
5816
|
-
},
|
|
5817
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(ProfileDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Profile Diff" })]
|
|
5874
|
+
sx: { textTransform: "none" },
|
|
5875
|
+
children: "Profile"
|
|
5818
5876
|
}), "profile_diff"),
|
|
5819
|
-
|
|
5877
|
+
wrapButton(/* @__PURE__ */ jsx(Button, {
|
|
5878
|
+
size: "xsmall",
|
|
5879
|
+
variant: "outlined",
|
|
5880
|
+
color: "neutral",
|
|
5881
|
+
startIcon: /* @__PURE__ */ jsx(ValueDiffIcon, { fontSize: "small" }),
|
|
5882
|
+
onClick: handleValueClick,
|
|
5820
5883
|
disabled: isAddedOrRemoved || featureToggles.disableDatabaseQuery,
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
action: EXPLORE_ACTION.VALUE_DIFF,
|
|
5824
|
-
source: EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
5825
|
-
node_count: 1
|
|
5826
|
-
});
|
|
5827
|
-
runAction("value_diff", { model: node.data.name }, {
|
|
5828
|
-
showForm: true,
|
|
5829
|
-
showLast: false
|
|
5830
|
-
});
|
|
5831
|
-
handleClose();
|
|
5832
|
-
},
|
|
5833
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(ValueDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Value Diff" })]
|
|
5884
|
+
sx: { textTransform: "none" },
|
|
5885
|
+
children: "Value"
|
|
5834
5886
|
}), "value_diff"),
|
|
5835
|
-
|
|
5887
|
+
wrapButton(/* @__PURE__ */ jsx(Button, {
|
|
5888
|
+
size: "xsmall",
|
|
5889
|
+
variant: "outlined",
|
|
5890
|
+
color: "neutral",
|
|
5891
|
+
startIcon: /* @__PURE__ */ jsx(TopKDiffIcon, { fontSize: "small" }),
|
|
5892
|
+
onClick: handleTopKClick,
|
|
5836
5893
|
disabled: isAddedOrRemoved || featureToggles.disableDatabaseQuery,
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
action: EXPLORE_ACTION.TOP_K_DIFF,
|
|
5840
|
-
source: EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
5841
|
-
node_count: 1
|
|
5842
|
-
});
|
|
5843
|
-
runAction("top_k_diff", {
|
|
5844
|
-
model: node.data.name,
|
|
5845
|
-
column_name: "",
|
|
5846
|
-
k: 50
|
|
5847
|
-
}, { showForm: true });
|
|
5848
|
-
handleClose();
|
|
5849
|
-
},
|
|
5850
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(TopKDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Top-K Diff" })]
|
|
5894
|
+
sx: { textTransform: "none" },
|
|
5895
|
+
children: "Top-K"
|
|
5851
5896
|
}), "top_k_diff"),
|
|
5852
|
-
|
|
5897
|
+
wrapButton(/* @__PURE__ */ jsx(Button, {
|
|
5898
|
+
size: "xsmall",
|
|
5899
|
+
variant: "outlined",
|
|
5900
|
+
color: "neutral",
|
|
5901
|
+
startIcon: /* @__PURE__ */ jsx(HistogramDiffIcon, { fontSize: "small" }),
|
|
5902
|
+
onClick: handleHistogramClick,
|
|
5853
5903
|
disabled: isAddedOrRemoved || featureToggles.disableDatabaseQuery,
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
action: EXPLORE_ACTION.HISTOGRAM_DIFF,
|
|
5857
|
-
source: EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
5858
|
-
node_count: 1
|
|
5859
|
-
});
|
|
5860
|
-
runAction("histogram_diff", {
|
|
5861
|
-
model: node.data.name,
|
|
5862
|
-
column_name: "",
|
|
5863
|
-
column_type: ""
|
|
5864
|
-
}, { showForm: true });
|
|
5865
|
-
handleClose();
|
|
5866
|
-
},
|
|
5867
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(HistogramDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Histogram Diff" })]
|
|
5904
|
+
sx: { textTransform: "none" },
|
|
5905
|
+
children: "Histogram"
|
|
5868
5906
|
}), "histogram_diff"),
|
|
5869
|
-
/* @__PURE__ */ jsx(
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
},
|
|
5882
|
-
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(SchemaDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: "Schema Diff" })]
|
|
5907
|
+
/* @__PURE__ */ jsx(SetupConnectionPopover, {
|
|
5908
|
+
display: metadataOnly,
|
|
5909
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
5910
|
+
size: "xsmall",
|
|
5911
|
+
variant: "outlined",
|
|
5912
|
+
color: "neutral",
|
|
5913
|
+
startIcon: /* @__PURE__ */ jsx(QueryDiffIcon, { fontSize: "small" }),
|
|
5914
|
+
onClick: handleQueryClick,
|
|
5915
|
+
disabled: featureToggles.disableDatabaseQuery,
|
|
5916
|
+
sx: { textTransform: "none" },
|
|
5917
|
+
children: "Query"
|
|
5918
|
+
})
|
|
5883
5919
|
})
|
|
5884
5920
|
]
|
|
5885
|
-
})]
|
|
5886
|
-
}
|
|
5887
|
-
return null;
|
|
5921
|
+
})]
|
|
5922
|
+
});
|
|
5888
5923
|
}
|
|
5889
5924
|
|
|
5890
5925
|
//#endregion
|
|
@@ -11732,4 +11767,4 @@ function NavBar() {
|
|
|
11732
11767
|
|
|
11733
11768
|
//#endregion
|
|
11734
11769
|
export { NodeSqlView as A, GraphEdge as B, NodeView as C, SqlEditor_default as D, RunStatusAndDate as E, HistoryToggle as F, MuiProvider as G, HSplit as H, GraphNode as I, mui_provider_default as K, ModelRowCount as L, CodeEditor_default as M, SchemaView as N, QueryForm as O, LineageViewTopBar as P, ResourceTypeTag as R, SetupConnectionBanner as S, RunView as T, VSplit as U, GraphColumnNode as V, ErrorBoundary$1 as W, CheckList as _, IdleTimeoutBadge as a, LineagePage as b, ChangeSummary as c, CheckEmptyState as d, CheckDetail as f, CheckBreadcrumb as g, CheckDescription as h, DisplayModeToggle as i, DiffEditor_default as j, EnvInfo as k, RunList as l, LineageDiffView as m, TopBar as n, SummaryView as o, SchemaDiffView as p, RecceVersionBadge as r, SchemaSummary as s, NavBar as t, RunPage as u, QueryPage as v, RunResultPane as w, LineageView as x, SetupConnectionGuide as y, RowCountDiffTag as z };
|
|
11735
|
-
//# sourceMappingURL=components-
|
|
11770
|
+
//# sourceMappingURL=components-Bt0G4cpr.mjs.map
|