@nice2dev/ui-bi 1.1.10 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +173 -0
- package/dist/NiceETLBuilder.d.ts +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +321 -275
- package/dist/types.d.ts +3 -5
- package/dist/ui-bi.css +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e, Fragment as
|
|
2
|
-
import { NiceIcon as
|
|
3
|
-
import { useNiceTranslation as C, NiceTutorialButton as
|
|
4
|
-
import { useState as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { NiceIcon as g, NiceAppShell as q } from "@nice2dev/ui";
|
|
3
|
+
import { useNiceTranslation as C, createId as w, NiceTutorialButton as G, resolveTutorial as Q } from "@nice2dev/ui-core";
|
|
4
|
+
import { useState as N, useRef as X, useCallback as y } from "react";
|
|
5
|
+
const Z = [
|
|
6
6
|
{
|
|
7
7
|
target: ".nice-etl-builder",
|
|
8
8
|
titleKey: "tutorial.etlBuilder.intro.title",
|
|
@@ -11,167 +11,188 @@ const Q = [
|
|
|
11
11
|
content: "Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",
|
|
12
12
|
placement: "auto"
|
|
13
13
|
}
|
|
14
|
-
],
|
|
14
|
+
], ee = {
|
|
15
15
|
id: "",
|
|
16
16
|
name: "New Pipeline",
|
|
17
17
|
sources: [],
|
|
18
18
|
transformations: [],
|
|
19
19
|
destinations: [],
|
|
20
20
|
version: 1
|
|
21
|
-
},
|
|
22
|
-
{ type: "filter", label: "Filter", icon: "filter" },
|
|
23
|
-
{ type: "map", label: "Map", icon: "shuffle" },
|
|
24
|
-
{ type: "aggregate", label: "Aggregate", icon: "∑" },
|
|
25
|
-
{ type: "join", label: "Join", icon: "link" },
|
|
26
|
-
{ type: "union", label: "Union", icon: "∪" },
|
|
27
|
-
{ type: "sort", label: "Sort", icon: "sort" },
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{ type: "
|
|
35
|
-
{ type: "
|
|
36
|
-
{ type: "
|
|
37
|
-
{ type: "
|
|
21
|
+
}, R = (u) => /^[a-z][a-z0-9-]*$/.test(u) ? /* @__PURE__ */ e(g, { name: u, size: 16 }) : u, x = [
|
|
22
|
+
{ type: "filter", key: "etlBuilder.transform.filter", label: "Filter", icon: "filter" },
|
|
23
|
+
{ type: "map", key: "etlBuilder.transform.map", label: "Map", icon: "shuffle" },
|
|
24
|
+
{ type: "aggregate", key: "etlBuilder.transform.aggregate", label: "Aggregate", icon: "∑" },
|
|
25
|
+
{ type: "join", key: "etlBuilder.transform.join", label: "Join", icon: "link" },
|
|
26
|
+
{ type: "union", key: "etlBuilder.transform.union", label: "Union", icon: "∪" },
|
|
27
|
+
{ type: "sort", key: "etlBuilder.transform.sort", label: "Sort", icon: "sort" },
|
|
28
|
+
{
|
|
29
|
+
type: "deduplicate",
|
|
30
|
+
key: "etlBuilder.transform.deduplicate",
|
|
31
|
+
label: "Deduplicate",
|
|
32
|
+
icon: "copy"
|
|
33
|
+
},
|
|
34
|
+
{ type: "pivot", key: "etlBuilder.transform.pivot", label: "Pivot", icon: "expand" },
|
|
35
|
+
{ type: "unpivot", key: "etlBuilder.transform.unpivot", label: "Unpivot", icon: "collapse" },
|
|
36
|
+
{ type: "split", key: "etlBuilder.transform.split", label: "Split", icon: "scissors" },
|
|
37
|
+
{ type: "merge", key: "etlBuilder.transform.merge", label: "Merge", icon: "git-branch" },
|
|
38
|
+
{ type: "lookup", key: "etlBuilder.transform.lookup", label: "Lookup", icon: "book" },
|
|
39
|
+
{ type: "derive", key: "etlBuilder.transform.derive", label: "Derive Column", icon: "plus" },
|
|
40
|
+
{ type: "validate", key: "etlBuilder.transform.validate", label: "Validate", icon: "check" },
|
|
41
|
+
{ type: "cleanse", key: "etlBuilder.transform.cleanse", label: "Cleanse", icon: "wand" },
|
|
42
|
+
{ type: "custom", key: "etlBuilder.transform.custom", label: "Custom", icon: "ƒ" }
|
|
38
43
|
];
|
|
39
44
|
function ce({
|
|
40
|
-
pipeline:
|
|
45
|
+
pipeline: u,
|
|
41
46
|
dataSources: t = [],
|
|
42
|
-
onChange:
|
|
43
|
-
onRun:
|
|
44
|
-
onSchedule:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
onChange: o,
|
|
48
|
+
onRun: r,
|
|
49
|
+
onSchedule: h,
|
|
50
|
+
onSave: n,
|
|
51
|
+
className: f = "",
|
|
52
|
+
tutorial: s
|
|
47
53
|
}) {
|
|
48
|
-
const { t:
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
const { t: c } = C(), [m, U] = N(
|
|
55
|
+
() => u || {
|
|
56
|
+
...ee,
|
|
57
|
+
id: w(),
|
|
58
|
+
name: c("etlBuilder.newPipeline", "New Pipeline")
|
|
59
|
+
}
|
|
60
|
+
), [p, v] = N(null), [B, F] = N("design"), [S, L] = N(!1), [M, I] = N([]), [T, D] = N(null), $ = X(null), _ = y(
|
|
51
61
|
(i) => {
|
|
52
|
-
|
|
62
|
+
U((a) => {
|
|
53
63
|
const d = i(a);
|
|
54
|
-
return
|
|
64
|
+
return o == null || o(d), d;
|
|
55
65
|
});
|
|
56
66
|
},
|
|
57
|
-
[
|
|
58
|
-
),
|
|
67
|
+
[o]
|
|
68
|
+
), A = y(
|
|
59
69
|
(i) => {
|
|
60
70
|
var d;
|
|
61
71
|
const a = {
|
|
62
|
-
id:
|
|
72
|
+
id: w(),
|
|
63
73
|
type: i.type,
|
|
64
74
|
name: i.name,
|
|
65
75
|
config: i.config,
|
|
66
76
|
schema: (d = i.schema) == null ? void 0 : d.tables[0]
|
|
67
77
|
};
|
|
68
|
-
|
|
69
|
-
...
|
|
70
|
-
sources: [...
|
|
78
|
+
_((b) => ({
|
|
79
|
+
...b,
|
|
80
|
+
sources: [...b.sources, a]
|
|
71
81
|
}));
|
|
72
82
|
},
|
|
73
|
-
[
|
|
74
|
-
),
|
|
83
|
+
[_]
|
|
84
|
+
), z = y(
|
|
75
85
|
(i, a) => {
|
|
76
|
-
var f;
|
|
77
86
|
const d = {
|
|
78
|
-
id:
|
|
87
|
+
id: w(),
|
|
79
88
|
type: i,
|
|
80
|
-
name: ((
|
|
89
|
+
name: (() => {
|
|
90
|
+
const b = x.find((J) => J.type === i);
|
|
91
|
+
return b ? c(b.key, b.label) : i;
|
|
92
|
+
})(),
|
|
81
93
|
input: [],
|
|
82
|
-
output:
|
|
83
|
-
config:
|
|
94
|
+
output: w(),
|
|
95
|
+
config: ie(i)
|
|
84
96
|
};
|
|
85
|
-
|
|
86
|
-
...
|
|
87
|
-
transformations: [...
|
|
88
|
-
})),
|
|
97
|
+
_((b) => ({
|
|
98
|
+
...b,
|
|
99
|
+
transformations: [...b.transformations, d]
|
|
100
|
+
})), v({ type: "transformation", id: d.id });
|
|
89
101
|
},
|
|
90
|
-
[
|
|
91
|
-
), W =
|
|
102
|
+
[_, c]
|
|
103
|
+
), W = y(() => {
|
|
92
104
|
const i = {
|
|
93
|
-
id:
|
|
105
|
+
id: w(),
|
|
94
106
|
type: "database",
|
|
95
|
-
name: "New Destination",
|
|
107
|
+
name: c("etlBuilder.newDestination", "New Destination"),
|
|
96
108
|
config: {},
|
|
97
109
|
writeMode: "append"
|
|
98
110
|
};
|
|
99
|
-
|
|
111
|
+
_((a) => ({
|
|
100
112
|
...a,
|
|
101
113
|
destinations: [...a.destinations, i]
|
|
102
|
-
})),
|
|
103
|
-
}, [
|
|
114
|
+
})), v({ type: "destination", id: i.id });
|
|
115
|
+
}, [_, c]), P = y(
|
|
104
116
|
(i, a) => {
|
|
105
|
-
|
|
117
|
+
_((d) => {
|
|
106
118
|
switch (i) {
|
|
107
119
|
case "source":
|
|
108
|
-
return { ...d, sources: d.sources.filter((
|
|
120
|
+
return { ...d, sources: d.sources.filter((b) => b.id !== a) };
|
|
109
121
|
case "transformation":
|
|
110
122
|
return {
|
|
111
123
|
...d,
|
|
112
|
-
transformations: d.transformations.filter((
|
|
124
|
+
transformations: d.transformations.filter((b) => b.id !== a)
|
|
113
125
|
};
|
|
114
126
|
case "destination":
|
|
115
|
-
return { ...d, destinations: d.destinations.filter((
|
|
127
|
+
return { ...d, destinations: d.destinations.filter((b) => b.id !== a) };
|
|
116
128
|
default:
|
|
117
129
|
return d;
|
|
118
130
|
}
|
|
119
|
-
}),
|
|
131
|
+
}), v(null);
|
|
120
132
|
},
|
|
121
|
-
[
|
|
122
|
-
),
|
|
123
|
-
if (
|
|
133
|
+
[_]
|
|
134
|
+
), O = y(async () => {
|
|
135
|
+
if (r) {
|
|
124
136
|
L(!0);
|
|
125
137
|
try {
|
|
126
|
-
const i = await
|
|
127
|
-
|
|
138
|
+
const i = await r(m);
|
|
139
|
+
I((a) => [i, ...a].slice(0, 50));
|
|
128
140
|
} finally {
|
|
129
141
|
L(!1);
|
|
130
142
|
}
|
|
131
143
|
}
|
|
132
|
-
}, [
|
|
144
|
+
}, [m, r]), H = y(
|
|
133
145
|
(i) => {
|
|
134
|
-
|
|
146
|
+
_((a) => ({ ...a, schedule: i })), h == null || h(m, i);
|
|
135
147
|
},
|
|
136
|
-
[
|
|
137
|
-
),
|
|
148
|
+
[m, _, h]
|
|
149
|
+
), j = y(
|
|
138
150
|
(i) => {
|
|
139
|
-
if (i.preventDefault(), !!
|
|
140
|
-
if (
|
|
141
|
-
const a =
|
|
142
|
-
|
|
151
|
+
if (i.preventDefault(), !!T) {
|
|
152
|
+
if (T.startsWith("transform:")) {
|
|
153
|
+
const a = T.replace("transform:", "");
|
|
154
|
+
z(a);
|
|
143
155
|
}
|
|
144
156
|
D(null);
|
|
145
157
|
}
|
|
146
158
|
},
|
|
147
|
-
[
|
|
148
|
-
),
|
|
149
|
-
if (!
|
|
159
|
+
[T, z]
|
|
160
|
+
), K = () => {
|
|
161
|
+
if (!p)
|
|
150
162
|
return null;
|
|
151
|
-
switch (
|
|
163
|
+
switch (p.type) {
|
|
152
164
|
case "source":
|
|
153
|
-
return
|
|
165
|
+
return m.sources.find((i) => i.id === p.id);
|
|
154
166
|
case "transformation":
|
|
155
|
-
return
|
|
167
|
+
return m.transformations.find((i) => i.id === p.id);
|
|
156
168
|
case "destination":
|
|
157
|
-
return
|
|
169
|
+
return m.destinations.find((i) => i.id === p.id);
|
|
158
170
|
default:
|
|
159
171
|
return null;
|
|
160
172
|
}
|
|
161
|
-
},
|
|
162
|
-
/* @__PURE__ */ e("h4", { children:
|
|
163
|
-
t.map((i) => /* @__PURE__ */ l("div", { className: "nice-etl-builder__palette-item", onClick: () =>
|
|
164
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: /* @__PURE__ */ e(
|
|
173
|
+
}, V = B === "design" ? /* @__PURE__ */ l("div", { className: "nice-etl-builder__palette", children: [
|
|
174
|
+
/* @__PURE__ */ e("h4", { children: c("etlBuilder.sources", "Sources") }),
|
|
175
|
+
t.map((i) => /* @__PURE__ */ l("div", { className: "nice-etl-builder__palette-item", onClick: () => A(i), children: [
|
|
176
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: /* @__PURE__ */ e(g, { name: "database", size: 14 }) }),
|
|
165
177
|
/* @__PURE__ */ e("span", { children: i.name })
|
|
166
178
|
] }, i.id)),
|
|
167
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ l(
|
|
168
180
|
"button",
|
|
169
181
|
{
|
|
170
|
-
onClick: () =>
|
|
171
|
-
|
|
182
|
+
onClick: () => A({
|
|
183
|
+
id: "",
|
|
184
|
+
name: c("etlBuilder.newSource", "New Source"),
|
|
185
|
+
type: "database",
|
|
186
|
+
config: {}
|
|
187
|
+
}),
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ e(g, { name: "plus", size: 14 }),
|
|
190
|
+
" ",
|
|
191
|
+
c("etlBuilder.addSource", "Add Source")
|
|
192
|
+
]
|
|
172
193
|
}
|
|
173
194
|
),
|
|
174
|
-
/* @__PURE__ */ e("h4", { children:
|
|
195
|
+
/* @__PURE__ */ e("h4", { children: c("etlBuilder.transformations", "Transformations") }),
|
|
175
196
|
x.map((i) => /* @__PURE__ */ l(
|
|
176
197
|
"div",
|
|
177
198
|
{
|
|
@@ -180,42 +201,46 @@ function ce({
|
|
|
180
201
|
onDragStart: () => D(`transform:${i.type}`),
|
|
181
202
|
onDragEnd: () => D(null),
|
|
182
203
|
children: [
|
|
183
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children:
|
|
184
|
-
/* @__PURE__ */ e("span", { children: i.label })
|
|
204
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: R(i.icon) }),
|
|
205
|
+
/* @__PURE__ */ e("span", { children: c(i.key, i.label) })
|
|
185
206
|
]
|
|
186
207
|
},
|
|
187
208
|
i.type
|
|
188
209
|
)),
|
|
189
|
-
/* @__PURE__ */ e("h4", { children:
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
|
|
192
|
-
|
|
210
|
+
/* @__PURE__ */ e("h4", { children: c("etlBuilder.destinations", "Destinations") }),
|
|
211
|
+
/* @__PURE__ */ l("button", { onClick: W, children: [
|
|
212
|
+
/* @__PURE__ */ e(g, { name: "plus", size: 14 }),
|
|
213
|
+
" ",
|
|
214
|
+
c("etlBuilder.addDestination", "Add Destination")
|
|
215
|
+
] })
|
|
216
|
+
] }) : void 0, Y = p && B === "design" ? /* @__PURE__ */ e(
|
|
217
|
+
le,
|
|
193
218
|
{
|
|
194
|
-
nodeType:
|
|
195
|
-
node:
|
|
219
|
+
nodeType: p.type,
|
|
220
|
+
node: K() ?? null,
|
|
196
221
|
dataSources: t,
|
|
197
222
|
onChange: (i) => {
|
|
198
|
-
|
|
199
|
-
switch (
|
|
223
|
+
_((a) => {
|
|
224
|
+
switch (p.type) {
|
|
200
225
|
case "source":
|
|
201
226
|
return {
|
|
202
227
|
...a,
|
|
203
228
|
sources: a.sources.map(
|
|
204
|
-
(d) => d.id ===
|
|
229
|
+
(d) => d.id === p.id ? { ...d, ...i } : d
|
|
205
230
|
)
|
|
206
231
|
};
|
|
207
232
|
case "transformation":
|
|
208
233
|
return {
|
|
209
234
|
...a,
|
|
210
235
|
transformations: a.transformations.map(
|
|
211
|
-
(d) => d.id ===
|
|
236
|
+
(d) => d.id === p.id ? { ...d, ...i } : d
|
|
212
237
|
)
|
|
213
238
|
};
|
|
214
239
|
case "destination":
|
|
215
240
|
return {
|
|
216
241
|
...a,
|
|
217
242
|
destinations: a.destinations.map(
|
|
218
|
-
(d) => d.id ===
|
|
243
|
+
(d) => d.id === p.id ? { ...d, ...i } : d
|
|
219
244
|
)
|
|
220
245
|
};
|
|
221
246
|
default:
|
|
@@ -223,79 +248,98 @@ function ce({
|
|
|
223
248
|
}
|
|
224
249
|
});
|
|
225
250
|
},
|
|
226
|
-
onClose: () =>
|
|
251
|
+
onClose: () => v(null)
|
|
227
252
|
}
|
|
228
253
|
) : void 0;
|
|
229
254
|
return /* @__PURE__ */ l(
|
|
230
|
-
|
|
255
|
+
q,
|
|
231
256
|
{
|
|
232
257
|
flush: !0,
|
|
233
|
-
className: `nice-etl-builder ${
|
|
258
|
+
className: `nice-etl-builder ${f}`,
|
|
234
259
|
height: "100%",
|
|
235
260
|
style: { minHeight: 600 },
|
|
236
|
-
sidebar:
|
|
237
|
-
rightSidebar:
|
|
261
|
+
sidebar: V,
|
|
262
|
+
rightSidebar: Y,
|
|
238
263
|
toolbar: /* @__PURE__ */ l("div", { className: "nice-etl-builder__toolbar", children: [
|
|
239
264
|
/* @__PURE__ */ e(
|
|
240
265
|
"input",
|
|
241
266
|
{
|
|
242
267
|
type: "text",
|
|
243
|
-
value:
|
|
244
|
-
onChange: (i) =>
|
|
268
|
+
value: m.name,
|
|
269
|
+
onChange: (i) => _((a) => ({ ...a, name: i.target.value })),
|
|
245
270
|
className: "nice-etl-builder__name-input"
|
|
246
271
|
}
|
|
247
272
|
),
|
|
248
273
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__tabs", children: ["design", "code", "schedule", "history"].map((i) => /* @__PURE__ */ e(
|
|
249
274
|
"button",
|
|
250
275
|
{
|
|
251
|
-
className: `nice-etl-builder__tab ${
|
|
252
|
-
onClick: () =>
|
|
253
|
-
children: i.charAt(0).toUpperCase() + i.slice(1)
|
|
276
|
+
className: `nice-etl-builder__tab ${B === i ? "nice-etl-builder__tab--active" : ""}`,
|
|
277
|
+
onClick: () => F(i),
|
|
278
|
+
children: c(`etlBuilder.tab.${i}`, i.charAt(0).toUpperCase() + i.slice(1))
|
|
254
279
|
},
|
|
255
280
|
i
|
|
256
281
|
)) }),
|
|
257
282
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__actions", children: [
|
|
258
|
-
/* @__PURE__ */ l(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
283
|
+
/* @__PURE__ */ l(
|
|
284
|
+
"button",
|
|
285
|
+
{
|
|
286
|
+
onClick: O,
|
|
287
|
+
disabled: S || !r,
|
|
288
|
+
title: r ? void 0 : c("etlBuilder.runNotSetUp", "Running pipelines is not set up"),
|
|
289
|
+
className: "nice-etl-builder__run-btn",
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ e(g, { name: S ? "clock" : "play", size: 14 }),
|
|
292
|
+
" ",
|
|
293
|
+
S ? c("etlBuilder.running", "Running...") : c("etlBuilder.run", "Run")
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
),
|
|
297
|
+
/* @__PURE__ */ l(
|
|
298
|
+
"button",
|
|
299
|
+
{
|
|
300
|
+
onClick: () => n == null ? void 0 : n(m),
|
|
301
|
+
disabled: !n,
|
|
302
|
+
title: n ? void 0 : c("etlBuilder.saveNotSetUp", "Saving pipelines is not set up"),
|
|
303
|
+
className: "nice-etl-builder__save-btn",
|
|
304
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ e(g, { name: "save", size: 14 }),
|
|
306
|
+
" ",
|
|
307
|
+
c("save", "Save")
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
),
|
|
311
|
+
/* @__PURE__ */ e(G, { steps: Q(s, Z) })
|
|
268
312
|
] })
|
|
269
313
|
] }),
|
|
270
314
|
children: [
|
|
271
|
-
|
|
315
|
+
B === "design" && /* @__PURE__ */ e(
|
|
272
316
|
"div",
|
|
273
317
|
{
|
|
274
|
-
ref:
|
|
318
|
+
ref: $,
|
|
275
319
|
className: "nice-etl-builder__canvas",
|
|
276
320
|
onDragOver: (i) => i.preventDefault(),
|
|
277
|
-
onDrop:
|
|
278
|
-
onClick: () =>
|
|
321
|
+
onDrop: j,
|
|
322
|
+
onClick: () => v(null),
|
|
279
323
|
children: /* @__PURE__ */ l("div", { className: "nice-etl-builder__flow", children: [
|
|
280
324
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column", children: [
|
|
281
|
-
/* @__PURE__ */ e("h5", { children:
|
|
282
|
-
|
|
325
|
+
/* @__PURE__ */ e("h5", { children: c("etlBuilder.sources", "Sources") }),
|
|
326
|
+
m.sources.map((i) => /* @__PURE__ */ e(
|
|
283
327
|
E,
|
|
284
328
|
{
|
|
285
329
|
node: i,
|
|
286
330
|
nodeType: "source",
|
|
287
331
|
icon: "database",
|
|
288
|
-
isSelected: (
|
|
289
|
-
onSelect: () =>
|
|
290
|
-
onDelete: () =>
|
|
332
|
+
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
333
|
+
onSelect: () => v({ type: "source", id: i.id }),
|
|
334
|
+
onDelete: () => P("source", i.id)
|
|
291
335
|
},
|
|
292
336
|
i.id
|
|
293
337
|
))
|
|
294
338
|
] }),
|
|
295
|
-
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "
|
|
339
|
+
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", "aria-hidden": "true", children: /* @__PURE__ */ e(g, { name: "arrow-right", size: 16 }) }),
|
|
296
340
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column nice-etl-builder__column--transforms", children: [
|
|
297
|
-
/* @__PURE__ */ e("h5", { children:
|
|
298
|
-
|
|
341
|
+
/* @__PURE__ */ e("h5", { children: c("etlBuilder.transformations", "Transformations") }),
|
|
342
|
+
m.transformations.map((i) => {
|
|
299
343
|
const a = x.find((d) => d.type === i.type);
|
|
300
344
|
return /* @__PURE__ */ e(
|
|
301
345
|
E,
|
|
@@ -303,27 +347,27 @@ function ce({
|
|
|
303
347
|
node: i,
|
|
304
348
|
nodeType: "transformation",
|
|
305
349
|
icon: (a == null ? void 0 : a.icon) || "shuffle",
|
|
306
|
-
isSelected: (
|
|
307
|
-
onSelect: () =>
|
|
308
|
-
onDelete: () =>
|
|
350
|
+
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
351
|
+
onSelect: () => v({ type: "transformation", id: i.id }),
|
|
352
|
+
onDelete: () => P("transformation", i.id)
|
|
309
353
|
},
|
|
310
354
|
i.id
|
|
311
355
|
);
|
|
312
356
|
}),
|
|
313
|
-
|
|
357
|
+
m.transformations.length === 0 && /* @__PURE__ */ e("div", { className: "nice-etl-builder__empty-column", children: c("etlBuilder.dragTransformationsHere", "Drag transformations here") })
|
|
314
358
|
] }),
|
|
315
|
-
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "
|
|
359
|
+
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", "aria-hidden": "true", children: /* @__PURE__ */ e(g, { name: "arrow-right", size: 16 }) }),
|
|
316
360
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column", children: [
|
|
317
|
-
/* @__PURE__ */ e("h5", { children:
|
|
318
|
-
|
|
361
|
+
/* @__PURE__ */ e("h5", { children: c("etlBuilder.destinations", "Destinations") }),
|
|
362
|
+
m.destinations.map((i) => /* @__PURE__ */ e(
|
|
319
363
|
E,
|
|
320
364
|
{
|
|
321
365
|
node: i,
|
|
322
366
|
nodeType: "destination",
|
|
323
367
|
icon: "download",
|
|
324
|
-
isSelected: (
|
|
325
|
-
onSelect: () =>
|
|
326
|
-
onDelete: () =>
|
|
368
|
+
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
369
|
+
onSelect: () => v({ type: "destination", id: i.id }),
|
|
370
|
+
onDelete: () => P("destination", i.id)
|
|
327
371
|
},
|
|
328
372
|
i.id
|
|
329
373
|
))
|
|
@@ -331,22 +375,22 @@ function ce({
|
|
|
331
375
|
] })
|
|
332
376
|
}
|
|
333
377
|
),
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
378
|
+
B === "code" && /* @__PURE__ */ e("div", { className: "nice-etl-builder__code-view", children: /* @__PURE__ */ e("pre", { children: JSON.stringify(m, null, 2) }) }),
|
|
379
|
+
B === "schedule" && /* @__PURE__ */ e(
|
|
380
|
+
te,
|
|
337
381
|
{
|
|
338
|
-
schedule:
|
|
339
|
-
monitoring:
|
|
340
|
-
onChange:
|
|
382
|
+
schedule: m.schedule,
|
|
383
|
+
monitoring: m.monitoring,
|
|
384
|
+
onChange: H
|
|
341
385
|
}
|
|
342
386
|
),
|
|
343
|
-
|
|
387
|
+
B === "history" && /* @__PURE__ */ e(ne, { runs: M })
|
|
344
388
|
]
|
|
345
389
|
}
|
|
346
390
|
);
|
|
347
391
|
}
|
|
348
|
-
function
|
|
349
|
-
switch (
|
|
392
|
+
function ie(u) {
|
|
393
|
+
switch (u) {
|
|
350
394
|
case "filter":
|
|
351
395
|
return { condition: "" };
|
|
352
396
|
case "map":
|
|
@@ -379,79 +423,81 @@ return data;` };
|
|
|
379
423
|
}
|
|
380
424
|
}
|
|
381
425
|
function E({
|
|
382
|
-
node:
|
|
426
|
+
node: u,
|
|
383
427
|
nodeType: t,
|
|
384
|
-
icon:
|
|
385
|
-
isSelected:
|
|
386
|
-
onSelect:
|
|
387
|
-
onDelete:
|
|
428
|
+
icon: o,
|
|
429
|
+
isSelected: r,
|
|
430
|
+
onSelect: h,
|
|
431
|
+
onDelete: n
|
|
388
432
|
}) {
|
|
433
|
+
const { t: f } = C();
|
|
389
434
|
return /* @__PURE__ */ l(
|
|
390
435
|
"div",
|
|
391
436
|
{
|
|
392
|
-
className: `nice-etl-builder__node nice-etl-builder__node--${t} ${
|
|
393
|
-
onClick: (
|
|
394
|
-
|
|
437
|
+
className: `nice-etl-builder__node nice-etl-builder__node--${t} ${r ? "nice-etl-builder__node--selected" : ""}`,
|
|
438
|
+
onClick: (s) => {
|
|
439
|
+
s.stopPropagation(), h();
|
|
395
440
|
},
|
|
396
441
|
children: [
|
|
397
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children:
|
|
398
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-name", children:
|
|
442
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children: R(o) }),
|
|
443
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-name", children: u.name }),
|
|
399
444
|
/* @__PURE__ */ e(
|
|
400
445
|
"button",
|
|
401
446
|
{
|
|
447
|
+
"aria-label": f("etlBuilder.close", "Close"),
|
|
402
448
|
className: "nice-etl-builder__node-delete",
|
|
403
|
-
onClick: (
|
|
404
|
-
|
|
449
|
+
onClick: (s) => {
|
|
450
|
+
s.stopPropagation(), n();
|
|
405
451
|
},
|
|
406
|
-
children: "
|
|
452
|
+
children: /* @__PURE__ */ e(g, { name: "close", size: 14 })
|
|
407
453
|
}
|
|
408
454
|
)
|
|
409
455
|
]
|
|
410
456
|
}
|
|
411
457
|
);
|
|
412
458
|
}
|
|
413
|
-
function
|
|
414
|
-
nodeType:
|
|
459
|
+
function le({
|
|
460
|
+
nodeType: u,
|
|
415
461
|
node: t,
|
|
416
|
-
dataSources:
|
|
417
|
-
onChange:
|
|
418
|
-
onClose:
|
|
462
|
+
dataSources: o,
|
|
463
|
+
onChange: r,
|
|
464
|
+
onClose: h
|
|
419
465
|
}) {
|
|
420
|
-
var
|
|
421
|
-
const { t:
|
|
466
|
+
var f;
|
|
467
|
+
const { t: n } = C();
|
|
422
468
|
return t ? /* @__PURE__ */ l("div", { className: "nice-etl-builder__properties", children: [
|
|
423
469
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__properties-header", children: [
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
470
|
+
/* @__PURE__ */ e("h4", { children: u === "source" ? n("etlBuilder.sourceProperties", "Source Properties") : u === "transformation" ? n("etlBuilder.transformationProperties", "Transformation Properties") : u === "destination" ? n("etlBuilder.destinationProperties", "Destination Properties") : n("etlBuilder.properties", "{type} Properties").replace(
|
|
471
|
+
"{type}",
|
|
472
|
+
u.charAt(0).toUpperCase() + u.slice(1)
|
|
473
|
+
) }),
|
|
474
|
+
/* @__PURE__ */ e("button", { onClick: h, "aria-label": n("etlBuilder.close", "Close"), children: /* @__PURE__ */ e(g, { name: "close", size: 14 }) })
|
|
429
475
|
] }),
|
|
430
476
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__properties-content", children: [
|
|
431
477
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
432
|
-
/* @__PURE__ */ e("label", { children:
|
|
478
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.name", "Name") }),
|
|
433
479
|
/* @__PURE__ */ e(
|
|
434
480
|
"input",
|
|
435
481
|
{
|
|
436
482
|
type: "text",
|
|
437
483
|
value: t.name,
|
|
438
|
-
onChange: (
|
|
484
|
+
onChange: (s) => r({ name: s.target.value })
|
|
439
485
|
}
|
|
440
486
|
)
|
|
441
487
|
] }),
|
|
442
|
-
|
|
488
|
+
u === "source" && /* @__PURE__ */ l(k, { children: [
|
|
443
489
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
444
|
-
/* @__PURE__ */ e("label", { children:
|
|
490
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.type", "Type") }),
|
|
445
491
|
/* @__PURE__ */ l(
|
|
446
492
|
"select",
|
|
447
493
|
{
|
|
448
494
|
value: t.type,
|
|
449
|
-
onChange: (
|
|
495
|
+
onChange: (s) => r({ type: s.target.value }),
|
|
450
496
|
children: [
|
|
451
|
-
/* @__PURE__ */ e("option", { value: "database", children:
|
|
497
|
+
/* @__PURE__ */ e("option", { value: "database", children: n("etlBuilder.database", "Database") }),
|
|
452
498
|
/* @__PURE__ */ e("option", { value: "api", children: "API" }),
|
|
453
|
-
/* @__PURE__ */ e("option", { value: "file", children:
|
|
454
|
-
/* @__PURE__ */ e("option", { value: "stream", children:
|
|
499
|
+
/* @__PURE__ */ e("option", { value: "file", children: n("etlBuilder.file", "File") }),
|
|
500
|
+
/* @__PURE__ */ e("option", { value: "stream", children: n("etlBuilder.stream", "Stream") })
|
|
455
501
|
]
|
|
456
502
|
}
|
|
457
503
|
)
|
|
@@ -461,37 +507,37 @@ function ee({
|
|
|
461
507
|
"input",
|
|
462
508
|
{
|
|
463
509
|
type: "checkbox",
|
|
464
|
-
checked: ((
|
|
465
|
-
onChange: (
|
|
466
|
-
var
|
|
467
|
-
return
|
|
510
|
+
checked: ((f = t.incremental) == null ? void 0 : f.enabled) || !1,
|
|
511
|
+
onChange: (s) => {
|
|
512
|
+
var c;
|
|
513
|
+
return r({
|
|
468
514
|
incremental: {
|
|
469
515
|
...t.incremental,
|
|
470
|
-
enabled:
|
|
471
|
-
column: ((
|
|
516
|
+
enabled: s.target.checked,
|
|
517
|
+
column: ((c = t.incremental) == null ? void 0 : c.column) || ""
|
|
472
518
|
}
|
|
473
519
|
});
|
|
474
520
|
}
|
|
475
521
|
}
|
|
476
522
|
),
|
|
477
|
-
|
|
523
|
+
n("etlBuilder.incrementalLoad", "Incremental Load")
|
|
478
524
|
] }) })
|
|
479
525
|
] }),
|
|
480
|
-
|
|
526
|
+
u === "transformation" && /* @__PURE__ */ l(k, { children: [
|
|
481
527
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
482
|
-
/* @__PURE__ */ e("label", { children:
|
|
528
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.type", "Type") }),
|
|
483
529
|
/* @__PURE__ */ e("span", { children: t.type })
|
|
484
530
|
] }),
|
|
485
531
|
t.type === "filter" && /* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
486
|
-
/* @__PURE__ */ e("label", { children:
|
|
532
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.condition", "Condition") }),
|
|
487
533
|
/* @__PURE__ */ e(
|
|
488
534
|
"textarea",
|
|
489
535
|
{
|
|
490
536
|
value: String(t.config.condition || ""),
|
|
491
|
-
onChange: (
|
|
492
|
-
config: { ...t.config, condition:
|
|
537
|
+
onChange: (s) => r({
|
|
538
|
+
config: { ...t.config, condition: s.target.value }
|
|
493
539
|
}),
|
|
494
|
-
placeholder:
|
|
540
|
+
placeholder: n(
|
|
495
541
|
"etlBuilder.conditionPlaceholder",
|
|
496
542
|
"e.g., age > 18 AND status = 'active'"
|
|
497
543
|
),
|
|
@@ -499,46 +545,46 @@ function ee({
|
|
|
499
545
|
}
|
|
500
546
|
)
|
|
501
547
|
] }),
|
|
502
|
-
t.type === "derive" && /* @__PURE__ */ l(
|
|
548
|
+
t.type === "derive" && /* @__PURE__ */ l(k, { children: [
|
|
503
549
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
504
|
-
/* @__PURE__ */ e("label", { children:
|
|
550
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.columnName", "Column Name") }),
|
|
505
551
|
/* @__PURE__ */ e(
|
|
506
552
|
"input",
|
|
507
553
|
{
|
|
508
554
|
type: "text",
|
|
509
555
|
value: String(t.config.name || ""),
|
|
510
|
-
onChange: (
|
|
511
|
-
config: { ...t.config, name:
|
|
556
|
+
onChange: (s) => r({
|
|
557
|
+
config: { ...t.config, name: s.target.value }
|
|
512
558
|
})
|
|
513
559
|
}
|
|
514
560
|
)
|
|
515
561
|
] }),
|
|
516
562
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
517
|
-
/* @__PURE__ */ e("label", { children:
|
|
563
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.expression", "Expression") }),
|
|
518
564
|
/* @__PURE__ */ e(
|
|
519
565
|
"input",
|
|
520
566
|
{
|
|
521
567
|
type: "text",
|
|
522
568
|
value: String(t.config.expression || ""),
|
|
523
|
-
onChange: (
|
|
569
|
+
onChange: (s) => r({
|
|
524
570
|
config: {
|
|
525
571
|
...t.config,
|
|
526
|
-
expression:
|
|
572
|
+
expression: s.target.value
|
|
527
573
|
}
|
|
528
574
|
}),
|
|
529
|
-
placeholder:
|
|
575
|
+
placeholder: n("etlBuilder.expressionPlaceholder", "e.g., price * quantity")
|
|
530
576
|
}
|
|
531
577
|
)
|
|
532
578
|
] })
|
|
533
579
|
] }),
|
|
534
580
|
t.type === "custom" && /* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
535
|
-
/* @__PURE__ */ e("label", { children:
|
|
581
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.code", "Code") }),
|
|
536
582
|
/* @__PURE__ */ e(
|
|
537
583
|
"textarea",
|
|
538
584
|
{
|
|
539
585
|
value: String(t.config.code || ""),
|
|
540
|
-
onChange: (
|
|
541
|
-
config: { ...t.config, code:
|
|
586
|
+
onChange: (s) => r({
|
|
587
|
+
config: { ...t.config, code: s.target.value }
|
|
542
588
|
}),
|
|
543
589
|
rows: 10,
|
|
544
590
|
className: "nice-etl-builder__code-input"
|
|
@@ -546,126 +592,126 @@ function ee({
|
|
|
546
592
|
)
|
|
547
593
|
] })
|
|
548
594
|
] }),
|
|
549
|
-
|
|
595
|
+
u === "destination" && /* @__PURE__ */ l(k, { children: [
|
|
550
596
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
551
|
-
/* @__PURE__ */ e("label", { children:
|
|
597
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.type", "Type") }),
|
|
552
598
|
/* @__PURE__ */ l(
|
|
553
599
|
"select",
|
|
554
600
|
{
|
|
555
601
|
value: t.type,
|
|
556
|
-
onChange: (
|
|
602
|
+
onChange: (s) => r({ type: s.target.value }),
|
|
557
603
|
children: [
|
|
558
|
-
/* @__PURE__ */ e("option", { value: "database", children:
|
|
559
|
-
/* @__PURE__ */ e("option", { value: "file", children:
|
|
604
|
+
/* @__PURE__ */ e("option", { value: "database", children: n("etlBuilder.database", "Database") }),
|
|
605
|
+
/* @__PURE__ */ e("option", { value: "file", children: n("etlBuilder.file", "File") }),
|
|
560
606
|
/* @__PURE__ */ e("option", { value: "api", children: "API" }),
|
|
561
|
-
/* @__PURE__ */ e("option", { value: "warehouse", children:
|
|
607
|
+
/* @__PURE__ */ e("option", { value: "warehouse", children: n("etlBuilder.dataWarehouse", "Data Warehouse") })
|
|
562
608
|
]
|
|
563
609
|
}
|
|
564
610
|
)
|
|
565
611
|
] }),
|
|
566
612
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
567
|
-
/* @__PURE__ */ e("label", { children:
|
|
613
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.writeMode", "Write Mode") }),
|
|
568
614
|
/* @__PURE__ */ l(
|
|
569
615
|
"select",
|
|
570
616
|
{
|
|
571
617
|
value: t.writeMode,
|
|
572
|
-
onChange: (
|
|
618
|
+
onChange: (s) => r({ writeMode: s.target.value }),
|
|
573
619
|
children: [
|
|
574
|
-
/* @__PURE__ */ e("option", { value: "append", children:
|
|
575
|
-
/* @__PURE__ */ e("option", { value: "overwrite", children:
|
|
576
|
-
/* @__PURE__ */ e("option", { value: "upsert", children:
|
|
577
|
-
/* @__PURE__ */ e("option", { value: "merge", children:
|
|
620
|
+
/* @__PURE__ */ e("option", { value: "append", children: n("etlBuilder.append", "Append") }),
|
|
621
|
+
/* @__PURE__ */ e("option", { value: "overwrite", children: n("etlBuilder.overwrite", "Overwrite") }),
|
|
622
|
+
/* @__PURE__ */ e("option", { value: "upsert", children: n("etlBuilder.upsert", "Upsert") }),
|
|
623
|
+
/* @__PURE__ */ e("option", { value: "merge", children: n("etlBuilder.merge", "Merge") })
|
|
578
624
|
]
|
|
579
625
|
}
|
|
580
626
|
)
|
|
581
627
|
] })
|
|
582
628
|
] })
|
|
583
629
|
] })
|
|
584
|
-
] }) : /* @__PURE__ */ e(
|
|
630
|
+
] }) : /* @__PURE__ */ e(k, {});
|
|
585
631
|
}
|
|
586
|
-
function
|
|
587
|
-
schedule:
|
|
632
|
+
function te({
|
|
633
|
+
schedule: u,
|
|
588
634
|
monitoring: t,
|
|
589
|
-
onChange:
|
|
635
|
+
onChange: o
|
|
590
636
|
}) {
|
|
591
|
-
const { t:
|
|
637
|
+
const { t: r } = C(), [h, n] = N(u || { enabled: !1 });
|
|
592
638
|
return /* @__PURE__ */ l("div", { className: "nice-etl-builder__schedule-editor", children: [
|
|
593
|
-
/* @__PURE__ */ e("h4", { children:
|
|
639
|
+
/* @__PURE__ */ e("h4", { children: r("etlBuilder.scheduleConfiguration", "Schedule Configuration") }),
|
|
594
640
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ l("label", { children: [
|
|
595
641
|
/* @__PURE__ */ e(
|
|
596
642
|
"input",
|
|
597
643
|
{
|
|
598
644
|
type: "checkbox",
|
|
599
|
-
checked:
|
|
600
|
-
onChange: (
|
|
601
|
-
const
|
|
602
|
-
|
|
645
|
+
checked: h.enabled,
|
|
646
|
+
onChange: (f) => {
|
|
647
|
+
const s = { ...h, enabled: f.target.checked };
|
|
648
|
+
n(s), o(s);
|
|
603
649
|
}
|
|
604
650
|
}
|
|
605
651
|
),
|
|
606
|
-
|
|
652
|
+
r("etlBuilder.enableScheduledExecution", "Enable scheduled execution")
|
|
607
653
|
] }) }),
|
|
608
|
-
|
|
654
|
+
h.enabled && /* @__PURE__ */ l(k, { children: [
|
|
609
655
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
610
|
-
/* @__PURE__ */ e("label", { children:
|
|
656
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.cronExpression", "Cron Expression") }),
|
|
611
657
|
/* @__PURE__ */ e(
|
|
612
658
|
"input",
|
|
613
659
|
{
|
|
614
660
|
type: "text",
|
|
615
|
-
value:
|
|
616
|
-
onChange: (
|
|
617
|
-
const
|
|
618
|
-
|
|
661
|
+
value: h.cron || "",
|
|
662
|
+
onChange: (f) => {
|
|
663
|
+
const s = { ...h, cron: f.target.value };
|
|
664
|
+
n(s);
|
|
619
665
|
},
|
|
620
|
-
placeholder:
|
|
666
|
+
placeholder: r("etlBuilder.cronPlaceholder", "0 * * * * (every hour)")
|
|
621
667
|
}
|
|
622
668
|
),
|
|
623
|
-
/* @__PURE__ */ e("small", { children: "Format: minute hour day month weekday" })
|
|
669
|
+
/* @__PURE__ */ e("small", { children: r("etlBuilder.cronFormat", "Format: minute hour day month weekday") })
|
|
624
670
|
] }),
|
|
625
671
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
626
|
-
/* @__PURE__ */ e("label", { children:
|
|
672
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.timezone", "Timezone") }),
|
|
627
673
|
/* @__PURE__ */ l(
|
|
628
674
|
"select",
|
|
629
675
|
{
|
|
630
|
-
value:
|
|
631
|
-
onChange: (
|
|
632
|
-
const
|
|
633
|
-
|
|
676
|
+
value: h.timezone || "UTC",
|
|
677
|
+
onChange: (f) => {
|
|
678
|
+
const s = { ...h, timezone: f.target.value };
|
|
679
|
+
n(s);
|
|
634
680
|
},
|
|
635
681
|
children: [
|
|
636
682
|
/* @__PURE__ */ e("option", { value: "UTC", children: "UTC" }),
|
|
637
|
-
/* @__PURE__ */ e("option", { value: "America/New_York", children:
|
|
638
|
-
/* @__PURE__ */ e("option", { value: "America/Chicago", children:
|
|
639
|
-
/* @__PURE__ */ e("option", { value: "America/Los_Angeles", children:
|
|
640
|
-
/* @__PURE__ */ e("option", { value: "Europe/London", children:
|
|
641
|
-
/* @__PURE__ */ e("option", { value: "Europe/Warsaw", children:
|
|
683
|
+
/* @__PURE__ */ e("option", { value: "America/New_York", children: r("etlBuilder.easternTime", "Eastern Time") }),
|
|
684
|
+
/* @__PURE__ */ e("option", { value: "America/Chicago", children: r("etlBuilder.centralTime", "Central Time") }),
|
|
685
|
+
/* @__PURE__ */ e("option", { value: "America/Los_Angeles", children: r("etlBuilder.pacificTime", "Pacific Time") }),
|
|
686
|
+
/* @__PURE__ */ e("option", { value: "Europe/London", children: r("etlBuilder.london", "London") }),
|
|
687
|
+
/* @__PURE__ */ e("option", { value: "Europe/Warsaw", children: r("etlBuilder.warsaw", "Warsaw") })
|
|
642
688
|
]
|
|
643
689
|
}
|
|
644
690
|
)
|
|
645
691
|
] }),
|
|
646
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
692
|
+
/* @__PURE__ */ e("button", { onClick: () => o(h), children: r("etlBuilder.saveSchedule", "Save Schedule") })
|
|
647
693
|
] }),
|
|
648
|
-
/* @__PURE__ */ e("h4", { children:
|
|
694
|
+
/* @__PURE__ */ e("h4", { children: r("etlBuilder.monitoring", "Monitoring") }),
|
|
649
695
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ l("label", { children: [
|
|
650
696
|
/* @__PURE__ */ e("input", { type: "checkbox", checked: (t == null ? void 0 : t.alertOnFailure) || !1, disabled: !0 }),
|
|
651
|
-
|
|
697
|
+
r("etlBuilder.alertOnFailure", "Alert on failure")
|
|
652
698
|
] }) }),
|
|
653
699
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
654
|
-
/* @__PURE__ */ e("label", { children:
|
|
700
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.logLevel", "Log Level") }),
|
|
655
701
|
/* @__PURE__ */ l("select", { value: (t == null ? void 0 : t.logLevel) || "info", disabled: !0, children: [
|
|
656
|
-
/* @__PURE__ */ e("option", { value: "error", children:
|
|
657
|
-
/* @__PURE__ */ e("option", { value: "warn", children:
|
|
658
|
-
/* @__PURE__ */ e("option", { value: "info", children:
|
|
659
|
-
/* @__PURE__ */ e("option", { value: "debug", children:
|
|
702
|
+
/* @__PURE__ */ e("option", { value: "error", children: r("etlBuilder.error", "Error") }),
|
|
703
|
+
/* @__PURE__ */ e("option", { value: "warn", children: r("etlBuilder.warning", "Warning") }),
|
|
704
|
+
/* @__PURE__ */ e("option", { value: "info", children: r("etlBuilder.info", "Info") }),
|
|
705
|
+
/* @__PURE__ */ e("option", { value: "debug", children: r("etlBuilder.debug", "Debug") })
|
|
660
706
|
] })
|
|
661
707
|
] })
|
|
662
708
|
] });
|
|
663
709
|
}
|
|
664
|
-
function
|
|
710
|
+
function ne({ runs: u }) {
|
|
665
711
|
const { t } = C();
|
|
666
712
|
return /* @__PURE__ */ l("div", { className: "nice-etl-builder__history-view", children: [
|
|
667
713
|
/* @__PURE__ */ e("h4", { children: t("etlBuilder.runHistory", "Run History") }),
|
|
668
|
-
|
|
714
|
+
u.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-etl-builder__no-history", children: t("etlBuilder.noRunsYet", "No runs yet") }) : /* @__PURE__ */ l("table", { className: "nice-etl-builder__history-table", children: [
|
|
669
715
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ l("tr", { children: [
|
|
670
716
|
/* @__PURE__ */ e("th", { children: t("etlBuilder.status", "Status") }),
|
|
671
717
|
/* @__PURE__ */ e("th", { children: t("etlBuilder.startTime", "Start Time") }),
|
|
@@ -673,38 +719,38 @@ function le({ runs: o }) {
|
|
|
673
719
|
/* @__PURE__ */ e("th", { children: t("etlBuilder.rows", "Rows") }),
|
|
674
720
|
/* @__PURE__ */ e("th", { children: t("etlBuilder.errors", "Errors") })
|
|
675
721
|
] }) }),
|
|
676
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
722
|
+
/* @__PURE__ */ e("tbody", { children: u.map((o) => /* @__PURE__ */ l(
|
|
677
723
|
"tr",
|
|
678
724
|
{
|
|
679
|
-
className: `nice-etl-builder__run nice-etl-builder__run--${
|
|
725
|
+
className: `nice-etl-builder__run nice-etl-builder__run--${o.status}`,
|
|
680
726
|
children: [
|
|
681
727
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ l(
|
|
682
728
|
"span",
|
|
683
729
|
{
|
|
684
|
-
className: `nice-etl-builder__status nice-etl-builder__status--${
|
|
730
|
+
className: `nice-etl-builder__status nice-etl-builder__status--${o.status}`,
|
|
685
731
|
children: [
|
|
686
732
|
/* @__PURE__ */ e(
|
|
687
|
-
|
|
733
|
+
g,
|
|
688
734
|
{
|
|
689
|
-
name:
|
|
735
|
+
name: o.status === "success" ? "check" : o.status === "failed" ? "close" : "clock",
|
|
690
736
|
size: 12
|
|
691
737
|
}
|
|
692
738
|
),
|
|
693
|
-
|
|
739
|
+
o.status
|
|
694
740
|
]
|
|
695
741
|
}
|
|
696
742
|
) }),
|
|
697
|
-
/* @__PURE__ */ e("td", { children:
|
|
698
|
-
/* @__PURE__ */ e("td", { children:
|
|
743
|
+
/* @__PURE__ */ e("td", { children: o.startTime.toLocaleString() }),
|
|
744
|
+
/* @__PURE__ */ e("td", { children: o.endTime ? `${Math.round((o.endTime.getTime() - o.startTime.getTime()) / 1e3)}s` : "-" }),
|
|
699
745
|
/* @__PURE__ */ l("td", { children: [
|
|
700
|
-
|
|
746
|
+
o.rowsProcessed.toLocaleString(),
|
|
701
747
|
" / ",
|
|
702
|
-
|
|
748
|
+
o.rowsWritten.toLocaleString()
|
|
703
749
|
] }),
|
|
704
|
-
/* @__PURE__ */ e("td", { children:
|
|
750
|
+
/* @__PURE__ */ e("td", { children: o.errors.length })
|
|
705
751
|
]
|
|
706
752
|
},
|
|
707
|
-
|
|
753
|
+
o.id
|
|
708
754
|
)) })
|
|
709
755
|
] })
|
|
710
756
|
] });
|