Flowfile 0.3.0__py3-none-any.whl → 0.3.0.2__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.

Files changed (149) hide show
  1. flowfile/__init__.py +13 -6
  2. flowfile/__main__.py +50 -15
  3. flowfile/api.py +383 -0
  4. flowfile/readme.md +130 -0
  5. flowfile/web/__init__.py +155 -0
  6. flowfile/web/static/assets/AirbyteReader-1ac35765.css +314 -0
  7. flowfile/web/static/assets/AirbyteReader-cb0c1d4a.js +921 -0
  8. flowfile/web/static/assets/CrossJoin-41efa4cb.css +100 -0
  9. flowfile/web/static/assets/CrossJoin-a514fa59.js +153 -0
  10. flowfile/web/static/assets/DatabaseConnectionSettings-0c04b2e5.css +77 -0
  11. flowfile/web/static/assets/DatabaseConnectionSettings-f2cecf33.js +151 -0
  12. flowfile/web/static/assets/DatabaseManager-30fa27e5.css +64 -0
  13. flowfile/web/static/assets/DatabaseManager-83ee3c98.js +484 -0
  14. flowfile/web/static/assets/DatabaseReader-dc0c6881.js +426 -0
  15. flowfile/web/static/assets/DatabaseReader-f50c6558.css +158 -0
  16. flowfile/web/static/assets/DatabaseWriter-2f570e53.css +96 -0
  17. flowfile/web/static/assets/DatabaseWriter-5afe9f8d.js +312 -0
  18. flowfile/web/static/assets/ExploreData-5bdae813.css +45 -0
  19. flowfile/web/static/assets/ExploreData-c7ee19cf.js +118306 -0
  20. flowfile/web/static/assets/ExternalSource-17b23a01.js +225 -0
  21. flowfile/web/static/assets/ExternalSource-e37b6275.css +94 -0
  22. flowfile/web/static/assets/Filter-90856b4f.js +238 -0
  23. flowfile/web/static/assets/Filter-a9d08ba1.css +20 -0
  24. flowfile/web/static/assets/Formula-38b71e9e.js +197 -0
  25. flowfile/web/static/assets/Formula-d60a74f4.css +17 -0
  26. flowfile/web/static/assets/FuzzyMatch-6857de82.css +254 -0
  27. flowfile/web/static/assets/FuzzyMatch-d0f1fe81.js +422 -0
  28. flowfile/web/static/assets/GoogleSheet-854294a4.js +2616 -0
  29. flowfile/web/static/assets/GoogleSheet-92084da7.css +233 -0
  30. flowfile/web/static/assets/GraphSolver-0c86bbc6.js +382 -0
  31. flowfile/web/static/assets/GraphSolver-17fd26db.css +68 -0
  32. flowfile/web/static/assets/GroupBy-ab1ea74b.css +51 -0
  33. flowfile/web/static/assets/GroupBy-f2772e9f.js +413 -0
  34. flowfile/web/static/assets/Join-41c0f331.css +109 -0
  35. flowfile/web/static/assets/Join-bc3e1cf7.js +247 -0
  36. flowfile/web/static/assets/ManualInput-03aa0245.js +391 -0
  37. flowfile/web/static/assets/ManualInput-ac7b9972.css +84 -0
  38. flowfile/web/static/assets/Output-48f81019.css +2642 -0
  39. flowfile/web/static/assets/Output-5b35eee8.js +536 -0
  40. flowfile/web/static/assets/Pivot-7164087c.js +408 -0
  41. flowfile/web/static/assets/Pivot-f415e85f.css +35 -0
  42. flowfile/web/static/assets/PolarsCode-3abf6507.js +2863 -0
  43. flowfile/web/static/assets/PolarsCode-650322d1.css +35 -0
  44. flowfile/web/static/assets/PopOver-b37ff9be.js +577 -0
  45. flowfile/web/static/assets/PopOver-bccfde04.css +32 -0
  46. flowfile/web/static/assets/Read-65966a3e.js +701 -0
  47. flowfile/web/static/assets/Read-80dc1675.css +197 -0
  48. flowfile/web/static/assets/RecordCount-c66c6d6d.js +121 -0
  49. flowfile/web/static/assets/RecordId-826dc095.js +339 -0
  50. flowfile/web/static/assets/Sample-4ed555c8.js +184 -0
  51. flowfile/web/static/assets/SecretManager-eac1e97d.js +382 -0
  52. flowfile/web/static/assets/Select-085f05cc.js +231 -0
  53. flowfile/web/static/assets/SettingsSection-1f5e79c1.js +87 -0
  54. flowfile/web/static/assets/SettingsSection-9c836ecc.css +47 -0
  55. flowfile/web/static/assets/Sort-3e6cb414.js +309 -0
  56. flowfile/web/static/assets/Sort-7ccfa0fe.css +51 -0
  57. flowfile/web/static/assets/TextToRows-606349bc.js +307 -0
  58. flowfile/web/static/assets/TextToRows-c92d1ec2.css +48 -0
  59. flowfile/web/static/assets/UnavailableFields-5edd5322.css +49 -0
  60. flowfile/web/static/assets/UnavailableFields-b41976ed.js +36 -0
  61. flowfile/web/static/assets/Union-8d9ac7f9.css +30 -0
  62. flowfile/web/static/assets/Union-fca91665.js +145 -0
  63. flowfile/web/static/assets/Unique-a59f830e.js +273 -0
  64. flowfile/web/static/assets/Unique-b5615727.css +51 -0
  65. flowfile/web/static/assets/Unpivot-246e9bbd.css +77 -0
  66. flowfile/web/static/assets/Unpivot-c3815565.js +441 -0
  67. flowfile/web/static/assets/airbyte-292aa232.png +0 -0
  68. flowfile/web/static/assets/api-22b338bd.js +60 -0
  69. flowfile/web/static/assets/cross_join-d30c0290.png +0 -0
  70. flowfile/web/static/assets/database_reader-ce1e55f3.svg +24 -0
  71. flowfile/web/static/assets/database_writer-b4ad0753.svg +23 -0
  72. flowfile/web/static/assets/designer-2394122a.css +10697 -0
  73. flowfile/web/static/assets/designer-e5bbe26f.js +69712 -0
  74. flowfile/web/static/assets/documentation-08045cf2.js +33 -0
  75. flowfile/web/static/assets/documentation-12216a74.css +50 -0
  76. flowfile/web/static/assets/dropDown-35135ba8.css +143 -0
  77. flowfile/web/static/assets/dropDown-5e7e9a5a.js +319 -0
  78. flowfile/web/static/assets/dropDownGeneric-50a91b99.js +72 -0
  79. flowfile/web/static/assets/dropDownGeneric-895680d6.css +10 -0
  80. flowfile/web/static/assets/element-icons-9c88a535.woff +0 -0
  81. flowfile/web/static/assets/element-icons-de5eb258.ttf +0 -0
  82. flowfile/web/static/assets/explore_data-8a0a2861.png +0 -0
  83. flowfile/web/static/assets/fa-brands-400-808443ae.ttf +0 -0
  84. flowfile/web/static/assets/fa-brands-400-d7236a19.woff2 +0 -0
  85. flowfile/web/static/assets/fa-regular-400-54cf6086.ttf +0 -0
  86. flowfile/web/static/assets/fa-regular-400-e3456d12.woff2 +0 -0
  87. flowfile/web/static/assets/fa-solid-900-aa759986.woff2 +0 -0
  88. flowfile/web/static/assets/fa-solid-900-d2f05935.ttf +0 -0
  89. flowfile/web/static/assets/fa-v4compatibility-0ce9033c.woff2 +0 -0
  90. flowfile/web/static/assets/fa-v4compatibility-30f6abf6.ttf +0 -0
  91. flowfile/web/static/assets/filter-d7708bda.png +0 -0
  92. flowfile/web/static/assets/formula-eeeb1611.png +0 -0
  93. flowfile/web/static/assets/fullEditor-178376bb.css +256 -0
  94. flowfile/web/static/assets/fullEditor-705c6ccb.js +630 -0
  95. flowfile/web/static/assets/fuzzy_match-40c161b2.png +0 -0
  96. flowfile/web/static/assets/genericNodeSettings-65587f20.js +137 -0
  97. flowfile/web/static/assets/genericNodeSettings-924759c7.css +46 -0
  98. flowfile/web/static/assets/graph_solver-8b7888b8.png +0 -0
  99. flowfile/web/static/assets/group_by-80561fc3.png +0 -0
  100. flowfile/web/static/assets/index-552863fd.js +58652 -0
  101. flowfile/web/static/assets/index-681a3ed0.css +8843 -0
  102. flowfile/web/static/assets/input_data-ab2eb678.png +0 -0
  103. flowfile/web/static/assets/join-349043ae.png +0 -0
  104. flowfile/web/static/assets/manual_input-ae98f31d.png +0 -0
  105. flowfile/web/static/assets/nodeTitle-cf9bae3c.js +227 -0
  106. flowfile/web/static/assets/nodeTitle-f4b12bcb.css +134 -0
  107. flowfile/web/static/assets/old_join-5d0eb604.png +0 -0
  108. flowfile/web/static/assets/output-06ec0371.png +0 -0
  109. flowfile/web/static/assets/pivot-9660df51.png +0 -0
  110. flowfile/web/static/assets/polars_code-05ce5dc6.png +0 -0
  111. flowfile/web/static/assets/record_count-dab44eb5.png +0 -0
  112. flowfile/web/static/assets/record_id-0b15856b.png +0 -0
  113. flowfile/web/static/assets/sample-693a88b5.png +0 -0
  114. flowfile/web/static/assets/secretApi-3ad510e1.js +46 -0
  115. flowfile/web/static/assets/select-b0d0437a.png +0 -0
  116. flowfile/web/static/assets/selectDynamic-b062bc9b.css +107 -0
  117. flowfile/web/static/assets/selectDynamic-bd644891.js +302 -0
  118. flowfile/web/static/assets/sort-2aa579f0.png +0 -0
  119. flowfile/web/static/assets/summarize-2a099231.png +0 -0
  120. flowfile/web/static/assets/text_to_rows-859b29ea.png +0 -0
  121. flowfile/web/static/assets/union-2d8609f4.png +0 -0
  122. flowfile/web/static/assets/unique-1958b98a.png +0 -0
  123. flowfile/web/static/assets/unpivot-d3cb4b5b.png +0 -0
  124. flowfile/web/static/assets/view-7a0f0be1.png +0 -0
  125. flowfile/web/static/assets/vue-codemirror.esm-dd17b478.js +22281 -0
  126. flowfile/web/static/assets/vue-content-loader.es-6b36f05e.js +210 -0
  127. flowfile/web/static/flowfile.svg +47 -0
  128. flowfile/web/static/icons/flowfile.png +0 -0
  129. flowfile/web/static/images/airbyte.png +0 -0
  130. flowfile/web/static/images/flowfile.svg +47 -0
  131. flowfile/web/static/images/google.svg +1 -0
  132. flowfile/web/static/images/sheets.png +0 -0
  133. flowfile/web/static/index.html +22 -0
  134. flowfile/web/static/vite.svg +1 -0
  135. flowfile/web/static/vue.svg +1 -0
  136. flowfile-0.3.0.2.dist-info/METADATA +235 -0
  137. {flowfile-0.3.0.dist-info → flowfile-0.3.0.2.dist-info}/RECORD +147 -15
  138. {flowfile-0.3.0.dist-info → flowfile-0.3.0.2.dist-info}/entry_points.txt +1 -1
  139. flowfile_core/configs/settings.py +7 -32
  140. flowfile_core/flowfile/FlowfileFlow.py +4 -2
  141. flowfile_core/flowfile/analytics/analytics_processor.py +1 -1
  142. flowfile_core/main.py +4 -1
  143. flowfile_core/schemas/input_schema.py +1 -8
  144. flowfile_frame/__init__.py +0 -1
  145. flowfile_frame/utils.py +0 -139
  146. flowfile-0.3.0.dist-info/METADATA +0 -219
  147. flowfile_frame/__main__.py +0 -12
  148. {flowfile-0.3.0.dist-info → flowfile-0.3.0.2.dist-info}/LICENSE +0 -0
  149. {flowfile-0.3.0.dist-info → flowfile-0.3.0.2.dist-info}/WHEEL +0 -0
