@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
|
@@ -7544,11 +7544,12 @@ function NodeView({ node, onCloseNode }) {
|
|
|
7544
7544
|
};
|
|
7545
7545
|
const baseColumns = Object.keys(node.data.data.base?.columns ?? {});
|
|
7546
7546
|
const currentColumns = Object.keys(node.data.data.current?.columns ?? {});
|
|
7547
|
+
const isModelSeedOrSnapshot = node.data.resourceType === "model" || node.data.resourceType === "seed" || node.data.resourceType === "snapshot";
|
|
7547
7548
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, {
|
|
7548
7549
|
sx: {
|
|
7549
7550
|
height: "100%",
|
|
7550
7551
|
display: "grid",
|
|
7551
|
-
gridTemplateRows: "auto auto 1fr"
|
|
7552
|
+
gridTemplateRows: "auto auto auto 1fr"
|
|
7552
7553
|
},
|
|
7553
7554
|
children: [
|
|
7554
7555
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Stack.default, {
|
|
@@ -7568,18 +7569,8 @@ function NodeView({ node, onCloseNode }) {
|
|
|
7568
7569
|
})
|
|
7569
7570
|
}),
|
|
7570
7571
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, { sx: { flexGrow: 1 } }),
|
|
7571
|
-
isSingleEnvOnboarding
|
|
7572
|
+
!isSingleEnvOnboarding && isModelSeedOrSnapshot && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ExploreHeaderButtons, {
|
|
7572
7573
|
node,
|
|
7573
|
-
baseColumns,
|
|
7574
|
-
currentColumns,
|
|
7575
|
-
refetchRowCount,
|
|
7576
|
-
disableReason
|
|
7577
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ExploreChangeMenuButton, {
|
|
7578
|
-
node,
|
|
7579
|
-
baseColumns,
|
|
7580
|
-
currentColumns,
|
|
7581
|
-
disableReason,
|
|
7582
|
-
refetchRowCountDiff,
|
|
7583
7574
|
onSandboxOpen: () => setIsSandboxOpen(true)
|
|
7584
7575
|
}),
|
|
7585
7576
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
@@ -7600,7 +7591,7 @@ function NodeView({ node, onCloseNode }) {
|
|
|
7600
7591
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Stack.default, {
|
|
7601
7592
|
direction: "row",
|
|
7602
7593
|
spacing: 1,
|
|
7603
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResourceTypeTag, { node }),
|
|
7594
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResourceTypeTag, { node }), isModelSeedOrSnapshot && (isSingleEnvOnboarding ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCountTag, {
|
|
7604
7595
|
node,
|
|
7605
7596
|
onRefresh: refetchRowCount
|
|
7606
7597
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCountDiffTag, {
|
|
@@ -7609,6 +7600,25 @@ function NodeView({ node, onCloseNode }) {
|
|
|
7609
7600
|
}))]
|
|
7610
7601
|
})
|
|
7611
7602
|
}),
|
|
7603
|
+
isModelSeedOrSnapshot && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
7604
|
+
sx: {
|
|
7605
|
+
pl: 2,
|
|
7606
|
+
py: 1
|
|
7607
|
+
},
|
|
7608
|
+
children: isSingleEnvOnboarding ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SingleEnvActionButtons, {
|
|
7609
|
+
node,
|
|
7610
|
+
baseColumns,
|
|
7611
|
+
currentColumns,
|
|
7612
|
+
refetchRowCount,
|
|
7613
|
+
disableReason
|
|
7614
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DiffActionButtons, {
|
|
7615
|
+
node,
|
|
7616
|
+
baseColumns,
|
|
7617
|
+
currentColumns,
|
|
7618
|
+
disableReason,
|
|
7619
|
+
refetchRowCountDiff
|
|
7620
|
+
})
|
|
7621
|
+
}),
|
|
7612
7622
|
withColumns && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, {
|
|
7613
7623
|
sx: {
|
|
7614
7624
|
overflow: "auto",
|
|
@@ -7677,9 +7687,7 @@ function NodeView({ node, onCloseNode }) {
|
|
|
7677
7687
|
]
|
|
7678
7688
|
});
|
|
7679
7689
|
}
|
|
7680
|
-
function
|
|
7681
|
-
const [anchorEl, setAnchorEl] = (0, react.useState)(null);
|
|
7682
|
-
const open = Boolean(anchorEl);
|
|
7690
|
+
function SingleEnvActionButtons({ node, baseColumns, currentColumns, refetchRowCount, disableReason }) {
|
|
7683
7691
|
const [, setLocation] = require_state.useAppLocation();
|
|
7684
7692
|
const { setSqlQuery } = require_RecceCheckContext.useRecceQueryContext();
|
|
7685
7693
|
const { runAction } = require_state.useRecceActionContext();
|
|
@@ -7688,81 +7696,77 @@ function SingleEnvironmentMenuButton({ node, baseColumns, currentColumns, refetc
|
|
|
7688
7696
|
const formattedColumns = formatSelectColumns(baseColumns, currentColumns);
|
|
7689
7697
|
let query = `select * from {{ ref("${node.data.name}") }}`;
|
|
7690
7698
|
if (formattedColumns.length) query = `select \n ${formattedColumns.join("\n ")}\nfrom {{ ref("${node.data.name}") }}`;
|
|
7691
|
-
const
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
const
|
|
7695
|
-
|
|
7699
|
+
const QueryIcon = require_state.findByRunType("query").icon;
|
|
7700
|
+
const RowCountIcon = require_state.findByRunType("row_count").icon;
|
|
7701
|
+
const ProfileIcon = require_state.findByRunType("profile").icon;
|
|
7702
|
+
const handleQueryClick = () => {
|
|
7703
|
+
if (envInfo?.adapterType === "dbt") setSqlQuery(query);
|
|
7704
|
+
else if (envInfo?.adapterType === "sqlmesh") setSqlQuery(`select * from ${node.data.name}`);
|
|
7705
|
+
setLocation("/query");
|
|
7706
|
+
};
|
|
7707
|
+
const handleRowCountClick = () => {
|
|
7708
|
+
refetchRowCount();
|
|
7709
|
+
};
|
|
7710
|
+
const handleProfileClick = () => {
|
|
7711
|
+
require_state.trackExploreAction({
|
|
7712
|
+
action: require_state.EXPLORE_ACTION.PROFILE,
|
|
7713
|
+
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_SINGLE_ENV,
|
|
7714
|
+
node_count: 1
|
|
7715
|
+
});
|
|
7716
|
+
runAction("profile", { model: node.data.name }, {
|
|
7717
|
+
showForm: true,
|
|
7718
|
+
showLast: false
|
|
7719
|
+
});
|
|
7696
7720
|
};
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
children:
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_SINGLE_ENV,
|
|
7738
|
-
node_count: 1
|
|
7739
|
-
});
|
|
7740
|
-
runAction("profile", { model: node.data.name }, {
|
|
7741
|
-
showForm: true,
|
|
7742
|
-
showLast: false
|
|
7743
|
-
});
|
|
7744
|
-
handleClose();
|
|
7745
|
-
},
|
|
7746
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfileIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Profile" })]
|
|
7747
|
-
}) })
|
|
7748
|
-
})
|
|
7749
|
-
]
|
|
7750
|
-
})] });
|
|
7751
|
-
}
|
|
7752
|
-
return null;
|
|
7721
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Stack.default, {
|
|
7722
|
+
direction: "row",
|
|
7723
|
+
alignItems: "center",
|
|
7724
|
+
flexWrap: "wrap",
|
|
7725
|
+
gap: 1,
|
|
7726
|
+
children: [
|
|
7727
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7728
|
+
size: "xsmall",
|
|
7729
|
+
variant: "outlined",
|
|
7730
|
+
color: "neutral",
|
|
7731
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QueryIcon, { fontSize: "small" }),
|
|
7732
|
+
onClick: handleQueryClick,
|
|
7733
|
+
sx: { textTransform: "none" },
|
|
7734
|
+
children: "Query"
|
|
7735
|
+
}),
|
|
7736
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7737
|
+
size: "xsmall",
|
|
7738
|
+
variant: "outlined",
|
|
7739
|
+
color: "neutral",
|
|
7740
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCountIcon, { fontSize: "small" }),
|
|
7741
|
+
onClick: handleRowCountClick,
|
|
7742
|
+
sx: { textTransform: "none" },
|
|
7743
|
+
children: "Row Count"
|
|
7744
|
+
}),
|
|
7745
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tooltip.default, {
|
|
7746
|
+
title: disableReason(isAddedOrRemoved, "profile"),
|
|
7747
|
+
placement: "top",
|
|
7748
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7749
|
+
size: "xsmall",
|
|
7750
|
+
variant: "outlined",
|
|
7751
|
+
color: "neutral",
|
|
7752
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfileIcon, { fontSize: "small" }),
|
|
7753
|
+
onClick: handleProfileClick,
|
|
7754
|
+
disabled: isAddedOrRemoved,
|
|
7755
|
+
sx: { textTransform: "none" },
|
|
7756
|
+
children: "Profile"
|
|
7757
|
+
}) })
|
|
7758
|
+
})
|
|
7759
|
+
]
|
|
7760
|
+
});
|
|
7753
7761
|
}
|
|
7754
|
-
function
|
|
7755
|
-
const [anchorEl, setAnchorEl] = (0, react.useState)(null);
|
|
7756
|
-
const open = Boolean(anchorEl);
|
|
7762
|
+
function ExploreHeaderButtons({ node, onSandboxOpen }) {
|
|
7757
7763
|
const [, setLocation] = require_state.useAppLocation();
|
|
7758
|
-
const { runAction } = require_state.useRecceActionContext();
|
|
7759
|
-
const { setSqlQuery, setPrimaryKeys } = require_RecceCheckContext.useRecceQueryContext();
|
|
7760
|
-
const { envInfo, isActionAvailable } = require_state.useLineageGraphContext();
|
|
7761
7764
|
const { featureToggles } = require_state.useRecceInstanceContext();
|
|
7765
|
+
const { isActionAvailable } = require_state.useLineageGraphContext();
|
|
7766
|
+
const { setPrimaryKeys } = require_RecceCheckContext.useRecceQueryContext();
|
|
7762
7767
|
const { primaryKey } = require_state.useModelColumns_default(node.data.name);
|
|
7763
7768
|
const { apiClient } = require_state.useApiConfig();
|
|
7764
7769
|
const metadataOnly = featureToggles.mode === "metadata only";
|
|
7765
|
-
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
7766
7770
|
const addSchemaCheck = (0, react.useCallback)(async () => {
|
|
7767
7771
|
const nodeId = node.id;
|
|
7768
7772
|
setLocation(`/checks/?id=${(await require_version.createSchemaDiffCheck({ node_id: nodeId }, apiClient)).check_id}`);
|
|
@@ -7771,186 +7775,217 @@ function ExploreChangeMenuButton({ node, baseColumns, currentColumns, disableRea
|
|
|
7771
7775
|
setLocation,
|
|
7772
7776
|
apiClient
|
|
7773
7777
|
]);
|
|
7778
|
+
const SchemaDiffIcon = require_state.findByRunType("schema_diff").icon;
|
|
7779
|
+
const SandboxIcon = require_state.findByRunType("sandbox").icon;
|
|
7780
|
+
const handleAddSchemaCheck = () => {
|
|
7781
|
+
addSchemaCheck();
|
|
7782
|
+
};
|
|
7783
|
+
const handleSandboxOpen = () => {
|
|
7784
|
+
if (isActionAvailable("query_diff_with_primary_key")) setPrimaryKeys(primaryKey !== void 0 ? [primaryKey] : void 0);
|
|
7785
|
+
onSandboxOpen();
|
|
7786
|
+
require_state.trackPreviewChange({
|
|
7787
|
+
action: "explore",
|
|
7788
|
+
node: node.data.name
|
|
7789
|
+
});
|
|
7790
|
+
};
|
|
7791
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Stack.default, {
|
|
7792
|
+
direction: "row",
|
|
7793
|
+
alignItems: "center",
|
|
7794
|
+
sx: { mr: 1 },
|
|
7795
|
+
flexWrap: "wrap",
|
|
7796
|
+
gap: 1,
|
|
7797
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7798
|
+
size: "xsmall",
|
|
7799
|
+
variant: "outlined",
|
|
7800
|
+
color: "neutral",
|
|
7801
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SchemaDiffIcon, { fontSize: "small" }),
|
|
7802
|
+
onClick: handleAddSchemaCheck,
|
|
7803
|
+
sx: { textTransform: "none" },
|
|
7804
|
+
children: "Add schema diff to checklist"
|
|
7805
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SetupConnectionPopover, {
|
|
7806
|
+
display: metadataOnly,
|
|
7807
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7808
|
+
size: "xsmall",
|
|
7809
|
+
variant: "outlined",
|
|
7810
|
+
color: "neutral",
|
|
7811
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SandboxIcon, { fontSize: "small" }),
|
|
7812
|
+
onClick: handleSandboxOpen,
|
|
7813
|
+
disabled: featureToggles.disableDatabaseQuery,
|
|
7814
|
+
sx: { textTransform: "none" },
|
|
7815
|
+
children: "Sandbox"
|
|
7816
|
+
})
|
|
7817
|
+
})]
|
|
7818
|
+
});
|
|
7819
|
+
}
|
|
7820
|
+
function DiffActionButtons({ node, baseColumns, currentColumns, disableReason, refetchRowCountDiff }) {
|
|
7821
|
+
const [, setLocation] = require_state.useAppLocation();
|
|
7822
|
+
const { runAction } = require_state.useRecceActionContext();
|
|
7823
|
+
const { setSqlQuery, setPrimaryKeys } = require_RecceCheckContext.useRecceQueryContext();
|
|
7824
|
+
const { envInfo, isActionAvailable } = require_state.useLineageGraphContext();
|
|
7825
|
+
const { featureToggles } = require_state.useRecceInstanceContext();
|
|
7826
|
+
const { primaryKey } = require_state.useModelColumns_default(node.data.name);
|
|
7827
|
+
const metadataOnly = featureToggles.mode === "metadata only";
|
|
7828
|
+
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
7774
7829
|
const formattedColumns = formatSelectColumns(baseColumns, currentColumns);
|
|
7775
7830
|
let query = `select * from {{ ref("${node.data.name}") }}`;
|
|
7776
7831
|
if (formattedColumns.length) query = `select \n ${formattedColumns.join("\n ")}\nfrom {{ ref("${node.data.name}") }}`;
|
|
7777
|
-
const
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
const
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
const
|
|
7832
|
+
const QueryDiffIcon = require_state.findByRunType("query_diff").icon;
|
|
7833
|
+
const RowCountDiffIcon = require_state.findByRunType("row_count_diff").icon;
|
|
7834
|
+
const ProfileDiffIcon = require_state.findByRunType("profile_diff").icon;
|
|
7835
|
+
const ValueDiffIcon = require_state.findByRunType("value_diff").icon;
|
|
7836
|
+
const TopKDiffIcon = require_state.findByRunType("top_k_diff").icon;
|
|
7837
|
+
const HistogramDiffIcon = require_state.findByRunType("histogram_diff").icon;
|
|
7838
|
+
const wrapButton = (button, runType) => {
|
|
7784
7839
|
if (metadataOnly) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SetupConnectionPopover, {
|
|
7785
7840
|
display: true,
|
|
7786
|
-
children:
|
|
7841
|
+
children: button
|
|
7787
7842
|
});
|
|
7788
7843
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tooltip.default, {
|
|
7789
7844
|
title: disableReason(isAddedOrRemoved, runType),
|
|
7790
|
-
placement: "
|
|
7791
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children:
|
|
7845
|
+
placement: "top",
|
|
7846
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: button })
|
|
7792
7847
|
});
|
|
7793
7848
|
};
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7849
|
+
const handleRowCountClick = () => {
|
|
7850
|
+
refetchRowCountDiff();
|
|
7851
|
+
};
|
|
7852
|
+
const handleProfileClick = () => {
|
|
7853
|
+
require_state.trackExploreAction({
|
|
7854
|
+
action: require_state.EXPLORE_ACTION.PROFILE_DIFF,
|
|
7855
|
+
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
7856
|
+
node_count: 1
|
|
7857
|
+
});
|
|
7858
|
+
runAction("profile_diff", { model: node.data.name }, {
|
|
7859
|
+
showForm: true,
|
|
7860
|
+
showLast: false
|
|
7861
|
+
});
|
|
7862
|
+
};
|
|
7863
|
+
const handleValueClick = () => {
|
|
7864
|
+
require_state.trackExploreAction({
|
|
7865
|
+
action: require_state.EXPLORE_ACTION.VALUE_DIFF,
|
|
7866
|
+
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
7867
|
+
node_count: 1
|
|
7868
|
+
});
|
|
7869
|
+
runAction("value_diff", { model: node.data.name }, {
|
|
7870
|
+
showForm: true,
|
|
7871
|
+
showLast: false
|
|
7872
|
+
});
|
|
7873
|
+
};
|
|
7874
|
+
const handleTopKClick = () => {
|
|
7875
|
+
require_state.trackExploreAction({
|
|
7876
|
+
action: require_state.EXPLORE_ACTION.TOP_K_DIFF,
|
|
7877
|
+
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
7878
|
+
node_count: 1
|
|
7879
|
+
});
|
|
7880
|
+
runAction("top_k_diff", {
|
|
7881
|
+
model: node.data.name,
|
|
7882
|
+
column_name: "",
|
|
7883
|
+
k: 50
|
|
7884
|
+
}, { showForm: true });
|
|
7885
|
+
};
|
|
7886
|
+
const handleHistogramClick = () => {
|
|
7887
|
+
require_state.trackExploreAction({
|
|
7888
|
+
action: require_state.EXPLORE_ACTION.HISTOGRAM_DIFF,
|
|
7889
|
+
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
7890
|
+
node_count: 1
|
|
7891
|
+
});
|
|
7892
|
+
runAction("histogram_diff", {
|
|
7893
|
+
model: node.data.name,
|
|
7894
|
+
column_name: "",
|
|
7895
|
+
column_type: ""
|
|
7896
|
+
}, { showForm: true });
|
|
7897
|
+
};
|
|
7898
|
+
const handleQueryClick = () => {
|
|
7899
|
+
if (envInfo?.adapterType === "dbt") setSqlQuery(query);
|
|
7900
|
+
else if (envInfo?.adapterType === "sqlmesh") setSqlQuery(`select * from ${node.data.name}`);
|
|
7901
|
+
if (isActionAvailable("query_diff_with_primary_key")) setPrimaryKeys(primaryKey !== void 0 ? [primaryKey] : void 0);
|
|
7902
|
+
setLocation("/query");
|
|
7903
|
+
};
|
|
7904
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Stack.default, {
|
|
7905
|
+
direction: "row",
|
|
7906
|
+
alignItems: "center",
|
|
7907
|
+
flexWrap: "wrap",
|
|
7908
|
+
gap: 2,
|
|
7909
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
|
|
7910
|
+
variant: "caption",
|
|
7911
|
+
fontWeight: "bold",
|
|
7912
|
+
children: "Diff"
|
|
7913
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Stack.default, {
|
|
7914
|
+
direction: "row",
|
|
7915
|
+
alignItems: "center",
|
|
7916
|
+
flexWrap: "wrap",
|
|
7917
|
+
gap: 1,
|
|
7918
|
+
width: "93%",
|
|
7819
7919
|
children: [
|
|
7820
7920
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SetupConnectionPopover, {
|
|
7821
7921
|
display: metadataOnly,
|
|
7822
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
setLocation("/query");
|
|
7829
|
-
handleClose();
|
|
7830
|
-
},
|
|
7831
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QueryDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Query" })]
|
|
7832
|
-
})
|
|
7833
|
-
}),
|
|
7834
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SetupConnectionPopover, {
|
|
7835
|
-
display: metadataOnly,
|
|
7836
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_MenuItem.default, {
|
|
7837
|
-
disabled: featureToggles.disableDatabaseQuery,
|
|
7838
|
-
onClick: () => {
|
|
7839
|
-
if (isActionAvailable("query_diff_with_primary_key")) setPrimaryKeys(primaryKey !== void 0 ? [primaryKey] : void 0);
|
|
7840
|
-
onSandboxOpen();
|
|
7841
|
-
require_state.trackPreviewChange({
|
|
7842
|
-
action: "explore",
|
|
7843
|
-
node: node.data.name
|
|
7844
|
-
});
|
|
7845
|
-
handleClose();
|
|
7846
|
-
},
|
|
7847
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SandboxIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Sandbox (Experiment)" })]
|
|
7848
|
-
})
|
|
7849
|
-
}),
|
|
7850
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Divider.default, {}),
|
|
7851
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListSubheader.default, {
|
|
7852
|
-
sx: {
|
|
7853
|
-
lineHeight: "32px",
|
|
7854
|
-
bgcolor: "transparent"
|
|
7855
|
-
},
|
|
7856
|
-
children: "Diff"
|
|
7857
|
-
}),
|
|
7858
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SetupConnectionPopover, {
|
|
7859
|
-
display: metadataOnly,
|
|
7860
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_MenuItem.default, {
|
|
7922
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7923
|
+
size: "xsmall",
|
|
7924
|
+
variant: "outlined",
|
|
7925
|
+
color: "neutral",
|
|
7926
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCountDiffIcon, { fontSize: "small" }),
|
|
7927
|
+
onClick: handleRowCountClick,
|
|
7861
7928
|
disabled: featureToggles.disableDatabaseQuery,
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
handleClose();
|
|
7865
|
-
},
|
|
7866
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCountDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Row Count Diff" })]
|
|
7929
|
+
sx: { textTransform: "none" },
|
|
7930
|
+
children: "Row Count"
|
|
7867
7931
|
})
|
|
7868
7932
|
}),
|
|
7869
|
-
|
|
7933
|
+
wrapButton(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7934
|
+
size: "xsmall",
|
|
7935
|
+
variant: "outlined",
|
|
7936
|
+
color: "neutral",
|
|
7937
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfileDiffIcon, { fontSize: "small" }),
|
|
7938
|
+
onClick: handleProfileClick,
|
|
7870
7939
|
disabled: isAddedOrRemoved || featureToggles.disableDatabaseQuery,
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
action: require_state.EXPLORE_ACTION.PROFILE_DIFF,
|
|
7874
|
-
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
7875
|
-
node_count: 1
|
|
7876
|
-
});
|
|
7877
|
-
runAction("profile_diff", { model: node.data.name }, {
|
|
7878
|
-
showForm: true,
|
|
7879
|
-
showLast: false
|
|
7880
|
-
});
|
|
7881
|
-
handleClose();
|
|
7882
|
-
},
|
|
7883
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfileDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Profile Diff" })]
|
|
7940
|
+
sx: { textTransform: "none" },
|
|
7941
|
+
children: "Profile"
|
|
7884
7942
|
}), "profile_diff"),
|
|
7885
|
-
|
|
7943
|
+
wrapButton(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7944
|
+
size: "xsmall",
|
|
7945
|
+
variant: "outlined",
|
|
7946
|
+
color: "neutral",
|
|
7947
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueDiffIcon, { fontSize: "small" }),
|
|
7948
|
+
onClick: handleValueClick,
|
|
7886
7949
|
disabled: isAddedOrRemoved || featureToggles.disableDatabaseQuery,
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
action: require_state.EXPLORE_ACTION.VALUE_DIFF,
|
|
7890
|
-
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
7891
|
-
node_count: 1
|
|
7892
|
-
});
|
|
7893
|
-
runAction("value_diff", { model: node.data.name }, {
|
|
7894
|
-
showForm: true,
|
|
7895
|
-
showLast: false
|
|
7896
|
-
});
|
|
7897
|
-
handleClose();
|
|
7898
|
-
},
|
|
7899
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Value Diff" })]
|
|
7950
|
+
sx: { textTransform: "none" },
|
|
7951
|
+
children: "Value"
|
|
7900
7952
|
}), "value_diff"),
|
|
7901
|
-
|
|
7953
|
+
wrapButton(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7954
|
+
size: "xsmall",
|
|
7955
|
+
variant: "outlined",
|
|
7956
|
+
color: "neutral",
|
|
7957
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TopKDiffIcon, { fontSize: "small" }),
|
|
7958
|
+
onClick: handleTopKClick,
|
|
7902
7959
|
disabled: isAddedOrRemoved || featureToggles.disableDatabaseQuery,
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
action: require_state.EXPLORE_ACTION.TOP_K_DIFF,
|
|
7906
|
-
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
7907
|
-
node_count: 1
|
|
7908
|
-
});
|
|
7909
|
-
runAction("top_k_diff", {
|
|
7910
|
-
model: node.data.name,
|
|
7911
|
-
column_name: "",
|
|
7912
|
-
k: 50
|
|
7913
|
-
}, { showForm: true });
|
|
7914
|
-
handleClose();
|
|
7915
|
-
},
|
|
7916
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TopKDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Top-K Diff" })]
|
|
7960
|
+
sx: { textTransform: "none" },
|
|
7961
|
+
children: "Top-K"
|
|
7917
7962
|
}), "top_k_diff"),
|
|
7918
|
-
|
|
7963
|
+
wrapButton(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7964
|
+
size: "xsmall",
|
|
7965
|
+
variant: "outlined",
|
|
7966
|
+
color: "neutral",
|
|
7967
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HistogramDiffIcon, { fontSize: "small" }),
|
|
7968
|
+
onClick: handleHistogramClick,
|
|
7919
7969
|
disabled: isAddedOrRemoved || featureToggles.disableDatabaseQuery,
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
action: require_state.EXPLORE_ACTION.HISTOGRAM_DIFF,
|
|
7923
|
-
source: require_state.EXPLORE_SOURCE.NODE_SIDEBAR_MULTI_ENV,
|
|
7924
|
-
node_count: 1
|
|
7925
|
-
});
|
|
7926
|
-
runAction("histogram_diff", {
|
|
7927
|
-
model: node.data.name,
|
|
7928
|
-
column_name: "",
|
|
7929
|
-
column_type: ""
|
|
7930
|
-
}, { showForm: true });
|
|
7931
|
-
handleClose();
|
|
7932
|
-
},
|
|
7933
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HistogramDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Histogram Diff" })]
|
|
7970
|
+
sx: { textTransform: "none" },
|
|
7971
|
+
children: "Histogram"
|
|
7934
7972
|
}), "histogram_diff"),
|
|
7935
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
},
|
|
7948
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemIcon.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SchemaDiffIcon, { fontSize: "small" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_ListItemText.default, { children: "Schema Diff" })]
|
|
7973
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SetupConnectionPopover, {
|
|
7974
|
+
display: metadataOnly,
|
|
7975
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
7976
|
+
size: "xsmall",
|
|
7977
|
+
variant: "outlined",
|
|
7978
|
+
color: "neutral",
|
|
7979
|
+
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QueryDiffIcon, { fontSize: "small" }),
|
|
7980
|
+
onClick: handleQueryClick,
|
|
7981
|
+
disabled: featureToggles.disableDatabaseQuery,
|
|
7982
|
+
sx: { textTransform: "none" },
|
|
7983
|
+
children: "Query"
|
|
7984
|
+
})
|
|
7949
7985
|
})
|
|
7950
7986
|
]
|
|
7951
|
-
})]
|
|
7952
|
-
}
|
|
7953
|
-
return null;
|
|
7987
|
+
})]
|
|
7988
|
+
});
|
|
7954
7989
|
}
|
|
7955
7990
|
|
|
7956
7991
|
//#endregion
|
|
@@ -14082,4 +14117,4 @@ Object.defineProperty(exports, 'mui_provider_default', {
|
|
|
14082
14117
|
return mui_provider_default;
|
|
14083
14118
|
}
|
|
14084
14119
|
});
|
|
14085
|
-
//# sourceMappingURL=components-
|
|
14120
|
+
//# sourceMappingURL=components-Cvfq_6t4.js.map
|