Flowfile 0.3.0__py3-none-any.whl → 0.3.0.1__py3-none-any.whl
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.
Potentially problematic release.
This version of Flowfile might be problematic. Click here for more details.
- flowfile/__init__.py +13 -6
- flowfile/__main__.py +51 -15
- flowfile/api.py +379 -0
- flowfile/web/__init__.py +155 -0
- flowfile/web/static/assets/AirbyteReader-1ac35765.css +314 -0
- flowfile/web/static/assets/AirbyteReader-cb0c1d4a.js +921 -0
- flowfile/web/static/assets/CrossJoin-41efa4cb.css +100 -0
- flowfile/web/static/assets/CrossJoin-a514fa59.js +153 -0
- flowfile/web/static/assets/DatabaseConnectionSettings-0c04b2e5.css +77 -0
- flowfile/web/static/assets/DatabaseConnectionSettings-f2cecf33.js +151 -0
- flowfile/web/static/assets/DatabaseManager-30fa27e5.css +64 -0
- flowfile/web/static/assets/DatabaseManager-83ee3c98.js +484 -0
- flowfile/web/static/assets/DatabaseReader-dc0c6881.js +426 -0
- flowfile/web/static/assets/DatabaseReader-f50c6558.css +158 -0
- flowfile/web/static/assets/DatabaseWriter-2f570e53.css +96 -0
- flowfile/web/static/assets/DatabaseWriter-5afe9f8d.js +312 -0
- flowfile/web/static/assets/ExploreData-5bdae813.css +45 -0
- flowfile/web/static/assets/ExploreData-c7ee19cf.js +118306 -0
- flowfile/web/static/assets/ExternalSource-17b23a01.js +225 -0
- flowfile/web/static/assets/ExternalSource-e37b6275.css +94 -0
- flowfile/web/static/assets/Filter-90856b4f.js +238 -0
- flowfile/web/static/assets/Filter-a9d08ba1.css +20 -0
- flowfile/web/static/assets/Formula-38b71e9e.js +197 -0
- flowfile/web/static/assets/Formula-d60a74f4.css +17 -0
- flowfile/web/static/assets/FuzzyMatch-6857de82.css +254 -0
- flowfile/web/static/assets/FuzzyMatch-d0f1fe81.js +422 -0
- flowfile/web/static/assets/GoogleSheet-854294a4.js +2616 -0
- flowfile/web/static/assets/GoogleSheet-92084da7.css +233 -0
- flowfile/web/static/assets/GraphSolver-0c86bbc6.js +382 -0
- flowfile/web/static/assets/GraphSolver-17fd26db.css +68 -0
- flowfile/web/static/assets/GroupBy-ab1ea74b.css +51 -0
- flowfile/web/static/assets/GroupBy-f2772e9f.js +413 -0
- flowfile/web/static/assets/Join-41c0f331.css +109 -0
- flowfile/web/static/assets/Join-bc3e1cf7.js +247 -0
- flowfile/web/static/assets/ManualInput-03aa0245.js +391 -0
- flowfile/web/static/assets/ManualInput-ac7b9972.css +84 -0
- flowfile/web/static/assets/Output-48f81019.css +2642 -0
- flowfile/web/static/assets/Output-5b35eee8.js +536 -0
- flowfile/web/static/assets/Pivot-7164087c.js +408 -0
- flowfile/web/static/assets/Pivot-f415e85f.css +35 -0
- flowfile/web/static/assets/PolarsCode-3abf6507.js +2863 -0
- flowfile/web/static/assets/PolarsCode-650322d1.css +35 -0
- flowfile/web/static/assets/PopOver-b37ff9be.js +577 -0
- flowfile/web/static/assets/PopOver-bccfde04.css +32 -0
- flowfile/web/static/assets/Read-65966a3e.js +701 -0
- flowfile/web/static/assets/Read-80dc1675.css +197 -0
- flowfile/web/static/assets/RecordCount-c66c6d6d.js +121 -0
- flowfile/web/static/assets/RecordId-826dc095.js +339 -0
- flowfile/web/static/assets/Sample-4ed555c8.js +184 -0
- flowfile/web/static/assets/SecretManager-eac1e97d.js +382 -0
- flowfile/web/static/assets/Select-085f05cc.js +231 -0
- flowfile/web/static/assets/SettingsSection-1f5e79c1.js +87 -0
- flowfile/web/static/assets/SettingsSection-9c836ecc.css +47 -0
- flowfile/web/static/assets/Sort-3e6cb414.js +309 -0
- flowfile/web/static/assets/Sort-7ccfa0fe.css +51 -0
- flowfile/web/static/assets/TextToRows-606349bc.js +307 -0
- flowfile/web/static/assets/TextToRows-c92d1ec2.css +48 -0
- flowfile/web/static/assets/UnavailableFields-5edd5322.css +49 -0
- flowfile/web/static/assets/UnavailableFields-b41976ed.js +36 -0
- flowfile/web/static/assets/Union-8d9ac7f9.css +30 -0
- flowfile/web/static/assets/Union-fca91665.js +145 -0
- flowfile/web/static/assets/Unique-a59f830e.js +273 -0
- flowfile/web/static/assets/Unique-b5615727.css +51 -0
- flowfile/web/static/assets/Unpivot-246e9bbd.css +77 -0
- flowfile/web/static/assets/Unpivot-c3815565.js +441 -0
- flowfile/web/static/assets/airbyte-292aa232.png +0 -0
- flowfile/web/static/assets/api-22b338bd.js +60 -0
- flowfile/web/static/assets/cross_join-d30c0290.png +0 -0
- flowfile/web/static/assets/database_reader-ce1e55f3.svg +24 -0
- flowfile/web/static/assets/database_writer-b4ad0753.svg +23 -0
- flowfile/web/static/assets/designer-2394122a.css +10697 -0
- flowfile/web/static/assets/designer-e5bbe26f.js +69712 -0
- flowfile/web/static/assets/documentation-08045cf2.js +33 -0
- flowfile/web/static/assets/documentation-12216a74.css +50 -0
- flowfile/web/static/assets/dropDown-35135ba8.css +143 -0
- flowfile/web/static/assets/dropDown-5e7e9a5a.js +319 -0
- flowfile/web/static/assets/dropDownGeneric-50a91b99.js +72 -0
- flowfile/web/static/assets/dropDownGeneric-895680d6.css +10 -0
- flowfile/web/static/assets/element-icons-9c88a535.woff +0 -0
- flowfile/web/static/assets/element-icons-de5eb258.ttf +0 -0
- flowfile/web/static/assets/explore_data-8a0a2861.png +0 -0
- flowfile/web/static/assets/fa-brands-400-808443ae.ttf +0 -0
- flowfile/web/static/assets/fa-brands-400-d7236a19.woff2 +0 -0
- flowfile/web/static/assets/fa-regular-400-54cf6086.ttf +0 -0
- flowfile/web/static/assets/fa-regular-400-e3456d12.woff2 +0 -0
- flowfile/web/static/assets/fa-solid-900-aa759986.woff2 +0 -0
- flowfile/web/static/assets/fa-solid-900-d2f05935.ttf +0 -0
- flowfile/web/static/assets/fa-v4compatibility-0ce9033c.woff2 +0 -0
- flowfile/web/static/assets/fa-v4compatibility-30f6abf6.ttf +0 -0
- flowfile/web/static/assets/filter-d7708bda.png +0 -0
- flowfile/web/static/assets/formula-eeeb1611.png +0 -0
- flowfile/web/static/assets/fullEditor-178376bb.css +256 -0
- flowfile/web/static/assets/fullEditor-705c6ccb.js +630 -0
- flowfile/web/static/assets/fuzzy_match-40c161b2.png +0 -0
- flowfile/web/static/assets/genericNodeSettings-65587f20.js +137 -0
- flowfile/web/static/assets/genericNodeSettings-924759c7.css +46 -0
- flowfile/web/static/assets/graph_solver-8b7888b8.png +0 -0
- flowfile/web/static/assets/group_by-80561fc3.png +0 -0
- flowfile/web/static/assets/index-552863fd.js +58652 -0
- flowfile/web/static/assets/index-681a3ed0.css +8843 -0
- flowfile/web/static/assets/input_data-ab2eb678.png +0 -0
- flowfile/web/static/assets/join-349043ae.png +0 -0
- flowfile/web/static/assets/manual_input-ae98f31d.png +0 -0
- flowfile/web/static/assets/nodeTitle-cf9bae3c.js +227 -0
- flowfile/web/static/assets/nodeTitle-f4b12bcb.css +134 -0
- flowfile/web/static/assets/old_join-5d0eb604.png +0 -0
- flowfile/web/static/assets/output-06ec0371.png +0 -0
- flowfile/web/static/assets/pivot-9660df51.png +0 -0
- flowfile/web/static/assets/polars_code-05ce5dc6.png +0 -0
- flowfile/web/static/assets/record_count-dab44eb5.png +0 -0
- flowfile/web/static/assets/record_id-0b15856b.png +0 -0
- flowfile/web/static/assets/sample-693a88b5.png +0 -0
- flowfile/web/static/assets/secretApi-3ad510e1.js +46 -0
- flowfile/web/static/assets/select-b0d0437a.png +0 -0
- flowfile/web/static/assets/selectDynamic-b062bc9b.css +107 -0
- flowfile/web/static/assets/selectDynamic-bd644891.js +302 -0
- flowfile/web/static/assets/sort-2aa579f0.png +0 -0
- flowfile/web/static/assets/summarize-2a099231.png +0 -0
- flowfile/web/static/assets/text_to_rows-859b29ea.png +0 -0
- flowfile/web/static/assets/union-2d8609f4.png +0 -0
- flowfile/web/static/assets/unique-1958b98a.png +0 -0
- flowfile/web/static/assets/unpivot-d3cb4b5b.png +0 -0
- flowfile/web/static/assets/view-7a0f0be1.png +0 -0
- flowfile/web/static/assets/vue-codemirror.esm-dd17b478.js +22281 -0
- flowfile/web/static/assets/vue-content-loader.es-6b36f05e.js +210 -0
- flowfile/web/static/flowfile.svg +47 -0
- flowfile/web/static/icons/flowfile.png +0 -0
- flowfile/web/static/images/airbyte.png +0 -0
- flowfile/web/static/images/flowfile.svg +47 -0
- flowfile/web/static/images/google.svg +1 -0
- flowfile/web/static/images/sheets.png +0 -0
- flowfile/web/static/index.html +22 -0
- flowfile/web/static/vite.svg +1 -0
- flowfile/web/static/vue.svg +1 -0
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/METADATA +1 -1
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/RECORD +146 -15
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/entry_points.txt +1 -1
- flowfile_core/configs/settings.py +7 -32
- flowfile_core/flowfile/FlowfileFlow.py +4 -2
- flowfile_core/flowfile/analytics/analytics_processor.py +1 -1
- flowfile_core/main.py +4 -1
- flowfile_core/schemas/input_schema.py +1 -8
- flowfile_frame/__init__.py +0 -1
- flowfile_frame/utils.py +0 -139
- flowfile_frame/__main__.py +0 -12
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/LICENSE +0 -0
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
.polars-editor-root {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
}
|
|
6
|
+
.validation-error {
|
|
7
|
+
margin-top: 8px;
|
|
8
|
+
padding: 8px;
|
|
9
|
+
color: #ff5555;
|
|
10
|
+
background-color: rgba(255, 85, 85, 0.1);
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Polars-specific syntax highlighting */
|
|
15
|
+
.cm-variable.cm-polars {
|
|
16
|
+
color: #50fa7b; /* Polars namespace */
|
|
17
|
+
}
|
|
18
|
+
.cm-property.cm-polars {
|
|
19
|
+
color: #8be9fd; /* Polars methods */
|
|
20
|
+
}
|
|
21
|
+
.cm-keyword {
|
|
22
|
+
color: #ff79c6;
|
|
23
|
+
}
|
|
24
|
+
.cm-function {
|
|
25
|
+
color: #50fa7b;
|
|
26
|
+
}
|
|
27
|
+
.cm-string {
|
|
28
|
+
color: #f1fa8c;
|
|
29
|
+
}
|
|
30
|
+
.cm-number {
|
|
31
|
+
color: #bd93f9;
|
|
32
|
+
}
|
|
33
|
+
.cm-comment {
|
|
34
|
+
color: #6272a4;
|
|
35
|
+
}
|
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import { r as ref, j as defineStore, a as axios, d as defineComponent, ad as useCssVars, n as onMounted, c as openBlock, e as createElementBlock, p as createBaseVNode, L as renderSlot, h as createBlock, t as toDisplayString, i as createCommentVNode, T as normalizeStyle, s as normalizeClass, a6 as Teleport, R as nextTick, _ as _export_sfc } from "./index-552863fd.js";
|
|
2
|
+
const FLOW_ID_STORAGE_KEY = "last_flow_id";
|
|
3
|
+
ref(null);
|
|
4
|
+
const getDownstreamNodeIds = async (flow_id, node_id) => {
|
|
5
|
+
const response = await axios.get("/node/downstream_node_ids", {
|
|
6
|
+
params: { flow_id, node_id },
|
|
7
|
+
headers: { accept: "application/json" }
|
|
8
|
+
});
|
|
9
|
+
return response.data;
|
|
10
|
+
};
|
|
11
|
+
const loadDownstreamNodeIds = async (flowId, nodeId) => {
|
|
12
|
+
const downstreamNodeIds = await getDownstreamNodeIds(flowId, nodeId);
|
|
13
|
+
return downstreamNodeIds;
|
|
14
|
+
};
|
|
15
|
+
const useNodeStore = defineStore("node", {
|
|
16
|
+
state: () => {
|
|
17
|
+
const savedFlowId = sessionStorage.getItem(FLOW_ID_STORAGE_KEY);
|
|
18
|
+
const initialFlowId = savedFlowId ? parseInt(savedFlowId) : -1;
|
|
19
|
+
return {
|
|
20
|
+
inputCode: "",
|
|
21
|
+
flow_id: initialFlowId,
|
|
22
|
+
node_id: -1,
|
|
23
|
+
previous_node_id: -1,
|
|
24
|
+
nodeValidateFuncs: /* @__PURE__ */ new Map(),
|
|
25
|
+
nodeData: null,
|
|
26
|
+
node_exists: false,
|
|
27
|
+
is_loaded: false,
|
|
28
|
+
size_data_preview: 300,
|
|
29
|
+
dataTypes: ["String", "Datetime", "Int64", "Int32", "Int16", "Float64", "Float32", "Boolean"],
|
|
30
|
+
isDrawerOpen: false,
|
|
31
|
+
isAnalysisOpen: false,
|
|
32
|
+
drawCloseFunction: null,
|
|
33
|
+
initialEditorData: "",
|
|
34
|
+
runResults: {},
|
|
35
|
+
nodeDescriptions: {},
|
|
36
|
+
runNodeResults: {},
|
|
37
|
+
runNodeValidations: {},
|
|
38
|
+
currentRunResult: null,
|
|
39
|
+
isRunning: false,
|
|
40
|
+
showFlowResult: false,
|
|
41
|
+
tableVisible: false,
|
|
42
|
+
resultVersion: 0,
|
|
43
|
+
vueFlowInstance: null,
|
|
44
|
+
allExpressions: null,
|
|
45
|
+
isShowingLogViewer: false,
|
|
46
|
+
isStreamingLogs: false,
|
|
47
|
+
displayLogViewer: true
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
actions: {
|
|
51
|
+
initializeResultCache(flowId) {
|
|
52
|
+
if (!this.runNodeResults[flowId]) {
|
|
53
|
+
this.runNodeResults[flowId] = {};
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
initializeValidationCache(flowId) {
|
|
57
|
+
if (!this.runNodeValidations[flowId]) {
|
|
58
|
+
this.runNodeValidations[flowId] = {};
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
setNodeResult(nodeId, result) {
|
|
62
|
+
this.initializeResultCache(this.flow_id);
|
|
63
|
+
this.runNodeResults[this.flow_id][nodeId] = result;
|
|
64
|
+
},
|
|
65
|
+
getNodeResult(nodeId) {
|
|
66
|
+
var _a;
|
|
67
|
+
return (_a = this.runNodeResults[this.flow_id]) == null ? void 0 : _a[nodeId];
|
|
68
|
+
},
|
|
69
|
+
resetNodeResult() {
|
|
70
|
+
console.log("Clearing node results");
|
|
71
|
+
this.runNodeResults = {};
|
|
72
|
+
},
|
|
73
|
+
clearFlowResults(flowId) {
|
|
74
|
+
if (this.runNodeResults[flowId]) {
|
|
75
|
+
delete this.runNodeResults[flowId];
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
setNodeValidation(nodeId, nodeValidationInput) {
|
|
79
|
+
if (typeof nodeId === "string") {
|
|
80
|
+
nodeId = parseInt(nodeId);
|
|
81
|
+
}
|
|
82
|
+
this.initializeValidationCache(this.flow_id);
|
|
83
|
+
const nodeValidation = {
|
|
84
|
+
...nodeValidationInput,
|
|
85
|
+
validationTime: Date.now() / 1e3
|
|
86
|
+
};
|
|
87
|
+
this.runNodeValidations[this.flow_id][nodeId] = nodeValidation;
|
|
88
|
+
},
|
|
89
|
+
resetNodeValidation() {
|
|
90
|
+
this.runNodeValidations = {};
|
|
91
|
+
},
|
|
92
|
+
getNodeValidation(nodeId) {
|
|
93
|
+
var _a;
|
|
94
|
+
return ((_a = this.runNodeValidations[this.flow_id]) == null ? void 0 : _a[nodeId]) || {
|
|
95
|
+
isValid: true,
|
|
96
|
+
error: "",
|
|
97
|
+
validationTime: 0
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
insertRunResult(runResult, showResult = true) {
|
|
101
|
+
this.currentRunResult = runResult;
|
|
102
|
+
this.runResults[runResult.flow_id] = runResult;
|
|
103
|
+
this.showFlowResult = showResult;
|
|
104
|
+
this.isShowingLogViewer = this.displayLogViewer && showResult;
|
|
105
|
+
this.initializeResultCache(runResult.flow_id);
|
|
106
|
+
runResult.node_step_result.forEach((nodeResult) => {
|
|
107
|
+
this.runNodeResults[runResult.flow_id][nodeResult.node_id] = nodeResult;
|
|
108
|
+
});
|
|
109
|
+
this.resultVersion++;
|
|
110
|
+
},
|
|
111
|
+
resetRunResults() {
|
|
112
|
+
this.runNodeResults = {};
|
|
113
|
+
this.runResults = {};
|
|
114
|
+
this.currentRunResult = null;
|
|
115
|
+
},
|
|
116
|
+
initializeDescriptionCache(flowId) {
|
|
117
|
+
if (!this.nodeDescriptions[flowId]) {
|
|
118
|
+
this.nodeDescriptions[flowId] = {};
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
setNodeValidateFunc(nodeId, func) {
|
|
122
|
+
if (typeof nodeId === "string") {
|
|
123
|
+
nodeId = parseInt(nodeId);
|
|
124
|
+
}
|
|
125
|
+
this.nodeValidateFuncs.set(nodeId, func);
|
|
126
|
+
},
|
|
127
|
+
async validateNode(nodeId) {
|
|
128
|
+
if (typeof nodeId === "string") {
|
|
129
|
+
nodeId = parseInt(nodeId);
|
|
130
|
+
}
|
|
131
|
+
const func = this.nodeValidateFuncs.get(nodeId);
|
|
132
|
+
if (func) {
|
|
133
|
+
func();
|
|
134
|
+
} else {
|
|
135
|
+
console.warn("No validation function found for node", nodeId);
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
setFlowId(flowId) {
|
|
139
|
+
this.flow_id = flowId;
|
|
140
|
+
try {
|
|
141
|
+
sessionStorage.setItem(FLOW_ID_STORAGE_KEY, flowId.toString());
|
|
142
|
+
} catch (error) {
|
|
143
|
+
console.warn("Failed to store flow ID in session storage:", error);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
setVueFlowInstance(vueFlowInstance) {
|
|
147
|
+
this.vueFlowInstance = vueFlowInstance;
|
|
148
|
+
},
|
|
149
|
+
setInitialEditorData(editorDataString) {
|
|
150
|
+
this.initialEditorData = editorDataString;
|
|
151
|
+
},
|
|
152
|
+
getInitialEditorData() {
|
|
153
|
+
return this.initialEditorData;
|
|
154
|
+
},
|
|
155
|
+
cacheNodeDescriptionDict(flowId, nodeId, description) {
|
|
156
|
+
this.initializeDescriptionCache(flowId);
|
|
157
|
+
this.nodeDescriptions[flowId][nodeId] = description;
|
|
158
|
+
},
|
|
159
|
+
clearNodeDescriptionCache(flowId, nodeId) {
|
|
160
|
+
if (this.nodeDescriptions[flowId] && this.nodeDescriptions[flowId][nodeId]) {
|
|
161
|
+
delete this.nodeDescriptions[flowId][nodeId];
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
clearFlowDescriptionCache(flowId) {
|
|
165
|
+
if (this.nodeDescriptions[flowId]) {
|
|
166
|
+
delete this.nodeDescriptions[flowId];
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
clearAllDescriptionCaches() {
|
|
170
|
+
this.nodeDescriptions = {};
|
|
171
|
+
},
|
|
172
|
+
async getNodeDescription(nodeId, forceRefresh = false) {
|
|
173
|
+
var _a, _b;
|
|
174
|
+
this.initializeDescriptionCache(this.flow_id);
|
|
175
|
+
if (!forceRefresh && ((_a = this.nodeDescriptions[this.flow_id]) == null ? void 0 : _a[nodeId])) {
|
|
176
|
+
return this.nodeDescriptions[this.flow_id][nodeId];
|
|
177
|
+
}
|
|
178
|
+
try {
|
|
179
|
+
const response = await axios.get("/node/description", {
|
|
180
|
+
params: {
|
|
181
|
+
node_id: nodeId,
|
|
182
|
+
flow_id: this.flow_id
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
this.cacheNodeDescriptionDict(this.flow_id, nodeId, response.data);
|
|
186
|
+
return response.data;
|
|
187
|
+
} catch (error) {
|
|
188
|
+
console.info("Error fetching node description:", error);
|
|
189
|
+
if ((_b = this.nodeDescriptions[this.flow_id]) == null ? void 0 : _b[nodeId]) {
|
|
190
|
+
console.warn("Using cached description due to API error");
|
|
191
|
+
return this.nodeDescriptions[this.flow_id][nodeId];
|
|
192
|
+
}
|
|
193
|
+
return "";
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
async setNodeDescription(nodeId, description) {
|
|
197
|
+
try {
|
|
198
|
+
this.cacheNodeDescriptionDict(this.flow_id, nodeId, description);
|
|
199
|
+
const response = await axios.post("/node/description/", JSON.stringify(description), {
|
|
200
|
+
params: {
|
|
201
|
+
flow_id: this.flow_id,
|
|
202
|
+
node_id: nodeId
|
|
203
|
+
},
|
|
204
|
+
headers: {
|
|
205
|
+
"Content-Type": "application/json"
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
if (response.data.status === "success") {
|
|
209
|
+
console.log(response.data.message);
|
|
210
|
+
} else {
|
|
211
|
+
console.warn("Unexpected success response structure:", response.data);
|
|
212
|
+
}
|
|
213
|
+
} catch (error) {
|
|
214
|
+
if (error.response) {
|
|
215
|
+
console.error("API error:", error.response.data.message);
|
|
216
|
+
} else if (error.request) {
|
|
217
|
+
console.error("The request was made but no response was received");
|
|
218
|
+
} else {
|
|
219
|
+
console.error("Error", error.message);
|
|
220
|
+
}
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
setCloseFunction(f) {
|
|
225
|
+
this.drawCloseFunction = f;
|
|
226
|
+
},
|
|
227
|
+
getSizeDataPreview() {
|
|
228
|
+
return this.size_data_preview;
|
|
229
|
+
},
|
|
230
|
+
setSizeDataPreview(newHeight) {
|
|
231
|
+
this.size_data_preview = newHeight;
|
|
232
|
+
},
|
|
233
|
+
toggleDrawer() {
|
|
234
|
+
console.log("toggleDrawer in column-store.ts");
|
|
235
|
+
if (this.isDrawerOpen && this.drawCloseFunction) {
|
|
236
|
+
this.pushNodeData();
|
|
237
|
+
}
|
|
238
|
+
this.isDrawerOpen = !this.isDrawerOpen;
|
|
239
|
+
},
|
|
240
|
+
pushNodeData() {
|
|
241
|
+
if (this.drawCloseFunction && !this.isRunning) {
|
|
242
|
+
this.drawCloseFunction();
|
|
243
|
+
this.drawCloseFunction = null;
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
openDrawer(close_function) {
|
|
247
|
+
console.log("openDrawer in column-store.ts");
|
|
248
|
+
if (this.isDrawerOpen) {
|
|
249
|
+
console.log("pushing data");
|
|
250
|
+
this.pushNodeData();
|
|
251
|
+
}
|
|
252
|
+
if (close_function) {
|
|
253
|
+
this.drawCloseFunction = close_function;
|
|
254
|
+
}
|
|
255
|
+
this.isDrawerOpen = true;
|
|
256
|
+
},
|
|
257
|
+
closeDrawer() {
|
|
258
|
+
this.isDrawerOpen = false;
|
|
259
|
+
if (this.drawCloseFunction) {
|
|
260
|
+
this.pushNodeData();
|
|
261
|
+
}
|
|
262
|
+
this.node_id = -1;
|
|
263
|
+
},
|
|
264
|
+
openAnalysisDrawer(close_function) {
|
|
265
|
+
console.log("openAnalysisDrawer in column-store.ts");
|
|
266
|
+
if (this.isAnalysisOpen) {
|
|
267
|
+
this.pushNodeData();
|
|
268
|
+
}
|
|
269
|
+
if (close_function) {
|
|
270
|
+
this.drawCloseFunction = close_function;
|
|
271
|
+
}
|
|
272
|
+
this.isAnalysisOpen = true;
|
|
273
|
+
},
|
|
274
|
+
closeAnalysisDrawer() {
|
|
275
|
+
this.isAnalysisOpen = false;
|
|
276
|
+
if (this.drawCloseFunction) {
|
|
277
|
+
console.log("closeDrawer in column-store.ts");
|
|
278
|
+
this.pushNodeData();
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
getDataTypes() {
|
|
282
|
+
return this.dataTypes;
|
|
283
|
+
},
|
|
284
|
+
setInputCode(newCode) {
|
|
285
|
+
this.inputCode = newCode;
|
|
286
|
+
},
|
|
287
|
+
showLogViewer() {
|
|
288
|
+
console.log("triggered show log viewer");
|
|
289
|
+
this.isShowingLogViewer = this.displayLogViewer;
|
|
290
|
+
},
|
|
291
|
+
hideLogViewer() {
|
|
292
|
+
this.isShowingLogViewer = false;
|
|
293
|
+
},
|
|
294
|
+
toggleLogViewer() {
|
|
295
|
+
console.log("triggered toggle log viewer");
|
|
296
|
+
this.isShowingLogViewer = !this.isShowingLogViewer;
|
|
297
|
+
},
|
|
298
|
+
getRunResult(flow_id) {
|
|
299
|
+
return this.runResults[flow_id] || null;
|
|
300
|
+
},
|
|
301
|
+
async getTableExample(flow_id, node_id) {
|
|
302
|
+
try {
|
|
303
|
+
const response = await axios.get("/node/data", {
|
|
304
|
+
params: { flow_id, node_id },
|
|
305
|
+
headers: { accept: "application/json" }
|
|
306
|
+
});
|
|
307
|
+
return response.data;
|
|
308
|
+
} catch (error) {
|
|
309
|
+
console.error("Error fetching table example:", error);
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
async getNodeData(node_id, useCache = true) {
|
|
314
|
+
if (this.node_id === node_id && useCache) {
|
|
315
|
+
if (this.nodeData) {
|
|
316
|
+
this.is_loaded = true;
|
|
317
|
+
return this.nodeData;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
try {
|
|
321
|
+
this.setFlowIdAndNodeId(this.flow_id, node_id);
|
|
322
|
+
const response = await axios.get("/node", {
|
|
323
|
+
params: { flow_id: this.flow_id, node_id: this.node_id },
|
|
324
|
+
headers: { accept: "application/json" }
|
|
325
|
+
});
|
|
326
|
+
this.nodeData = response.data;
|
|
327
|
+
this.is_loaded = true;
|
|
328
|
+
this.node_exists = true;
|
|
329
|
+
return this.nodeData;
|
|
330
|
+
} catch (error) {
|
|
331
|
+
console.error("Error fetching node data:", error);
|
|
332
|
+
this.nodeData = null;
|
|
333
|
+
this.is_loaded = false;
|
|
334
|
+
this.node_exists = false;
|
|
335
|
+
return null;
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
async reloadCurrentNodeData() {
|
|
339
|
+
return this.getNodeData(this.node_id, false);
|
|
340
|
+
},
|
|
341
|
+
setFlowIdAndNodeId(flow_id, node_id) {
|
|
342
|
+
if (this.node_id === node_id && this.flow_id === flow_id) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
console.log("Automatically pushing the node data ");
|
|
346
|
+
this.pushNodeData();
|
|
347
|
+
this.previous_node_id = this.node_id;
|
|
348
|
+
if (this.flow_id !== flow_id) {
|
|
349
|
+
this.setFlowId(flow_id);
|
|
350
|
+
}
|
|
351
|
+
this.node_id = node_id;
|
|
352
|
+
},
|
|
353
|
+
getCurrentNodeData() {
|
|
354
|
+
return this.nodeData;
|
|
355
|
+
},
|
|
356
|
+
doReset() {
|
|
357
|
+
this.is_loaded = false;
|
|
358
|
+
},
|
|
359
|
+
getVueFlowInstance() {
|
|
360
|
+
return this.vueFlowInstance;
|
|
361
|
+
},
|
|
362
|
+
getEditorNodeData() {
|
|
363
|
+
var _a;
|
|
364
|
+
if (this.node_id) {
|
|
365
|
+
return (_a = this.vueFlowInstance) == null ? void 0 : _a.findNode(String(this.node_id));
|
|
366
|
+
}
|
|
367
|
+
return null;
|
|
368
|
+
},
|
|
369
|
+
async fetchExpressionsOverview() {
|
|
370
|
+
try {
|
|
371
|
+
const response = await axios.get("/editor/expression_doc");
|
|
372
|
+
this.allExpressions = response.data;
|
|
373
|
+
return this.allExpressions;
|
|
374
|
+
} catch (error) {
|
|
375
|
+
console.error("Error fetching expressions overview:", error);
|
|
376
|
+
return [];
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
async getExpressionsOverview() {
|
|
380
|
+
if (this.allExpressions) {
|
|
381
|
+
return this.allExpressions;
|
|
382
|
+
} else {
|
|
383
|
+
return await this.fetchExpressionsOverview();
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
async updateSettingsDirectly(inputData) {
|
|
387
|
+
var _a, _b;
|
|
388
|
+
try {
|
|
389
|
+
const node = (_a = this.vueFlowInstance) == null ? void 0 : _a.findNode(String(this.node_id));
|
|
390
|
+
inputData.pos_x = node.position.x;
|
|
391
|
+
inputData.pos_y = node.position.y;
|
|
392
|
+
console.log("updating settings");
|
|
393
|
+
console.log("node", node);
|
|
394
|
+
const response = await axios.post("/update_settings/", inputData, {
|
|
395
|
+
params: {
|
|
396
|
+
node_type: node.data.component.__name
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
const downstreamNodeIds = await loadDownstreamNodeIds(this.flow_id, inputData.node_id);
|
|
400
|
+
downstreamNodeIds.map((nodeId) => {
|
|
401
|
+
this.validateNode(nodeId);
|
|
402
|
+
});
|
|
403
|
+
return response.data;
|
|
404
|
+
} catch (error) {
|
|
405
|
+
console.error("Error updating settings:", (_b = error.response) == null ? void 0 : _b.data);
|
|
406
|
+
throw error;
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
async updateSettings(inputData) {
|
|
410
|
+
var _a, _b;
|
|
411
|
+
try {
|
|
412
|
+
const node = (_a = this.vueFlowInstance) == null ? void 0 : _a.findNode(String(this.node_id));
|
|
413
|
+
inputData.value.pos_x = node.position.x;
|
|
414
|
+
inputData.value.pos_y = node.position.y;
|
|
415
|
+
console.log("updating settings");
|
|
416
|
+
console.log("node", node);
|
|
417
|
+
const response = await axios.post("/update_settings/", inputData.value, {
|
|
418
|
+
params: {
|
|
419
|
+
node_type: node.data.component.__name
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
const downstreamNodeIds = await loadDownstreamNodeIds(
|
|
423
|
+
this.flow_id,
|
|
424
|
+
inputData.value.node_id
|
|
425
|
+
);
|
|
426
|
+
downstreamNodeIds.map((nodeId) => {
|
|
427
|
+
this.validateNode(nodeId);
|
|
428
|
+
});
|
|
429
|
+
return response.data;
|
|
430
|
+
} catch (error) {
|
|
431
|
+
console.error("Error updating settings:", (_b = error.response) == null ? void 0 : _b.data);
|
|
432
|
+
throw error;
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
updateNodeDescription(nodeId, description) {
|
|
436
|
+
this.cacheNodeDescriptionDict(this.flow_id, nodeId, description);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
const _hoisted_1 = { class: "popover-container" };
|
|
441
|
+
const _hoisted_2 = { key: 0 };
|
|
442
|
+
const _hoisted_3 = ["innerHTML"];
|
|
443
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
444
|
+
__name: "PopOver",
|
|
445
|
+
props: {
|
|
446
|
+
content: {
|
|
447
|
+
type: String,
|
|
448
|
+
required: true
|
|
449
|
+
},
|
|
450
|
+
title: {
|
|
451
|
+
type: String,
|
|
452
|
+
default: ""
|
|
453
|
+
},
|
|
454
|
+
placement: {
|
|
455
|
+
type: String,
|
|
456
|
+
default: "top"
|
|
457
|
+
},
|
|
458
|
+
minWidth: {
|
|
459
|
+
type: Number,
|
|
460
|
+
default: 100
|
|
461
|
+
},
|
|
462
|
+
zIndex: {
|
|
463
|
+
type: Number,
|
|
464
|
+
default: 9999
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
setup(__props) {
|
|
468
|
+
useCssVars((_ctx) => ({
|
|
469
|
+
"64450ce2": props.minWidth + "px"
|
|
470
|
+
}));
|
|
471
|
+
const visible = ref(false);
|
|
472
|
+
const referenceEl = ref(null);
|
|
473
|
+
const popoverEl = ref(null);
|
|
474
|
+
const props = __props;
|
|
475
|
+
const popoverStyle = ref({
|
|
476
|
+
top: "0px",
|
|
477
|
+
left: "0px",
|
|
478
|
+
zIndex: props.zIndex.toString()
|
|
479
|
+
});
|
|
480
|
+
const showPopover = () => {
|
|
481
|
+
visible.value = true;
|
|
482
|
+
nextTick(() => {
|
|
483
|
+
updatePosition();
|
|
484
|
+
});
|
|
485
|
+
};
|
|
486
|
+
const hidePopover = () => {
|
|
487
|
+
visible.value = false;
|
|
488
|
+
};
|
|
489
|
+
const updatePosition = () => {
|
|
490
|
+
if (!referenceEl.value || !popoverEl.value)
|
|
491
|
+
return;
|
|
492
|
+
const referenceRect = referenceEl.value.getBoundingClientRect();
|
|
493
|
+
const popoverRect = popoverEl.value.getBoundingClientRect();
|
|
494
|
+
const offset = 20;
|
|
495
|
+
let top = 0;
|
|
496
|
+
let left = 0;
|
|
497
|
+
switch (props.placement) {
|
|
498
|
+
case "top":
|
|
499
|
+
top = referenceRect.top - popoverRect.height - offset;
|
|
500
|
+
left = referenceRect.left + referenceRect.width / 2 - popoverRect.width / 2;
|
|
501
|
+
break;
|
|
502
|
+
case "bottom":
|
|
503
|
+
top = referenceRect.bottom + offset;
|
|
504
|
+
left = referenceRect.left + referenceRect.width / 2 - popoverRect.width / 2;
|
|
505
|
+
break;
|
|
506
|
+
case "left":
|
|
507
|
+
top = referenceRect.top + referenceRect.height / 2 - popoverRect.height / 2;
|
|
508
|
+
left = referenceRect.left - popoverRect.width - offset;
|
|
509
|
+
break;
|
|
510
|
+
case "right":
|
|
511
|
+
top = referenceRect.top + referenceRect.height / 2 - popoverRect.height / 2;
|
|
512
|
+
left = referenceRect.right + offset;
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
const viewportWidth = window.innerWidth;
|
|
516
|
+
const viewportHeight = window.innerHeight;
|
|
517
|
+
if (left < 10)
|
|
518
|
+
left = 10;
|
|
519
|
+
if (left + popoverRect.width > viewportWidth - 10) {
|
|
520
|
+
left = viewportWidth - popoverRect.width - 10;
|
|
521
|
+
}
|
|
522
|
+
if (top < 10)
|
|
523
|
+
top = 10;
|
|
524
|
+
if (top + popoverRect.height > viewportHeight - 10) {
|
|
525
|
+
top = viewportHeight - popoverRect.height - 10;
|
|
526
|
+
}
|
|
527
|
+
popoverStyle.value = {
|
|
528
|
+
top: `${top}px`,
|
|
529
|
+
left: `${left}px`,
|
|
530
|
+
zIndex: props.zIndex.toString()
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
onMounted(() => {
|
|
534
|
+
window.addEventListener("resize", () => {
|
|
535
|
+
if (visible.value) {
|
|
536
|
+
updatePosition();
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
return (_ctx, _cache) => {
|
|
541
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
542
|
+
createBaseVNode("div", {
|
|
543
|
+
ref_key: "referenceEl",
|
|
544
|
+
ref: referenceEl,
|
|
545
|
+
class: "popover-reference",
|
|
546
|
+
onMouseenter: showPopover,
|
|
547
|
+
onMouseleave: hidePopover
|
|
548
|
+
}, [
|
|
549
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
550
|
+
], 544),
|
|
551
|
+
visible.value ? (openBlock(), createBlock(Teleport, {
|
|
552
|
+
key: 0,
|
|
553
|
+
to: "body"
|
|
554
|
+
}, [
|
|
555
|
+
createBaseVNode("div", {
|
|
556
|
+
ref_key: "popoverEl",
|
|
557
|
+
ref: popoverEl,
|
|
558
|
+
style: normalizeStyle(popoverStyle.value),
|
|
559
|
+
class: normalizeClass(["popover", { "popover--left": props.placement === "left" }])
|
|
560
|
+
}, [
|
|
561
|
+
props.title !== "" ? (openBlock(), createElementBlock("h3", _hoisted_2, toDisplayString(props.title), 1)) : createCommentVNode("", true),
|
|
562
|
+
createBaseVNode("p", {
|
|
563
|
+
class: "content",
|
|
564
|
+
innerHTML: props.content
|
|
565
|
+
}, null, 8, _hoisted_3)
|
|
566
|
+
], 6)
|
|
567
|
+
])) : createCommentVNode("", true)
|
|
568
|
+
]);
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
const PopOver_vue_vue_type_style_index_0_scoped_e6f071d2_lang = "";
|
|
573
|
+
const PopOver = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e6f071d2"]]);
|
|
574
|
+
export {
|
|
575
|
+
PopOver as P,
|
|
576
|
+
useNodeStore as u
|
|
577
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
.popover-container[data-v-e6f071d2] {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
}
|
|
6
|
+
.popover[data-v-e6f071d2] {
|
|
7
|
+
position: fixed;
|
|
8
|
+
padding: 10px;
|
|
9
|
+
background-color: #fff;
|
|
10
|
+
border: 0.5px solid #ccc;
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
13
|
+
min-width: var(--64450ce2);
|
|
14
|
+
}
|
|
15
|
+
.popover--left[data-v-e6f071d2] {
|
|
16
|
+
min-width: 200px;
|
|
17
|
+
}
|
|
18
|
+
.popover-reference[data-v-e6f071d2] {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
.popover h3[data-v-e6f071d2] {
|
|
22
|
+
margin: 0 0 2px;
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
font-family: "Roboto", "Source Sans Pro", Avenir, Helvetica, Arial, sans-serif;
|
|
25
|
+
}
|
|
26
|
+
.popover p[data-v-e6f071d2] {
|
|
27
|
+
margin: 0;
|
|
28
|
+
font-family: "Roboto", "Source Sans Pro", Avenir, Helvetica, Arial, sans-serif;
|
|
29
|
+
}
|
|
30
|
+
.content[data-v-e6f071d2] {
|
|
31
|
+
white-space: pre-wrap;
|
|
32
|
+
}
|