@burdenoff/microfe-bigconsole 2026.804.2 → 2026.805.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/AdminRoot.js +21 -16
- package/dist/bigconsole/AdminRoot.js.map +1 -1
- package/dist/bigconsole/BigConsoleRoot.js +44 -39
- package/dist/bigconsole/BigConsoleRoot.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +115 -100
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +100 -98
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -161
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +20 -20
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +216 -49
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +96 -90
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetMenu.js +87 -76
- package/dist/bigconsole/components/widgets/WidgetMenu.js.map +1 -1
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +120 -118
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +113 -104
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +208 -199
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +376 -325
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +135 -125
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +182 -172
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +233 -198
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +281 -268
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +238 -223
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +162 -144
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +212 -204
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +191 -183
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +128 -103
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +238 -217
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +116 -102
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/utils/csv.js +91 -0
- package/dist/bigconsole/utils/csv.js.map +1 -0
- package/dist/constants/permissions.js +83 -0
- package/dist/constants/permissions.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { useAppNavigate as e } from "../contexts/NavigationContext.js";
|
|
2
2
|
import "../contexts/index.js";
|
|
3
3
|
import t from "../hooks/useDataSinkOperations.js";
|
|
4
|
-
import {
|
|
4
|
+
import { BIGCONSOLE_PERMISSIONS as n } from "../../constants/permissions.js";
|
|
5
|
+
import { isNative as ee, nativeCopyText as te, nativeToast as ne } from "../../utils/nativeBridge.js";
|
|
5
6
|
import r from "../components/datasink/CacheTTLSelector.js";
|
|
6
|
-
import
|
|
7
|
-
import { memo as i, useCallback as a, useEffect as o, useMemo as
|
|
8
|
-
import { useParams as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import re from "../components/datasink/RefreshTypeSelector.js";
|
|
8
|
+
import { memo as i, useCallback as a, useEffect as o, useMemo as ie, useState as s } from "react";
|
|
9
|
+
import { useParams as c } from "react-router";
|
|
10
|
+
import { AccessDenied as l, PermissionButton as u } from "@burdenoff/fe-libs/shared/components";
|
|
11
|
+
import { usePermissions as ae } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { AlertCircle as d, ArrowLeft as oe, Check as se, Copy as ce, Database as f, Eye as p, Loader2 as m, Save as le, Settings as ue } from "lucide-react";
|
|
13
|
+
import { Button as h, Card as g, CardContent as _, CardHeader as v, CardTitle as y, GlassCard as de, IllustratedEmptyState as fe, Input as b, Label as x, PagePurpose as pe, Textarea as S } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
12
15
|
//#region src/bigconsole/pages/DataSinkBuilderPage.tsx
|
|
13
|
-
function
|
|
16
|
+
function me(e) {
|
|
14
17
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
|
|
15
18
|
}
|
|
16
|
-
function
|
|
19
|
+
function he(e) {
|
|
17
20
|
let t = {};
|
|
18
21
|
if (e.name.trim() ? e.name.length < 2 ? t.name = "Name must be at least 2 characters" : e.name.length > 100 && (t.name = "Name must be less than 100 characters") : t.name = "Name is required", e.key.trim() ? /^[a-z0-9_]+$/.test(e.key) ? e.key.length > 64 && (t.key = "Key must be less than 64 characters") : t.key = "Key can only contain lowercase letters, numbers, and underscores" : t.key = "Key is required", e.data && e.data.trim()) try {
|
|
19
22
|
JSON.parse(e.data);
|
|
@@ -23,61 +26,61 @@ function T(e) {
|
|
|
23
26
|
return t;
|
|
24
27
|
}
|
|
25
28
|
var E = i(function() {
|
|
26
|
-
let { dataSinkId: i } =
|
|
29
|
+
let { dataSinkId: i } = c(), E = e(), D = i !== "new" && !!i, { hasPermission: ge, isLoading: _e } = ae(), ve = ge(n.DATASINK_READ), ye = D ? n.DATASINK_UPDATE : n.DATASINK_CREATE, [O, k] = s({
|
|
27
30
|
name: "",
|
|
28
31
|
key: "",
|
|
29
32
|
description: "",
|
|
30
33
|
ttl: 300,
|
|
31
34
|
refresh: { type: "manual" },
|
|
32
35
|
data: "{}"
|
|
33
|
-
}), [A, j] = s({}), [M, N] = s(!1), [P, F] = s(!1), [I, L] = s(null), [
|
|
36
|
+
}), [A, j] = s({}), [M, N] = s(!1), [P, F] = s(!1), [I, L] = s(null), [be, R] = s(!1), [z, B] = s(!1), [V, H] = s(null), [U, W] = s(null), { loading: xe, error: G, dataSinks: Se, fetchDataSink: K, createDataSink: q, updateDataSink: J, getDataSinkData: Y } = t({ skipFetch: !0 }), X = D ? Se.find((e) => e.id === i) : null;
|
|
34
37
|
o(() => {
|
|
35
|
-
D && i && !
|
|
38
|
+
D && i && !X && K(i);
|
|
36
39
|
}, [
|
|
37
40
|
D,
|
|
38
41
|
i,
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
X,
|
|
43
|
+
K
|
|
41
44
|
]);
|
|
42
|
-
let [
|
|
45
|
+
let [Z, Ce] = s(!1);
|
|
43
46
|
o(() => {
|
|
44
|
-
if (
|
|
47
|
+
if (X && !Z) {
|
|
45
48
|
let e = "";
|
|
46
|
-
if (
|
|
47
|
-
if (typeof
|
|
48
|
-
let t = JSON.parse(
|
|
49
|
+
if (X.data) try {
|
|
50
|
+
if (typeof X.data == "string") {
|
|
51
|
+
let t = JSON.parse(X.data);
|
|
49
52
|
e = JSON.stringify(t, null, 2);
|
|
50
|
-
} else e = JSON.stringify(
|
|
53
|
+
} else e = JSON.stringify(X.data, null, 2);
|
|
51
54
|
} catch {
|
|
52
|
-
e = typeof
|
|
55
|
+
e = typeof X.data == "string" ? X.data : "";
|
|
53
56
|
}
|
|
54
57
|
k({
|
|
55
|
-
name:
|
|
56
|
-
key:
|
|
57
|
-
description:
|
|
58
|
-
ttl:
|
|
59
|
-
refresh:
|
|
60
|
-
type:
|
|
61
|
-
schedule:
|
|
62
|
-
cron:
|
|
63
|
-
timezone:
|
|
58
|
+
name: X.name || "",
|
|
59
|
+
key: X.key || "",
|
|
60
|
+
description: X.description || "",
|
|
61
|
+
ttl: X.ttl || 300,
|
|
62
|
+
refresh: X.refresh ? {
|
|
63
|
+
type: X.refresh.type === "scheduled" ? "scheduled" : "manual",
|
|
64
|
+
schedule: X.refresh.schedule ? {
|
|
65
|
+
cron: X.refresh.schedule.cron,
|
|
66
|
+
timezone: X.refresh.schedule.timezone
|
|
64
67
|
} : void 0
|
|
65
68
|
} : { type: "manual" },
|
|
66
69
|
data: e
|
|
67
|
-
}), N(!0),
|
|
70
|
+
}), N(!0), Ce(!0), j({});
|
|
68
71
|
}
|
|
69
|
-
}, [
|
|
70
|
-
let
|
|
72
|
+
}, [X, Z]);
|
|
73
|
+
let we = a((e) => {
|
|
71
74
|
let t = e.target.value;
|
|
72
75
|
k((e) => ({
|
|
73
76
|
...e,
|
|
74
77
|
name: t,
|
|
75
|
-
key: M ? e.key :
|
|
78
|
+
key: M ? e.key : me(t)
|
|
76
79
|
})), j((e) => ({
|
|
77
80
|
...e,
|
|
78
81
|
name: void 0
|
|
79
82
|
}));
|
|
80
|
-
}, [M]),
|
|
83
|
+
}, [M]), Te = a((e) => {
|
|
81
84
|
let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
82
85
|
k((e) => ({
|
|
83
86
|
...e,
|
|
@@ -86,22 +89,22 @@ var E = i(function() {
|
|
|
86
89
|
...e,
|
|
87
90
|
key: void 0
|
|
88
91
|
}));
|
|
89
|
-
}, []),
|
|
92
|
+
}, []), Ee = a((e) => {
|
|
90
93
|
k((t) => ({
|
|
91
94
|
...t,
|
|
92
95
|
description: e.target.value
|
|
93
96
|
}));
|
|
94
|
-
}, []),
|
|
97
|
+
}, []), De = a((e) => {
|
|
95
98
|
k((t) => ({
|
|
96
99
|
...t,
|
|
97
100
|
ttl: e || 0
|
|
98
101
|
}));
|
|
99
|
-
}, []),
|
|
102
|
+
}, []), Oe = a((e) => {
|
|
100
103
|
k((t) => ({
|
|
101
104
|
...t,
|
|
102
105
|
refresh: e
|
|
103
106
|
}));
|
|
104
|
-
}, []),
|
|
107
|
+
}, []), Q = a((e) => {
|
|
105
108
|
k((t) => ({
|
|
106
109
|
...t,
|
|
107
110
|
data: e.target.value
|
|
@@ -109,7 +112,7 @@ var E = i(function() {
|
|
|
109
112
|
...e,
|
|
110
113
|
data: void 0
|
|
111
114
|
}));
|
|
112
|
-
}, []),
|
|
115
|
+
}, []), ke = a(() => {
|
|
113
116
|
try {
|
|
114
117
|
let e = JSON.parse(O.data);
|
|
115
118
|
k((t) => ({
|
|
@@ -125,29 +128,29 @@ var E = i(function() {
|
|
|
125
128
|
data: "Invalid JSON format"
|
|
126
129
|
}));
|
|
127
130
|
}
|
|
128
|
-
}, [O.data]),
|
|
129
|
-
O.key && (await
|
|
131
|
+
}, [O.data]), Ae = a(async () => {
|
|
132
|
+
O.key && (await te(O.key), R(!0), ee() && ne("Key copied"), setTimeout(() => R(!1), 2e3));
|
|
130
133
|
}, [O.key]), $ = a(() => {
|
|
131
134
|
E("/datasinks");
|
|
132
|
-
}, [E]),
|
|
133
|
-
if (!(!D || !
|
|
134
|
-
|
|
135
|
+
}, [E]), je = a(async () => {
|
|
136
|
+
if (!(!D || !X)) {
|
|
137
|
+
B(!0), W(null);
|
|
135
138
|
try {
|
|
136
|
-
let e = await
|
|
137
|
-
e?.raw ?
|
|
139
|
+
let e = await Y({ key: X.key });
|
|
140
|
+
e?.raw ? H(Array.isArray(e.raw) ? e.raw.slice(0, 20) : [e.raw]) : H([]);
|
|
138
141
|
} catch (e) {
|
|
139
|
-
|
|
142
|
+
W(e instanceof Error ? e.message : "Failed to load data");
|
|
140
143
|
} finally {
|
|
141
|
-
|
|
144
|
+
B(!1);
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
147
|
}, [
|
|
145
148
|
D,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
]),
|
|
149
|
+
X,
|
|
150
|
+
Y
|
|
151
|
+
]), Me = a(async (e) => {
|
|
149
152
|
e.preventDefault(), L(null);
|
|
150
|
-
let t =
|
|
153
|
+
let t = he(O);
|
|
151
154
|
if (Object.keys(t).length > 0) {
|
|
152
155
|
j(t);
|
|
153
156
|
return;
|
|
@@ -164,10 +167,10 @@ var E = i(function() {
|
|
|
164
167
|
})), F(!1);
|
|
165
168
|
return;
|
|
166
169
|
}
|
|
167
|
-
if (D &&
|
|
168
|
-
if (!await
|
|
169
|
-
id:
|
|
170
|
-
version:
|
|
170
|
+
if (D && X) {
|
|
171
|
+
if (!await J({
|
|
172
|
+
id: X.id,
|
|
173
|
+
version: X.version,
|
|
171
174
|
name: O.name,
|
|
172
175
|
description: O.description || void 0,
|
|
173
176
|
ttl: O.ttl,
|
|
@@ -177,7 +180,7 @@ var E = i(function() {
|
|
|
177
180
|
},
|
|
178
181
|
data: e
|
|
179
182
|
})) throw Error("Failed to update DataSink");
|
|
180
|
-
} else if (!await
|
|
183
|
+
} else if (!await q({
|
|
181
184
|
key: O.key,
|
|
182
185
|
name: O.name,
|
|
183
186
|
description: O.description || void 0,
|
|
@@ -197,11 +200,11 @@ var E = i(function() {
|
|
|
197
200
|
}, [
|
|
198
201
|
O,
|
|
199
202
|
D,
|
|
200
|
-
|
|
203
|
+
X,
|
|
204
|
+
q,
|
|
201
205
|
J,
|
|
202
|
-
Y,
|
|
203
206
|
E
|
|
204
|
-
]),
|
|
207
|
+
]), Ne = ie(() => {
|
|
205
208
|
let e = O.name.trim().length >= 2, t = O.key.trim().length > 0, n = !0;
|
|
206
209
|
if (O.data && O.data.trim()) try {
|
|
207
210
|
JSON.parse(O.data);
|
|
@@ -214,161 +217,164 @@ var E = i(function() {
|
|
|
214
217
|
O.key,
|
|
215
218
|
O.data
|
|
216
219
|
]);
|
|
217
|
-
return
|
|
220
|
+
return xe && D ? /* @__PURE__ */ w("div", {
|
|
218
221
|
className: "flex items-center justify-center min-h-[400px]",
|
|
219
|
-
children: /* @__PURE__ */
|
|
220
|
-
}) :
|
|
222
|
+
children: /* @__PURE__ */ w(m, { className: "w-8 h-8 text-text-secondary animate-spin" })
|
|
223
|
+
}) : G ? /* @__PURE__ */ w("div", {
|
|
221
224
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
222
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ T("div", {
|
|
223
226
|
className: "text-center",
|
|
224
227
|
children: [
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ w(d, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
|
|
229
|
+
/* @__PURE__ */ w("p", {
|
|
227
230
|
className: "text-status-error-text text-body-sm font-medium mb-2",
|
|
228
231
|
children: "Failed to load DataSink"
|
|
229
232
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ w("p", {
|
|
231
234
|
className: "text-text-tertiary text-body-xs",
|
|
232
|
-
children:
|
|
235
|
+
children: G.message
|
|
233
236
|
})
|
|
234
237
|
]
|
|
235
238
|
})
|
|
236
|
-
}) : /* @__PURE__ */
|
|
239
|
+
}) : D && !_e && !ve ? /* @__PURE__ */ w(l, {
|
|
240
|
+
title: "Access Denied",
|
|
241
|
+
description: "You don't have permission to view this data sink."
|
|
242
|
+
}) : /* @__PURE__ */ w("div", {
|
|
237
243
|
className: "min-h-screen bg-bg-canvas",
|
|
238
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ T("div", {
|
|
239
245
|
className: "max-w-3xl mx-auto p-card-padding",
|
|
240
246
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ T("div", {
|
|
242
248
|
className: "mb-6",
|
|
243
249
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ T(h, {
|
|
245
251
|
onClick: $,
|
|
246
252
|
variant: "ghost",
|
|
247
253
|
size: "sm",
|
|
248
254
|
className: "mb-4",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ w(oe, { className: "w-4 h-4 mr-2" }), "Back to DataSinks"]
|
|
250
256
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ w("h1", {
|
|
252
258
|
className: "text-heading-h1 font-bold text-text-primary",
|
|
253
259
|
children: D ? "Edit DataSink" : "Create DataSink"
|
|
254
260
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ w("p", {
|
|
256
262
|
className: "text-body-sm text-text-secondary mt-1",
|
|
257
263
|
children: D ? "Update the DataSink configuration." : "Create a new DataSink to store and cache data. Use the unique key to connect workflows."
|
|
258
264
|
})
|
|
259
265
|
]
|
|
260
266
|
}),
|
|
261
|
-
I && /* @__PURE__ */
|
|
267
|
+
I && /* @__PURE__ */ T("div", {
|
|
262
268
|
className: "mb-6 p-4 bg-status-error-bg/10 border border-status-error-border/30 rounded-lg flex items-start gap-3",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ w(d, { className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
264
270
|
className: "text-sm font-medium text-status-error-text",
|
|
265
271
|
children: "Failed to save DataSink"
|
|
266
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ w("p", {
|
|
267
273
|
className: "text-xs text-status-error-text/80 mt-1",
|
|
268
274
|
children: I
|
|
269
275
|
})] })]
|
|
270
276
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ w(pe, {
|
|
272
278
|
className: "mb-6",
|
|
273
279
|
children: "A data sink is the named, structured store your dashboards read from. Give it a unique key, configure how long data is cached and how it refreshes, then point a workflow at that key to push data in. Get the basics right here and everything downstream connects to it."
|
|
274
280
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
onSubmit:
|
|
281
|
+
/* @__PURE__ */ T("form", {
|
|
282
|
+
onSubmit: Me,
|
|
277
283
|
className: "space-y-6",
|
|
278
284
|
children: [
|
|
279
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ T(de, {
|
|
280
286
|
treatment: "glass",
|
|
281
287
|
glow: !0,
|
|
282
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ w(v, {
|
|
283
289
|
className: "pb-4",
|
|
284
|
-
children: /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ T("div", {
|
|
285
291
|
className: "flex items-center gap-3",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ w("div", {
|
|
287
293
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
-
}), /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ w(f, { className: "w-4 h-4 text-action-primary-bg" })
|
|
295
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
|
|
290
296
|
className: "text-base",
|
|
291
297
|
children: "Basic Information"
|
|
292
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ w("p", {
|
|
293
299
|
className: "text-xs text-text-secondary mt-0.5",
|
|
294
300
|
children: "Essential details for your DataSink"
|
|
295
301
|
})] })]
|
|
296
302
|
})
|
|
297
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ T(_, {
|
|
298
304
|
className: "space-y-5",
|
|
299
305
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ T("div", {
|
|
301
307
|
className: "space-y-2",
|
|
302
308
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ T(x, {
|
|
304
310
|
htmlFor: "name",
|
|
305
|
-
children: ["Name ", /* @__PURE__ */
|
|
311
|
+
children: ["Name ", /* @__PURE__ */ w("span", {
|
|
306
312
|
className: "text-status-error-text",
|
|
307
313
|
children: "*"
|
|
308
314
|
})]
|
|
309
315
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ w(b, {
|
|
311
317
|
id: "name",
|
|
312
318
|
type: "text",
|
|
313
319
|
value: O.name,
|
|
314
|
-
onChange:
|
|
320
|
+
onChange: we,
|
|
315
321
|
placeholder: "e.g., Sales Metrics",
|
|
316
322
|
className: A.name ? "border-status-error-border" : ""
|
|
317
323
|
}),
|
|
318
|
-
A.name && /* @__PURE__ */
|
|
324
|
+
A.name && /* @__PURE__ */ w("p", {
|
|
319
325
|
className: "text-body-xs text-status-error-text",
|
|
320
326
|
children: A.name
|
|
321
327
|
})
|
|
322
328
|
]
|
|
323
329
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ T("div", {
|
|
325
331
|
className: "space-y-2",
|
|
326
332
|
children: [
|
|
327
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ T(x, {
|
|
328
334
|
htmlFor: "key",
|
|
329
|
-
children: ["Unique Key ", /* @__PURE__ */
|
|
335
|
+
children: ["Unique Key ", /* @__PURE__ */ w("span", {
|
|
330
336
|
className: "text-status-error-text",
|
|
331
337
|
children: "*"
|
|
332
338
|
})]
|
|
333
339
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ T("div", {
|
|
335
341
|
className: "flex gap-2",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ w(b, {
|
|
337
343
|
id: "key",
|
|
338
344
|
type: "text",
|
|
339
345
|
value: O.key,
|
|
340
|
-
onChange:
|
|
346
|
+
onChange: Te,
|
|
341
347
|
placeholder: "sales_metrics",
|
|
342
348
|
disabled: D,
|
|
343
349
|
className: `font-mono flex-1 ${A.key ? "border-status-error-border" : ""}`
|
|
344
|
-
}), O.key && /* @__PURE__ */
|
|
350
|
+
}), O.key && /* @__PURE__ */ w(h, {
|
|
345
351
|
type: "button",
|
|
346
|
-
onClick:
|
|
352
|
+
onClick: Ae,
|
|
347
353
|
variant: "outline",
|
|
348
354
|
size: "sm",
|
|
349
355
|
className: "px-3",
|
|
350
|
-
children:
|
|
356
|
+
children: be ? /* @__PURE__ */ w(se, { className: "w-4 h-4 text-status-success-text" }) : /* @__PURE__ */ w(ce, { className: "w-4 h-4" })
|
|
351
357
|
})]
|
|
352
358
|
}),
|
|
353
|
-
A.key && /* @__PURE__ */
|
|
359
|
+
A.key && /* @__PURE__ */ w("p", {
|
|
354
360
|
className: "text-body-xs text-status-error-text",
|
|
355
361
|
children: A.key
|
|
356
362
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ w("p", {
|
|
358
364
|
className: "text-body-xs text-text-tertiary",
|
|
359
365
|
children: D ? "Key cannot be changed. Use this key in your workflows to push data." : "Auto-generated from name. This key will be used by workflows to push data."
|
|
360
366
|
})
|
|
361
367
|
]
|
|
362
368
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ T("div", {
|
|
364
370
|
className: "space-y-2",
|
|
365
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ w(x, {
|
|
366
372
|
htmlFor: "description",
|
|
367
373
|
children: "Description"
|
|
368
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ w(S, {
|
|
369
375
|
id: "description",
|
|
370
376
|
value: O.description,
|
|
371
|
-
onChange:
|
|
377
|
+
onChange: Ee,
|
|
372
378
|
placeholder: "Describe what data this sink stores...",
|
|
373
379
|
rows: 2,
|
|
374
380
|
className: "resize-none"
|
|
@@ -377,158 +383,162 @@ var E = i(function() {
|
|
|
377
383
|
]
|
|
378
384
|
})]
|
|
379
385
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ T(g, { children: [/* @__PURE__ */ w(v, {
|
|
381
387
|
className: "pb-4",
|
|
382
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ T("div", {
|
|
383
389
|
className: "flex items-center gap-3",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ w("div", {
|
|
385
391
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
386
|
-
children: /* @__PURE__ */
|
|
387
|
-
}), /* @__PURE__ */
|
|
392
|
+
children: /* @__PURE__ */ w(ue, { className: "w-4 h-4 text-action-primary-bg" })
|
|
393
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
|
|
388
394
|
className: "text-base",
|
|
389
395
|
children: "Configuration"
|
|
390
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ w("p", {
|
|
391
397
|
className: "text-xs text-text-secondary mt-0.5",
|
|
392
398
|
children: "Cache and refresh settings"
|
|
393
399
|
})] })]
|
|
394
400
|
})
|
|
395
|
-
}), /* @__PURE__ */
|
|
401
|
+
}), /* @__PURE__ */ T(_, {
|
|
396
402
|
className: "space-y-5",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ T("div", {
|
|
398
404
|
className: "space-y-2",
|
|
399
405
|
children: [
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ w(x, { children: "Cache Duration" }),
|
|
407
|
+
/* @__PURE__ */ w(r, {
|
|
402
408
|
value: O.ttl,
|
|
403
|
-
onChange:
|
|
409
|
+
onChange: De
|
|
404
410
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ w("p", {
|
|
406
412
|
className: "text-body-xs text-text-tertiary",
|
|
407
413
|
children: "How long cached data remains valid before requiring refresh."
|
|
408
414
|
})
|
|
409
415
|
]
|
|
410
|
-
}), /* @__PURE__ */
|
|
416
|
+
}), /* @__PURE__ */ w(re, {
|
|
411
417
|
value: O.refresh,
|
|
412
|
-
onChange:
|
|
418
|
+
onChange: Oe
|
|
413
419
|
})]
|
|
414
420
|
})] }),
|
|
415
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ T(g, { children: [/* @__PURE__ */ w(v, {
|
|
416
422
|
className: "pb-4",
|
|
417
|
-
children: /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ T("div", {
|
|
418
424
|
className: "flex items-center justify-between",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ T("div", {
|
|
420
426
|
className: "flex items-center gap-3",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ w("div", {
|
|
422
428
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
423
|
-
children: /* @__PURE__ */
|
|
424
|
-
}), /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ w(f, { className: "w-4 h-4 text-action-primary-bg" })
|
|
430
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
|
|
425
431
|
className: "text-base",
|
|
426
432
|
children: "Data Payload"
|
|
427
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), /* @__PURE__ */ w("p", {
|
|
428
434
|
className: "text-xs text-text-secondary mt-0.5",
|
|
429
435
|
children: D ? "Edit the JSON data stored in this DataSink" : "Optional initial data (JSON format)"
|
|
430
436
|
})] })]
|
|
431
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), /* @__PURE__ */ w(h, {
|
|
432
438
|
type: "button",
|
|
433
|
-
onClick:
|
|
439
|
+
onClick: ke,
|
|
434
440
|
variant: "outline",
|
|
435
441
|
size: "sm",
|
|
436
442
|
children: "Format JSON"
|
|
437
443
|
})]
|
|
438
444
|
})
|
|
439
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ w(_, { children: /* @__PURE__ */ T("div", {
|
|
440
446
|
className: "space-y-2",
|
|
441
447
|
children: [
|
|
442
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ w(S, {
|
|
443
449
|
value: O.data,
|
|
444
|
-
onChange:
|
|
450
|
+
onChange: Q,
|
|
445
451
|
placeholder: "{\"key\": \"value\"}",
|
|
446
452
|
rows: 10,
|
|
447
453
|
className: `font-mono text-xs resize-y ${A.data ? "border-status-error-border" : ""}`
|
|
448
454
|
}),
|
|
449
|
-
A.data && /* @__PURE__ */
|
|
455
|
+
A.data && /* @__PURE__ */ w("p", {
|
|
450
456
|
className: "text-body-xs text-status-error-text",
|
|
451
457
|
children: A.data
|
|
452
458
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ w("p", {
|
|
454
460
|
className: "text-body-xs text-text-tertiary",
|
|
455
461
|
children: "Enter valid JSON data. This data will be stored and can be accessed by widgets via parsers."
|
|
456
462
|
})
|
|
457
463
|
]
|
|
458
464
|
}) })] }),
|
|
459
|
-
D &&
|
|
465
|
+
D && X && /* @__PURE__ */ T(g, { children: [/* @__PURE__ */ w(v, {
|
|
460
466
|
className: "pb-4",
|
|
461
|
-
children: /* @__PURE__ */
|
|
467
|
+
children: /* @__PURE__ */ T("div", {
|
|
462
468
|
className: "flex items-center justify-between",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ T("div", {
|
|
464
470
|
className: "flex items-center gap-3",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ w("div", {
|
|
466
472
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
467
|
-
children: /* @__PURE__ */
|
|
468
|
-
}), /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ w(p, { className: "w-4 h-4 text-action-primary-bg" })
|
|
474
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
|
|
469
475
|
className: "text-base",
|
|
470
476
|
children: "Data Preview"
|
|
471
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ w("p", {
|
|
472
478
|
className: "text-xs text-text-secondary mt-0.5",
|
|
473
479
|
children: "Preview the first 20 records"
|
|
474
480
|
})] })]
|
|
475
|
-
}), /* @__PURE__ */
|
|
481
|
+
}), /* @__PURE__ */ w(h, {
|
|
476
482
|
type: "button",
|
|
477
|
-
onClick:
|
|
483
|
+
onClick: je,
|
|
478
484
|
variant: "outline",
|
|
479
485
|
size: "sm",
|
|
480
|
-
disabled:
|
|
481
|
-
children:
|
|
486
|
+
disabled: z,
|
|
487
|
+
children: z ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(m, { className: "w-4 h-4 mr-2 animate-spin" }), "Loading..."] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(p, { className: "w-4 h-4 mr-2" }), "Show Data"] })
|
|
482
488
|
})]
|
|
483
489
|
})
|
|
484
|
-
}), (
|
|
490
|
+
}), (V || U) && /* @__PURE__ */ w(_, { children: U ? /* @__PURE__ */ w("div", {
|
|
485
491
|
className: "p-4 bg-status-error-bg/10 border border-status-error-border/30 rounded-md",
|
|
486
|
-
children: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ w("p", {
|
|
487
493
|
className: "text-sm text-status-error-text",
|
|
488
|
-
children:
|
|
494
|
+
children: U
|
|
489
495
|
})
|
|
490
|
-
}) :
|
|
496
|
+
}) : V && V.length > 0 ? /* @__PURE__ */ w("pre", {
|
|
491
497
|
className: "p-4 bg-bg-sunken rounded-md overflow-auto max-h-[300px] text-xs font-mono",
|
|
492
|
-
children: JSON.stringify(
|
|
493
|
-
}) : /* @__PURE__ */
|
|
498
|
+
children: JSON.stringify(V, null, 2)
|
|
499
|
+
}) : /* @__PURE__ */ w(fe, {
|
|
494
500
|
illustration: "empty-generic",
|
|
495
501
|
title: "No data available yet",
|
|
496
502
|
description: "Connect a workflow to this sink's key to start pushing data."
|
|
497
503
|
}) })] }),
|
|
498
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ T("div", {
|
|
499
505
|
className: "flex items-center justify-end gap-4 pt-4",
|
|
500
|
-
children: [/* @__PURE__ */
|
|
506
|
+
children: [/* @__PURE__ */ w(h, {
|
|
501
507
|
type: "button",
|
|
502
508
|
onClick: $,
|
|
503
509
|
variant: "secondary",
|
|
504
510
|
children: "Cancel"
|
|
505
|
-
}), /* @__PURE__ */
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
511
|
+
}), /* @__PURE__ */ w(u, {
|
|
512
|
+
permission: ye,
|
|
513
|
+
deniedBehavior: "disable",
|
|
514
|
+
children: /* @__PURE__ */ w(h, {
|
|
515
|
+
type: "submit",
|
|
516
|
+
disabled: !Ne || P,
|
|
517
|
+
variant: "default",
|
|
518
|
+
children: P ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(m, { className: "w-4 h-4 mr-2 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(le, { className: "w-4 h-4 mr-2" }), D ? "Save Changes" : "Create DataSink"] })
|
|
519
|
+
})
|
|
510
520
|
})]
|
|
511
521
|
})
|
|
512
522
|
]
|
|
513
523
|
}),
|
|
514
|
-
!D && /* @__PURE__ */
|
|
524
|
+
!D && /* @__PURE__ */ T("div", {
|
|
515
525
|
className: "mt-6 p-4 bg-bg-sunken rounded-lg border border-border-default",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
526
|
+
children: [/* @__PURE__ */ w("h3", {
|
|
517
527
|
className: "text-sm font-medium text-text-primary mb-2",
|
|
518
528
|
children: "What's Next?"
|
|
519
|
-
}), /* @__PURE__ */
|
|
529
|
+
}), /* @__PURE__ */ T("ol", {
|
|
520
530
|
className: "list-decimal list-inside text-xs text-text-secondary space-y-1",
|
|
521
531
|
children: [
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ w("li", { children: "Create this DataSink to get your unique key" }),
|
|
533
|
+
/* @__PURE__ */ T("li", { children: [
|
|
524
534
|
"Go to ",
|
|
525
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ w("strong", { children: "Workflows" }),
|
|
526
536
|
" and create a FluidGrids workflow"
|
|
527
537
|
] }),
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ w("li", { children: "Use the unique key in your workflow to push data to this DataSink" }),
|
|
539
|
+
/* @__PURE__ */ T("li", { children: [
|
|
530
540
|
"Create ",
|
|
531
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ w("strong", { children: "Parsers" }),
|
|
532
542
|
" to transform the data using JQ or JSONata"
|
|
533
543
|
] })
|
|
534
544
|
]
|