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,484 @@
|
|
|
1
|
+
import { f as fetchDatabaseConnectionsInterfaces, c as createDatabaseConnectionApi, d as deleteDatabaseConnectionApi } from "./api-22b338bd.js";
|
|
2
|
+
import { d as defineComponent, r as ref, m as watch, l as computed, c as openBlock, e as createElementBlock, p as createBaseVNode, a4 as withDirectives, a5 as vModelText, ae as vModelSelect, af as vModelDynamic, s as normalizeClass, ag as vModelCheckbox, t as toDisplayString, v as withModifiers, n as onMounted, g as createTextVNode, F as Fragment, q as renderList, f as createVNode, w as withCtx, u as unref, z as ElMessage, ah as ElDialog, ai as ElButton, _ as _export_sfc } from "./index-552863fd.js";
|
|
3
|
+
const _hoisted_1$1 = { class: "form-grid" };
|
|
4
|
+
const _hoisted_2$1 = { class: "form-field" };
|
|
5
|
+
const _hoisted_3$1 = { class: "form-field" };
|
|
6
|
+
const _hoisted_4$1 = { class: "form-field" };
|
|
7
|
+
const _hoisted_5$1 = { class: "form-field" };
|
|
8
|
+
const _hoisted_6$1 = { class: "form-field" };
|
|
9
|
+
const _hoisted_7$1 = { class: "form-field" };
|
|
10
|
+
const _hoisted_8$1 = { class: "form-field" };
|
|
11
|
+
const _hoisted_9$1 = { class: "password-field" };
|
|
12
|
+
const _hoisted_10$1 = ["type"];
|
|
13
|
+
const _hoisted_11$1 = { class: "form-field" };
|
|
14
|
+
const _hoisted_12$1 = { class: "checkbox-container" };
|
|
15
|
+
const _hoisted_13$1 = { class: "form-actions" };
|
|
16
|
+
const _hoisted_14$1 = ["disabled"];
|
|
17
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
18
|
+
__name: "DatabaseConnectionSettings",
|
|
19
|
+
props: {
|
|
20
|
+
initialConnection: {},
|
|
21
|
+
isSubmitting: { type: Boolean }
|
|
22
|
+
},
|
|
23
|
+
emits: ["submit", "cancel"],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const defaultConnection = () => ({
|
|
28
|
+
connectionName: "",
|
|
29
|
+
databaseType: "postgresql",
|
|
30
|
+
username: "",
|
|
31
|
+
password: "",
|
|
32
|
+
host: "",
|
|
33
|
+
port: 5432,
|
|
34
|
+
database: "",
|
|
35
|
+
sslEnabled: false,
|
|
36
|
+
url: ""
|
|
37
|
+
});
|
|
38
|
+
const connection = ref(
|
|
39
|
+
props.initialConnection ? { ...props.initialConnection } : defaultConnection()
|
|
40
|
+
);
|
|
41
|
+
watch(
|
|
42
|
+
() => props.initialConnection,
|
|
43
|
+
(newVal) => {
|
|
44
|
+
if (newVal) {
|
|
45
|
+
connection.value = { ...newVal };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
const showPassword = ref(false);
|
|
50
|
+
const isValid = computed(() => {
|
|
51
|
+
return !!connection.value.connectionName && !!connection.value.username && !!connection.value.password && !!connection.value.host;
|
|
52
|
+
});
|
|
53
|
+
const submitButtonText = computed(() => {
|
|
54
|
+
if (props.isSubmitting) {
|
|
55
|
+
return "Saving...";
|
|
56
|
+
}
|
|
57
|
+
return props.initialConnection ? "Update Connection" : "Create Connection";
|
|
58
|
+
});
|
|
59
|
+
const submitForm = () => {
|
|
60
|
+
if (isValid.value) {
|
|
61
|
+
emit("submit", connection.value);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return (_ctx, _cache) => {
|
|
65
|
+
return openBlock(), createElementBlock("form", {
|
|
66
|
+
class: "form",
|
|
67
|
+
onSubmit: withModifiers(submitForm, ["prevent"])
|
|
68
|
+
}, [
|
|
69
|
+
createBaseVNode("div", _hoisted_1$1, [
|
|
70
|
+
createBaseVNode("div", _hoisted_2$1, [
|
|
71
|
+
_cache[10] || (_cache[10] = createBaseVNode("label", {
|
|
72
|
+
for: "connection-name",
|
|
73
|
+
class: "form-label"
|
|
74
|
+
}, "Connection Name", -1)),
|
|
75
|
+
withDirectives(createBaseVNode("input", {
|
|
76
|
+
id: "connection-name",
|
|
77
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => connection.value.connectionName = $event),
|
|
78
|
+
type: "text",
|
|
79
|
+
class: "form-input",
|
|
80
|
+
placeholder: "my_postgres_db",
|
|
81
|
+
required: ""
|
|
82
|
+
}, null, 512), [
|
|
83
|
+
[vModelText, connection.value.connectionName]
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
createBaseVNode("div", _hoisted_3$1, [
|
|
87
|
+
_cache[12] || (_cache[12] = createBaseVNode("label", {
|
|
88
|
+
for: "database-type",
|
|
89
|
+
class: "form-label"
|
|
90
|
+
}, "Database Type", -1)),
|
|
91
|
+
withDirectives(createBaseVNode("select", {
|
|
92
|
+
id: "database-type",
|
|
93
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => connection.value.databaseType = $event),
|
|
94
|
+
class: "form-input",
|
|
95
|
+
required: ""
|
|
96
|
+
}, _cache[11] || (_cache[11] = [
|
|
97
|
+
createBaseVNode("option", { value: "postgresql" }, "PostgreSQL", -1)
|
|
98
|
+
]), 512), [
|
|
99
|
+
[vModelSelect, connection.value.databaseType]
|
|
100
|
+
])
|
|
101
|
+
]),
|
|
102
|
+
createBaseVNode("div", _hoisted_4$1, [
|
|
103
|
+
_cache[13] || (_cache[13] = createBaseVNode("label", {
|
|
104
|
+
for: "host",
|
|
105
|
+
class: "form-label"
|
|
106
|
+
}, "Host", -1)),
|
|
107
|
+
withDirectives(createBaseVNode("input", {
|
|
108
|
+
id: "host",
|
|
109
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => connection.value.host = $event),
|
|
110
|
+
type: "text",
|
|
111
|
+
class: "form-input",
|
|
112
|
+
placeholder: "localhost or IP address",
|
|
113
|
+
required: ""
|
|
114
|
+
}, null, 512), [
|
|
115
|
+
[vModelText, connection.value.host]
|
|
116
|
+
])
|
|
117
|
+
]),
|
|
118
|
+
createBaseVNode("div", _hoisted_5$1, [
|
|
119
|
+
_cache[14] || (_cache[14] = createBaseVNode("label", {
|
|
120
|
+
for: "port",
|
|
121
|
+
class: "form-label"
|
|
122
|
+
}, "Port", -1)),
|
|
123
|
+
withDirectives(createBaseVNode("input", {
|
|
124
|
+
id: "port",
|
|
125
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => connection.value.port = $event),
|
|
126
|
+
type: "number",
|
|
127
|
+
class: "form-input",
|
|
128
|
+
placeholder: "5432"
|
|
129
|
+
}, null, 512), [
|
|
130
|
+
[vModelText, connection.value.port]
|
|
131
|
+
])
|
|
132
|
+
]),
|
|
133
|
+
createBaseVNode("div", _hoisted_6$1, [
|
|
134
|
+
_cache[15] || (_cache[15] = createBaseVNode("label", {
|
|
135
|
+
for: "database",
|
|
136
|
+
class: "form-label"
|
|
137
|
+
}, "Database", -1)),
|
|
138
|
+
withDirectives(createBaseVNode("input", {
|
|
139
|
+
id: "database",
|
|
140
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => connection.value.database = $event),
|
|
141
|
+
type: "text",
|
|
142
|
+
class: "form-input",
|
|
143
|
+
placeholder: "Database name"
|
|
144
|
+
}, null, 512), [
|
|
145
|
+
[vModelText, connection.value.database]
|
|
146
|
+
])
|
|
147
|
+
]),
|
|
148
|
+
createBaseVNode("div", _hoisted_7$1, [
|
|
149
|
+
_cache[16] || (_cache[16] = createBaseVNode("label", {
|
|
150
|
+
for: "username",
|
|
151
|
+
class: "form-label"
|
|
152
|
+
}, "Username", -1)),
|
|
153
|
+
withDirectives(createBaseVNode("input", {
|
|
154
|
+
id: "username",
|
|
155
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => connection.value.username = $event),
|
|
156
|
+
type: "text",
|
|
157
|
+
class: "form-input",
|
|
158
|
+
placeholder: "Username",
|
|
159
|
+
required: ""
|
|
160
|
+
}, null, 512), [
|
|
161
|
+
[vModelText, connection.value.username]
|
|
162
|
+
])
|
|
163
|
+
]),
|
|
164
|
+
createBaseVNode("div", _hoisted_8$1, [
|
|
165
|
+
_cache[17] || (_cache[17] = createBaseVNode("label", {
|
|
166
|
+
for: "password",
|
|
167
|
+
class: "form-label"
|
|
168
|
+
}, "Password", -1)),
|
|
169
|
+
createBaseVNode("div", _hoisted_9$1, [
|
|
170
|
+
withDirectives(createBaseVNode("input", {
|
|
171
|
+
id: "password",
|
|
172
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => connection.value.password = $event),
|
|
173
|
+
type: showPassword.value ? "text" : "password",
|
|
174
|
+
class: "form-input",
|
|
175
|
+
placeholder: "Password",
|
|
176
|
+
required: ""
|
|
177
|
+
}, null, 8, _hoisted_10$1), [
|
|
178
|
+
[vModelDynamic, connection.value.password]
|
|
179
|
+
]),
|
|
180
|
+
createBaseVNode("button", {
|
|
181
|
+
type: "button",
|
|
182
|
+
class: "toggle-visibility",
|
|
183
|
+
"aria-label": "Toggle password visibility",
|
|
184
|
+
onClick: _cache[7] || (_cache[7] = ($event) => showPassword.value = !showPassword.value)
|
|
185
|
+
}, [
|
|
186
|
+
createBaseVNode("i", {
|
|
187
|
+
class: normalizeClass(showPassword.value ? "fa-solid fa-eye-slash" : "fa-solid fa-eye")
|
|
188
|
+
}, null, 2)
|
|
189
|
+
])
|
|
190
|
+
])
|
|
191
|
+
]),
|
|
192
|
+
createBaseVNode("div", _hoisted_11$1, [
|
|
193
|
+
createBaseVNode("div", _hoisted_12$1, [
|
|
194
|
+
withDirectives(createBaseVNode("input", {
|
|
195
|
+
id: "ssl-enabled",
|
|
196
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => connection.value.sslEnabled = $event),
|
|
197
|
+
type: "checkbox",
|
|
198
|
+
class: "checkbox-input"
|
|
199
|
+
}, null, 512), [
|
|
200
|
+
[vModelCheckbox, connection.value.sslEnabled]
|
|
201
|
+
]),
|
|
202
|
+
_cache[18] || (_cache[18] = createBaseVNode("label", {
|
|
203
|
+
for: "ssl-enabled",
|
|
204
|
+
class: "form-label"
|
|
205
|
+
}, "Enable SSL", -1))
|
|
206
|
+
])
|
|
207
|
+
])
|
|
208
|
+
]),
|
|
209
|
+
createBaseVNode("div", _hoisted_13$1, [
|
|
210
|
+
createBaseVNode("button", {
|
|
211
|
+
type: "button",
|
|
212
|
+
class: "btn btn-secondary",
|
|
213
|
+
onClick: _cache[9] || (_cache[9] = ($event) => _ctx.$emit("cancel"))
|
|
214
|
+
}, "Cancel"),
|
|
215
|
+
createBaseVNode("button", {
|
|
216
|
+
type: "submit",
|
|
217
|
+
class: "btn btn-primary",
|
|
218
|
+
disabled: !isValid.value || _ctx.isSubmitting
|
|
219
|
+
}, toDisplayString(submitButtonText.value), 9, _hoisted_14$1)
|
|
220
|
+
])
|
|
221
|
+
], 32);
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
const _hoisted_1 = { class: "database-manager-container" };
|
|
226
|
+
const _hoisted_2 = { class: "card mb-3" };
|
|
227
|
+
const _hoisted_3 = { class: "card-header" };
|
|
228
|
+
const _hoisted_4 = { class: "card-title" };
|
|
229
|
+
const _hoisted_5 = { class: "card-content" };
|
|
230
|
+
const _hoisted_6 = {
|
|
231
|
+
key: 0,
|
|
232
|
+
class: "loading-state"
|
|
233
|
+
};
|
|
234
|
+
const _hoisted_7 = {
|
|
235
|
+
key: 1,
|
|
236
|
+
class: "empty-state"
|
|
237
|
+
};
|
|
238
|
+
const _hoisted_8 = {
|
|
239
|
+
key: 2,
|
|
240
|
+
class: "flex-col gap-2"
|
|
241
|
+
};
|
|
242
|
+
const _hoisted_9 = { class: "secret-info" };
|
|
243
|
+
const _hoisted_10 = { class: "secret-name" };
|
|
244
|
+
const _hoisted_11 = { class: "badge" };
|
|
245
|
+
const _hoisted_12 = { class: "connection-details" };
|
|
246
|
+
const _hoisted_13 = { class: "secret-actions" };
|
|
247
|
+
const _hoisted_14 = ["onClick"];
|
|
248
|
+
const _hoisted_15 = ["onClick"];
|
|
249
|
+
const _hoisted_16 = { class: "dialog-footer" };
|
|
250
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
251
|
+
__name: "DatabaseManager",
|
|
252
|
+
setup(__props) {
|
|
253
|
+
const connectionInterfaces = ref([]);
|
|
254
|
+
const isLoading = ref(true);
|
|
255
|
+
const dialogVisible = ref(false);
|
|
256
|
+
const deleteDialogVisible = ref(false);
|
|
257
|
+
const isEditing = ref(false);
|
|
258
|
+
const isSubmitting = ref(false);
|
|
259
|
+
const isDeleting = ref(false);
|
|
260
|
+
const connectionToDelete = ref("");
|
|
261
|
+
const activeConnection = ref(void 0);
|
|
262
|
+
const fetchConnections = async () => {
|
|
263
|
+
isLoading.value = true;
|
|
264
|
+
try {
|
|
265
|
+
connectionInterfaces.value = await fetchDatabaseConnectionsInterfaces();
|
|
266
|
+
} catch (error) {
|
|
267
|
+
console.error("Error fetching connections:", error);
|
|
268
|
+
ElMessage.error("Failed to load database connections");
|
|
269
|
+
} finally {
|
|
270
|
+
isLoading.value = false;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
const showAddModal = () => {
|
|
274
|
+
isEditing.value = false;
|
|
275
|
+
activeConnection.value = void 0;
|
|
276
|
+
dialogVisible.value = true;
|
|
277
|
+
};
|
|
278
|
+
const showEditModal = (connection) => {
|
|
279
|
+
isEditing.value = true;
|
|
280
|
+
activeConnection.value = {
|
|
281
|
+
connectionName: connection.connectionName,
|
|
282
|
+
databaseType: connection.databaseType,
|
|
283
|
+
username: connection.username,
|
|
284
|
+
password: "",
|
|
285
|
+
// Password is not returned from the API
|
|
286
|
+
host: connection.host || "",
|
|
287
|
+
port: connection.port || 5432,
|
|
288
|
+
database: connection.database || "",
|
|
289
|
+
sslEnabled: connection.sslEnabled,
|
|
290
|
+
url: connection.url || ""
|
|
291
|
+
};
|
|
292
|
+
dialogVisible.value = true;
|
|
293
|
+
};
|
|
294
|
+
const showDeleteModal = (connectionName) => {
|
|
295
|
+
connectionToDelete.value = connectionName;
|
|
296
|
+
deleteDialogVisible.value = true;
|
|
297
|
+
};
|
|
298
|
+
const handleFormSubmit = async (connection) => {
|
|
299
|
+
isSubmitting.value = true;
|
|
300
|
+
try {
|
|
301
|
+
await createDatabaseConnectionApi(connection);
|
|
302
|
+
await fetchConnections();
|
|
303
|
+
dialogVisible.value = false;
|
|
304
|
+
ElMessage.success(`Connection ${isEditing.value ? "updated" : "created"} successfully`);
|
|
305
|
+
} catch (error) {
|
|
306
|
+
ElMessage.error(
|
|
307
|
+
`Failed to ${isEditing.value ? "update" : "create"} connection: ${error.message || "Unknown error"}`
|
|
308
|
+
);
|
|
309
|
+
} finally {
|
|
310
|
+
isSubmitting.value = false;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
const handleDeleteConnection = async () => {
|
|
314
|
+
if (!connectionToDelete.value)
|
|
315
|
+
return;
|
|
316
|
+
isDeleting.value = true;
|
|
317
|
+
try {
|
|
318
|
+
await deleteDatabaseConnectionApi(connectionToDelete.value);
|
|
319
|
+
await fetchConnections();
|
|
320
|
+
deleteDialogVisible.value = false;
|
|
321
|
+
ElMessage.success("Connection deleted successfully");
|
|
322
|
+
} catch (error) {
|
|
323
|
+
ElMessage.error("Failed to delete connection");
|
|
324
|
+
} finally {
|
|
325
|
+
isDeleting.value = false;
|
|
326
|
+
connectionToDelete.value = "";
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
const handleCloseDialog = (done) => {
|
|
330
|
+
if (isSubmitting.value)
|
|
331
|
+
return;
|
|
332
|
+
done();
|
|
333
|
+
};
|
|
334
|
+
const handleCloseDeleteDialog = (done) => {
|
|
335
|
+
if (isDeleting.value)
|
|
336
|
+
return;
|
|
337
|
+
done();
|
|
338
|
+
};
|
|
339
|
+
onMounted(() => {
|
|
340
|
+
fetchConnections();
|
|
341
|
+
});
|
|
342
|
+
return (_ctx, _cache) => {
|
|
343
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
344
|
+
_cache[18] || (_cache[18] = createBaseVNode("div", { class: "mb-3" }, [
|
|
345
|
+
createBaseVNode("h2", { class: "page-title" }, "Database Connections"),
|
|
346
|
+
createBaseVNode("p", { class: "description-text" }, " Database connections allow you to connect to your databases for reading and writing data. Create and manage your connections here to use them in your data workflows. ")
|
|
347
|
+
], -1)),
|
|
348
|
+
createBaseVNode("div", _hoisted_2, [
|
|
349
|
+
createBaseVNode("div", _hoisted_3, [
|
|
350
|
+
createBaseVNode("h3", _hoisted_4, "Your Connections (" + toDisplayString(connectionInterfaces.value.length) + ")", 1),
|
|
351
|
+
createBaseVNode("button", {
|
|
352
|
+
class: "btn btn-primary",
|
|
353
|
+
onClick: showAddModal
|
|
354
|
+
}, _cache[4] || (_cache[4] = [
|
|
355
|
+
createBaseVNode("i", { class: "fa-solid fa-plus" }, null, -1),
|
|
356
|
+
createTextVNode(" Add Connection ")
|
|
357
|
+
]))
|
|
358
|
+
]),
|
|
359
|
+
createBaseVNode("div", _hoisted_5, [
|
|
360
|
+
_cache[11] || (_cache[11] = createBaseVNode("div", { class: "info-box mb-3" }, [
|
|
361
|
+
createBaseVNode("i", { class: "fa-solid fa-info-circle" }),
|
|
362
|
+
createBaseVNode("div", null, [
|
|
363
|
+
createBaseVNode("p", null, [
|
|
364
|
+
createBaseVNode("strong", null, "What are database connections?")
|
|
365
|
+
]),
|
|
366
|
+
createBaseVNode("p", null, " Database connections store the credentials and configuration needed to securely access your databases. Once set up, you can reuse these connections throughout your workflows without re-entering credentials. ")
|
|
367
|
+
])
|
|
368
|
+
], -1)),
|
|
369
|
+
isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_6, _cache[5] || (_cache[5] = [
|
|
370
|
+
createBaseVNode("div", { class: "loading-spinner" }, null, -1),
|
|
371
|
+
createBaseVNode("p", null, "Loading connections...", -1)
|
|
372
|
+
]))) : connectionInterfaces.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_7, _cache[6] || (_cache[6] = [
|
|
373
|
+
createBaseVNode("i", { class: "fa-solid fa-database" }, null, -1),
|
|
374
|
+
createBaseVNode("p", null, "You haven't added any database connections yet", -1),
|
|
375
|
+
createBaseVNode("p", { class: "hint-text" }, ' Click the "Add Connection" button to create your first database connection. ', -1)
|
|
376
|
+
]))) : (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
377
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(connectionInterfaces.value, (connection) => {
|
|
378
|
+
return openBlock(), createElementBlock("div", {
|
|
379
|
+
key: connection.connectionName,
|
|
380
|
+
class: "secret-item"
|
|
381
|
+
}, [
|
|
382
|
+
createBaseVNode("div", _hoisted_9, [
|
|
383
|
+
createBaseVNode("div", _hoisted_10, [
|
|
384
|
+
_cache[7] || (_cache[7] = createBaseVNode("i", { class: "fa-solid fa-database" }, null, -1)),
|
|
385
|
+
createBaseVNode("span", null, toDisplayString(connection.connectionName), 1),
|
|
386
|
+
createBaseVNode("span", _hoisted_11, toDisplayString(connection.databaseType), 1)
|
|
387
|
+
]),
|
|
388
|
+
createBaseVNode("div", _hoisted_12, [
|
|
389
|
+
createBaseVNode("span", null, toDisplayString(connection.database ? connection.database : "No database specified"), 1),
|
|
390
|
+
_cache[8] || (_cache[8] = createBaseVNode("span", { class: "separator" }, "•", -1)),
|
|
391
|
+
createBaseVNode("span", null, toDisplayString(connection.host ? connection.host : "Using connection URL"), 1)
|
|
392
|
+
])
|
|
393
|
+
]),
|
|
394
|
+
createBaseVNode("div", _hoisted_13, [
|
|
395
|
+
createBaseVNode("button", {
|
|
396
|
+
type: "button",
|
|
397
|
+
class: "btn btn-secondary",
|
|
398
|
+
onClick: ($event) => showEditModal(connection)
|
|
399
|
+
}, _cache[9] || (_cache[9] = [
|
|
400
|
+
createBaseVNode("i", { class: "fa-solid fa-edit" }, null, -1),
|
|
401
|
+
createBaseVNode("span", null, "Modify", -1)
|
|
402
|
+
]), 8, _hoisted_14),
|
|
403
|
+
createBaseVNode("button", {
|
|
404
|
+
type: "button",
|
|
405
|
+
class: "btn btn-danger",
|
|
406
|
+
onClick: ($event) => showDeleteModal(connection.connectionName)
|
|
407
|
+
}, _cache[10] || (_cache[10] = [
|
|
408
|
+
createBaseVNode("i", { class: "fa-solid fa-trash-alt" }, null, -1),
|
|
409
|
+
createBaseVNode("span", null, "Delete", -1)
|
|
410
|
+
]), 8, _hoisted_15)
|
|
411
|
+
])
|
|
412
|
+
]);
|
|
413
|
+
}), 128))
|
|
414
|
+
]))
|
|
415
|
+
])
|
|
416
|
+
]),
|
|
417
|
+
createVNode(unref(ElDialog), {
|
|
418
|
+
modelValue: dialogVisible.value,
|
|
419
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event),
|
|
420
|
+
title: isEditing.value ? "Edit Database Connection" : "Add Database Connection",
|
|
421
|
+
width: "500px",
|
|
422
|
+
"before-close": handleCloseDialog
|
|
423
|
+
}, {
|
|
424
|
+
default: withCtx(() => [
|
|
425
|
+
_cache[12] || (_cache[12] = createBaseVNode("div", { class: "modal-description mb-3" }, [
|
|
426
|
+
createBaseVNode("p", null, " Configure your database connection details. You can connect using either host/port information or a connection URL. ")
|
|
427
|
+
], -1)),
|
|
428
|
+
createVNode(_sfc_main$1, {
|
|
429
|
+
"initial-connection": activeConnection.value,
|
|
430
|
+
"is-submitting": isSubmitting.value,
|
|
431
|
+
onSubmit: handleFormSubmit,
|
|
432
|
+
onCancel: _cache[0] || (_cache[0] = ($event) => dialogVisible.value = false)
|
|
433
|
+
}, null, 8, ["initial-connection", "is-submitting"])
|
|
434
|
+
]),
|
|
435
|
+
_: 1
|
|
436
|
+
}, 8, ["modelValue", "title"]),
|
|
437
|
+
createVNode(unref(ElDialog), {
|
|
438
|
+
modelValue: deleteDialogVisible.value,
|
|
439
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => deleteDialogVisible.value = $event),
|
|
440
|
+
title: "Delete Connection",
|
|
441
|
+
width: "400px",
|
|
442
|
+
"before-close": handleCloseDeleteDialog
|
|
443
|
+
}, {
|
|
444
|
+
footer: withCtx(() => [
|
|
445
|
+
createBaseVNode("div", _hoisted_16, [
|
|
446
|
+
createVNode(unref(ElButton), {
|
|
447
|
+
onClick: _cache[2] || (_cache[2] = ($event) => deleteDialogVisible.value = false)
|
|
448
|
+
}, {
|
|
449
|
+
default: withCtx(() => _cache[15] || (_cache[15] = [
|
|
450
|
+
createTextVNode("Cancel")
|
|
451
|
+
])),
|
|
452
|
+
_: 1
|
|
453
|
+
}),
|
|
454
|
+
createVNode(unref(ElButton), {
|
|
455
|
+
type: "danger",
|
|
456
|
+
loading: isDeleting.value,
|
|
457
|
+
onClick: handleDeleteConnection
|
|
458
|
+
}, {
|
|
459
|
+
default: withCtx(() => _cache[16] || (_cache[16] = [
|
|
460
|
+
createTextVNode(" Delete ")
|
|
461
|
+
])),
|
|
462
|
+
_: 1
|
|
463
|
+
}, 8, ["loading"])
|
|
464
|
+
])
|
|
465
|
+
]),
|
|
466
|
+
default: withCtx(() => [
|
|
467
|
+
createBaseVNode("p", null, [
|
|
468
|
+
_cache[13] || (_cache[13] = createTextVNode(" Are you sure you want to delete the connection ")),
|
|
469
|
+
createBaseVNode("strong", null, toDisplayString(connectionToDelete.value), 1),
|
|
470
|
+
_cache[14] || (_cache[14] = createTextVNode("? "))
|
|
471
|
+
]),
|
|
472
|
+
_cache[17] || (_cache[17] = createBaseVNode("p", { class: "warning-text" }, " This action cannot be undone and may affect any processes using this connection. ", -1))
|
|
473
|
+
]),
|
|
474
|
+
_: 1
|
|
475
|
+
}, 8, ["modelValue"])
|
|
476
|
+
]);
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
const DatabaseManager_vue_vue_type_style_index_0_scoped_87a64956_lang = "";
|
|
481
|
+
const DatabaseManager = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-87a64956"]]);
|
|
482
|
+
export {
|
|
483
|
+
DatabaseManager as default
|
|
484
|
+
};
|