@@ -0,0 +1,426 @@
1
+ import { d as defineComponent, c as openBlock, e as createElementBlock, p as createBaseVNode, _ as _export_sfc, r as ref, n as onMounted, b as resolveComponent, f as createVNode, w as withCtx, F as Fragment, q as renderList, h as createBlock, u as unref, aj as ElRadio, g as createTextVNode, t as toDisplayString, a4 as withDirectives, ae as vModelSelect, a5 as vModelText, i as createCommentVNode, a as axios, z as ElMessage, R as nextTick, a6 as Teleport } from "./index-552863fd.js";
2
+ import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
3
+ import { u as useNodeStore } from "./PopOver-b37ff9be.js";
4
+ import { f as fetchDatabaseConnectionsInterfaces } from "./api-22b338bd.js";
5
+ import { D as DatabaseConnectionSettings } from "./DatabaseConnectionSettings-f2cecf33.js";
6
+ import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
7
+ import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
8
+ import "./secretApi-3ad510e1.js";
9
+ import "./designer-e5bbe26f.js";
10
+ const createNodeDatabaseReader = (flowId, nodeId) => {
11
+ const databaseSettings = {
12
+ query_mode: "table",
13
+ connection_mode: "reference",
14
+ schema_name: void 0,
15
+ table_name: void 0,
16
+ query: "",
17
+ database_connection: {
18
+ database_type: "postgresql",
19
+ username: "",
20
+ password_ref: "",
21
+ host: "localhost",
22
+ port: 4322,
23
+ database: "",
24
+ url: void 0
25
+ }
26
+ };
27
+ const nodePolarsCode = {
28
+ flow_id: flowId,
29
+ node_id: nodeId,
30
+ pos_x: 0,
31
+ pos_y: 0,
32
+ database_settings: databaseSettings,
33
+ cache_results: false,
34
+ fields: []
35
+ };
36
+ return nodePolarsCode;
37
+ };
38
+ const _hoisted_1$2 = { class: "query-section" };
39
+ const _hoisted_2$1 = { class: "form-group" };
40
+ const _hoisted_3$1 = ["value"];
41
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
42
+ __name: "SQLQueryComponent",
43
+ props: {
44
+ modelValue: {}
45
+ },
46
+ emits: ["update:modelValue"],
47
+ setup(__props, { emit: __emit }) {
48
+ const emit = __emit;
49
+ const onInput = (event) => {
50
+ const target = event.target;
51
+ emit("update:modelValue", target.value);
52
+ };
53
+ return (_ctx, _cache) => {
54
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
55
+ _cache[0] || (_cache[0] = createBaseVNode("h4", { class: "section-subtitle" }, "SQL Query", -1)),
56
+ createBaseVNode("div", _hoisted_2$1, [
57
+ createBaseVNode("textarea", {
58
+ id: "query",
59
+ value: _ctx.modelValue,
60
+ class: "form-control textarea",
61
+ placeholder: "Enter SQL query",
62
+ rows: "4",
63
+ onInput
64
+ }, null, 40, _hoisted_3$1)
65
+ ])
66
+ ]);
67
+ };
68
+ }
69
+ });
70
+ const SQLQueryComponent_vue_vue_type_style_index_0_scoped_29602f2f_lang = "";
71
+ const SqlQueryComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-29602f2f"]]);
72
+ const _hoisted_1$1 = {
73
+ key: 0,
74
+ class: "db-container"
75
+ };
76
+ const _hoisted_2 = { class: "listbox-wrapper" };
77
+ const _hoisted_3 = { class: "form-group" };
78
+ const _hoisted_4 = { key: 0 };
79
+ const _hoisted_5 = { key: 1 };
80
+ const _hoisted_6 = { key: 0 };
81
+ const _hoisted_7 = { key: 1 };
82
+ const _hoisted_8 = ["value"];
83
+ const _hoisted_9 = { class: "listbox-wrapper" };
84
+ const _hoisted_10 = { class: "form-group" };
85
+ const _hoisted_11 = {
86
+ key: 0,
87
+ class: "query-section"
88
+ };
89
+ const _hoisted_12 = { class: "form-row" };
90
+ const _hoisted_13 = { class: "form-group half" };
91
+ const _hoisted_14 = { class: "form-group half" };
92
+ const _hoisted_15 = { class: "validation-section" };
93
+ const _hoisted_16 = ["disabled"];
94
+ const _hoisted_17 = {
95
+ key: 0,
96
+ class: "error-box"
97
+ };
98
+ const _hoisted_18 = { class: "error-message" };
99
+ const _hoisted_19 = {
100
+ key: 1,
101
+ class: "success-box"
102
+ };
103
+ const _hoisted_20 = { class: "success-message" };
104
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
105
+ __name: "DatabaseReader",
106
+ props: {
107
+ nodeId: {}
108
+ },
109
+ setup(__props, { expose: __expose }) {
110
+ const connectionModeOptions = ref(["inline", "reference"]);
111
+ const connectionInterfaces = ref([]);
112
+ const nodeStore = useNodeStore();
113
+ const nodeDatabaseReader = ref(null);
114
+ const dataLoaded = ref(false);
115
+ const validationError = ref(null);
116
+ const validationSuccess = ref(null);
117
+ const isValidating = ref(false);
118
+ const connectionsAreLoading = ref(false);
119
+ const handleQueryModeChange = (event) => {
120
+ const target = event.target;
121
+ const selectedMode = target.value;
122
+ validationError.value = null;
123
+ validationSuccess.value = null;
124
+ if (nodeDatabaseReader.value) {
125
+ nodeDatabaseReader.value.fields = [];
126
+ if (selectedMode === "table") {
127
+ nodeDatabaseReader.value.database_settings.query = "";
128
+ } else {
129
+ nodeDatabaseReader.value.database_settings.schema_name = void 0;
130
+ nodeDatabaseReader.value.database_settings.table_name = void 0;
131
+ }
132
+ }
133
+ };
134
+ const loadNodeData = async (nodeId) => {
135
+ var _a;
136
+ try {
137
+ const nodeData = await nodeStore.getNodeData(nodeId, false);
138
+ if (nodeData) {
139
+ const hasValidSetup = Boolean((_a = nodeData.setting_input) == null ? void 0 : _a.is_setup);
140
+ nodeDatabaseReader.value = hasValidSetup ? nodeData.setting_input : createNodeDatabaseReader(nodeStore.flow_id, nodeId);
141
+ }
142
+ dataLoaded.value = true;
143
+ } catch (error) {
144
+ console.error("Error loading node data:", error);
145
+ dataLoaded.value = false;
146
+ }
147
+ };
148
+ const validateQuery = () => {
149
+ var _a, _b;
150
+ if (!((_b = (_a = nodeDatabaseReader.value) == null ? void 0 : _a.database_settings) == null ? void 0 : _b.query)) {
151
+ validationError.value = "Please enter a SQL query";
152
+ validationSuccess.value = null;
153
+ return;
154
+ }
155
+ validateDatabaseSettings();
156
+ };
157
+ const resetFields = () => {
158
+ if (nodeDatabaseReader.value) {
159
+ nodeDatabaseReader.value.fields = [];
160
+ }
161
+ };
162
+ const validateDatabaseSettings = async () => {
163
+ var _a;
164
+ if (!((_a = nodeDatabaseReader.value) == null ? void 0 : _a.database_settings)) {
165
+ validationError.value = "Database settings are incomplete";
166
+ validationSuccess.value = null;
167
+ return;
168
+ }
169
+ validationError.value = null;
170
+ validationSuccess.value = null;
171
+ isValidating.value = true;
172
+ resetFields();
173
+ try {
174
+ const response = await axios.post(
175
+ "/validate_db_settings",
176
+ nodeDatabaseReader.value.database_settings
177
+ );
178
+ validationSuccess.value = response.data.message || "Settings are valid";
179
+ } catch (error) {
180
+ if (error.response && error.response.data && error.response.data.detail) {
181
+ validationError.value = error.response.data.detail;
182
+ } else {
183
+ validationError.value = "An error occurred during validation";
184
+ console.error("Validation error:", error);
185
+ }
186
+ } finally {
187
+ isValidating.value = false;
188
+ }
189
+ };
190
+ const pushNodeData = async () => {
191
+ if (!nodeDatabaseReader.value || !nodeDatabaseReader.value.database_settings) {
192
+ return;
193
+ }
194
+ nodeDatabaseReader.value.is_setup = true;
195
+ nodeStore.updateSettings(nodeDatabaseReader);
196
+ dataLoaded.value = false;
197
+ };
198
+ const fetchConnections = async () => {
199
+ connectionsAreLoading.value = true;
200
+ try {
201
+ connectionInterfaces.value = await fetchDatabaseConnectionsInterfaces();
202
+ } catch (error) {
203
+ console.error("Error fetching connections:", error);
204
+ ElMessage.error("Failed to load database connections");
205
+ } finally {
206
+ connectionsAreLoading.value = false;
207
+ }
208
+ };
209
+ onMounted(async () => {
210
+ await fetchConnections();
211
+ });
212
+ __expose({
213
+ loadNodeData,
214
+ pushNodeData
215
+ });
216
+ return (_ctx, _cache) => {
217
+ const _component_el_radio_group = resolveComponent("el-radio-group");
218
+ return dataLoaded.value && nodeDatabaseReader.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
219
+ createVNode(GenericNodeSettings, {
220
+ modelValue: nodeDatabaseReader.value,
221
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => nodeDatabaseReader.value = $event)
222
+ }, {
223
+ default: withCtx(() => [
224
+ createBaseVNode("div", _hoisted_2, [
225
+ createBaseVNode("div", _hoisted_3, [
226
+ _cache[8] || (_cache[8] = createBaseVNode("label", null, "Connection Mode", -1)),
227
+ createVNode(_component_el_radio_group, {
228
+ modelValue: nodeDatabaseReader.value.database_settings.connection_mode,
229
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => nodeDatabaseReader.value.database_settings.connection_mode = $event)
230
+ }, {
231
+ default: withCtx(() => [
232
+ (openBlock(true), createElementBlock(Fragment, null, renderList(connectionModeOptions.value, (option) => {
233
+ return openBlock(), createBlock(unref(ElRadio), {
234
+ key: option,
235
+ label: option
236
+ }, {
237
+ default: withCtx(() => [
238
+ createTextVNode(toDisplayString(option), 1)
239
+ ]),
240
+ _: 2
241
+ }, 1032, ["label"]);
242
+ }), 128))
243
+ ]),
244
+ _: 1
245
+ }, 8, ["modelValue"])
246
+ ]),
247
+ createBaseVNode("div", null, [
248
+ nodeDatabaseReader.value.database_settings.connection_mode == "inline" && nodeDatabaseReader.value.database_settings.database_connection ? (openBlock(), createElementBlock("div", _hoisted_4, [
249
+ createVNode(DatabaseConnectionSettings, {
250
+ modelValue: nodeDatabaseReader.value.database_settings.database_connection,
251
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => nodeDatabaseReader.value.database_settings.database_connection = $event),
252
+ onChange: resetFields
253
+ }, null, 8, ["modelValue"])
254
+ ])) : (openBlock(), createElementBlock("div", _hoisted_5, [
255
+ connectionsAreLoading.value ? (openBlock(), createElementBlock("div", _hoisted_6, _cache[9] || (_cache[9] = [
256
+ createBaseVNode("div", { class: "loading-spinner" }, null, -1),
257
+ createBaseVNode("p", null, "Loading connections...", -1)
258
+ ]))) : (openBlock(), createElementBlock("div", _hoisted_7, [
259
+ withDirectives(createBaseVNode("select", {
260
+ id: "connection-select",
261
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => nodeDatabaseReader.value.database_settings.database_connection_name = $event),
262
+ class: "form-control minimal-select"
263
+ }, [
264
+ _cache[10] || (_cache[10] = createBaseVNode("option", {
265
+ disabled: "",
266
+ value: ""
267
+ }, "Choose a connection", -1)),
268
+ (openBlock(true), createElementBlock(Fragment, null, renderList(connectionInterfaces.value, (conn) => {
269
+ return openBlock(), createElementBlock("option", {
270
+ key: conn.connectionName,
271
+ value: conn.connectionName
272
+ }, toDisplayString(conn.connectionName) + " (" + toDisplayString(conn.databaseType) + " - " + toDisplayString(conn.database) + ") ", 9, _hoisted_8);
273
+ }), 128))
274
+ ], 512), [
275
+ [vModelSelect, nodeDatabaseReader.value.database_settings.database_connection_name]
276
+ ])
277
+ ]))
278
+ ]))
279
+ ])
280
+ ]),
281
+ createBaseVNode("div", _hoisted_9, [
282
+ createBaseVNode("div", _hoisted_10, [
283
+ _cache[12] || (_cache[12] = createBaseVNode("label", { for: "query-mode" }, "Query Mode", -1)),
284
+ withDirectives(createBaseVNode("select", {
285
+ id: "query-mode",
286
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => nodeDatabaseReader.value.database_settings.query_mode = $event),
287
+ class: "form-control",
288
+ onChange: handleQueryModeChange
289
+ }, _cache[11] || (_cache[11] = [
290
+ createBaseVNode("option", { value: "table" }, "Table", -1),
291
+ createBaseVNode("option", { value: "query" }, "Query", -1)
292
+ ]), 544), [
293
+ [vModelSelect, nodeDatabaseReader.value.database_settings.query_mode]
294
+ ])
295
+ ]),
296
+ nodeDatabaseReader.value.database_settings.query_mode === "table" ? (openBlock(), createElementBlock("div", _hoisted_11, [
297
+ _cache[15] || (_cache[15] = createBaseVNode("h4", { class: "section-subtitle" }, "Table Selection", -1)),
298
+ createBaseVNode("div", _hoisted_12, [
299
+ createBaseVNode("div", _hoisted_13, [
300
+ _cache[13] || (_cache[13] = createBaseVNode("label", { for: "schema-name" }, "Schema", -1)),
301
+ withDirectives(createBaseVNode("input", {
302
+ id: "schema-name",
303
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => nodeDatabaseReader.value.database_settings.schema_name = $event),
304
+ type: "text",
305
+ class: "form-control",
306
+ placeholder: "Enter schema name",
307
+ onInput: resetFields
308
+ }, null, 544), [
309
+ [vModelText, nodeDatabaseReader.value.database_settings.schema_name]
310
+ ])
311
+ ]),
312
+ createBaseVNode("div", _hoisted_14, [
313
+ _cache[14] || (_cache[14] = createBaseVNode("label", { for: "table-name" }, "Table", -1)),
314
+ withDirectives(createBaseVNode("input", {
315
+ id: "table-name",
316
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => nodeDatabaseReader.value.database_settings.table_name = $event),
317
+ type: "text",
318
+ class: "form-control",
319
+ placeholder: "Enter table name",
320
+ onInput: resetFields
321
+ }, null, 544), [
322
+ [vModelText, nodeDatabaseReader.value.database_settings.table_name]
323
+ ])
324
+ ])
325
+ ])
326
+ ])) : createCommentVNode("", true),
327
+ nodeDatabaseReader.value.database_settings.query_mode === "query" ? (openBlock(), createBlock(SqlQueryComponent, {
328
+ key: 1,
329
+ modelValue: nodeDatabaseReader.value.database_settings.query,
330
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => nodeDatabaseReader.value.database_settings.query = $event),
331
+ onValidate: validateQuery,
332
+ onInput: resetFields
333
+ }, null, 8, ["modelValue"])) : createCommentVNode("", true),
334
+ createBaseVNode("div", _hoisted_15, [
335
+ createBaseVNode("button", {
336
+ class: "validate-button",
337
+ disabled: isValidating.value,
338
+ onClick: validateDatabaseSettings
339
+ }, toDisplayString(isValidating.value ? "Validating..." : "Validate Settings"), 9, _hoisted_16),
340
+ validationError.value ? (openBlock(), createElementBlock("div", _hoisted_17, [
341
+ _cache[16] || (_cache[16] = createBaseVNode("div", { class: "error-title" }, "Validation Error", -1)),
342
+ createBaseVNode("div", _hoisted_18, toDisplayString(validationError.value), 1)
343
+ ])) : createCommentVNode("", true),
344
+ validationSuccess.value ? (openBlock(), createElementBlock("div", _hoisted_19, [
345
+ createBaseVNode("div", _hoisted_20, toDisplayString(validationSuccess.value), 1)
346
+ ])) : createCommentVNode("", true)
347
+ ])
348
+ ])
349
+ ]),
350
+ _: 1
351
+ }, 8, ["modelValue"])
352
+ ])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
353
+ };
354
+ }
355
+ });
356
+ const DatabaseReader_vue_vue_type_style_index_0_scoped_ae4d7dc5_lang = "";
357
+ const DatabaseReader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ae4d7dc5"]]);
358
+ const _hoisted_1 = { ref: "el" };
359
+ const _sfc_main = /* @__PURE__ */ defineComponent({
360
+ __name: "DatabaseReader",
361
+ props: {
362
+ nodeId: {
363
+ type: Number,
364
+ required: true
365
+ }
366
+ },
367
+ setup(__props) {
368
+ const nodeStore = useNodeStore();
369
+ const childComp = ref(null);
370
+ const props = __props;
371
+ const drawer = ref(false);
372
+ const closeOnDrawer = () => {
373
+ var _a;
374
+ drawer.value = false;
375
+ (_a = childComp.value) == null ? void 0 : _a.pushNodeData();
376
+ };
377
+ const openDrawer = async () => {
378
+ if (nodeStore.node_id === props.nodeId) {
379
+ return;
380
+ }
381
+ nodeStore.closeDrawer();
382
+ drawer.value = true;
383
+ const drawerOpen = nodeStore.isDrawerOpen;
384
+ nodeStore.isDrawerOpen = true;
385
+ await nextTick();
386
+ if (nodeStore.node_id === props.nodeId && drawerOpen) {
387
+ return;
388
+ }
389
+ if (childComp.value) {
390
+ childComp.value.loadNodeData(props.nodeId);
391
+ nodeStore.openDrawer(closeOnDrawer);
392
+ }
393
+ };
394
+ onMounted(async () => {
395
+ await nextTick();
396
+ });
397
+ return (_ctx, _cache) => {
398
+ return openBlock(), createElementBlock("div", _hoisted_1, [
399
+ createVNode(NodeButton, {
400
+ ref: "nodeButton",
401
+ "node-id": __props.nodeId,
402
+ "image-src": "database_reader.svg",
403
+ title: `${__props.nodeId}: Database reader`,
404
+ onClick: openDrawer
405
+ }, null, 8, ["node-id", "title"]),
406
+ drawer.value ? (openBlock(), createBlock(Teleport, {
407
+ key: 0,
408
+ to: "#nodesettings"
409
+ }, [
410
+ createVNode(NodeTitle, {
411
+ title: "Read data from database",
412
+ intro: "Read data from database"
413
+ }),
414
+ createVNode(DatabaseReader, {
415
+ ref_key: "childComp",
416
+ ref: childComp,
417
+ "node-id": __props.nodeId
418
+ }, null, 8, ["node-id"])
419
+ ])) : createCommentVNode("", true)
420
+ ], 512);
421
+ };
422
+ }
423
+ });
424
+ export {
425
+ _sfc_main as default
426
+ };
@@ -0,0 +1,158 @@
1
+
2
+ .query-section[data-v-29602f2f] {
3
+ margin-top: 1rem;
4
+ padding-top: 1rem;
5
+ border-top: 1px solid #edf2f7;
6
+ }
7
+ .section-subtitle[data-v-29602f2f] {
8
+ margin: 0 0 0.75rem 0;
9
+ font-size: 0.95rem;
10
+ font-weight: 600;
11
+ color: #4a5568;
12
+ }
13
+ .form-group[data-v-29602f2f] {
14
+ margin-bottom: 1rem;
15
+ }
16
+ .form-control[data-v-29602f2f] {
17
+ width: 100%;
18
+ padding: 0.5rem;
19
+ border: 1px solid #e2e8f0;
20
+ border-radius: 4px;
21
+ font-size: 0.875rem;
22
+ }
23
+ .textarea[data-v-29602f2f] {
24
+ resize: vertical;
25
+ min-height: 100px;
26
+ font-family: monospace;
27
+ }
28
+
29
+ .db-container[data-v-ae4d7dc5] {
30
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
31
+ max-width: 100%;
32
+ color: #333;
33
+ }
34
+ .section-subtitle[data-v-ae4d7dc5] {
35
+ margin: 0 0 0.75rem 0;
36
+ font-size: 0.95rem;
37
+ font-weight: 600;
38
+ color: #4a5568;
39
+ }
40
+ .query-section[data-v-ae4d7dc5] {
41
+ margin-top: 1rem;
42
+ padding-top: 1rem;
43
+ border-top: 1px solid #edf2f7;
44
+ }
45
+ .form-row[data-v-ae4d7dc5] {
46
+ display: flex;
47
+ gap: 0.75rem;
48
+ margin-bottom: 0.75rem;
49
+ width: 100%;
50
+ box-sizing: border-box;
51
+ }
52
+ .half[data-v-ae4d7dc5] {
53
+ flex: 1;
54
+ min-width: 0; /* Allow fields to shrink below their content size */
55
+ max-width: calc(50% - 0.375rem); /* Account for the gap between items */
56
+ }
57
+ .form-control[data-v-ae4d7dc5] {
58
+ width: 100%;
59
+ padding: 0.5rem;
60
+ border: 1px solid #e2e8f0;
61
+ border-radius: 4px;
62
+ font-size: 0.875rem;
63
+ box-sizing: border-box;
64
+ }
65
+ .form-group[data-v-ae4d7dc5] {
66
+ margin-bottom: 0.75rem;
67
+ width: 100%;
68
+ }
69
+ label[data-v-ae4d7dc5] {
70
+ display: block;
71
+ margin-bottom: 0.25rem;
72
+ font-size: 0.875rem;
73
+ font-weight: 500;
74
+ color: #4a5568;
75
+ }
76
+ .form-control[data-v-ae4d7dc5] {
77
+ width: 100%;
78
+ padding: 0.5rem;
79
+ border: 1px solid #e2e8f0;
80
+ border-radius: 4px;
81
+ font-size: 0.875rem;
82
+ }
83
+ select.form-control[data-v-ae4d7dc5] {
84
+ appearance: none;
85
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
86
+ background-repeat: no-repeat;
87
+ background-position: right 0.5rem center;
88
+ background-size: 1em;
89
+ padding-right: 2rem;
90
+ }
91
+
92
+ /* Validation section styling */
93
+ .validation-section[data-v-ae4d7dc5] {
94
+ margin-top: 1.5rem;
95
+ padding-top: 1rem;
96
+ border-top: 1px solid #edf2f7;
97
+ }
98
+ .validate-button[data-v-ae4d7dc5] {
99
+ background-color: #4299e1;
100
+ color: white;
101
+ border: none;
102
+ border-radius: 4px;
103
+ padding: 0.5rem 1rem;
104
+ font-size: 0.875rem;
105
+ font-weight: 500;
106
+ cursor: pointer;
107
+ transition: background-color 0.2s;
108
+ }
109
+ .validate-button[data-v-ae4d7dc5]:hover {
110
+ background-color: #3182ce;
111
+ }
112
+ .validate-button[data-v-ae4d7dc5]:disabled {
113
+ background-color: #a0aec0;
114
+ cursor: not-allowed;
115
+ }
116
+ .error-box[data-v-ae4d7dc5] {
117
+ margin-top: 1rem;
118
+ padding: 0.75rem;
119
+ border-radius: 4px;
120
+ background-color: #fff5f5;
121
+ border: 1px solid #fed7d7;
122
+ }
123
+ .error-title[data-v-ae4d7dc5] {
124
+ color: #e53e3e;
125
+ font-weight: 600;
126
+ margin-bottom: 0.25rem;
127
+ }
128
+ .error-message[data-v-ae4d7dc5] {
129
+ color: #c53030;
130
+ font-size: 0.875rem;
131
+ white-space: pre-wrap;
132
+ overflow-wrap: break-word;
133
+ }
134
+ .success-box[data-v-ae4d7dc5] {
135
+ margin-top: 1rem;
136
+ padding: 0.75rem;
137
+ border-radius: 4px;
138
+ background-color: #f0fff4;
139
+ border: 1px solid #c6f6d5;
140
+ }
141
+ .success-message[data-v-ae4d7dc5] {
142
+ color: #38a169;
143
+ font-size: 0.875rem;
144
+ }
145
+ @media (max-width: 640px) {
146
+ .form-row[data-v-ae4d7dc5] {
147
+ flex-direction: column;
148
+ gap: 0.5rem;
149
+ }
150
+ }
151
+ .el-radio-group[data-v-ae4d7dc5] {
152
+ display: flex !important;
153
+ flex-direction: row !important;
154
+ gap: 1rem;
155
+ }
156
+ .el-radio[data-v-ae4d7dc5] {
157
+ margin-right: 0 !important; /* Override any existing margins */
158
+ }
@@ -0,0 +1,96 @@
1
+
2
+ .db-container[data-v-90b52fee] {
3
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
4
+ max-width: 100%;
5
+ color: #333;
6
+ }
7
+ .section-subtitle[data-v-90b52fee] {
8
+ margin: 0 0 0.75rem 0;
9
+ font-size: 0.95rem;
10
+ font-weight: 600;
11
+ color: #4a5568;
12
+ }
13
+ .form-row[data-v-90b52fee] {
14
+ display: flex;
15
+ gap: 0.75rem;
16
+ margin-bottom: 0.75rem;
17
+ width: 100%;
18
+ box-sizing: border-box;
19
+ }
20
+ .half[data-v-90b52fee] {
21
+ flex: 1;
22
+ min-width: 0; /* Allow fields to shrink below their content size */
23
+ max-width: calc(50% - 0.375rem); /* Account for the gap between items */
24
+ }
25
+ .form-control[data-v-90b52fee] {
26
+ width: 100%;
27
+ padding: 0.5rem;
28
+ border: 1px solid #e2e8f0;
29
+ border-radius: 4px;
30
+ font-size: 0.875rem;
31
+ box-sizing: border-box;
32
+ }
33
+ .form-group[data-v-90b52fee] {
34
+ margin-bottom: 0.75rem;
35
+ width: 100%;
36
+ }
37
+ label[data-v-90b52fee] {
38
+ display: block;
39
+ margin-bottom: 0.25rem;
40
+ font-size: 0.875rem;
41
+ font-weight: 500;
42
+ color: #4a5568;
43
+ }
44
+ select.form-control[data-v-90b52fee] {
45
+ appearance: none;
46
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
47
+ background-repeat: no-repeat;
48
+ background-position: right 0.5rem center;
49
+ background-size: 1em;
50
+ padding-right: 2rem;
51
+ }
52
+ .loading-spinner[data-v-90b52fee] {
53
+ display: inline-block;
54
+ width: 20px;
55
+ height: 20px;
56
+ border: 2px solid rgba(66, 153, 225, 0.3);
57
+ border-radius: 50%;
58
+ border-top-color: #4299e1;
59
+ animation: spin-90b52fee 1s ease-in-out infinite;
60
+ margin-right: 8px;
61
+ }
62
+ @keyframes spin-90b52fee {
63
+ to {
64
+ transform: rotate(360deg);
65
+ }
66
+ }
67
+ .option-description[data-v-90b52fee] {
68
+ font-size: 0.875rem;
69
+ color: #718096;
70
+ margin: 0.5rem 0;
71
+ padding: 0.75rem;
72
+ background-color: #f7fafc;
73
+ border-radius: 4px;
74
+ border-left: 3px solid #4299e1;
75
+ }
76
+ .el-radio-group[data-v-90b52fee] {
77
+ display: flex !important;
78
+ flex-direction: row !important;
79
+ gap: 1rem;
80
+ }
81
+ .el-radio[data-v-90b52fee] {
82
+ margin-right: 0 !important; /* Override any existing margins */
83
+ }
84
+ @media (max-width: 640px) {
85
+ .form-row[data-v-90b52fee] {
86
+ flex-direction: column;
87
+ gap: 0.5rem;
88
+ }
89
+ .half[data-v-90b52fee] {
90
+ max-width: 100%;
91
+ }
92
+ .el-radio-group[data-v-90b52fee] {
93
+ flex-direction: column !important;
94
+ gap: 0.5rem;
95
+ }
96
+ }