@datarecce/ui 0.1.31 → 0.1.32
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/{state-lPCQsWy5.js → RecceCheckContext-BOGmP80K.js} +4367 -5089
- package/dist/RecceCheckContext-BOGmP80K.js.map +1 -0
- package/dist/{state-B9yzhuKs.mjs → RecceCheckContext-CwUCo6AW.mjs} +4273 -4541
- package/dist/RecceCheckContext-CwUCo6AW.mjs.map +1 -0
- package/dist/{state-DOUPNifc.css → RecceCheckContext-DPnWB_aU.css} +57 -57
- package/dist/RecceCheckContext-DPnWB_aU.css.map +1 -0
- package/dist/{state-IA7HWYOs.css → RecceCheckContext-DyxOeUsX.css} +57 -57
- package/dist/RecceCheckContext-DyxOeUsX.css.map +1 -0
- package/dist/api.d.mts +1 -1
- package/dist/api.js +65 -26
- package/dist/api.js.map +1 -0
- package/dist/api.mjs +44 -5
- package/dist/api.mjs.map +1 -0
- package/dist/{components-DCOI1YlQ.mjs → components-DQUwJlNQ.mjs} +20 -21
- package/dist/{components-DCOI1YlQ.mjs.map → components-DQUwJlNQ.mjs.map} +1 -1
- package/dist/{components-B-YxuuPz.js → components-uVp0e4cH.js} +231 -241
- package/dist/{components-B-YxuuPz.js.map → components-uVp0e4cH.js.map} +1 -1
- package/dist/components.d.mts +1 -1
- package/dist/components.js +38 -38
- package/dist/components.mjs +5 -5
- package/dist/{urls-B1Ymdoz-.mjs → const-CaIm1Z8g.mjs} +2 -6
- package/dist/const-CaIm1Z8g.mjs.map +1 -0
- package/dist/{urls-C4eAc82S.js → const-CvdZO0FN.js} +1 -11
- package/dist/const-CvdZO0FN.js.map +1 -0
- package/dist/global-styles.css +84 -0
- package/dist/global-styles.css.map +1 -0
- package/dist/global-styles.js +1 -0
- package/dist/global-styles.mjs +1 -0
- package/dist/{hooks-DjBNmTdh.mjs → hooks-C6Kma5ld.mjs} +2 -3
- package/dist/{hooks-DjBNmTdh.mjs.map → hooks-C6Kma5ld.mjs.map} +1 -1
- package/dist/hooks-CfZ4UBBF.js +40 -0
- package/dist/{hooks-B9hsc1oD.js.map → hooks-CfZ4UBBF.js.map} +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.js +26 -26
- package/dist/hooks.mjs +4 -4
- package/dist/{html2canvas-pro.esm-WJxOmKlq.js → html2canvas-pro.esm-CsuSOHXp.js} +1 -1
- package/dist/{html2canvas-pro.esm-WJxOmKlq.js.map → html2canvas-pro.esm-CsuSOHXp.js.map} +1 -1
- package/dist/{html2canvas-pro.esm-BInzOtWO.mjs → html2canvas-pro.esm-E7kpobrC.mjs} +1 -1
- package/dist/{html2canvas-pro.esm-BInzOtWO.mjs.map → html2canvas-pro.esm-E7kpobrC.mjs.map} +1 -1
- package/dist/{index-IIXVIoOL.d.mts → index-DsCU2oGL.d.mts} +7 -7
- package/dist/{index-IIXVIoOL.d.mts.map → index-DsCU2oGL.d.mts.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.js +85 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -8
- package/dist/index.mjs.map +1 -1
- package/dist/{mui-theme-B2wm_cvZ.js → mui-theme-iBHkjXJq.js} +2 -2
- package/dist/{mui-theme-B2wm_cvZ.js.map → mui-theme-iBHkjXJq.js.map} +1 -1
- package/dist/state-CTITyT0R.js +795 -0
- package/dist/state-CTITyT0R.js.map +1 -0
- package/dist/state-Sc2b4jri.mjs +382 -0
- package/dist/state-Sc2b4jri.mjs.map +1 -0
- package/dist/styles.css +4 -3
- package/dist/theme.d.mts +1 -1
- package/dist/theme.js +1 -1
- package/dist/{tooltipMessage-DosF13kZ.js → tooltipMessage-BC5W7H3X.js} +1 -1
- package/dist/{tooltipMessage-DosF13kZ.js.map → tooltipMessage-BC5W7H3X.js.map} +1 -1
- package/dist/{tooltipMessage-B--I3p1V.mjs → tooltipMessage-B_xMIKWL.mjs} +1 -1
- package/dist/{tooltipMessage-B--I3p1V.mjs.map → tooltipMessage-B_xMIKWL.mjs.map} +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.js +5 -4
- package/dist/types.mjs +3 -2
- package/dist/urls-BQW5wjg-.js +13 -0
- package/dist/urls-BQW5wjg-.js.map +1 -0
- package/dist/urls-DT7FVEcS.mjs +7 -0
- package/dist/urls-DT7FVEcS.mjs.map +1 -0
- package/dist/version-B9s8yne-.js +300 -0
- package/dist/version-B9s8yne-.js.map +1 -0
- package/dist/version-DP1kU_7v.mjs +162 -0
- package/dist/version-DP1kU_7v.mjs.map +1 -0
- package/package.json +2 -2
- package/src/global-styles.css +81 -0
- package/src/theme/index.ts +1 -1
- package/dist/RecceCheckContext-DPpu9nG5.js +0 -303
- package/dist/RecceCheckContext-DPpu9nG5.js.map +0 -1
- package/dist/RecceCheckContext-bXdfQLGG.mjs +0 -229
- package/dist/RecceCheckContext-bXdfQLGG.mjs.map +0 -1
- package/dist/hooks-B9hsc1oD.js +0 -40
- package/dist/state-B9yzhuKs.mjs.map +0 -1
- package/dist/state-DOUPNifc.css.map +0 -1
- package/dist/state-IA7HWYOs.css.map +0 -1
- package/dist/state-lPCQsWy5.js.map +0 -1
- package/dist/urls-B1Ymdoz-.mjs.map +0 -1
- package/dist/urls-C4eAc82S.js.map +0 -1
- package/dist/version-Dh8sZhvs.js +0 -147
- package/dist/version-Dh8sZhvs.js.map +0 -1
- package/dist/version-OnOKzBeQ.mjs +0 -93
- package/dist/version-OnOKzBeQ.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
const require_state = require('./state-
|
|
3
|
-
const require_mui_theme = require('./mui-theme-
|
|
4
|
-
const
|
|
5
|
-
const require_version = require('./version-
|
|
6
|
-
const
|
|
7
|
-
const require_tooltipMessage = require('./tooltipMessage-
|
|
2
|
+
const require_state = require('./state-CTITyT0R.js');
|
|
3
|
+
const require_mui_theme = require('./mui-theme-iBHkjXJq.js');
|
|
4
|
+
const require_RecceCheckContext = require('./RecceCheckContext-BOGmP80K.js');
|
|
5
|
+
const require_version = require('./version-B9s8yne-.js');
|
|
6
|
+
const require_urls = require('./urls-BQW5wjg-.js');
|
|
7
|
+
const require_tooltipMessage = require('./tooltipMessage-BC5W7H3X.js');
|
|
8
8
|
let _mui_material_CssBaseline = require("@mui/material/CssBaseline");
|
|
9
9
|
_mui_material_CssBaseline = require_state.__toESM(_mui_material_CssBaseline);
|
|
10
10
|
let _mui_material_styles = require("@mui/material/styles");
|
|
@@ -30,16 +30,10 @@ react_split = require_state.__toESM(react_split);
|
|
|
30
30
|
let _xyflow_react = require("@xyflow/react");
|
|
31
31
|
let _mui_material_Divider = require("@mui/material/Divider");
|
|
32
32
|
_mui_material_Divider = require_state.__toESM(_mui_material_Divider);
|
|
33
|
-
let axios = require("axios");
|
|
34
|
-
let _tanstack_react_query = require("@tanstack/react-query");
|
|
35
33
|
require("@xyflow/react/dist/style.css");
|
|
34
|
+
let _tanstack_react_query = require("@tanstack/react-query");
|
|
35
|
+
let axios = require("axios");
|
|
36
36
|
let react_icons_fi = require("react-icons/fi");
|
|
37
|
-
require("react-icons");
|
|
38
|
-
let react_icons_lu = require("react-icons/lu");
|
|
39
|
-
let react_icons_tb = require("react-icons/tb");
|
|
40
|
-
let lodash = require("lodash");
|
|
41
|
-
lodash = require_state.__toESM(lodash);
|
|
42
|
-
let react_icons_pi = require("react-icons/pi");
|
|
43
37
|
let _mui_material_Dialog = require("@mui/material/Dialog");
|
|
44
38
|
_mui_material_Dialog = require_state.__toESM(_mui_material_Dialog);
|
|
45
39
|
let _mui_material_DialogActions = require("@mui/material/DialogActions");
|
|
@@ -53,6 +47,15 @@ _mui_material_IconButton = require_state.__toESM(_mui_material_IconButton);
|
|
|
53
47
|
let react_icons_io5 = require("react-icons/io5");
|
|
54
48
|
let next_link = require("next/link");
|
|
55
49
|
next_link = require_state.__toESM(next_link);
|
|
50
|
+
let next_navigation = require("next/navigation");
|
|
51
|
+
let _mui_material_Link = require("@mui/material/Link");
|
|
52
|
+
_mui_material_Link = require_state.__toESM(_mui_material_Link);
|
|
53
|
+
let _mui_material_Popover = require("@mui/material/Popover");
|
|
54
|
+
_mui_material_Popover = require_state.__toESM(_mui_material_Popover);
|
|
55
|
+
let react_icons_lu = require("react-icons/lu");
|
|
56
|
+
let react_icons_tb = require("react-icons/tb");
|
|
57
|
+
let lodash = require("lodash");
|
|
58
|
+
lodash = require_state.__toESM(lodash);
|
|
56
59
|
let _mui_material_Checkbox = require("@mui/material/Checkbox");
|
|
57
60
|
_mui_material_Checkbox = require_state.__toESM(_mui_material_Checkbox);
|
|
58
61
|
let _mui_material_FormControlLabel = require("@mui/material/FormControlLabel");
|
|
@@ -64,16 +67,12 @@ _mui_material_Menu = require_state.__toESM(_mui_material_Menu);
|
|
|
64
67
|
let _mui_material_MenuItem = require("@mui/material/MenuItem");
|
|
65
68
|
_mui_material_MenuItem = require_state.__toESM(_mui_material_MenuItem);
|
|
66
69
|
let react_icons_vsc = require("react-icons/vsc");
|
|
70
|
+
let react_icons_pi = require("react-icons/pi");
|
|
67
71
|
let _mui_material_Tooltip = require("@mui/material/Tooltip");
|
|
68
72
|
_mui_material_Tooltip = require_state.__toESM(_mui_material_Tooltip);
|
|
69
73
|
let usehooks_ts = require("usehooks-ts");
|
|
70
74
|
let _mui_material_ListSubheader = require("@mui/material/ListSubheader");
|
|
71
75
|
_mui_material_ListSubheader = require_state.__toESM(_mui_material_ListSubheader);
|
|
72
|
-
let next_navigation = require("next/navigation");
|
|
73
|
-
let _mui_material_Link = require("@mui/material/Link");
|
|
74
|
-
_mui_material_Link = require_state.__toESM(_mui_material_Link);
|
|
75
|
-
let _mui_material_Popover = require("@mui/material/Popover");
|
|
76
|
-
_mui_material_Popover = require_state.__toESM(_mui_material_Popover);
|
|
77
76
|
let date_fns = require("date-fns");
|
|
78
77
|
let file_saver = require("file-saver");
|
|
79
78
|
file_saver = require_state.__toESM(file_saver);
|
|
@@ -2294,7 +2293,7 @@ var require_lib = /* @__PURE__ */ require_state.__commonJSMin(((exports) => {
|
|
|
2294
2293
|
//#region recce-source/js/src/lib/hooks/ScreenShot.tsx
|
|
2295
2294
|
var import_lib = require_lib();
|
|
2296
2295
|
const loadHtml2Canvas = async () => {
|
|
2297
|
-
return (await Promise.resolve().then(() => require("./html2canvas-pro.esm-
|
|
2296
|
+
return (await Promise.resolve().then(() => require("./html2canvas-pro.esm-CsuSOHXp.js"))).default;
|
|
2298
2297
|
};
|
|
2299
2298
|
const getHTMLElementFromRef = (refCurrent) => {
|
|
2300
2299
|
if ("element" in refCurrent) return refCurrent.element;
|
|
@@ -2402,7 +2401,7 @@ function useCopyToClipboard$1({ renderLibrary = "html2canvas", imageType = "png"
|
|
|
2402
2401
|
};
|
|
2403
2402
|
}
|
|
2404
2403
|
function useCopyToClipboardButton(options) {
|
|
2405
|
-
const { successToast, failToast } =
|
|
2404
|
+
const { successToast, failToast } = require_RecceCheckContext.useClipBoardToast();
|
|
2406
2405
|
const { isLoading, copyToClipboard, ImageDownloadModal, ref } = useCopyToClipboard$1({
|
|
2407
2406
|
imageType: "png",
|
|
2408
2407
|
shadowEffect: true,
|
|
@@ -2560,7 +2559,7 @@ const useRun = (runId) => {
|
|
|
2560
2559
|
const { apiClient } = require_state.useApiConfig();
|
|
2561
2560
|
const [isRunning, setIsRunning] = (0, react.useState)(false);
|
|
2562
2561
|
const [aborting, setAborting] = (0, react.useState)(false);
|
|
2563
|
-
const [, refetchRunsAggregated] =
|
|
2562
|
+
const [, refetchRunsAggregated] = require_RecceCheckContext.useRunsAggregated();
|
|
2564
2563
|
const { error, data: run } = (0, _tanstack_react_query.useQuery)({
|
|
2565
2564
|
queryKey: require_state.cacheKeys.run(runId ?? ""),
|
|
2566
2565
|
queryFn: async () => {
|
|
@@ -2591,7 +2590,7 @@ const useRun = (runId) => {
|
|
|
2591
2590
|
await require_state.cancelRun(runId, apiClient);
|
|
2592
2591
|
}, [runId, apiClient]);
|
|
2593
2592
|
let RunResultView;
|
|
2594
|
-
if (run &&
|
|
2593
|
+
if (run && require_RecceCheckContext.runTypeHasRef(run.type)) RunResultView = require_RecceCheckContext.findByRunType(run.type).RunResultView;
|
|
2595
2594
|
return {
|
|
2596
2595
|
run,
|
|
2597
2596
|
isRunning,
|
|
@@ -2680,7 +2679,7 @@ function useThemeColors() {
|
|
|
2680
2679
|
//#endregion
|
|
2681
2680
|
//#region recce-source/js/src/components/lineage/ActionControl.tsx
|
|
2682
2681
|
function ActionControl({ onClose }) {
|
|
2683
|
-
const { cancel, actionState } =
|
|
2682
|
+
const { cancel, actionState } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
2684
2683
|
const getProgressMessage = () => {
|
|
2685
2684
|
if (actionState.mode === "per_node") return `${actionState.completed} / ${actionState.total}`;
|
|
2686
2685
|
else if (actionState.currentRun?.progress?.percentage) return `${actionState.currentRun.progress.percentage * 100}%`;
|
|
@@ -2878,8 +2877,8 @@ function ChangeStatusLegend() {
|
|
|
2878
2877
|
//#endregion
|
|
2879
2878
|
//#region recce-source/js/src/components/lineage/ColumnLevelLineageControl.tsx
|
|
2880
2879
|
const ModeMessage = () => {
|
|
2881
|
-
const { lineageGraph } =
|
|
2882
|
-
const { centerNode, viewOptions } =
|
|
2880
|
+
const { lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
2881
|
+
const { centerNode, viewOptions } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
2883
2882
|
const cllInput = viewOptions.column_level_lineage;
|
|
2884
2883
|
if (!lineageGraph) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
2885
2884
|
if (!cllInput) return "Default View";
|
|
@@ -2935,10 +2934,10 @@ const ModeMessage = () => {
|
|
|
2935
2934
|
}
|
|
2936
2935
|
};
|
|
2937
2936
|
const ColumnLevelLineageControl = ({ action }) => {
|
|
2938
|
-
const { showColumnLevelLineage, resetColumnLevelLineage, interactive, viewOptions } =
|
|
2939
|
-
const { data: flagData } =
|
|
2937
|
+
const { showColumnLevelLineage, resetColumnLevelLineage, interactive, viewOptions } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
2938
|
+
const { data: flagData } = require_RecceCheckContext.useRecceServerFlag();
|
|
2940
2939
|
const singleEnv = flagData?.single_env_onboarding ?? false;
|
|
2941
|
-
const { lineageGraph } =
|
|
2940
|
+
const { lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
2942
2941
|
const noCatalogCurrent = !lineageGraph?.catalogMetadata.current;
|
|
2943
2942
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Stack.default, {
|
|
2944
2943
|
direction: "row",
|
|
@@ -3076,7 +3075,7 @@ function GraphColumnNode(nodeProps) {
|
|
|
3076
3075
|
const { column, type, transformationType, changeStatus } = data;
|
|
3077
3076
|
const showContent = (0, _xyflow_react.useStore)((s) => s.transform[2] > .3);
|
|
3078
3077
|
const { background, text, border } = useThemeColors();
|
|
3079
|
-
const { viewOptions, showContextMenu, isNodeHighlighted, isNodeShowingChangeAnalysis } =
|
|
3078
|
+
const { viewOptions, showContextMenu, isNodeHighlighted, isNodeShowingChangeAnalysis } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
3080
3079
|
const selectedNode = viewOptions.column_level_lineage?.node_id;
|
|
3081
3080
|
const isFocus = column === viewOptions.column_level_lineage?.column && nodeId === selectedNode;
|
|
3082
3081
|
const [isHovered, setIsHovered] = react.default.useState(false);
|
|
@@ -3110,12 +3109,12 @@ function GraphColumnNode(nodeProps) {
|
|
|
3110
3109
|
width: "100%",
|
|
3111
3110
|
gap: "3px",
|
|
3112
3111
|
alignItems: "center",
|
|
3113
|
-
height: `${
|
|
3112
|
+
height: `${require_RecceCheckContext.COLUMN_HEIGHT - 1}px`
|
|
3114
3113
|
},
|
|
3115
3114
|
children: [
|
|
3116
3115
|
isShowingChangeAnalysis && changeStatus ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChangeStatus, { changeStatus }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TransformationType, { transformationType }),
|
|
3117
3116
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
3118
|
-
sx: { height: `${
|
|
3117
|
+
sx: { height: `${require_RecceCheckContext.COLUMN_HEIGHT + 1}px` },
|
|
3119
3118
|
children: column
|
|
3120
3119
|
}),
|
|
3121
3120
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, { sx: { flexGrow: 1 } }),
|
|
@@ -3133,7 +3132,7 @@ function GraphColumnNode(nodeProps) {
|
|
|
3133
3132
|
showContextMenu(e, nodeProps);
|
|
3134
3133
|
}
|
|
3135
3134
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
3136
|
-
sx: { height: `${
|
|
3135
|
+
sx: { height: `${require_RecceCheckContext.COLUMN_HEIGHT + 1} px` },
|
|
3137
3136
|
children: type
|
|
3138
3137
|
})
|
|
3139
3138
|
]
|
|
@@ -3207,7 +3206,7 @@ function ColumnLevelLineageLegend() {
|
|
|
3207
3206
|
function GraphEdge(props) {
|
|
3208
3207
|
const { source, target, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style: styleOverride = {}, markerEnd, data } = props;
|
|
3209
3208
|
const style = { ...styleOverride };
|
|
3210
|
-
const { isEdgeHighlighted } =
|
|
3209
|
+
const { isEdgeHighlighted } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
3211
3210
|
if (data?.changeStatus) {
|
|
3212
3211
|
style.stroke = getIconForChangeStatus$1(data.changeStatus).hexColor;
|
|
3213
3212
|
style.strokeDasharray = "5";
|
|
@@ -3415,7 +3414,7 @@ function _RowCountByRate({ rowCount }) {
|
|
|
3415
3414
|
variant: "body2",
|
|
3416
3415
|
component: "span",
|
|
3417
3416
|
sx: { color: "success.main" },
|
|
3418
|
-
children:
|
|
3417
|
+
children: require_RecceCheckContext.deltaPercentageString(base, current)
|
|
3419
3418
|
})
|
|
3420
3419
|
]
|
|
3421
3420
|
});
|
|
@@ -3441,7 +3440,7 @@ function _RowCountByRate({ rowCount }) {
|
|
|
3441
3440
|
variant: "body2",
|
|
3442
3441
|
component: "span",
|
|
3443
3442
|
sx: { color: "error.main" },
|
|
3444
|
-
children:
|
|
3443
|
+
children: require_RecceCheckContext.deltaPercentageString(base, current)
|
|
3445
3444
|
})
|
|
3446
3445
|
]
|
|
3447
3446
|
});
|
|
@@ -3471,10 +3470,10 @@ function ModelRowCount({ rowCount }) {
|
|
|
3471
3470
|
});
|
|
3472
3471
|
}
|
|
3473
3472
|
function RowCountDiffTag({ rowCount: fetchedRowCount, node, onRefresh, isFetching }) {
|
|
3474
|
-
const { featureToggles } =
|
|
3475
|
-
const { runsAggregated } =
|
|
3473
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
3474
|
+
const { runsAggregated } = require_RecceCheckContext.useLineageGraphContext();
|
|
3476
3475
|
const lastRowCount = runsAggregated?.[node.id]?.row_count_diff.result;
|
|
3477
|
-
const RunTypeIcon =
|
|
3476
|
+
const RunTypeIcon = require_RecceCheckContext.findByRunType("row_count_diff").icon;
|
|
3478
3477
|
const rowCount = fetchedRowCount ?? lastRowCount;
|
|
3479
3478
|
const rowsToShow = rowCount;
|
|
3480
3479
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tooltip.default, {
|
|
@@ -3516,9 +3515,9 @@ function RowCountDiffTag({ rowCount: fetchedRowCount, node, onRefresh, isFetchin
|
|
|
3516
3515
|
});
|
|
3517
3516
|
}
|
|
3518
3517
|
function RowCountTag({ rowCount: fetchedRowCount, node, onRefresh, isFetching }) {
|
|
3519
|
-
const { runsAggregated } =
|
|
3518
|
+
const { runsAggregated } = require_RecceCheckContext.useLineageGraphContext();
|
|
3520
3519
|
const lastRowCount = runsAggregated?.[node.id]?.row_count.result;
|
|
3521
|
-
const RunTypeIcon =
|
|
3520
|
+
const RunTypeIcon = require_RecceCheckContext.findByRunType("row_count").icon;
|
|
3522
3521
|
let label;
|
|
3523
3522
|
const rowCount = fetchedRowCount ?? lastRowCount;
|
|
3524
3523
|
if (rowCount) label = `${rowCount.curr ?? "N/A"} rows`;
|
|
@@ -3661,10 +3660,10 @@ function _RowCountDiffTag({ rowCount }) {
|
|
|
3661
3660
|
tagLabel = "=";
|
|
3662
3661
|
chipColor = "default";
|
|
3663
3662
|
} else if (base !== current) {
|
|
3664
|
-
tagLabel = `${
|
|
3663
|
+
tagLabel = `${require_RecceCheckContext.deltaPercentageString(base, current)} Rows`;
|
|
3665
3664
|
chipColor = base < current ? "success" : "error";
|
|
3666
3665
|
}
|
|
3667
|
-
const RowCountIcon =
|
|
3666
|
+
const RowCountIcon = require_RecceCheckContext.findByRunType("row_count_diff").icon;
|
|
3668
3667
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Chip.default, {
|
|
3669
3668
|
size: "small",
|
|
3670
3669
|
color: chipColor,
|
|
@@ -3683,7 +3682,7 @@ const CHANGE_CATEGORY_MSGS = {
|
|
|
3683
3682
|
unknown: "Unknown"
|
|
3684
3683
|
};
|
|
3685
3684
|
const NodeRunsAggregated = ({ id, inverted }) => {
|
|
3686
|
-
const { lineageGraph, runsAggregated } =
|
|
3685
|
+
const { lineageGraph, runsAggregated } = require_RecceCheckContext.useLineageGraphContext();
|
|
3687
3686
|
const { text, isDark } = useThemeColors();
|
|
3688
3687
|
const runs = runsAggregated?.[id];
|
|
3689
3688
|
const node = lineageGraph?.nodes[id];
|
|
@@ -3701,7 +3700,7 @@ const NodeRunsAggregated = ({ id, inverted }) => {
|
|
|
3701
3700
|
}
|
|
3702
3701
|
const colorChanged = inverted ? text.inverted : getIconForChangeStatus$1("modified").color;
|
|
3703
3702
|
const colorUnchanged = inverted ? text.secondary : isDark ? "grey.700" : "grey.100";
|
|
3704
|
-
const SchemaDiffIcon =
|
|
3703
|
+
const SchemaDiffIcon = require_RecceCheckContext.findByRunType("schema_diff").icon;
|
|
3705
3704
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, {
|
|
3706
3705
|
sx: {
|
|
3707
3706
|
display: "flex",
|
|
@@ -3770,7 +3769,7 @@ function GraphNode(nodeProps) {
|
|
|
3770
3769
|
const { background, text, isDark } = useThemeColors();
|
|
3771
3770
|
const { icon: ResourceIcon } = getIconForResourceType(resourceType);
|
|
3772
3771
|
const [isHovered, setIsHovered] = (0, react.useState)(false);
|
|
3773
|
-
const { interactive, selectNode, selectMode, focusedNode, getNodeAction, getNodeColumnSet, isNodeHighlighted, isNodeSelected, isNodeShowingChangeAnalysis, showContextMenu, viewOptions, cll, showColumnLevelLineage } =
|
|
3772
|
+
const { interactive, selectNode, selectMode, focusedNode, getNodeAction, getNodeColumnSet, isNodeHighlighted, isNodeSelected, isNodeShowingChangeAnalysis, showContextMenu, viewOptions, cll, showColumnLevelLineage } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
3774
3773
|
const changeCategory = cll?.current.nodes[id]?.change_category;
|
|
3775
3774
|
const isHighlighted = isNodeHighlighted(id);
|
|
3776
3775
|
const isSelected = isNodeSelected(id);
|
|
@@ -3983,7 +3982,7 @@ function GraphNode(nodeProps) {
|
|
|
3983
3982
|
borderBottomRightRadius: 8
|
|
3984
3983
|
},
|
|
3985
3984
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, { sx: {
|
|
3986
|
-
height: `${columnSet.size *
|
|
3985
|
+
height: `${columnSet.size * require_RecceCheckContext.COLUMN_HEIGHT}px`,
|
|
3987
3986
|
overflow: "auto"
|
|
3988
3987
|
} })
|
|
3989
3988
|
}),
|
|
@@ -4004,7 +4003,7 @@ function GraphNode(nodeProps) {
|
|
|
4004
4003
|
//#endregion
|
|
4005
4004
|
//#region recce-source/js/src/lib/formatSelect.ts
|
|
4006
4005
|
function formatSelectColumns(baseColumns, currentColumns) {
|
|
4007
|
-
const mergedColumns =
|
|
4006
|
+
const mergedColumns = require_RecceCheckContext.mergeKeys(baseColumns, currentColumns);
|
|
4008
4007
|
if (mergedColumns.length === 0) return [];
|
|
4009
4008
|
if (baseColumns.length === 0 || currentColumns.length === 0) return mergedColumns.map((col, idx) => {
|
|
4010
4009
|
if (idx === mergedColumns.length - 1) return col;
|
|
@@ -4027,7 +4026,7 @@ function formatSelectColumns(baseColumns, currentColumns) {
|
|
|
4027
4026
|
//#endregion
|
|
4028
4027
|
//#region recce-source/js/src/components/lineage/LineageViewContextMenu.tsx
|
|
4029
4028
|
const ContextMenu = ({ menuItems, open, onClose, x, y }) => {
|
|
4030
|
-
const { featureToggles } =
|
|
4029
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
4031
4030
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Menu.default, {
|
|
4032
4031
|
open,
|
|
4033
4032
|
onClose,
|
|
@@ -4069,18 +4068,18 @@ const ContextMenu = ({ menuItems, open, onClose, x, y }) => {
|
|
|
4069
4068
|
};
|
|
4070
4069
|
const ModelNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
4071
4070
|
const menuItems = [];
|
|
4072
|
-
const { selectParentNodes, selectChildNodes, getNodeColumnSet, selectMode, cll, showColumnLevelLineage } =
|
|
4073
|
-
const { runAction } =
|
|
4074
|
-
const { featureToggles } =
|
|
4075
|
-
const { isActionAvailable } =
|
|
4076
|
-
const { data: flag } =
|
|
4077
|
-
const { lineageGraph } =
|
|
4071
|
+
const { selectParentNodes, selectChildNodes, getNodeColumnSet, selectMode, cll, showColumnLevelLineage } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
4072
|
+
const { runAction } = require_RecceCheckContext.useRecceActionContext();
|
|
4073
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
4074
|
+
const { isActionAvailable } = require_RecceCheckContext.useLineageGraphContext();
|
|
4075
|
+
const { data: flag } = require_RecceCheckContext.useRecceServerFlag();
|
|
4076
|
+
const { lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
4078
4077
|
const noCatalogCurrent = !lineageGraph?.catalogMetadata.current;
|
|
4079
4078
|
const singleEnv = flag?.single_env_onboarding ?? false;
|
|
4080
4079
|
const isQueryDisabled = featureToggles.disableDatabaseQuery;
|
|
4081
|
-
const { primaryKey } =
|
|
4080
|
+
const { primaryKey } = require_RecceCheckContext.useModelColumns_default((node?.data)?.data.name);
|
|
4082
4081
|
const { setSqlQuery, setPrimaryKeys } = require_RecceCheckContext.useRecceQueryContext();
|
|
4083
|
-
const [, setLocation] =
|
|
4082
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
4084
4083
|
if (!node?.data) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
4085
4084
|
const modelNode = node.data;
|
|
4086
4085
|
const resourceType = modelNode.resourceType;
|
|
@@ -4107,7 +4106,7 @@ const ModelNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4107
4106
|
label: "select group one",
|
|
4108
4107
|
isSeparator: true
|
|
4109
4108
|
});
|
|
4110
|
-
const run =
|
|
4109
|
+
const run = require_RecceCheckContext.findByRunType(singleEnv ? "query" : "query_diff");
|
|
4111
4110
|
const formattedColumns = formatSelectColumns(Object.keys(modelNode.data.base?.columns ?? {}), Object.keys(modelNode.data.current?.columns ?? {}));
|
|
4112
4111
|
let query = `select * from {{ ref("${modelNode.name}") }}`;
|
|
4113
4112
|
if (formattedColumns.length) query = `select \n ${formattedColumns.join("\n ")}\nfrom {{ ref("${modelNode.name}") }}`;
|
|
@@ -4166,7 +4165,7 @@ const ModelNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4166
4165
|
});
|
|
4167
4166
|
}
|
|
4168
4167
|
}
|
|
4169
|
-
const rowCountAndRowCountRun =
|
|
4168
|
+
const rowCountAndRowCountRun = require_RecceCheckContext.findByRunType(singleEnv ? "row_count" : "row_count_diff");
|
|
4170
4169
|
menuItems.push({
|
|
4171
4170
|
label: rowCountAndRowCountRun.title,
|
|
4172
4171
|
itemIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
@@ -4186,7 +4185,7 @@ const ModelNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4186
4185
|
});
|
|
4187
4186
|
}
|
|
4188
4187
|
});
|
|
4189
|
-
const profileAndProfileDiffRun =
|
|
4188
|
+
const profileAndProfileDiffRun = require_RecceCheckContext.findByRunType(singleEnv ? "profile" : "profile_diff");
|
|
4190
4189
|
menuItems.push({
|
|
4191
4190
|
label: profileAndProfileDiffRun.title,
|
|
4192
4191
|
itemIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
@@ -4211,7 +4210,7 @@ const ModelNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4211
4210
|
}
|
|
4212
4211
|
});
|
|
4213
4212
|
if (!singleEnv) {
|
|
4214
|
-
const valueDiffRun =
|
|
4213
|
+
const valueDiffRun = require_RecceCheckContext.findByRunType("value_diff");
|
|
4215
4214
|
menuItems.push({
|
|
4216
4215
|
label: valueDiffRun.title,
|
|
4217
4216
|
itemIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
@@ -4285,10 +4284,10 @@ const ModelNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4285
4284
|
};
|
|
4286
4285
|
const ColumnNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
4287
4286
|
const menuItems = [];
|
|
4288
|
-
const { runAction } =
|
|
4289
|
-
const { isActionAvailable } =
|
|
4290
|
-
const { featureToggles } =
|
|
4291
|
-
const { data: flag } =
|
|
4287
|
+
const { runAction } = require_RecceCheckContext.useRecceActionContext();
|
|
4288
|
+
const { isActionAvailable } = require_RecceCheckContext.useLineageGraphContext();
|
|
4289
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
4290
|
+
const { data: flag } = require_RecceCheckContext.useRecceServerFlag();
|
|
4292
4291
|
const singleEnv = flag?.single_env_onboarding ?? false;
|
|
4293
4292
|
const isQueryDisabled = featureToggles.disableDatabaseQuery;
|
|
4294
4293
|
if (node?.data === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
@@ -4356,7 +4355,7 @@ const ColumnNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4356
4355
|
});
|
|
4357
4356
|
};
|
|
4358
4357
|
const addedOrRemoved = modelNode.data.base?.columns?.[column] === void 0 || modelNode.data.current?.columns?.[column] === void 0;
|
|
4359
|
-
const run =
|
|
4358
|
+
const run = require_RecceCheckContext.findByRunType(singleEnv ? "profile" : "profile_diff");
|
|
4360
4359
|
menuItems.push({
|
|
4361
4360
|
label: run.title,
|
|
4362
4361
|
itemIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
@@ -4367,7 +4366,7 @@ const ColumnNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4367
4366
|
isDisabled: addedOrRemoved || !isActionAvailable("profile_diff") || isQueryDisabled
|
|
4368
4367
|
});
|
|
4369
4368
|
if (!singleEnv) {
|
|
4370
|
-
const isHistogramDiffRun$1 =
|
|
4369
|
+
const isHistogramDiffRun$1 = require_RecceCheckContext.findByRunType("histogram_diff");
|
|
4371
4370
|
menuItems.push({
|
|
4372
4371
|
label: isHistogramDiffRun$1.title,
|
|
4373
4372
|
itemIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
@@ -4375,9 +4374,9 @@ const ColumnNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4375
4374
|
sx: { display: "inline-flex" }
|
|
4376
4375
|
}),
|
|
4377
4376
|
action: handleHistogramDiff,
|
|
4378
|
-
isDisabled: addedOrRemoved || (columnType ? !
|
|
4377
|
+
isDisabled: addedOrRemoved || (columnType ? !require_RecceCheckContext.supportsHistogramDiff(columnType) : true) || isQueryDisabled
|
|
4379
4378
|
});
|
|
4380
|
-
const isTopKDiffRun$1 =
|
|
4379
|
+
const isTopKDiffRun$1 = require_RecceCheckContext.findByRunType("top_k_diff");
|
|
4381
4380
|
menuItems.push({
|
|
4382
4381
|
label: isTopKDiffRun$1.title,
|
|
4383
4382
|
itemIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
@@ -4387,7 +4386,7 @@ const ColumnNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4387
4386
|
action: handleTopkDiff,
|
|
4388
4387
|
isDisabled: addedOrRemoved || isQueryDisabled
|
|
4389
4388
|
});
|
|
4390
|
-
const isValueDiffRun$1 =
|
|
4389
|
+
const isValueDiffRun$1 = require_RecceCheckContext.findByRunType("value_diff");
|
|
4391
4390
|
menuItems.push({
|
|
4392
4391
|
label: isValueDiffRun$1.title,
|
|
4393
4392
|
itemIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
@@ -4407,7 +4406,7 @@ const ColumnNodeContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4407
4406
|
});
|
|
4408
4407
|
};
|
|
4409
4408
|
const LineageViewContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
4410
|
-
const { featureToggles } =
|
|
4409
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
4411
4410
|
if (featureToggles.disableViewActionDropdown) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextMenu, {
|
|
4412
4411
|
menuItems: [],
|
|
4413
4412
|
open: isOpen,
|
|
@@ -4415,14 +4414,14 @@ const LineageViewContextMenu = ({ isOpen, onClose, x, y, node }) => {
|
|
|
4415
4414
|
x,
|
|
4416
4415
|
y
|
|
4417
4416
|
});
|
|
4418
|
-
else if (node &&
|
|
4417
|
+
else if (node && require_RecceCheckContext.isLineageGraphNode(node)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelNodeContextMenu, {
|
|
4419
4418
|
x,
|
|
4420
4419
|
y,
|
|
4421
4420
|
isOpen,
|
|
4422
4421
|
onClose,
|
|
4423
4422
|
node
|
|
4424
4423
|
});
|
|
4425
|
-
else if (node &&
|
|
4424
|
+
else if (node && require_RecceCheckContext.isLineageGraphColumnNode(node)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ColumnNodeContextMenu, {
|
|
4426
4425
|
x,
|
|
4427
4426
|
y,
|
|
4428
4427
|
isOpen,
|
|
@@ -4514,7 +4513,7 @@ function LineageViewNotification({ notification, type }) {
|
|
|
4514
4513
|
//#endregion
|
|
4515
4514
|
//#region recce-source/js/src/components/shared/HistoryToggle.tsx
|
|
4516
4515
|
function HistoryToggle() {
|
|
4517
|
-
const { isHistoryOpen, showHistory } =
|
|
4516
|
+
const { isHistoryOpen, showHistory } = require_RecceCheckContext.useRecceActionContext();
|
|
4518
4517
|
if (isHistoryOpen) return;
|
|
4519
4518
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
4520
4519
|
sx: { fontSize: "8pt" },
|
|
@@ -4605,7 +4604,7 @@ const SelectFilterTooltip = () => {
|
|
|
4605
4604
|
const ViewModeSelectMenu = ({ isDisabled }) => {
|
|
4606
4605
|
const [anchorEl, setAnchorEl] = (0, react.useState)(null);
|
|
4607
4606
|
const open = Boolean(anchorEl);
|
|
4608
|
-
const { viewOptions, onViewOptionsChanged } =
|
|
4607
|
+
const { viewOptions, onViewOptionsChanged } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
4609
4608
|
const viewMode = viewOptions.view_mode ?? "changed_models";
|
|
4610
4609
|
const label = viewMode === "changed_models" ? "Changed Models" : "All";
|
|
4611
4610
|
const handleClick = (event) => {
|
|
@@ -4677,8 +4676,8 @@ const ViewModeSelectMenu = ({ isDisabled }) => {
|
|
|
4677
4676
|
const PackageSelectMenu = ({ isDisabled }) => {
|
|
4678
4677
|
const [anchorEl, setAnchorEl] = (0, react.useState)(null);
|
|
4679
4678
|
const open = Boolean(anchorEl);
|
|
4680
|
-
const { lineageGraph } =
|
|
4681
|
-
const { viewOptions, onViewOptionsChanged } =
|
|
4679
|
+
const { lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
4680
|
+
const { viewOptions, onViewOptionsChanged } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
4682
4681
|
const available = /* @__PURE__ */ new Set();
|
|
4683
4682
|
const nodes = Object.values(lineageGraph?.nodes ?? {});
|
|
4684
4683
|
for (const node of nodes) if (node.data.packageName) available.add(node.data.packageName);
|
|
@@ -4764,7 +4763,7 @@ const PackageSelectMenu = ({ isDisabled }) => {
|
|
|
4764
4763
|
};
|
|
4765
4764
|
const NodeSelectionInput = (props) => {
|
|
4766
4765
|
const [inputValue, setInputValue] = (0, react.useState)(props.value);
|
|
4767
|
-
const { data: flags } =
|
|
4766
|
+
const { data: flags } = require_RecceCheckContext.useRecceServerFlag();
|
|
4768
4767
|
const inputRef = (0, react.useRef)(null);
|
|
4769
4768
|
(0, react.useEffect)(() => {
|
|
4770
4769
|
if (inputRef.current) inputRef.current.value = props.value;
|
|
@@ -4816,7 +4815,7 @@ const NodeSelectionInput = (props) => {
|
|
|
4816
4815
|
});
|
|
4817
4816
|
};
|
|
4818
4817
|
const SelectFilter = ({ isDisabled }) => {
|
|
4819
|
-
const { viewOptions, onViewOptionsChanged } =
|
|
4818
|
+
const { viewOptions, onViewOptionsChanged } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
4820
4819
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NodeSelectionInput, {
|
|
4821
4820
|
isDisabled,
|
|
4822
4821
|
value: viewOptions.select ?? "",
|
|
@@ -4830,7 +4829,7 @@ const SelectFilter = ({ isDisabled }) => {
|
|
|
4830
4829
|
});
|
|
4831
4830
|
};
|
|
4832
4831
|
const ExcludeFilter = ({ isDisabled }) => {
|
|
4833
|
-
const { viewOptions, onViewOptionsChanged } =
|
|
4832
|
+
const { viewOptions, onViewOptionsChanged } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
4834
4833
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NodeSelectionInput, {
|
|
4835
4834
|
isDisabled,
|
|
4836
4835
|
value: viewOptions.exclude ?? "",
|
|
@@ -4853,9 +4852,9 @@ const ControlItem = (props) => {
|
|
|
4853
4852
|
});
|
|
4854
4853
|
};
|
|
4855
4854
|
const LineageViewTopBar = () => {
|
|
4856
|
-
const { deselect, focusedNode, selectedNodes, ...lineageViewContext } =
|
|
4857
|
-
const { featureToggles } =
|
|
4858
|
-
const { data: flags } =
|
|
4855
|
+
const { deselect, focusedNode, selectedNodes, ...lineageViewContext } = require_RecceCheckContext.useLineageViewContextSafe();
|
|
4856
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
4857
|
+
const { data: flags } = require_RecceCheckContext.useRecceServerFlag();
|
|
4859
4858
|
const isSingleEnvOnboarding = flags?.single_env_onboarding;
|
|
4860
4859
|
const [actionsAnchorEl, setActionsAnchorEl] = (0, react.useState)(null);
|
|
4861
4860
|
const actionsOpen = Boolean(actionsAnchorEl);
|
|
@@ -4869,10 +4868,10 @@ const LineageViewTopBar = () => {
|
|
|
4869
4868
|
const handleActionsClose = () => {
|
|
4870
4869
|
setActionsAnchorEl(null);
|
|
4871
4870
|
};
|
|
4872
|
-
const RowCountDiffIcon =
|
|
4873
|
-
const ValueDiffIcon =
|
|
4874
|
-
const LineageDiffIcon =
|
|
4875
|
-
const SchemaDiffIcon =
|
|
4871
|
+
const RowCountDiffIcon = require_RecceCheckContext.findByRunType("row_count_diff").icon;
|
|
4872
|
+
const ValueDiffIcon = require_RecceCheckContext.findByRunType("value_diff").icon;
|
|
4873
|
+
const LineageDiffIcon = require_RecceCheckContext.findByRunType("lineage_diff").icon;
|
|
4874
|
+
const SchemaDiffIcon = require_RecceCheckContext.findByRunType("schema_diff").icon;
|
|
4876
4875
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Stack.default, {
|
|
4877
4876
|
direction: "row",
|
|
4878
4877
|
alignItems: "center",
|
|
@@ -5124,11 +5123,11 @@ const LearnHowLink = () => {
|
|
|
5124
5123
|
//#endregion
|
|
5125
5124
|
//#region recce-source/js/src/components/schema/SchemaView.tsx
|
|
5126
5125
|
function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
5127
|
-
const lineageViewContext =
|
|
5126
|
+
const lineageViewContext = require_RecceCheckContext.useLineageViewContext();
|
|
5128
5127
|
const [gridApi, setGridApi] = (0, react.useState)(null);
|
|
5129
5128
|
const [cllRunningMap, setCllRunningMap] = (0, react.useState)(/* @__PURE__ */ new Map());
|
|
5130
5129
|
const { columns, rows } = (0, react.useMemo)(() => {
|
|
5131
|
-
return
|
|
5130
|
+
return require_RecceCheckContext.createDataGridFromData({
|
|
5132
5131
|
type: "schema_single",
|
|
5133
5132
|
columns: current?.columns
|
|
5134
5133
|
}, {
|
|
@@ -5141,7 +5140,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
5141
5140
|
cllRunningMap,
|
|
5142
5141
|
showMenu
|
|
5143
5142
|
]);
|
|
5144
|
-
const { lineageGraph } =
|
|
5143
|
+
const { lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
5145
5144
|
const noCatalogCurrent = !lineageGraph?.catalogMetadata.current;
|
|
5146
5145
|
let catalogMissingMessage = void 0;
|
|
5147
5146
|
if (noCatalogCurrent) catalogMissingMessage = "catalog.json not found. Run `recce debug` to troubleshoot.";
|
|
@@ -5206,7 +5205,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
5206
5205
|
p: 1
|
|
5207
5206
|
},
|
|
5208
5207
|
children: schemaMissingMessage
|
|
5209
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {}), rows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5208
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {}), rows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RecceCheckContext.ScreenshotDataGrid, {
|
|
5210
5209
|
style: {
|
|
5211
5210
|
blockSize: "auto",
|
|
5212
5211
|
maxHeight: "100%",
|
|
@@ -5216,7 +5215,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
5216
5215
|
},
|
|
5217
5216
|
columns,
|
|
5218
5217
|
rows,
|
|
5219
|
-
renderers: { noRowsFallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5218
|
+
renderers: { noRowsFallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RecceCheckContext.EmptyRowsRenderer, {}) },
|
|
5220
5219
|
className: "rdg-light",
|
|
5221
5220
|
ref,
|
|
5222
5221
|
getRowId,
|
|
@@ -5228,7 +5227,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
5228
5227
|
});
|
|
5229
5228
|
}
|
|
5230
5229
|
function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
5231
|
-
const lineageViewContext =
|
|
5230
|
+
const lineageViewContext = require_RecceCheckContext.useLineageViewContext();
|
|
5232
5231
|
const [gridApi, setGridApi] = (0, react.useState)(null);
|
|
5233
5232
|
const [cllRunningMap, setCllRunningMap] = (0, react.useState)(/* @__PURE__ */ new Map());
|
|
5234
5233
|
const { columns, rows } = (0, react.useMemo)(() => {
|
|
@@ -5239,7 +5238,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
5239
5238
|
"snapshot",
|
|
5240
5239
|
"source"
|
|
5241
5240
|
].includes(resourceType) ? current ?? base : void 0;
|
|
5242
|
-
return
|
|
5241
|
+
return require_RecceCheckContext.createDataGridFromData({
|
|
5243
5242
|
type: "schema_diff",
|
|
5244
5243
|
base: base?.columns,
|
|
5245
5244
|
current: current?.columns
|
|
@@ -5254,7 +5253,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
5254
5253
|
cllRunningMap,
|
|
5255
5254
|
showMenu
|
|
5256
5255
|
]);
|
|
5257
|
-
const { lineageGraph } =
|
|
5256
|
+
const { lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
5258
5257
|
const noCatalogBase = !lineageGraph?.catalogMetadata.base;
|
|
5259
5258
|
const noCatalogCurrent = !lineageGraph?.catalogMetadata.current;
|
|
5260
5259
|
let catalogMissingMessage = void 0;
|
|
@@ -5333,7 +5332,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
5333
5332
|
p: 1
|
|
5334
5333
|
},
|
|
5335
5334
|
children: schemaMissingMessage
|
|
5336
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {}), rows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5335
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {}), rows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RecceCheckContext.ScreenshotDataGrid, {
|
|
5337
5336
|
style: {
|
|
5338
5337
|
blockSize: "auto",
|
|
5339
5338
|
maxHeight: "100%",
|
|
@@ -5344,7 +5343,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
5344
5343
|
columns,
|
|
5345
5344
|
rows,
|
|
5346
5345
|
rowHeight: 35,
|
|
5347
|
-
renderers: { noRowsFallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5346
|
+
renderers: { noRowsFallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RecceCheckContext.EmptyRowsRenderer, {}) },
|
|
5348
5347
|
className: "rdg-light no-track-pii-safe",
|
|
5349
5348
|
ref,
|
|
5350
5349
|
getRowId,
|
|
@@ -5507,7 +5506,7 @@ var DiffEditor_default = DiffEditor;
|
|
|
5507
5506
|
const NodeSqlView = ({ node }) => {
|
|
5508
5507
|
const [isOpen, setIsOpen] = (0, react.useState)(false);
|
|
5509
5508
|
const [isHovered, setIsHovered] = (0, react.useState)(false);
|
|
5510
|
-
const { data: flags, isLoading } =
|
|
5509
|
+
const { data: flags, isLoading } = require_RecceCheckContext.useRecceServerFlag();
|
|
5511
5510
|
const isDark = (0, _mui_material_styles.useTheme)().palette.mode === "dark";
|
|
5512
5511
|
const isSingleEnvOnboarding = flags?.single_env_onboarding;
|
|
5513
5512
|
if (isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
@@ -5661,7 +5660,7 @@ function useFeedbackCollectionToast(options) {
|
|
|
5661
5660
|
const isSkipFeedback = localStorage.getItem(feedbackId);
|
|
5662
5661
|
if (toastId != null) return;
|
|
5663
5662
|
if (isSkipFeedback === "true" && !skipBypassFeedback) return;
|
|
5664
|
-
setToastId(
|
|
5663
|
+
setToastId(require_RecceCheckContext.toaster.create({
|
|
5665
5664
|
id: feedbackId,
|
|
5666
5665
|
duration: void 0,
|
|
5667
5666
|
type: "success",
|
|
@@ -5671,12 +5670,12 @@ function useFeedbackCollectionToast(options) {
|
|
|
5671
5670
|
description,
|
|
5672
5671
|
onLike: () => {
|
|
5673
5672
|
onFeedbackSubmit("like");
|
|
5674
|
-
|
|
5673
|
+
require_RecceCheckContext.toaster.dismiss(feedbackId);
|
|
5675
5674
|
localStorage.setItem(feedbackId, "true");
|
|
5676
5675
|
},
|
|
5677
5676
|
onDislike: () => {
|
|
5678
5677
|
onFeedbackSubmit("dislike");
|
|
5679
|
-
|
|
5678
|
+
require_RecceCheckContext.toaster.dismiss(feedbackId);
|
|
5680
5679
|
localStorage.setItem(feedbackId, "true");
|
|
5681
5680
|
},
|
|
5682
5681
|
externalLink,
|
|
@@ -5691,7 +5690,7 @@ function useFeedbackCollectionToast(options) {
|
|
|
5691
5690
|
return {
|
|
5692
5691
|
feedbackToast: feedBackCollectionToast,
|
|
5693
5692
|
closeToast: () => {
|
|
5694
|
-
if (toastId)
|
|
5693
|
+
if (toastId) require_RecceCheckContext.toaster.dismiss(toastId);
|
|
5695
5694
|
}
|
|
5696
5695
|
};
|
|
5697
5696
|
}
|
|
@@ -5703,7 +5702,7 @@ function useGuideToast(options) {
|
|
|
5703
5702
|
const { guideId, description, externalLinkText, onExternalLinkClick } = options;
|
|
5704
5703
|
function guideToast() {
|
|
5705
5704
|
if (toastId != null) return;
|
|
5706
|
-
setToastId(
|
|
5705
|
+
setToastId(require_RecceCheckContext.toaster.create({
|
|
5707
5706
|
id: guideId,
|
|
5708
5707
|
duration: 3e3,
|
|
5709
5708
|
type: "success",
|
|
@@ -5719,7 +5718,7 @@ function useGuideToast(options) {
|
|
|
5719
5718
|
return {
|
|
5720
5719
|
guideToast,
|
|
5721
5720
|
closeGuideToast: () => {
|
|
5722
|
-
if (toastId)
|
|
5721
|
+
if (toastId) require_RecceCheckContext.toaster.dismiss(toastId);
|
|
5723
5722
|
}
|
|
5724
5723
|
};
|
|
5725
5724
|
}
|
|
@@ -5786,7 +5785,7 @@ function renderInfoEntries(info) {
|
|
|
5786
5785
|
}, key));
|
|
5787
5786
|
}
|
|
5788
5787
|
function EnvInfo() {
|
|
5789
|
-
const { envInfo, reviewMode, lineageGraph } =
|
|
5788
|
+
const { envInfo, reviewMode, lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
5790
5789
|
const [open, setOpen] = (0, react.useState)(false);
|
|
5791
5790
|
const git = envInfo?.git;
|
|
5792
5791
|
const pr = envInfo?.pullRequest;
|
|
@@ -5858,7 +5857,7 @@ function EnvInfo() {
|
|
|
5858
5857
|
size: "small",
|
|
5859
5858
|
"aria-label": "Environment Info",
|
|
5860
5859
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
5861
|
-
component:
|
|
5860
|
+
component: require_RecceCheckContext.IconInfo,
|
|
5862
5861
|
sx: {
|
|
5863
5862
|
fontSize: 16,
|
|
5864
5863
|
verticalAlign: "middle"
|
|
@@ -6265,7 +6264,7 @@ const DropdownValuesInput = (props) => {
|
|
|
6265
6264
|
//#endregion
|
|
6266
6265
|
//#region recce-source/js/src/components/query/QueryForm.tsx
|
|
6267
6266
|
const QueryForm = ({ defaultPrimaryKeys, onPrimaryKeysChange, ...props }) => {
|
|
6268
|
-
const { lineageGraph, isActionAvailable } =
|
|
6267
|
+
const { lineageGraph, isActionAvailable } = require_RecceCheckContext.useLineageGraphContext();
|
|
6269
6268
|
const labelInfo = "Provide a primary key to perform query diff in data warehouse and only return changed rows.";
|
|
6270
6269
|
const availableColumns = (0, react.useMemo)(() => {
|
|
6271
6270
|
if (!lineageGraph) return [];
|
|
@@ -6330,7 +6329,7 @@ const QueryForm = ({ defaultPrimaryKeys, onPrimaryKeysChange, ...props }) => {
|
|
|
6330
6329
|
//#endregion
|
|
6331
6330
|
//#region recce-source/js/src/components/AuthModal/AuthModal.tsx
|
|
6332
6331
|
function AuthModal({ handleParentClose, parentOpen = false, ignoreCookie = false, variant = "auth" }) {
|
|
6333
|
-
const { authed } =
|
|
6332
|
+
const { authed } = require_RecceCheckContext.useRecceInstanceContext();
|
|
6334
6333
|
const { apiClient } = require_state.useApiConfig();
|
|
6335
6334
|
const [open, setOpen] = (0, react.useState)(parentOpen || !authed);
|
|
6336
6335
|
const authStateCookieValue = js_cookie.default.get("authState") ?? "pending";
|
|
@@ -6501,7 +6500,7 @@ function AuthModal({ handleParentClose, parentOpen = false, ignoreCookie = false
|
|
|
6501
6500
|
//#endregion
|
|
6502
6501
|
//#region recce-source/js/src/components/query/SqlEditor.tsx
|
|
6503
6502
|
function SqlEditor({ value, onChange, onRun, onRunBase, onRunDiff, label, CustomEditor, options = {}, manifestData, schemas, ...props }) {
|
|
6504
|
-
const { featureToggles } =
|
|
6503
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
6505
6504
|
const isDark = (0, _mui_material_styles.useTheme)().palette.mode === "dark";
|
|
6506
6505
|
const handleEditorChange = (value$1) => {
|
|
6507
6506
|
if (onChange) onChange(value$1);
|
|
@@ -6598,7 +6597,7 @@ function SqlEditor({ value, onChange, onRun, onRunBase, onRunDiff, label, Custom
|
|
|
6598
6597
|
function DualSqlEditor({ value, baseValue, onChange, onChangeBase, onRun, onRunBase, onRunDiff, options = {}, labels, SetupGuide, ...props }) {
|
|
6599
6598
|
const baseLabel = labels ? labels[0] : "Base";
|
|
6600
6599
|
const currentLabel = labels ? labels[1] : "Current";
|
|
6601
|
-
const { envInfo, lineageGraph } =
|
|
6600
|
+
const { envInfo, lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
6602
6601
|
let dbtBase;
|
|
6603
6602
|
let dbtCurrent;
|
|
6604
6603
|
if (envInfo?.dbt?.base && envInfo.dbt.current) {
|
|
@@ -6893,7 +6892,7 @@ const SingleEnvironmentSetupNotification = ({ runType }) => {
|
|
|
6893
6892
|
}
|
|
6894
6893
|
};
|
|
6895
6894
|
const RunResultShareMenu = ({ disableCopyToClipboard, onCopyToClipboard, onMouseEnter, onMouseLeave }) => {
|
|
6896
|
-
const { authed } =
|
|
6895
|
+
const { authed } = require_RecceCheckContext.useRecceInstanceContext();
|
|
6897
6896
|
const { handleShareClick } = require_RecceCheckContext.useRecceShareStateContext();
|
|
6898
6897
|
const [showModal, setShowModal] = (0, react.useState)(false);
|
|
6899
6898
|
const [anchorEl, setAnchorEl] = (0, react.useState)(null);
|
|
@@ -6955,14 +6954,14 @@ const RunResultShareMenu = ({ disableCopyToClipboard, onCopyToClipboard, onMouse
|
|
|
6955
6954
|
] });
|
|
6956
6955
|
};
|
|
6957
6956
|
const PrivateLoadableRunView = ({ runId, onClose, isSingleEnvironment }) => {
|
|
6958
|
-
const { featureToggles } =
|
|
6959
|
-
const { runAction } =
|
|
6957
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
6958
|
+
const { runAction } = require_RecceCheckContext.useRecceActionContext();
|
|
6960
6959
|
const { error, run, onCancel, isRunning } = useRun(runId);
|
|
6961
6960
|
const [viewOptions, setViewOptions] = (0, react.useState)();
|
|
6962
6961
|
const [tabValue, setTabValue] = (0, react.useState)("result");
|
|
6963
6962
|
const showSingleEnvironmentSetupNotification = isSingleEnvironment;
|
|
6964
6963
|
let RunResultView;
|
|
6965
|
-
if (run &&
|
|
6964
|
+
if (run && require_RecceCheckContext.runTypeHasRef(run.type)) RunResultView = require_RecceCheckContext.findByRunType(run.type).RunResultView;
|
|
6966
6965
|
const handleRerun = (0, react.useCallback)(() => {
|
|
6967
6966
|
if (run) runAction(run.type, run.params);
|
|
6968
6967
|
}, [run, runAction]);
|
|
@@ -7088,7 +7087,7 @@ const PrivateLoadableRunView = ({ runId, onClose, isSingleEnvironment }) => {
|
|
|
7088
7087
|
});
|
|
7089
7088
|
};
|
|
7090
7089
|
const RunResultPane = ({ onClose, isSingleEnvironment }) => {
|
|
7091
|
-
const { runId } =
|
|
7090
|
+
const { runId } = require_RecceCheckContext.useRecceActionContext();
|
|
7092
7091
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrivateLoadableRunView, {
|
|
7093
7092
|
runId,
|
|
7094
7093
|
onClose,
|
|
@@ -7096,10 +7095,10 @@ const RunResultPane = ({ onClose, isSingleEnvironment }) => {
|
|
|
7096
7095
|
});
|
|
7097
7096
|
};
|
|
7098
7097
|
function AddToCheckButton({ runId, viewOptions }) {
|
|
7099
|
-
const { featureToggles } =
|
|
7098
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
7100
7099
|
const { error, run } = useRun(runId);
|
|
7101
7100
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
7102
|
-
const [, setLocation] =
|
|
7101
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
7103
7102
|
const { apiClient } = require_state.useApiConfig();
|
|
7104
7103
|
const checkId = run?.check_id;
|
|
7105
7104
|
const handleGoToCheck = (0, react.useCallback)(() => {
|
|
@@ -7108,7 +7107,7 @@ function AddToCheckButton({ runId, viewOptions }) {
|
|
|
7108
7107
|
}, [checkId, setLocation]);
|
|
7109
7108
|
const handleAddToChecklist = (0, react.useCallback)(async () => {
|
|
7110
7109
|
if (!runId) return;
|
|
7111
|
-
const check = await
|
|
7110
|
+
const check = await require_version.createCheckByRun(runId, viewOptions, apiClient);
|
|
7112
7111
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
7113
7112
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
7114
7113
|
}, [
|
|
@@ -7206,7 +7205,7 @@ function SandboxTopBar({ current, primaryKeys, setPrimaryKeys, onRunResultOpen,
|
|
|
7206
7205
|
}
|
|
7207
7206
|
function SandboxEditorLabels({ currentModelID, height = "32px", flex = "0 0 auto" }) {
|
|
7208
7207
|
const isDark = (0, _mui_material_styles.useTheme)().palette.mode === "dark";
|
|
7209
|
-
const { lineageGraph, envInfo } =
|
|
7208
|
+
const { lineageGraph, envInfo } = require_RecceCheckContext.useLineageGraphContext();
|
|
7210
7209
|
const widthOfBar = "50%";
|
|
7211
7210
|
const margin = "0 16px";
|
|
7212
7211
|
const latestUpdateDistanceToNow = (0, date_fns.formatDistanceToNow)(formatTimestamp(envInfo?.dbt?.current?.generated_at ?? ""), { addSuffix: true });
|
|
@@ -7271,13 +7270,13 @@ function SandboxView({ isOpen, onClose, current }) {
|
|
|
7271
7270
|
const [isRunResultOpen, setIsRunResultOpen] = (0, react.useState)(false);
|
|
7272
7271
|
const [modifiedCode, setModifiedCode] = (0, react.useState)(current?.raw_code ?? "");
|
|
7273
7272
|
const [prevIsOpen, setPrevIsOpen] = (0, react.useState)(isOpen);
|
|
7274
|
-
const { showRunId, clearRunResult } =
|
|
7273
|
+
const { showRunId, clearRunResult } = require_RecceCheckContext.useRecceActionContext();
|
|
7275
7274
|
const { primaryKeys, setPrimaryKeys } = require_RecceCheckContext.useRecceQueryContext();
|
|
7276
|
-
const { data: flags, isLoading } =
|
|
7275
|
+
const { data: flags, isLoading } = require_RecceCheckContext.useRecceServerFlag();
|
|
7277
7276
|
const { apiClient } = require_state.useApiConfig();
|
|
7278
7277
|
const queryFn = async () => {
|
|
7279
7278
|
const sqlTemplate = modifiedCode;
|
|
7280
|
-
const { run_id } = await
|
|
7279
|
+
const { run_id } = await require_version.submitQueryDiff({
|
|
7281
7280
|
current_model: current?.name ?? "",
|
|
7282
7281
|
primary_keys: primaryKeys,
|
|
7283
7282
|
sql_template: sqlTemplate
|
|
@@ -7513,8 +7512,8 @@ function NodeView({ node, onCloseNode }) {
|
|
|
7513
7512
|
const [isSandboxOpen, setIsSandboxOpen] = (0, react.useState)(false);
|
|
7514
7513
|
const [isNotificationOpen, setIsNotificationOpen] = (0, react.useState)(true);
|
|
7515
7514
|
const [tabValue, setTabValue] = (0, react.useState)(0);
|
|
7516
|
-
const { runAction } =
|
|
7517
|
-
const { isActionAvailable } =
|
|
7515
|
+
const { runAction } = require_RecceCheckContext.useRecceActionContext();
|
|
7516
|
+
const { isActionAvailable } = require_RecceCheckContext.useLineageGraphContext();
|
|
7518
7517
|
const refetchRowCount = () => {
|
|
7519
7518
|
require_state.trackExploreAction({
|
|
7520
7519
|
action: require_state.EXPLORE_ACTION.ROW_COUNT,
|
|
@@ -7537,7 +7536,7 @@ function NodeView({ node, onCloseNode }) {
|
|
|
7537
7536
|
showLast: false
|
|
7538
7537
|
});
|
|
7539
7538
|
};
|
|
7540
|
-
const { singleEnv: isSingleEnvOnboarding } =
|
|
7539
|
+
const { singleEnv: isSingleEnvOnboarding } = require_RecceCheckContext.useRecceInstanceContext();
|
|
7541
7540
|
const disableReason = (isAddedOrRemoved, runType) => {
|
|
7542
7541
|
if (isAddedOrRemoved) return require_tooltipMessage.DisableTooltipMessages.add_or_remove;
|
|
7543
7542
|
if (!isActionAvailable(runType)) return "This action is not supported yet.";
|
|
@@ -7689,17 +7688,17 @@ function NodeView({ node, onCloseNode }) {
|
|
|
7689
7688
|
});
|
|
7690
7689
|
}
|
|
7691
7690
|
function SingleEnvActionButtons({ node, baseColumns, currentColumns, refetchRowCount, disableReason }) {
|
|
7692
|
-
const [, setLocation] =
|
|
7691
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
7693
7692
|
const { setSqlQuery } = require_RecceCheckContext.useRecceQueryContext();
|
|
7694
|
-
const { runAction } =
|
|
7695
|
-
const { envInfo } =
|
|
7693
|
+
const { runAction } = require_RecceCheckContext.useRecceActionContext();
|
|
7694
|
+
const { envInfo } = require_RecceCheckContext.useLineageGraphContext();
|
|
7696
7695
|
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
7697
7696
|
const formattedColumns = formatSelectColumns(baseColumns, currentColumns);
|
|
7698
7697
|
let query = `select * from {{ ref("${node.data.name}") }}`;
|
|
7699
7698
|
if (formattedColumns.length) query = `select \n ${formattedColumns.join("\n ")}\nfrom {{ ref("${node.data.name}") }}`;
|
|
7700
|
-
const QueryIcon =
|
|
7701
|
-
const RowCountIcon =
|
|
7702
|
-
const ProfileIcon =
|
|
7699
|
+
const QueryIcon = require_RecceCheckContext.findByRunType("query").icon;
|
|
7700
|
+
const RowCountIcon = require_RecceCheckContext.findByRunType("row_count").icon;
|
|
7701
|
+
const ProfileIcon = require_RecceCheckContext.findByRunType("profile").icon;
|
|
7703
7702
|
const handleQueryClick = () => {
|
|
7704
7703
|
if (envInfo?.adapterType === "dbt") setSqlQuery(query);
|
|
7705
7704
|
else if (envInfo?.adapterType === "sqlmesh") setSqlQuery(`select * from ${node.data.name}`);
|
|
@@ -7761,11 +7760,11 @@ function SingleEnvActionButtons({ node, baseColumns, currentColumns, refetchRowC
|
|
|
7761
7760
|
});
|
|
7762
7761
|
}
|
|
7763
7762
|
function ExploreHeaderButtons({ node, onSandboxOpen }) {
|
|
7764
|
-
const [, setLocation] =
|
|
7765
|
-
const { featureToggles } =
|
|
7766
|
-
const { isActionAvailable } =
|
|
7763
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
7764
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
7765
|
+
const { isActionAvailable } = require_RecceCheckContext.useLineageGraphContext();
|
|
7767
7766
|
const { setPrimaryKeys } = require_RecceCheckContext.useRecceQueryContext();
|
|
7768
|
-
const { primaryKey } =
|
|
7767
|
+
const { primaryKey } = require_RecceCheckContext.useModelColumns_default(node.data.name);
|
|
7769
7768
|
const { apiClient } = require_state.useApiConfig();
|
|
7770
7769
|
const metadataOnly = featureToggles.mode === "metadata only";
|
|
7771
7770
|
const addSchemaCheck = (0, react.useCallback)(async () => {
|
|
@@ -7776,8 +7775,8 @@ function ExploreHeaderButtons({ node, onSandboxOpen }) {
|
|
|
7776
7775
|
setLocation,
|
|
7777
7776
|
apiClient
|
|
7778
7777
|
]);
|
|
7779
|
-
const SchemaDiffIcon =
|
|
7780
|
-
const SandboxIcon =
|
|
7778
|
+
const SchemaDiffIcon = require_RecceCheckContext.findByRunType("schema_diff").icon;
|
|
7779
|
+
const SandboxIcon = require_RecceCheckContext.findByRunType("sandbox").icon;
|
|
7781
7780
|
const handleAddSchemaCheck = () => {
|
|
7782
7781
|
addSchemaCheck();
|
|
7783
7782
|
};
|
|
@@ -7819,23 +7818,23 @@ function ExploreHeaderButtons({ node, onSandboxOpen }) {
|
|
|
7819
7818
|
});
|
|
7820
7819
|
}
|
|
7821
7820
|
function DiffActionButtons({ node, baseColumns, currentColumns, disableReason, refetchRowCountDiff }) {
|
|
7822
|
-
const [, setLocation] =
|
|
7823
|
-
const { runAction } =
|
|
7821
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
7822
|
+
const { runAction } = require_RecceCheckContext.useRecceActionContext();
|
|
7824
7823
|
const { setSqlQuery, setPrimaryKeys } = require_RecceCheckContext.useRecceQueryContext();
|
|
7825
|
-
const { envInfo, isActionAvailable } =
|
|
7826
|
-
const { featureToggles } =
|
|
7827
|
-
const { primaryKey } =
|
|
7824
|
+
const { envInfo, isActionAvailable } = require_RecceCheckContext.useLineageGraphContext();
|
|
7825
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
7826
|
+
const { primaryKey } = require_RecceCheckContext.useModelColumns_default(node.data.name);
|
|
7828
7827
|
const metadataOnly = featureToggles.mode === "metadata only";
|
|
7829
7828
|
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
7830
7829
|
const formattedColumns = formatSelectColumns(baseColumns, currentColumns);
|
|
7831
7830
|
let query = `select * from {{ ref("${node.data.name}") }}`;
|
|
7832
7831
|
if (formattedColumns.length) query = `select \n ${formattedColumns.join("\n ")}\nfrom {{ ref("${node.data.name}") }}`;
|
|
7833
|
-
const QueryDiffIcon =
|
|
7834
|
-
const RowCountDiffIcon =
|
|
7835
|
-
const ProfileDiffIcon =
|
|
7836
|
-
const ValueDiffIcon =
|
|
7837
|
-
const TopKDiffIcon =
|
|
7838
|
-
const HistogramDiffIcon =
|
|
7832
|
+
const QueryDiffIcon = require_RecceCheckContext.findByRunType("query_diff").icon;
|
|
7833
|
+
const RowCountDiffIcon = require_RecceCheckContext.findByRunType("row_count_diff").icon;
|
|
7834
|
+
const ProfileDiffIcon = require_RecceCheckContext.findByRunType("profile_diff").icon;
|
|
7835
|
+
const ValueDiffIcon = require_RecceCheckContext.findByRunType("value_diff").icon;
|
|
7836
|
+
const TopKDiffIcon = require_RecceCheckContext.findByRunType("top_k_diff").icon;
|
|
7837
|
+
const HistogramDiffIcon = require_RecceCheckContext.findByRunType("histogram_diff").icon;
|
|
7839
7838
|
const wrapButton = (button, runType) => {
|
|
7840
7839
|
if (metadataOnly) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SetupConnectionPopover, {
|
|
7841
7840
|
display: true,
|
|
@@ -8004,8 +8003,8 @@ function getSettingsUrl(instanceInfo) {
|
|
|
8004
8003
|
//#endregion
|
|
8005
8004
|
//#region recce-source/js/src/components/lineage/SetupConnectionBanner.tsx
|
|
8006
8005
|
function SetupConnectionBanner() {
|
|
8007
|
-
const { featureToggles } =
|
|
8008
|
-
const { data: instanceInfo } =
|
|
8006
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
8007
|
+
const { data: instanceInfo } = require_RecceCheckContext.useRecceInstanceInfo();
|
|
8009
8008
|
if (featureToggles.mode !== "metadata only") return null;
|
|
8010
8009
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
8011
8010
|
sx: {
|
|
@@ -8275,7 +8274,7 @@ const initValue = {
|
|
|
8275
8274
|
const useMultiNodesAction = (nodes, { onActionStarted, onActionNodeUpdated, onActionCompleted }) => {
|
|
8276
8275
|
const { apiClient } = require_state.useApiConfig();
|
|
8277
8276
|
const actionState = (0, react.useRef)({ ...initValue }).current;
|
|
8278
|
-
const { showRunId } =
|
|
8277
|
+
const { showRunId } = require_RecceCheckContext.useRecceActionContext();
|
|
8279
8278
|
const submitRunForNodes = async (type, skip, getParams) => {
|
|
8280
8279
|
actionState.mode = "multi_nodes";
|
|
8281
8280
|
actionState.actions = {};
|
|
@@ -8451,7 +8450,7 @@ const useMultiNodesAction = (nodes, { onActionStarted, onActionNodeUpdated, onAc
|
|
|
8451
8450
|
});
|
|
8452
8451
|
};
|
|
8453
8452
|
const addLineageDiffCheck = async () => {
|
|
8454
|
-
return await
|
|
8453
|
+
return await require_version.createLineageDiffCheck({ node_ids: nodes.map((node) => node.id) }, apiClient);
|
|
8455
8454
|
};
|
|
8456
8455
|
const addSchemaDiffCheck = async () => {
|
|
8457
8456
|
let check;
|
|
@@ -8517,7 +8516,7 @@ const useResizeObserver = (ref, handler) => {
|
|
|
8517
8516
|
}, [handler, ref]);
|
|
8518
8517
|
};
|
|
8519
8518
|
const useNavToCheck = () => {
|
|
8520
|
-
const [, setLocation] =
|
|
8519
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
8521
8520
|
return (0, react.useCallback)((check) => {
|
|
8522
8521
|
if (check.check_id) setLocation(`/checks/?id=${check.check_id}`);
|
|
8523
8522
|
}, [setLocation]);
|
|
@@ -8527,7 +8526,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8527
8526
|
const { apiClient } = require_state.useApiConfig();
|
|
8528
8527
|
const reactFlow = (0, _xyflow_react.useReactFlow)();
|
|
8529
8528
|
const refResize = (0, react.useRef)(null);
|
|
8530
|
-
const { successToast, failToast } =
|
|
8529
|
+
const { successToast, failToast } = require_RecceCheckContext.useClipBoardToast();
|
|
8531
8530
|
const { copyToClipboard, ImageDownloadModal, ref: refReactFlow } = useCopyToClipboard$1({
|
|
8532
8531
|
renderLibrary: "html-to-image",
|
|
8533
8532
|
imageType: "png",
|
|
@@ -8551,13 +8550,13 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8551
8550
|
});
|
|
8552
8551
|
const [nodes, setNodes, onNodesChange] = (0, _xyflow_react.useNodesState)(initialNodes);
|
|
8553
8552
|
const [edges, setEdges, onEdgesChange] = (0, _xyflow_react.useEdgesState)([]);
|
|
8554
|
-
const { lineageGraph, retchLineageGraph, isLoading, error, refetchRunsAggregated } =
|
|
8555
|
-
const { featureToggles, singleEnv } =
|
|
8556
|
-
const { runId, showRunId, closeRunResult, runAction, isRunResultOpen } =
|
|
8553
|
+
const { lineageGraph, retchLineageGraph, isLoading, error, refetchRunsAggregated } = require_RecceCheckContext.useLineageGraphContext();
|
|
8554
|
+
const { featureToggles, singleEnv } = require_RecceCheckContext.useRecceInstanceContext();
|
|
8555
|
+
const { runId, showRunId, closeRunResult, runAction, isRunResultOpen } = require_RecceCheckContext.useRecceActionContext();
|
|
8557
8556
|
const { run } = useRun(runId);
|
|
8558
8557
|
const [viewOptions, setViewOptions] = (0, react.useState)({ ...props.viewOptions });
|
|
8559
8558
|
const trackLineageRender = (0, react.useCallback)((nodes$1, currentViewMode, impactRadiusEnabled, cllColumnActive, rightSidebarOpen) => {
|
|
8560
|
-
const lineageGraphNodesOnly = nodes$1.filter(
|
|
8559
|
+
const lineageGraphNodesOnly = nodes$1.filter(require_RecceCheckContext.isLineageGraphNode);
|
|
8561
8560
|
const grouped = Object.groupBy(lineageGraphNodesOnly, (node) => node.data.changeStatus ?? "unchanged");
|
|
8562
8561
|
const statusCounts = Object.fromEntries(Object.entries(grouped).map(([status, nodes$2]) => [`nodes_${status}`, nodes$2?.length ?? 0]));
|
|
8563
8562
|
const trackingData = {
|
|
@@ -8572,10 +8571,10 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8572
8571
|
}, []);
|
|
8573
8572
|
const cllHistory = (0, react.useRef)([]).current;
|
|
8574
8573
|
const [cll, setCll] = (0, react.useState)(void 0);
|
|
8575
|
-
const actionGetCll = (0, _tanstack_react_query.useMutation)({ mutationFn: (input) =>
|
|
8574
|
+
const actionGetCll = (0, _tanstack_react_query.useMutation)({ mutationFn: (input) => require_version.getCll(input, apiClient) });
|
|
8576
8575
|
const [nodeColumnSetMap, setNodeColumSetMap] = (0, react.useState)({});
|
|
8577
8576
|
const findNodeByName = (0, react.useCallback)((name) => {
|
|
8578
|
-
return nodes.filter(
|
|
8577
|
+
return nodes.filter(require_RecceCheckContext.isLineageGraphNode).find((n) => n.data.name === name);
|
|
8579
8578
|
}, [nodes]);
|
|
8580
8579
|
(0, react.useImperativeHandle)(ref, () => ({ copyToClipboard }));
|
|
8581
8580
|
const isModelsChanged = (0, react.useMemo)(() => {
|
|
@@ -8640,8 +8639,8 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8640
8639
|
} else if (selectMode === "action_result") {
|
|
8641
8640
|
const nodeIds = Object.keys(multiNodeAction.actionState.actions);
|
|
8642
8641
|
highlightedModels = new Set(nodeIds);
|
|
8643
|
-
} else if (focusedNode) highlightedModels =
|
|
8644
|
-
else if (isModelsChanged) highlightedModels =
|
|
8642
|
+
} else if (focusedNode) highlightedModels = require_RecceCheckContext.union(require_RecceCheckContext.selectUpstream(lineageGraph, [focusedNode.id]), require_RecceCheckContext.selectDownstream(lineageGraph, [focusedNode.id]));
|
|
8643
|
+
else if (isModelsChanged) highlightedModels = require_RecceCheckContext.selectDownstream(lineageGraph, lineageGraph.modifiedSet);
|
|
8645
8644
|
else highlightedModels = new Set(filteredNodeIds);
|
|
8646
8645
|
return new Set(highlightedModels);
|
|
8647
8646
|
}, [
|
|
@@ -8693,7 +8692,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8693
8692
|
} catch (e) {
|
|
8694
8693
|
if (e instanceof axios.AxiosError) {
|
|
8695
8694
|
const e2 = e;
|
|
8696
|
-
|
|
8695
|
+
require_RecceCheckContext.toaster.create({
|
|
8697
8696
|
title: "Column Level Lineage error",
|
|
8698
8697
|
description: e2.response?.data.detail ?? e.message,
|
|
8699
8698
|
type: "error",
|
|
@@ -8702,11 +8701,11 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8702
8701
|
return;
|
|
8703
8702
|
}
|
|
8704
8703
|
}
|
|
8705
|
-
const [nodes$1, edges$1, nodeColumnSetMap$1] =
|
|
8704
|
+
const [nodes$1, edges$1, nodeColumnSetMap$1] = require_RecceCheckContext.toReactFlow(lineageGraph, {
|
|
8706
8705
|
selectedNodes: filteredNodeIds$1,
|
|
8707
8706
|
cll: cll$1
|
|
8708
8707
|
});
|
|
8709
|
-
|
|
8708
|
+
require_RecceCheckContext.layout(nodes$1, edges$1);
|
|
8710
8709
|
setNodes(nodes$1);
|
|
8711
8710
|
setEdges(edges$1);
|
|
8712
8711
|
setNodeColumSetMap(nodeColumnSetMap$1);
|
|
@@ -8774,7 +8773,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8774
8773
|
const onNodeClick = (event, node) => {
|
|
8775
8774
|
if (!interactive) return;
|
|
8776
8775
|
if (!lineageGraph) return;
|
|
8777
|
-
if (
|
|
8776
|
+
if (require_RecceCheckContext.isLineageGraphColumnNode(node)) {
|
|
8778
8777
|
onColumnNodeClick(event, node);
|
|
8779
8778
|
return;
|
|
8780
8779
|
}
|
|
@@ -8813,7 +8812,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8813
8812
|
} catch (e) {
|
|
8814
8813
|
if (e instanceof axios.AxiosError) {
|
|
8815
8814
|
const e2 = e;
|
|
8816
|
-
|
|
8815
|
+
require_RecceCheckContext.toaster.create({
|
|
8817
8816
|
title: "Select node error",
|
|
8818
8817
|
description: e2.response?.data.detail ?? e.message,
|
|
8819
8818
|
type: "error",
|
|
@@ -8830,7 +8829,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8830
8829
|
} catch (e) {
|
|
8831
8830
|
if (e instanceof axios.AxiosError) {
|
|
8832
8831
|
const e2 = e;
|
|
8833
|
-
|
|
8832
|
+
require_RecceCheckContext.toaster.create({
|
|
8834
8833
|
title: "Column Level Lineage error",
|
|
8835
8834
|
description: e2.response?.data.detail ?? e.message,
|
|
8836
8835
|
type: "error",
|
|
@@ -8839,7 +8838,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8839
8838
|
return;
|
|
8840
8839
|
}
|
|
8841
8840
|
}
|
|
8842
|
-
const [newNodes, newEdges, newNodeColumnSetMap] =
|
|
8841
|
+
const [newNodes, newEdges, newNodeColumnSetMap] = require_RecceCheckContext.toReactFlow(lineageGraph, {
|
|
8843
8842
|
selectedNodes: selectedNodes$1,
|
|
8844
8843
|
cll: cll$1
|
|
8845
8844
|
});
|
|
@@ -8890,7 +8889,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8890
8889
|
...viewOptions,
|
|
8891
8890
|
view_mode: "all"
|
|
8892
8891
|
});
|
|
8893
|
-
else if (
|
|
8892
|
+
else if (require_RecceCheckContext.isLineageGraphNode(node) && focusedNode !== node.data.data) onNodeClick(mockEvent, node);
|
|
8894
8893
|
} else onNodeViewClosed();
|
|
8895
8894
|
}
|
|
8896
8895
|
}, [
|
|
@@ -8912,7 +8911,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8912
8911
|
column_level_lineage: void 0
|
|
8913
8912
|
});
|
|
8914
8913
|
}
|
|
8915
|
-
setSelectedNodeIds(
|
|
8914
|
+
setSelectedNodeIds(require_RecceCheckContext.union(selectedNodeIds, require_RecceCheckContext.selectUpstream(lineageGraph, [nodeId], degree)));
|
|
8916
8915
|
};
|
|
8917
8916
|
const selectChildNodes = (nodeId, degree = 1e3) => {
|
|
8918
8917
|
if (selectMode === "action_result" || lineageGraph === void 0) return;
|
|
@@ -8924,7 +8923,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8924
8923
|
column_level_lineage: void 0
|
|
8925
8924
|
});
|
|
8926
8925
|
}
|
|
8927
|
-
setSelectedNodeIds(
|
|
8926
|
+
setSelectedNodeIds(require_RecceCheckContext.union(selectedNodeIds, require_RecceCheckContext.selectDownstream(lineageGraph, [nodeId], degree)));
|
|
8928
8927
|
};
|
|
8929
8928
|
const onNodeContextMenu = (event, node) => {
|
|
8930
8929
|
if (!interactive) return;
|
|
@@ -9086,7 +9085,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
9086
9085
|
selected: "multi"
|
|
9087
9086
|
});
|
|
9088
9087
|
} else if (!focusedNode) {
|
|
9089
|
-
check = await
|
|
9088
|
+
check = await require_version.createLineageDiffCheck(viewOptions, apiClient);
|
|
9090
9089
|
require_state.trackMultiNodesAction({
|
|
9091
9090
|
type: "lineage_diff",
|
|
9092
9091
|
selected: "none"
|
|
@@ -9194,7 +9193,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
9194
9193
|
})]
|
|
9195
9194
|
})
|
|
9196
9195
|
});
|
|
9197
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
9196
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_RecceCheckContext.LineageViewContext.Provider, {
|
|
9198
9197
|
value: contextValue,
|
|
9199
9198
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HSplit, {
|
|
9200
9199
|
sizes: focusedNode ? [70, 30] : [100, 0],
|
|
@@ -9342,7 +9341,7 @@ function LineagePage() {
|
|
|
9342
9341
|
//#endregion
|
|
9343
9342
|
//#region recce-source/js/src/components/query/SetupConnectionGuide.tsx
|
|
9344
9343
|
function SetupConnectionGuide() {
|
|
9345
|
-
const { data: instanceInfo } =
|
|
9344
|
+
const { data: instanceInfo } = require_RecceCheckContext.useRecceInstanceInfo();
|
|
9346
9345
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9347
9346
|
className: "flex flex-1 h-full min-h-0 m-2 p-4 bg-blue-50 rounded-lg shadow-md justify-center",
|
|
9348
9347
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -9447,19 +9446,19 @@ const QueryModeToggle = () => {
|
|
|
9447
9446
|
};
|
|
9448
9447
|
const QueryPage = () => {
|
|
9449
9448
|
const { sqlQuery: _sqlQuery, baseSqlQuery, setSqlQuery, setBaseSqlQuery, primaryKeys, setPrimaryKeys, isCustomQueries } = require_RecceCheckContext.useRecceQueryContext();
|
|
9450
|
-
const { lineageGraph, envInfo } =
|
|
9451
|
-
const { featureToggles, singleEnv } =
|
|
9449
|
+
const { lineageGraph, envInfo } = require_RecceCheckContext.useLineageGraphContext();
|
|
9450
|
+
const { featureToggles, singleEnv } = require_RecceCheckContext.useRecceInstanceContext();
|
|
9452
9451
|
let sqlQuery = _sqlQuery;
|
|
9453
9452
|
if (envInfo?.adapterType === "sqlmesh" && _sqlQuery === require_RecceCheckContext.defaultSqlQuery) sqlQuery = `select * from db.mymodel`;
|
|
9454
9453
|
if (featureToggles.mode === "read only") sqlQuery = `--- Would like to do query here? Book a demo with us at ${require_urls.RECCE_SUPPORT_CALENDAR_URL}\n${sqlQuery}`;
|
|
9455
|
-
const { showRunId } =
|
|
9454
|
+
const { showRunId } = require_RecceCheckContext.useRecceActionContext();
|
|
9456
9455
|
const { apiClient } = require_state.useApiConfig();
|
|
9457
9456
|
const queryFn = async (type) => {
|
|
9458
9457
|
function queryFactory(type$1) {
|
|
9459
9458
|
switch (type$1) {
|
|
9460
|
-
case "query": return
|
|
9461
|
-
case "query_base": return
|
|
9462
|
-
case "query_diff": return
|
|
9459
|
+
case "query": return require_version.submitQuery;
|
|
9460
|
+
case "query_base": return require_version.submitQueryBase;
|
|
9461
|
+
case "query_diff": return require_version.submitQueryDiff;
|
|
9463
9462
|
default: throw new Error(`Unknown query type: ${type$1}`);
|
|
9464
9463
|
}
|
|
9465
9464
|
}
|
|
@@ -9626,12 +9625,12 @@ const isDisabledByNoResult = (type, run) => {
|
|
|
9626
9625
|
//#region recce-source/js/src/components/check/CheckList.tsx
|
|
9627
9626
|
const ChecklistItem = ({ check, selected, onSelect, onMarkAsApproved }) => {
|
|
9628
9627
|
const isDark = (0, _mui_material_styles.useTheme)().palette.mode === "dark";
|
|
9629
|
-
const { featureToggles } =
|
|
9628
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
9630
9629
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
9631
9630
|
const { apiClient } = require_state.useApiConfig();
|
|
9632
9631
|
const checkId = check.check_id;
|
|
9633
9632
|
const { mutate } = (0, _tanstack_react_query.useMutation)({
|
|
9634
|
-
mutationFn: (check$1) =>
|
|
9633
|
+
mutationFn: (check$1) => require_version.updateCheck(checkId, check$1, apiClient),
|
|
9635
9634
|
onSuccess: async () => {
|
|
9636
9635
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.check(checkId) });
|
|
9637
9636
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
@@ -9639,7 +9638,7 @@ const ChecklistItem = ({ check, selected, onSelect, onMarkAsApproved }) => {
|
|
|
9639
9638
|
});
|
|
9640
9639
|
const trackedRunId = check.last_run?.run_id;
|
|
9641
9640
|
const { run } = useRun(trackedRunId);
|
|
9642
|
-
const icon =
|
|
9641
|
+
const icon = require_RecceCheckContext.findByRunType(check.type).icon;
|
|
9643
9642
|
const isMarkAsApprovedDisabled = isDisabledByNoResult(check.type, run) || featureToggles.disableUpdateChecklist;
|
|
9644
9643
|
const isNoResult = isDisabledByNoResult(check.type, run);
|
|
9645
9644
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, {
|
|
@@ -9705,7 +9704,7 @@ const CheckList = ({ checks, selectedItem, onCheckSelected, onChecksReordered })
|
|
|
9705
9704
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
9706
9705
|
const { apiClient } = require_state.useApiConfig();
|
|
9707
9706
|
const { mutate: markCheckedByID } = (0, _tanstack_react_query.useMutation)({
|
|
9708
|
-
mutationFn: (checkId) =>
|
|
9707
|
+
mutationFn: (checkId) => require_version.updateCheck(checkId, { is_checked: true }, apiClient),
|
|
9709
9708
|
onSuccess: async (_$1, checkId) => {
|
|
9710
9709
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.check(checkId) });
|
|
9711
9710
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
@@ -9850,15 +9849,6 @@ const CheckList = ({ checks, selectedItem, onCheckSelected, onChecksReordered })
|
|
|
9850
9849
|
//#endregion
|
|
9851
9850
|
//#region recce-source/js/src/lib/api/checkEvents.ts
|
|
9852
9851
|
/**
|
|
9853
|
-
* Check Events API - Types and Client Functions
|
|
9854
|
-
*
|
|
9855
|
-
* Provides timeline/conversation functionality for Checks, enabling
|
|
9856
|
-
* GitHub PR-style discussions with comments and automatic tracking
|
|
9857
|
-
* of state changes.
|
|
9858
|
-
*
|
|
9859
|
-
* NOTE: This feature is only available when connected to Recce Cloud.
|
|
9860
|
-
*/
|
|
9861
|
-
/**
|
|
9862
9852
|
* List all events for a check in chronological order.
|
|
9863
9853
|
*
|
|
9864
9854
|
* @param checkId - The check ID
|
|
@@ -10987,7 +10977,7 @@ function CheckBreadcrumb({ name, setName }) {
|
|
|
10987
10977
|
//#endregion
|
|
10988
10978
|
//#region recce-source/js/src/components/check/CheckDescription.tsx
|
|
10989
10979
|
function CheckDescription({ value, onChange }) {
|
|
10990
|
-
const { featureToggles } =
|
|
10980
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
10991
10981
|
const [editing, setEditing] = (0, react.useState)(false);
|
|
10992
10982
|
const [tempValue, setTempValue] = (0, react.useState)();
|
|
10993
10983
|
const textareaRef = (0, react.useRef)(null);
|
|
@@ -11152,7 +11142,7 @@ const NodelistItem = ({ node, selected, onSelect, schemaChanged, isDark }) => {
|
|
|
11152
11142
|
let statusIcon;
|
|
11153
11143
|
let statusColor;
|
|
11154
11144
|
if (schemaChanged) {
|
|
11155
|
-
statusIcon =
|
|
11145
|
+
statusIcon = require_RecceCheckContext.findByRunType("schema_diff").icon;
|
|
11156
11146
|
statusColor = getIconForChangeStatus$1("modified").color;
|
|
11157
11147
|
} else if (!base && current) {
|
|
11158
11148
|
statusIcon = getIconForChangeStatus$1("added").icon;
|
|
@@ -11200,7 +11190,7 @@ const NodelistItem = ({ node, selected, onSelect, schemaChanged, isDark }) => {
|
|
|
11200
11190
|
function PrivateSchemaDiffView({ check }, ref) {
|
|
11201
11191
|
const isDark = (0, _mui_material_styles.useTheme)().palette.mode === "dark";
|
|
11202
11192
|
const { apiClient } = require_state.useApiConfig();
|
|
11203
|
-
const { lineageGraph } =
|
|
11193
|
+
const { lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
11204
11194
|
const params = check.params;
|
|
11205
11195
|
const { isLoading, error, data } = (0, _tanstack_react_query.useQuery)({
|
|
11206
11196
|
queryKey: [...require_state.cacheKeys.check(check.check_id), "select"],
|
|
@@ -11322,12 +11312,12 @@ function CheckDetail({ checkId, refreshCheckList }) {
|
|
|
11322
11312
|
const theme = (0, _mui_material_styles.useTheme)();
|
|
11323
11313
|
const isDark = theme.palette.mode === "dark";
|
|
11324
11314
|
const { apiClient } = require_state.useApiConfig();
|
|
11325
|
-
const { featureToggles, sessionId } =
|
|
11315
|
+
const { featureToggles, sessionId } = require_RecceCheckContext.useRecceInstanceContext();
|
|
11326
11316
|
const { setLatestSelectedCheckId } = require_RecceCheckContext.useRecceCheckContext();
|
|
11327
|
-
const { cloudMode } =
|
|
11317
|
+
const { cloudMode } = require_RecceCheckContext.useLineageGraphContext();
|
|
11328
11318
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
11329
|
-
const [, setLocation] =
|
|
11330
|
-
const { successToast, failToast } =
|
|
11319
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
11320
|
+
const { successToast, failToast } = require_RecceCheckContext.useClipBoardToast();
|
|
11331
11321
|
const { markedAsApprovedToast } = require_RecceCheckContext.useCheckToast();
|
|
11332
11322
|
const [submittedRunId, setSubmittedRunId] = (0, react.useState)();
|
|
11333
11323
|
const [progress] = (0, react.useState)();
|
|
@@ -11337,26 +11327,26 @@ function CheckDetail({ checkId, refreshCheckList }) {
|
|
|
11337
11327
|
const menuOpen = Boolean(menuAnchorEl);
|
|
11338
11328
|
const { isLoading, error, data: check } = (0, _tanstack_react_query.useQuery)({
|
|
11339
11329
|
queryKey: require_state.cacheKeys.check(checkId),
|
|
11340
|
-
queryFn: async () =>
|
|
11330
|
+
queryFn: async () => require_version.getCheck(checkId, apiClient),
|
|
11341
11331
|
refetchOnMount: true
|
|
11342
11332
|
});
|
|
11343
11333
|
const trackedRunId = submittedRunId ?? check?.last_run?.run_id;
|
|
11344
11334
|
const { run, error: rerunError } = useRun(trackedRunId);
|
|
11345
11335
|
const isRunning = submittedRunId ? !run || run.status === "running" : run?.status === "running";
|
|
11346
|
-
const runTypeEntry = check?.type ?
|
|
11336
|
+
const runTypeEntry = check?.type ? require_RecceCheckContext.findByRunType(check.type) : void 0;
|
|
11347
11337
|
let RunResultView;
|
|
11348
11338
|
if (runTypeEntry) RunResultView = runTypeEntry.RunResultView;
|
|
11349
11339
|
const isPresetCheck = check?.is_preset ?? false;
|
|
11350
11340
|
const lineageViewRef = (0, react.useRef)(null);
|
|
11351
11341
|
const { mutate } = (0, _tanstack_react_query.useMutation)({
|
|
11352
|
-
mutationFn: (check$1) =>
|
|
11342
|
+
mutationFn: (check$1) => require_version.updateCheck(checkId, check$1, apiClient),
|
|
11353
11343
|
onSuccess: async () => {
|
|
11354
11344
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.check(checkId) });
|
|
11355
11345
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
11356
11346
|
}
|
|
11357
11347
|
});
|
|
11358
11348
|
const { mutate: handleDelete } = (0, _tanstack_react_query.useMutation)({
|
|
11359
|
-
mutationFn: () =>
|
|
11349
|
+
mutationFn: () => require_version.deleteCheck(checkId, apiClient),
|
|
11360
11350
|
onSuccess: async () => {
|
|
11361
11351
|
setLatestSelectedCheckId("");
|
|
11362
11352
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
@@ -11366,7 +11356,7 @@ function CheckDetail({ checkId, refreshCheckList }) {
|
|
|
11366
11356
|
const { mutate: handleMarkAsPresetCheck, isPending: isMarkingAsPreset } = (0, _tanstack_react_query.useMutation)({
|
|
11367
11357
|
mutationFn: async () => {
|
|
11368
11358
|
if (!check) throw new Error("Check not found");
|
|
11369
|
-
return await
|
|
11359
|
+
return await require_version.markAsPresetCheck(checkId, apiClient);
|
|
11370
11360
|
},
|
|
11371
11361
|
onSuccess: async () => {
|
|
11372
11362
|
successToast("Check marked as preset successfully");
|
|
@@ -11896,7 +11886,7 @@ function buildBody(check) {
|
|
|
11896
11886
|
//#region recce-source/js/src/components/check/CheckEmptyState.tsx
|
|
11897
11887
|
const CheckEmptyState = () => {
|
|
11898
11888
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
11899
|
-
const [, setLocation] =
|
|
11889
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
11900
11890
|
const { apiClient } = require_state.useApiConfig();
|
|
11901
11891
|
const { mutate: createSchemaCheck, isPending } = (0, _tanstack_react_query.useMutation)({
|
|
11902
11892
|
mutationFn: () => require_version.createSchemaDiffCheck({ select: "state:modified" }, apiClient),
|
|
@@ -11988,7 +11978,7 @@ const RunPage = ({ runId }) => {
|
|
|
11988
11978
|
queryFn: async () => require_state.waitRun(runId, void 0, apiClient)
|
|
11989
11979
|
});
|
|
11990
11980
|
let RunResultView;
|
|
11991
|
-
if (run &&
|
|
11981
|
+
if (run && require_RecceCheckContext.runTypeHasRef(run.type)) RunResultView = require_RecceCheckContext.findByRunType(run.type).RunResultView;
|
|
11992
11982
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RunView, {
|
|
11993
11983
|
error,
|
|
11994
11984
|
run,
|
|
@@ -11999,7 +11989,7 @@ const RunPage = ({ runId }) => {
|
|
|
11999
11989
|
//#endregion
|
|
12000
11990
|
//#region recce-source/js/src/components/run/RunList.tsx
|
|
12001
11991
|
const RunListItem = ({ run, isSelected, onSelectRun, onAddToChecklist, onGoToCheck }) => {
|
|
12002
|
-
const { featureToggles } =
|
|
11992
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
12003
11993
|
const { apiClient } = require_state.useApiConfig();
|
|
12004
11994
|
const { data: fetchedRun } = (0, _tanstack_react_query.useQuery)({
|
|
12005
11995
|
queryKey: require_state.cacheKeys.run(run.run_id),
|
|
@@ -12009,7 +11999,7 @@ const RunListItem = ({ run, isSelected, onSelectRun, onAddToChecklist, onGoToChe
|
|
|
12009
11999
|
enabled: run.status === "running",
|
|
12010
12000
|
retry: false
|
|
12011
12001
|
});
|
|
12012
|
-
const IconComponent =
|
|
12002
|
+
const IconComponent = require_RecceCheckContext.findByRunType(run.type).icon;
|
|
12013
12003
|
const checkId = run.check_id;
|
|
12014
12004
|
const hideAddToChecklist = featureToggles.disableUpdateChecklist;
|
|
12015
12005
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, {
|
|
@@ -12107,7 +12097,7 @@ const DateSegmentItem = ({ runAt }) => {
|
|
|
12107
12097
|
});
|
|
12108
12098
|
};
|
|
12109
12099
|
const RunList = () => {
|
|
12110
|
-
const { closeHistory } =
|
|
12100
|
+
const { closeHistory } = require_RecceCheckContext.useRecceActionContext();
|
|
12111
12101
|
const { apiClient } = require_state.useApiConfig();
|
|
12112
12102
|
const { data: runs, isLoading } = (0, _tanstack_react_query.useQuery)({
|
|
12113
12103
|
queryKey: require_state.cacheKeys.runs(),
|
|
@@ -12174,10 +12164,10 @@ const RunList = () => {
|
|
|
12174
12164
|
});
|
|
12175
12165
|
};
|
|
12176
12166
|
function DateDividedRunHistoryItem({ run, previousDate }) {
|
|
12177
|
-
const [, setLocation] =
|
|
12167
|
+
const [, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
12178
12168
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
12179
12169
|
const { apiClient } = require_state.useApiConfig();
|
|
12180
|
-
const { showRunId, runId } =
|
|
12170
|
+
const { showRunId, runId } = require_RecceCheckContext.useRecceActionContext();
|
|
12181
12171
|
const currentDate = new Date(run.run_at).toDateString();
|
|
12182
12172
|
const shouldRenderDateSegment = previousDate != null && previousDate !== currentDate;
|
|
12183
12173
|
const handleSelectRun = (runId$1) => {
|
|
@@ -12185,7 +12175,7 @@ function DateDividedRunHistoryItem({ run, previousDate }) {
|
|
|
12185
12175
|
showRunId(runId$1, false);
|
|
12186
12176
|
};
|
|
12187
12177
|
const handleAddToChecklist = (0, react.useCallback)(async (clickedRunId) => {
|
|
12188
|
-
const check = await
|
|
12178
|
+
const check = await require_version.createCheckByRun(clickedRunId, void 0, apiClient);
|
|
12189
12179
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
12190
12180
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
12191
12181
|
}, [
|
|
@@ -12476,7 +12466,7 @@ function listChangedNodes(lineageGraph) {
|
|
|
12476
12466
|
const allNodes = lineageGraph.nodes;
|
|
12477
12467
|
lineageGraph.modifiedSet.forEach((nodeId) => {
|
|
12478
12468
|
const node = allNodes[nodeId];
|
|
12479
|
-
const columnDiffStatus =
|
|
12469
|
+
const columnDiffStatus = require_RecceCheckContext.mergeKeysWithStatus(Object.keys(node.data.data.base?.columns ?? {}), Object.keys(node.data.data.current?.columns ?? {}));
|
|
12480
12470
|
if (!Object.values(columnDiffStatus).every((el) => el === void 0) && node.data.data.base && node.data.data.current) changedNodes.push(node);
|
|
12481
12471
|
});
|
|
12482
12472
|
return changedNodes;
|
|
@@ -12532,7 +12522,7 @@ function SchemaSummary({ lineageGraph }) {
|
|
|
12532
12522
|
//#endregion
|
|
12533
12523
|
//#region recce-source/js/src/components/summary/SummaryView.tsx
|
|
12534
12524
|
function SummaryView() {
|
|
12535
|
-
const { lineageGraph } =
|
|
12525
|
+
const { lineageGraph } = require_RecceCheckContext.useLineageGraphContext();
|
|
12536
12526
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Stack.default, {
|
|
12537
12527
|
sx: {
|
|
12538
12528
|
width: "100%",
|
|
@@ -12688,7 +12678,7 @@ const WARNING_THRESHOLD_SECONDS = 60;
|
|
|
12688
12678
|
* Styled as a warning indicator to draw user attention
|
|
12689
12679
|
*/
|
|
12690
12680
|
function IdleTimeoutBadge() {
|
|
12691
|
-
const { remainingSeconds, isEnabled } =
|
|
12681
|
+
const { remainingSeconds, isEnabled } = require_RecceCheckContext.useIdleTimeout();
|
|
12692
12682
|
if (!isEnabled || remainingSeconds === null) return null;
|
|
12693
12683
|
if (remainingSeconds > WARNING_THRESHOLD_SECONDS) return null;
|
|
12694
12684
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Badge.default, {
|
|
@@ -12707,7 +12697,7 @@ function IdleTimeoutBadge() {
|
|
|
12707
12697
|
sx: { display: "inline-flex" }
|
|
12708
12698
|
}),
|
|
12709
12699
|
"Idle timeout: ",
|
|
12710
|
-
|
|
12700
|
+
require_RecceCheckContext.formatDuration(remainingSeconds, "compact")
|
|
12711
12701
|
]
|
|
12712
12702
|
});
|
|
12713
12703
|
}
|
|
@@ -12773,7 +12763,7 @@ function RecceVersionBadge() {
|
|
|
12773
12763
|
const storageKey = "recce-update-toast-shown";
|
|
12774
12764
|
if (sessionStorage.getItem(storageKey)) return;
|
|
12775
12765
|
setTimeout(() => {
|
|
12776
|
-
|
|
12766
|
+
require_RecceCheckContext.toaster.create({
|
|
12777
12767
|
id: "recce-update-available",
|
|
12778
12768
|
title: "Update available",
|
|
12779
12769
|
description: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
@@ -12869,8 +12859,8 @@ function LinkIcon({ icon: IconComponent, href, sx, ...props }) {
|
|
|
12869
12859
|
});
|
|
12870
12860
|
}
|
|
12871
12861
|
function TopBar() {
|
|
12872
|
-
const { reviewMode, isDemoSite, envInfo, cloudMode } =
|
|
12873
|
-
const { featureToggles, authed } =
|
|
12862
|
+
const { reviewMode, isDemoSite, envInfo, cloudMode } = require_RecceCheckContext.useLineageGraphContext();
|
|
12863
|
+
const { featureToggles, authed } = require_RecceCheckContext.useRecceInstanceContext();
|
|
12874
12864
|
const { url: prURL, id: prID } = envInfo?.pullRequest ?? {};
|
|
12875
12865
|
const demoPrId = prURL ? prURL.split("/").pop() : null;
|
|
12876
12866
|
const brandLink = cloudMode || authed ? "https://cloud.datarecce.io/" : "https://reccehq.com/";
|
|
@@ -13063,7 +13053,7 @@ function TopBar() {
|
|
|
13063
13053
|
//#region recce-source/js/src/components/app/Filename.tsx
|
|
13064
13054
|
const useRecceToast = () => {
|
|
13065
13055
|
const toastSuccess = (message) => {
|
|
13066
|
-
|
|
13056
|
+
require_RecceCheckContext.toaster.create({
|
|
13067
13057
|
description: message,
|
|
13068
13058
|
type: "success",
|
|
13069
13059
|
duration: 5e3,
|
|
@@ -13074,7 +13064,7 @@ const useRecceToast = () => {
|
|
|
13074
13064
|
let errorMessage = message;
|
|
13075
13065
|
if (error != null) if (error instanceof axios.AxiosError) errorMessage = `${message}. ${String(error.response?.data?.detail)}`;
|
|
13076
13066
|
else errorMessage = `${message}. ${error}`;
|
|
13077
|
-
|
|
13067
|
+
require_RecceCheckContext.toaster.create({
|
|
13078
13068
|
description: errorMessage,
|
|
13079
13069
|
type: "error",
|
|
13080
13070
|
duration: 5e3,
|
|
@@ -13098,13 +13088,13 @@ const useClosePrompt = (prompt) => {
|
|
|
13098
13088
|
}, [prompt]);
|
|
13099
13089
|
};
|
|
13100
13090
|
const Filename = () => {
|
|
13101
|
-
const { featureToggles } =
|
|
13102
|
-
const { fileName, cloudMode, isDemoSite, envInfo } =
|
|
13091
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
13092
|
+
const { fileName, cloudMode, isDemoSite, envInfo } = require_RecceCheckContext.useLineageGraphContext();
|
|
13103
13093
|
const { apiClient } = require_state.useApiConfig();
|
|
13104
13094
|
const [modalOpen, setModalOpen] = (0, react.useState)(false);
|
|
13105
13095
|
const [overwriteOpen, setOverwriteOpen] = (0, react.useState)(false);
|
|
13106
13096
|
const isStateless = !fileName && !cloudMode && !isDemoSite;
|
|
13107
|
-
const { data: checks } =
|
|
13097
|
+
const { data: checks } = require_version.useChecks(isStateless);
|
|
13108
13098
|
const hasNonPresetChecks = checks != void 0 && checks.filter((check) => !check.is_preset).length > 0;
|
|
13109
13099
|
useClosePrompt(isStateless && hasNonPresetChecks);
|
|
13110
13100
|
const [{ newFileName, errorMessage, modified, overwriteWithMethod, bypass }, setState] = (0, react.useState)({ newFileName: fileName ?? "recce_state.json" });
|
|
@@ -13185,7 +13175,7 @@ const Filename = () => {
|
|
|
13185
13175
|
"aria-label": fileName ? "Change Filename" : "Save",
|
|
13186
13176
|
size: "small",
|
|
13187
13177
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
13188
|
-
component: fileName ?
|
|
13178
|
+
component: fileName ? require_RecceCheckContext.IconEdit : require_RecceCheckContext.IconSave,
|
|
13189
13179
|
sx: {
|
|
13190
13180
|
fontSize: 16,
|
|
13191
13181
|
verticalAlign: "middle"
|
|
@@ -13354,7 +13344,7 @@ const Filename = () => {
|
|
|
13354
13344
|
//#endregion
|
|
13355
13345
|
//#region recce-source/js/src/components/app/StateExporter.tsx
|
|
13356
13346
|
function StateExporter() {
|
|
13357
|
-
const { featureToggles } =
|
|
13347
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
13358
13348
|
const { apiClient } = require_state.useApiConfig();
|
|
13359
13349
|
const handleExport = async () => {
|
|
13360
13350
|
try {
|
|
@@ -13363,7 +13353,7 @@ function StateExporter() {
|
|
|
13363
13353
|
(0, file_saver.default)(new Blob([jsonString], { type: "application/json" }), `recce-state-${(0, date_fns.format)(/* @__PURE__ */ new Date(), "yyyy-MM-dd-HH-mm-ss")}.json`);
|
|
13364
13354
|
} catch (error) {
|
|
13365
13355
|
console.error("Export failed", error);
|
|
13366
|
-
|
|
13356
|
+
require_RecceCheckContext.toaster.create({
|
|
13367
13357
|
title: "Export failed",
|
|
13368
13358
|
description: String(error),
|
|
13369
13359
|
type: "error",
|
|
@@ -13383,7 +13373,7 @@ function StateExporter() {
|
|
|
13383
13373
|
},
|
|
13384
13374
|
disabled: featureToggles.disableExportStateFile,
|
|
13385
13375
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
13386
|
-
component:
|
|
13376
|
+
component: require_RecceCheckContext.IconExport,
|
|
13387
13377
|
sx: {
|
|
13388
13378
|
verticalAlign: "middle",
|
|
13389
13379
|
width: "16px",
|
|
@@ -13402,9 +13392,9 @@ const LOADING_MESSAGES = [
|
|
|
13402
13392
|
"Almost there, thanks for your patience..."
|
|
13403
13393
|
];
|
|
13404
13394
|
function TopLevelShare() {
|
|
13405
|
-
const { successToast, failToast } =
|
|
13395
|
+
const { successToast, failToast } = require_RecceCheckContext.useClipBoardToast();
|
|
13406
13396
|
const [, copyToClipboard] = (0, usehooks_ts.useCopyToClipboard)();
|
|
13407
|
-
const { authed } =
|
|
13397
|
+
const { authed } = require_RecceCheckContext.useRecceInstanceContext();
|
|
13408
13398
|
const { shareUrl, isLoading, error, handleShareClick } = require_RecceCheckContext.useRecceShareStateContext();
|
|
13409
13399
|
const [showModal, setShowModal] = (0, react.useState)(false);
|
|
13410
13400
|
const [messageIndex, setMessageIndex] = (0, react.useState)(0);
|
|
@@ -13526,10 +13516,10 @@ function StateSynchronizer() {
|
|
|
13526
13516
|
const [isSyncing, setSyncing] = (0, react.useState)(false);
|
|
13527
13517
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
13528
13518
|
const { apiClient } = require_state.useApiConfig();
|
|
13529
|
-
const [location, setLocation] =
|
|
13519
|
+
const [location, setLocation] = require_RecceCheckContext.useAppLocation();
|
|
13530
13520
|
const [open, setOpen] = (0, react.useState)(false);
|
|
13531
13521
|
const [syncOption, setSyncOption] = (0, react.useState)("");
|
|
13532
|
-
const { data: instanceInfo } =
|
|
13522
|
+
const { data: instanceInfo } = require_RecceCheckContext.useRecceInstanceInfo();
|
|
13533
13523
|
const handleClose = () => setOpen(false);
|
|
13534
13524
|
const handleSync = (0, react.useCallback)(async (input) => {
|
|
13535
13525
|
setOpen(false);
|
|
@@ -13540,7 +13530,7 @@ function StateSynchronizer() {
|
|
|
13540
13530
|
return;
|
|
13541
13531
|
}
|
|
13542
13532
|
while (await require_state.isStateSyncing(apiClient)) await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
13543
|
-
|
|
13533
|
+
require_RecceCheckContext.toaster.create({
|
|
13544
13534
|
description: "Sync Completed",
|
|
13545
13535
|
type: "success",
|
|
13546
13536
|
duration: 5e3,
|
|
@@ -13566,7 +13556,7 @@ function StateSynchronizer() {
|
|
|
13566
13556
|
"aria-label": "Sync state",
|
|
13567
13557
|
onClick: () => handleSync(instanceInfo?.session_id ? { method: "merge" } : {}),
|
|
13568
13558
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
13569
|
-
component:
|
|
13559
|
+
component: require_RecceCheckContext.IconSync,
|
|
13570
13560
|
sx: {
|
|
13571
13561
|
fontSize: 16,
|
|
13572
13562
|
verticalAlign: "middle"
|
|
@@ -13718,7 +13708,7 @@ function TabBadge({ queryKey, fetchCallback, selectCallback }) {
|
|
|
13718
13708
|
function ChecklistBadge() {
|
|
13719
13709
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TabBadge, {
|
|
13720
13710
|
queryKey: require_state.cacheKeys.checks(),
|
|
13721
|
-
fetchCallback:
|
|
13711
|
+
fetchCallback: require_version.listChecks,
|
|
13722
13712
|
selectCallback: (checks) => {
|
|
13723
13713
|
return checks.filter((check) => !check.is_checked).length;
|
|
13724
13714
|
}
|
|
@@ -13726,9 +13716,9 @@ function ChecklistBadge() {
|
|
|
13726
13716
|
}
|
|
13727
13717
|
function NavBar() {
|
|
13728
13718
|
const pathname = (0, next_navigation.usePathname)();
|
|
13729
|
-
const { isDemoSite, isLoading, cloudMode } =
|
|
13730
|
-
const { featureToggles } =
|
|
13731
|
-
const { data: flag, isLoading: isFlagLoading } =
|
|
13719
|
+
const { isDemoSite, isLoading, cloudMode } = require_RecceCheckContext.useLineageGraphContext();
|
|
13720
|
+
const { featureToggles } = require_RecceCheckContext.useRecceInstanceContext();
|
|
13721
|
+
const { data: flag, isLoading: isFlagLoading } = require_RecceCheckContext.useRecceServerFlag();
|
|
13732
13722
|
const prevPathnameRef = (0, react.useRef)(null);
|
|
13733
13723
|
(0, react.useEffect)(() => {
|
|
13734
13724
|
if (prevPathnameRef.current && prevPathnameRef.current !== pathname) require_state.trackNavigation({
|
|
@@ -14118,4 +14108,4 @@ Object.defineProperty(exports, 'mui_provider_default', {
|
|
|
14118
14108
|
return mui_provider_default;
|
|
14119
14109
|
}
|
|
14120
14110
|
});
|
|
14121
|
-
//# sourceMappingURL=components-
|
|
14111
|
+
//# sourceMappingURL=components-uVp0e4cH.js.map
|