@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
|
@@ -3,14 +3,17 @@ import "../contexts/index.js";
|
|
|
3
3
|
import t from "../hooks/useDashboardOperations.js";
|
|
4
4
|
import ee from "../hooks/useDataSinkOperations.js";
|
|
5
5
|
import te from "../hooks/useParserOperations.js";
|
|
6
|
+
import { BIGCONSOLE_PERMISSIONS as n } from "../../constants/permissions.js";
|
|
6
7
|
import ne from "../components/datasink/CacheTTLSelector.js";
|
|
7
|
-
import { memo as
|
|
8
|
-
import { useParams as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { memo as r, useCallback as i, useEffect as a, useMemo as re, useRef as ie, useState as o } from "react";
|
|
9
|
+
import { useParams as ae } from "react-router";
|
|
10
|
+
import { AccessDenied as oe, PermissionButton as s } from "@burdenoff/fe-libs/shared/components";
|
|
11
|
+
import { usePermissions as se } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { AlertCircle as c, ArrowLeft as ce, CheckCircle2 as le, ChevronDown as ue, ChevronRight as de, Code as fe, Download as pe, Eye as me, FileCode2 as he, LayoutDashboard as ge, Loader2 as l, Play as _e, Save as ve, Settings as ye, X as be } from "lucide-react";
|
|
13
|
+
import { Button as u, CardContent as xe, CardHeader as Se, CardTitle as Ce, GlassCard as we, PagePurpose as Te, Stepper as Ee } from "@burdenoff/fe-libs/ui";
|
|
11
14
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
15
|
//#region src/bigconsole/pages/ParserBuilderPage.tsx
|
|
13
|
-
var m = 25,
|
|
16
|
+
var m = 25, De = "default", Oe = [
|
|
14
17
|
"details",
|
|
15
18
|
"source",
|
|
16
19
|
"expression",
|
|
@@ -37,10 +40,10 @@ var m = 25, Ce = "default", we = [
|
|
|
37
40
|
description: "Finish up"
|
|
38
41
|
}
|
|
39
42
|
];
|
|
40
|
-
function
|
|
43
|
+
function ke(e) {
|
|
41
44
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
|
|
42
45
|
}
|
|
43
|
-
function
|
|
46
|
+
function Ae(e) {
|
|
44
47
|
let t = {};
|
|
45
48
|
return e.name.trim() ? e.name.length < 2 && (t.name = "Name must be at least 2 characters") : t.name = "Name is required", e.outputKey.trim() ? /^[a-z0-9_]+$/.test(e.outputKey) || (t.outputKey = "Output key can only contain lowercase letters, numbers, and underscores") : t.outputKey = "Output key is required", e.expression.trim() || (t.expression = "Expression is required"), e.inputSinkKey.trim() || (t.inputSinkKey = "Source DataSink is required"), e.ttl != null && e.ttl > 0 && (e.ttl < 30 || e.ttl > 86400) && (t.ttl = "Cache duration must be between 30 and 86400 seconds"), t;
|
|
46
49
|
}
|
|
@@ -57,8 +60,8 @@ var g = {
|
|
|
57
60
|
placeholder: "$sum(data[*].value)",
|
|
58
61
|
example: "$sum(data.values) - Calculate sum of values"
|
|
59
62
|
}
|
|
60
|
-
}, _ = "w-full px-3 py-2.5 text-sm text-text-primary bg-bg-surface border rounded-md placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg transition-all", v =
|
|
61
|
-
let { parserId:
|
|
63
|
+
}, _ = "w-full px-3 py-2.5 text-sm text-text-primary bg-bg-surface border rounded-md placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg transition-all", v = r(function() {
|
|
64
|
+
let { parserId: r, consoleId: v } = ae(), je = e(), [y, b] = o(0), [x, S] = o(De), C = v || x || De, w = r !== "new" && !!r, { hasPermission: Me, isLoading: Ne } = se(), Pe = Me(n.PARSER_READ), Fe = Me(w ? n.PARSER_UPDATE : n.PARSER_CREATE), Ie = w ? n.PARSER_UPDATE : n.PARSER_CREATE, T = !v, [E, D] = o({
|
|
62
65
|
name: "",
|
|
63
66
|
outputKey: "",
|
|
64
67
|
description: "",
|
|
@@ -66,25 +69,25 @@ var g = {
|
|
|
66
69
|
expression: "",
|
|
67
70
|
inputSinkKey: "",
|
|
68
71
|
ttl: 900
|
|
69
|
-
}), [
|
|
70
|
-
|
|
71
|
-
H.current =
|
|
72
|
-
}, [
|
|
73
|
-
let [U, W] = o(!1), [
|
|
74
|
-
consoleId:
|
|
72
|
+
}), [O, k] = o({}), [Le, Re] = o(!1), [ze, Be] = o(!1), [Ve, He] = o(null), [A, j] = o("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [M, N] = o(""), [P, F] = o(null), [Ue, We] = o(!1), [I, L] = o(null), [R, z] = o(!1), [B, V] = o(null), [Ge, Ke] = o(!1), H = ie(E.inputSinkKey);
|
|
73
|
+
a(() => {
|
|
74
|
+
H.current = E.inputSinkKey;
|
|
75
|
+
}, [E.inputSinkKey]);
|
|
76
|
+
let [U, W] = o(!1), [qe, Je] = o(null), [Ye, Xe] = o(!1), [Ze, G] = o(null), [K, Qe] = o(null), { loading: $e, error: et, parsers: tt, fetchParser: nt, createParser: rt, updateParser: it, testParserExpression: at } = te({
|
|
77
|
+
consoleId: C || "",
|
|
75
78
|
skipFetch: !0
|
|
76
|
-
}), { dataSinks: q, fetchDataSinks:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
}), { dataSinks: q, fetchDataSinks: ot, getDataSinkData: J } = ee({ skipFetch: !0 }), { dashboards: st, fetchDashboards: ct, loading: lt } = t(), Y = w ? tt.find((e) => e.id === r) : null;
|
|
80
|
+
a(() => {
|
|
81
|
+
ot(), w && r && nt(r), T && ct();
|
|
79
82
|
}, [
|
|
80
|
-
C,
|
|
81
|
-
n,
|
|
82
|
-
qe,
|
|
83
|
-
Ze,
|
|
84
83
|
w,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
r,
|
|
85
|
+
nt,
|
|
86
|
+
ot,
|
|
87
|
+
T,
|
|
88
|
+
ct
|
|
89
|
+
]), a(() => {
|
|
90
|
+
Y && (D({
|
|
88
91
|
name: Y.name || "",
|
|
89
92
|
outputKey: Y.outputKey || "",
|
|
90
93
|
description: Y.description || "",
|
|
@@ -92,69 +95,69 @@ var g = {
|
|
|
92
95
|
expression: Y.expression || "",
|
|
93
96
|
inputSinkKey: Y.inputSinkKey || "",
|
|
94
97
|
ttl: Y.ttl ?? null
|
|
95
|
-
}),
|
|
98
|
+
}), Re(!0), Y.consoleId && S(Y.consoleId));
|
|
96
99
|
}, [Y]);
|
|
97
|
-
let X =
|
|
100
|
+
let X = re(() => q.find((e) => e.key === E.inputSinkKey)?.name || E.inputSinkKey, [q, E.inputSinkKey]), ut = i((e) => {
|
|
98
101
|
let t = e.target.value;
|
|
99
|
-
|
|
102
|
+
D((e) => ({
|
|
100
103
|
...e,
|
|
101
104
|
name: t,
|
|
102
|
-
outputKey:
|
|
103
|
-
})),
|
|
105
|
+
outputKey: Le ? e.outputKey : ke(t)
|
|
106
|
+
})), k((e) => ({
|
|
104
107
|
...e,
|
|
105
108
|
name: void 0
|
|
106
109
|
}));
|
|
107
|
-
}, [
|
|
110
|
+
}, [Le]), dt = i((e) => {
|
|
108
111
|
let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
109
|
-
|
|
112
|
+
D((e) => ({
|
|
110
113
|
...e,
|
|
111
114
|
outputKey: t
|
|
112
|
-
})),
|
|
115
|
+
})), Re(!0), k((e) => ({
|
|
113
116
|
...e,
|
|
114
117
|
outputKey: void 0
|
|
115
118
|
}));
|
|
116
|
-
}, []),
|
|
117
|
-
|
|
119
|
+
}, []), ft = i((e) => {
|
|
120
|
+
D((t) => ({
|
|
118
121
|
...t,
|
|
119
122
|
description: e.target.value
|
|
120
123
|
}));
|
|
121
|
-
}, []),
|
|
122
|
-
|
|
124
|
+
}, []), pt = i((e) => {
|
|
125
|
+
D((t) => ({
|
|
123
126
|
...t,
|
|
124
127
|
type: e
|
|
125
128
|
})), N(""), F(null);
|
|
126
|
-
}, []),
|
|
127
|
-
|
|
129
|
+
}, []), mt = i((e) => {
|
|
130
|
+
D((t) => ({
|
|
128
131
|
...t,
|
|
129
132
|
expression: e.target.value
|
|
130
|
-
})),
|
|
133
|
+
})), k((e) => ({
|
|
131
134
|
...e,
|
|
132
135
|
expression: void 0
|
|
133
136
|
}));
|
|
134
|
-
}, []),
|
|
135
|
-
|
|
137
|
+
}, []), ht = i((e) => {
|
|
138
|
+
D((t) => ({
|
|
136
139
|
...t,
|
|
137
140
|
inputSinkKey: e.target.value
|
|
138
|
-
})),
|
|
141
|
+
})), k((e) => ({
|
|
139
142
|
...e,
|
|
140
143
|
inputSinkKey: void 0
|
|
141
|
-
})), W(!1),
|
|
142
|
-
}, [R]),
|
|
143
|
-
|
|
144
|
+
})), W(!1), Je(null), Qe(null), G(null), R && (j(""), z(!1)), V(null), N(""), F(null), L(null);
|
|
145
|
+
}, [R]), gt = i((e) => {
|
|
146
|
+
D((t) => ({
|
|
144
147
|
...t,
|
|
145
148
|
ttl: e
|
|
146
|
-
})),
|
|
149
|
+
})), k((e) => ({
|
|
147
150
|
...e,
|
|
148
151
|
ttl: void 0
|
|
149
152
|
}));
|
|
150
|
-
}, []),
|
|
151
|
-
|
|
152
|
-
}, []),
|
|
153
|
+
}, []), _t = i((e) => {
|
|
154
|
+
S(e.target.value);
|
|
155
|
+
}, []), vt = i((e) => {
|
|
153
156
|
j(e.target.value);
|
|
154
|
-
}, []),
|
|
155
|
-
let e =
|
|
157
|
+
}, []), yt = i(async () => {
|
|
158
|
+
let e = E.inputSinkKey;
|
|
156
159
|
if (e) {
|
|
157
|
-
|
|
160
|
+
Ke(!0);
|
|
158
161
|
try {
|
|
159
162
|
let t = await J({ key: e }, { limit: m });
|
|
160
163
|
if (H.current !== e) return;
|
|
@@ -167,30 +170,30 @@ var g = {
|
|
|
167
170
|
if (H.current !== e) return;
|
|
168
171
|
F(t instanceof Error ? t.message : "Failed to load sample data");
|
|
169
172
|
} finally {
|
|
170
|
-
|
|
173
|
+
Ke(!1);
|
|
171
174
|
}
|
|
172
175
|
}
|
|
173
176
|
}, [
|
|
174
|
-
|
|
177
|
+
E.inputSinkKey,
|
|
175
178
|
J,
|
|
176
179
|
X
|
|
177
|
-
]),
|
|
180
|
+
]), bt = i(() => {
|
|
178
181
|
j(""), z(!1), V(null), L(null), N(""), F(null);
|
|
179
|
-
}, []),
|
|
182
|
+
}, []), xt = i(async () => {
|
|
180
183
|
if (U) {
|
|
181
184
|
W(!1);
|
|
182
185
|
return;
|
|
183
186
|
}
|
|
184
|
-
if (!
|
|
187
|
+
if (!E.inputSinkKey) {
|
|
185
188
|
G("Please select a source DataSink first");
|
|
186
189
|
return;
|
|
187
190
|
}
|
|
188
|
-
W(!0),
|
|
189
|
-
let e =
|
|
191
|
+
W(!0), Xe(!0), G(null);
|
|
192
|
+
let e = E.inputSinkKey;
|
|
190
193
|
try {
|
|
191
194
|
let t = await J({ key: e }, { limit: m });
|
|
192
195
|
if (H.current !== e) return;
|
|
193
|
-
t?.raw !== void 0 && t?.raw !== null ? (
|
|
196
|
+
t?.raw !== void 0 && t?.raw !== null ? (Je(t.raw), Qe({
|
|
194
197
|
total: t.totalCount ?? null,
|
|
195
198
|
hasMore: t.hasMore ?? null,
|
|
196
199
|
sinkName: X
|
|
@@ -199,23 +202,23 @@ var g = {
|
|
|
199
202
|
if (H.current !== e) return;
|
|
200
203
|
G(t instanceof Error ? t.message : "Failed to load data");
|
|
201
204
|
} finally {
|
|
202
|
-
|
|
205
|
+
Xe(!1);
|
|
203
206
|
}
|
|
204
207
|
}, [
|
|
205
208
|
U,
|
|
206
|
-
|
|
209
|
+
E.inputSinkKey,
|
|
207
210
|
J,
|
|
208
211
|
X
|
|
209
|
-
]),
|
|
210
|
-
if (!
|
|
212
|
+
]), St = i(async () => {
|
|
213
|
+
if (!E.expression.trim()) {
|
|
211
214
|
F("Expression is required");
|
|
212
215
|
return;
|
|
213
216
|
}
|
|
214
217
|
let e;
|
|
215
218
|
if (R) e = {
|
|
216
|
-
type:
|
|
217
|
-
expression:
|
|
218
|
-
dataSinkKey:
|
|
219
|
+
type: E.type,
|
|
220
|
+
expression: E.expression,
|
|
221
|
+
dataSinkKey: E.inputSinkKey,
|
|
219
222
|
sampleLimit: m
|
|
220
223
|
};
|
|
221
224
|
else {
|
|
@@ -227,14 +230,14 @@ var g = {
|
|
|
227
230
|
return;
|
|
228
231
|
}
|
|
229
232
|
e = {
|
|
230
|
-
type:
|
|
231
|
-
expression:
|
|
233
|
+
type: E.type,
|
|
234
|
+
expression: E.expression,
|
|
232
235
|
sampleData: t
|
|
233
236
|
};
|
|
234
237
|
}
|
|
235
|
-
|
|
238
|
+
We(!0), F(null), N(""), L(null);
|
|
236
239
|
try {
|
|
237
|
-
let t = await
|
|
240
|
+
let t = await at(e);
|
|
238
241
|
t ? t.success ? (N(JSON.stringify(t.output, null, 2)), t.sampled && L({
|
|
239
242
|
sampledRows: t.sampledRows ?? null,
|
|
240
243
|
totalRows: t.totalRows ?? null
|
|
@@ -242,109 +245,113 @@ var g = {
|
|
|
242
245
|
} catch (e) {
|
|
243
246
|
F(e instanceof Error ? e.message : "Test failed");
|
|
244
247
|
} finally {
|
|
245
|
-
|
|
248
|
+
We(!1);
|
|
246
249
|
}
|
|
247
250
|
}, [
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
+
E.type,
|
|
252
|
+
E.expression,
|
|
253
|
+
E.inputSinkKey,
|
|
251
254
|
A,
|
|
252
255
|
R,
|
|
253
|
-
|
|
254
|
-
]), Z =
|
|
255
|
-
|
|
256
|
-
}, [
|
|
257
|
-
|
|
258
|
-
let e =
|
|
256
|
+
at
|
|
257
|
+
]), Z = i(() => {
|
|
258
|
+
je(v ? `/dashboards/${v}/parsers` : "/parsers");
|
|
259
|
+
}, [je, v]), Ct = i(async () => {
|
|
260
|
+
He(null);
|
|
261
|
+
let e = Ae(E);
|
|
259
262
|
if (Object.keys(e).length > 0) {
|
|
260
|
-
|
|
263
|
+
k(e), e.name || e.outputKey ? b(0) : e.inputSinkKey ? b(1) : e.expression && b(2);
|
|
261
264
|
return;
|
|
262
265
|
}
|
|
263
|
-
|
|
266
|
+
Be(!0);
|
|
264
267
|
try {
|
|
265
|
-
if (
|
|
266
|
-
if (!await
|
|
267
|
-
name:
|
|
268
|
-
description:
|
|
269
|
-
expression:
|
|
270
|
-
inputSinkKey:
|
|
271
|
-
outputKey:
|
|
272
|
-
ttl:
|
|
268
|
+
if (w && Y) {
|
|
269
|
+
if (!await it(Y.id, {
|
|
270
|
+
name: E.name,
|
|
271
|
+
description: E.description || void 0,
|
|
272
|
+
expression: E.expression,
|
|
273
|
+
inputSinkKey: E.inputSinkKey,
|
|
274
|
+
outputKey: E.outputKey,
|
|
275
|
+
ttl: E.ttl
|
|
273
276
|
}, Y.version)) throw Error("Failed to update parser");
|
|
274
|
-
} else if (!await
|
|
275
|
-
consoleId:
|
|
276
|
-
name:
|
|
277
|
-
type:
|
|
278
|
-
expression:
|
|
279
|
-
inputSinkKey:
|
|
280
|
-
outputKey:
|
|
281
|
-
description:
|
|
282
|
-
ttl:
|
|
277
|
+
} else if (!await rt({
|
|
278
|
+
consoleId: C || "",
|
|
279
|
+
name: E.name,
|
|
280
|
+
type: E.type,
|
|
281
|
+
expression: E.expression,
|
|
282
|
+
inputSinkKey: E.inputSinkKey,
|
|
283
|
+
outputKey: E.outputKey,
|
|
284
|
+
description: E.description || void 0,
|
|
285
|
+
ttl: E.ttl ?? void 0
|
|
283
286
|
})) throw Error("Failed to create parser");
|
|
284
287
|
Z();
|
|
285
288
|
} catch (e) {
|
|
286
|
-
|
|
289
|
+
He(e instanceof Error ? e.message : "Failed to save parser");
|
|
287
290
|
} finally {
|
|
288
|
-
|
|
291
|
+
Be(!1);
|
|
289
292
|
}
|
|
290
293
|
}, [
|
|
291
|
-
|
|
292
|
-
|
|
294
|
+
E,
|
|
295
|
+
w,
|
|
293
296
|
Y,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
+
rt,
|
|
298
|
+
it,
|
|
299
|
+
C,
|
|
297
300
|
Z
|
|
298
|
-
]),
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
]), Q =
|
|
304
|
-
switch (
|
|
305
|
-
case "details": return
|
|
306
|
-
case "source": return
|
|
307
|
-
case "expression": return
|
|
301
|
+
]), wt = re(() => E.name.trim().length >= 2 && E.expression.trim().length > 0 && E.inputSinkKey.trim().length > 0 && E.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(E.outputKey), [
|
|
302
|
+
E.name,
|
|
303
|
+
E.expression,
|
|
304
|
+
E.inputSinkKey,
|
|
305
|
+
E.outputKey
|
|
306
|
+
]), Q = i((e) => {
|
|
307
|
+
switch (Oe[e]) {
|
|
308
|
+
case "details": return E.name.trim().length >= 2 && E.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(E.outputKey);
|
|
309
|
+
case "source": return E.inputSinkKey.trim().length > 0;
|
|
310
|
+
case "expression": return E.expression.trim().length > 0;
|
|
308
311
|
default: return !0;
|
|
309
312
|
}
|
|
310
313
|
}, [
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
]),
|
|
314
|
+
E.name,
|
|
315
|
+
E.outputKey,
|
|
316
|
+
E.inputSinkKey,
|
|
317
|
+
E.expression
|
|
318
|
+
]), Tt = i((e) => {
|
|
316
319
|
let t = Math.max(0, Math.min(e, h.length - 1));
|
|
317
320
|
if (t > y) {
|
|
318
321
|
for (let e = y; e < t; e++) if (!Q(e)) return;
|
|
319
322
|
}
|
|
320
323
|
b(t);
|
|
321
|
-
}, [y, Q]),
|
|
324
|
+
}, [y, Q]), Et = i(() => {
|
|
322
325
|
b((e) => Math.min(e + 1, h.length - 1));
|
|
323
|
-
}, []),
|
|
326
|
+
}, []), Dt = i(() => {
|
|
324
327
|
b((e) => Math.max(e - 1, 0));
|
|
325
328
|
}, []);
|
|
326
|
-
if (
|
|
329
|
+
if ($e && w || Ne) return /* @__PURE__ */ f("div", {
|
|
327
330
|
className: "flex items-center justify-center min-h-[400px]",
|
|
328
|
-
children: /* @__PURE__ */ f(
|
|
331
|
+
children: /* @__PURE__ */ f(l, { className: "w-8 h-8 text-text-secondary animate-spin" })
|
|
329
332
|
});
|
|
330
|
-
if (
|
|
333
|
+
if (w && !Pe) return /* @__PURE__ */ f(oe, {
|
|
334
|
+
title: "Access Denied",
|
|
335
|
+
description: "You don't have permission to view this parser."
|
|
336
|
+
});
|
|
337
|
+
if (et) return /* @__PURE__ */ f("div", {
|
|
331
338
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
332
339
|
children: /* @__PURE__ */ p("div", {
|
|
333
340
|
className: "text-center",
|
|
334
341
|
children: [
|
|
335
|
-
/* @__PURE__ */ f(
|
|
342
|
+
/* @__PURE__ */ f(c, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
|
|
336
343
|
/* @__PURE__ */ f("p", {
|
|
337
344
|
className: "text-status-error-text text-body-sm font-medium mb-2",
|
|
338
345
|
children: "Failed to load Parser"
|
|
339
346
|
}),
|
|
340
347
|
/* @__PURE__ */ f("p", {
|
|
341
348
|
className: "text-text-tertiary text-body-xs",
|
|
342
|
-
children:
|
|
349
|
+
children: et.message
|
|
343
350
|
})
|
|
344
351
|
]
|
|
345
352
|
})
|
|
346
353
|
});
|
|
347
|
-
let $ = g[
|
|
354
|
+
let $ = g[E.type], Ot = y === h.length - 1;
|
|
348
355
|
return /* @__PURE__ */ f("div", {
|
|
349
356
|
className: "min-h-screen bg-bg-canvas",
|
|
350
357
|
children: /* @__PURE__ */ p("div", {
|
|
@@ -358,11 +365,11 @@ var g = {
|
|
|
358
365
|
variant: "ghost",
|
|
359
366
|
size: "sm",
|
|
360
367
|
className: "mb-4",
|
|
361
|
-
children: [/* @__PURE__ */ f(
|
|
368
|
+
children: [/* @__PURE__ */ f(ce, { className: "w-4 h-4 mr-2" }), "Back to Parsers"]
|
|
362
369
|
}),
|
|
363
370
|
/* @__PURE__ */ f("h1", {
|
|
364
371
|
className: "text-heading-h1 font-bold text-text-primary",
|
|
365
|
-
children:
|
|
372
|
+
children: w ? "Edit Parser" : "Create Parser"
|
|
366
373
|
}),
|
|
367
374
|
/* @__PURE__ */ f("p", {
|
|
368
375
|
className: "text-body-sm text-text-secondary mt-1",
|
|
@@ -370,42 +377,42 @@ var g = {
|
|
|
370
377
|
})
|
|
371
378
|
]
|
|
372
379
|
}),
|
|
373
|
-
/* @__PURE__ */ f(
|
|
380
|
+
/* @__PURE__ */ f(Te, {
|
|
374
381
|
className: "mb-6",
|
|
375
382
|
children: "A parser maps raw input into structured fields using a JQ or JSONata expression. Write the expression, run it against a sample to confirm the output, and save it once it produces the shape you need — then reuse it across pipelines to normalise any source."
|
|
376
383
|
}),
|
|
377
384
|
/* @__PURE__ */ f("div", {
|
|
378
385
|
className: "mb-6",
|
|
379
|
-
children: /* @__PURE__ */ f(
|
|
386
|
+
children: /* @__PURE__ */ f(Ee, {
|
|
380
387
|
steps: h,
|
|
381
388
|
active: y,
|
|
382
|
-
onStepClick:
|
|
389
|
+
onStepClick: Tt
|
|
383
390
|
})
|
|
384
391
|
}),
|
|
385
|
-
|
|
392
|
+
Ve && /* @__PURE__ */ p("div", {
|
|
386
393
|
className: "mb-6 p-4 bg-status-error-bg/10 border border-status-error-border/30 rounded-lg flex items-start gap-3",
|
|
387
|
-
children: [/* @__PURE__ */ f(
|
|
394
|
+
children: [/* @__PURE__ */ f(c, { className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
388
395
|
className: "text-sm font-medium text-status-error-text",
|
|
389
396
|
children: "Failed to save Parser"
|
|
390
397
|
}), /* @__PURE__ */ f("p", {
|
|
391
398
|
className: "text-xs text-status-error-text/80 mt-1",
|
|
392
|
-
children:
|
|
399
|
+
children: Ve
|
|
393
400
|
})] })]
|
|
394
401
|
}),
|
|
395
|
-
/* @__PURE__ */ p(
|
|
402
|
+
/* @__PURE__ */ p(we, {
|
|
396
403
|
treatment: "glass",
|
|
397
404
|
glow: !0,
|
|
398
|
-
children: [/* @__PURE__ */ f(
|
|
405
|
+
children: [/* @__PURE__ */ f(Se, {
|
|
399
406
|
className: "pb-4",
|
|
400
407
|
children: /* @__PURE__ */ p("div", {
|
|
401
408
|
className: "flex items-center gap-3",
|
|
402
409
|
children: [/* @__PURE__ */ p("div", {
|
|
403
410
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
404
411
|
children: [
|
|
405
|
-
y === 0 && /* @__PURE__ */ f(
|
|
406
|
-
y === 1 && /* @__PURE__ */ f(
|
|
407
|
-
y === 2 && /* @__PURE__ */ f(
|
|
408
|
-
y === 3 && /* @__PURE__ */ f(
|
|
412
|
+
y === 0 && /* @__PURE__ */ f(he, { className: "w-4 h-4 text-action-primary-bg" }),
|
|
413
|
+
y === 1 && /* @__PURE__ */ f(fe, { className: "w-4 h-4 text-action-primary-bg" }),
|
|
414
|
+
y === 2 && /* @__PURE__ */ f(_e, { className: "w-4 h-4 text-action-primary-bg" }),
|
|
415
|
+
y === 3 && /* @__PURE__ */ f(ye, { className: "w-4 h-4 text-action-primary-bg" })
|
|
409
416
|
]
|
|
410
417
|
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", {
|
|
411
418
|
className: "text-xs text-text-tertiary",
|
|
@@ -415,12 +422,12 @@ var g = {
|
|
|
415
422
|
" of ",
|
|
416
423
|
h.length
|
|
417
424
|
]
|
|
418
|
-
}), /* @__PURE__ */ f(
|
|
425
|
+
}), /* @__PURE__ */ f(Ce, {
|
|
419
426
|
className: "text-base",
|
|
420
427
|
children: h[y].label
|
|
421
428
|
})] })]
|
|
422
429
|
})
|
|
423
|
-
}), /* @__PURE__ */ p(
|
|
430
|
+
}), /* @__PURE__ */ p(xe, {
|
|
424
431
|
className: "space-y-5",
|
|
425
432
|
children: [
|
|
426
433
|
y === 0 && /* @__PURE__ */ p("div", {
|
|
@@ -440,14 +447,14 @@ var g = {
|
|
|
440
447
|
/* @__PURE__ */ f("input", {
|
|
441
448
|
id: "name",
|
|
442
449
|
type: "text",
|
|
443
|
-
value:
|
|
444
|
-
onChange:
|
|
450
|
+
value: E.name,
|
|
451
|
+
onChange: ut,
|
|
445
452
|
placeholder: "e.g., User Analytics Parser",
|
|
446
|
-
className: `${_} ${
|
|
453
|
+
className: `${_} ${O.name ? "border-status-error-border" : "border-border-default"}`
|
|
447
454
|
}),
|
|
448
|
-
|
|
455
|
+
O.name && /* @__PURE__ */ f("p", {
|
|
449
456
|
className: "text-xs text-status-error-text mt-1.5",
|
|
450
|
-
children:
|
|
457
|
+
children: O.name
|
|
451
458
|
})
|
|
452
459
|
] }), /* @__PURE__ */ p("div", { children: [
|
|
453
460
|
/* @__PURE__ */ p("label", {
|
|
@@ -461,17 +468,17 @@ var g = {
|
|
|
461
468
|
/* @__PURE__ */ f("input", {
|
|
462
469
|
id: "outputKey",
|
|
463
470
|
type: "text",
|
|
464
|
-
value:
|
|
465
|
-
onChange:
|
|
471
|
+
value: E.outputKey,
|
|
472
|
+
onChange: dt,
|
|
466
473
|
placeholder: "user_analytics_parser",
|
|
467
|
-
disabled:
|
|
468
|
-
className: `${_} font-mono ${
|
|
474
|
+
disabled: w,
|
|
475
|
+
className: `${_} font-mono ${O.outputKey ? "border-status-error-border" : "border-border-default"} disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60`
|
|
469
476
|
}),
|
|
470
|
-
|
|
477
|
+
O.outputKey && /* @__PURE__ */ f("p", {
|
|
471
478
|
className: "text-xs text-status-error-text mt-1.5",
|
|
472
|
-
children:
|
|
479
|
+
children: O.outputKey
|
|
473
480
|
}),
|
|
474
|
-
!
|
|
481
|
+
!w && /* @__PURE__ */ f("p", {
|
|
475
482
|
className: "text-xs text-text-tertiary mt-1.5",
|
|
476
483
|
children: "Auto-generated from name. Customize if needed."
|
|
477
484
|
})
|
|
@@ -483,38 +490,38 @@ var g = {
|
|
|
483
490
|
children: "Description"
|
|
484
491
|
}), /* @__PURE__ */ f("textarea", {
|
|
485
492
|
id: "description",
|
|
486
|
-
value:
|
|
487
|
-
onChange:
|
|
493
|
+
value: E.description,
|
|
494
|
+
onChange: ft,
|
|
488
495
|
placeholder: "Describe what this parser does...",
|
|
489
496
|
rows: 2,
|
|
490
497
|
className: `${_} border-border-default resize-y`
|
|
491
498
|
})] }),
|
|
492
|
-
|
|
499
|
+
T && /* @__PURE__ */ p("div", { children: [
|
|
493
500
|
/* @__PURE__ */ f("label", {
|
|
494
501
|
htmlFor: "dashboard",
|
|
495
502
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
496
503
|
children: /* @__PURE__ */ p("span", {
|
|
497
504
|
className: "flex items-center gap-2",
|
|
498
|
-
children: [/* @__PURE__ */ f(
|
|
505
|
+
children: [/* @__PURE__ */ f(ge, { className: "w-4 h-4" }), "Dashboard Scope"]
|
|
499
506
|
})
|
|
500
507
|
}),
|
|
501
508
|
/* @__PURE__ */ p("select", {
|
|
502
509
|
id: "dashboard",
|
|
503
510
|
value: x,
|
|
504
|
-
onChange:
|
|
505
|
-
disabled:
|
|
511
|
+
onChange: _t,
|
|
512
|
+
disabled: lt || w,
|
|
506
513
|
className: `${_} border-border-default disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60`,
|
|
507
514
|
children: [/* @__PURE__ */ f("option", {
|
|
508
515
|
value: "default",
|
|
509
516
|
children: "Global (available everywhere)"
|
|
510
|
-
}),
|
|
517
|
+
}), st.map((e) => /* @__PURE__ */ f("option", {
|
|
511
518
|
value: e.id,
|
|
512
519
|
children: e.name
|
|
513
520
|
}, e.id))]
|
|
514
521
|
}),
|
|
515
522
|
/* @__PURE__ */ f("p", {
|
|
516
523
|
className: "text-xs text-text-tertiary mt-1.5",
|
|
517
|
-
children:
|
|
524
|
+
children: w ? "Dashboard scope cannot be changed after creation." : x === "default" ? "Global parsers are available across all dashboards." : "This parser will only be available in the selected dashboard."
|
|
518
525
|
})
|
|
519
526
|
] })
|
|
520
527
|
]
|
|
@@ -532,13 +539,13 @@ var g = {
|
|
|
532
539
|
children: Object.keys(g).map((e) => {
|
|
533
540
|
let t = g[e];
|
|
534
541
|
return /* @__PURE__ */ p("label", {
|
|
535
|
-
className: `flex items-start gap-3 p-3 border rounded-md cursor-pointer transition-colors ${
|
|
542
|
+
className: `flex items-start gap-3 p-3 border rounded-md cursor-pointer transition-colors ${E.type === e ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default hover:bg-bg-sunken"}`,
|
|
536
543
|
children: [/* @__PURE__ */ f("input", {
|
|
537
544
|
type: "radio",
|
|
538
545
|
name: "parserType",
|
|
539
546
|
value: e,
|
|
540
|
-
checked:
|
|
541
|
-
onChange: () =>
|
|
547
|
+
checked: E.type === e,
|
|
548
|
+
onChange: () => pt(e),
|
|
542
549
|
className: "mt-1 w-4 h-4 text-action-primary-bg"
|
|
543
550
|
}), /* @__PURE__ */ p("span", { children: [/* @__PURE__ */ f("span", {
|
|
544
551
|
className: "text-sm font-medium text-text-primary",
|
|
@@ -560,9 +567,9 @@ var g = {
|
|
|
560
567
|
}),
|
|
561
568
|
/* @__PURE__ */ p("select", {
|
|
562
569
|
id: "inputSinkKey",
|
|
563
|
-
value:
|
|
564
|
-
onChange:
|
|
565
|
-
className: `${_} ${
|
|
570
|
+
value: E.inputSinkKey,
|
|
571
|
+
onChange: ht,
|
|
572
|
+
className: `${_} ${O.inputSinkKey ? "border-status-error-border" : "border-border-default"}`,
|
|
566
573
|
children: [/* @__PURE__ */ f("option", {
|
|
567
574
|
value: "",
|
|
568
575
|
children: "Select a DataSink..."
|
|
@@ -571,42 +578,42 @@ var g = {
|
|
|
571
578
|
children: e.name || e.key
|
|
572
579
|
}, e.id))]
|
|
573
580
|
}),
|
|
574
|
-
|
|
581
|
+
O.inputSinkKey && /* @__PURE__ */ f("p", {
|
|
575
582
|
className: "text-xs text-status-error-text mt-1.5",
|
|
576
|
-
children:
|
|
583
|
+
children: O.inputSinkKey
|
|
577
584
|
}),
|
|
578
585
|
q.length === 0 && /* @__PURE__ */ f("p", {
|
|
579
586
|
className: "text-xs text-text-tertiary mt-1.5",
|
|
580
587
|
children: "No DataSinks yet — create one first, then return here to build a parser for it."
|
|
581
588
|
}),
|
|
582
|
-
|
|
589
|
+
E.inputSinkKey && /* @__PURE__ */ p("div", {
|
|
583
590
|
className: "mt-3",
|
|
584
591
|
children: [/* @__PURE__ */ p("button", {
|
|
585
592
|
type: "button",
|
|
586
|
-
onClick:
|
|
593
|
+
onClick: xt,
|
|
587
594
|
className: "inline-flex items-center gap-2 text-sm text-action-primary-bg hover:text-action-primary-bgHover transition-colors",
|
|
588
595
|
children: [
|
|
589
|
-
f(U ?
|
|
590
|
-
/* @__PURE__ */ f(
|
|
596
|
+
f(U ? ue : de, { className: "w-4 h-4" }),
|
|
597
|
+
/* @__PURE__ */ f(me, { className: "w-4 h-4" }),
|
|
591
598
|
"Show Data Preview"
|
|
592
599
|
]
|
|
593
600
|
}), U && /* @__PURE__ */ f("div", {
|
|
594
601
|
className: "mt-3 border border-border-default rounded-md overflow-hidden",
|
|
595
|
-
children:
|
|
602
|
+
children: Ye ? /* @__PURE__ */ p("div", {
|
|
596
603
|
className: "p-4 flex items-center justify-center",
|
|
597
|
-
children: [/* @__PURE__ */ f(
|
|
604
|
+
children: [/* @__PURE__ */ f(l, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ f("span", {
|
|
598
605
|
className: "ml-2 text-sm text-text-secondary",
|
|
599
606
|
children: "Loading sample…"
|
|
600
607
|
})]
|
|
601
|
-
}) :
|
|
608
|
+
}) : Ze ? /* @__PURE__ */ f("div", {
|
|
602
609
|
className: "p-4 bg-status-error-bg/5",
|
|
603
610
|
children: /* @__PURE__ */ f("p", {
|
|
604
611
|
className: "text-sm text-status-error-text",
|
|
605
|
-
children:
|
|
612
|
+
children: Ze
|
|
606
613
|
})
|
|
607
|
-
}) :
|
|
614
|
+
}) : qe ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("pre", {
|
|
608
615
|
className: "p-3 text-xs font-mono bg-bg-sunken text-text-primary overflow-auto max-h-48",
|
|
609
|
-
children: JSON.stringify(
|
|
616
|
+
children: JSON.stringify(qe, null, 2)
|
|
610
617
|
}), K && /* @__PURE__ */ p("p", {
|
|
611
618
|
className: "px-3 py-2 text-xs text-text-tertiary border-t border-border-default",
|
|
612
619
|
children: [
|
|
@@ -637,28 +644,32 @@ var g = {
|
|
|
637
644
|
}),
|
|
638
645
|
/* @__PURE__ */ f("textarea", {
|
|
639
646
|
id: "expression",
|
|
640
|
-
value:
|
|
641
|
-
onChange:
|
|
647
|
+
value: E.expression,
|
|
648
|
+
onChange: mt,
|
|
642
649
|
placeholder: $.placeholder,
|
|
643
650
|
rows: 8,
|
|
644
|
-
className: `${_} font-mono resize-y ${
|
|
651
|
+
className: `${_} font-mono resize-y ${O.expression ? "border-status-error-border" : "border-border-default"}`
|
|
645
652
|
}),
|
|
646
|
-
|
|
653
|
+
O.expression && /* @__PURE__ */ f("p", {
|
|
647
654
|
className: "text-xs text-status-error-text mt-1.5",
|
|
648
|
-
children:
|
|
655
|
+
children: O.expression
|
|
649
656
|
}),
|
|
650
657
|
/* @__PURE__ */ p("p", {
|
|
651
658
|
className: "text-xs text-text-tertiary mt-1.5",
|
|
652
659
|
children: ["Example: ", $.example]
|
|
653
660
|
})
|
|
654
661
|
] }),
|
|
655
|
-
/* @__PURE__ */ f(
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
+
/* @__PURE__ */ f(s, {
|
|
663
|
+
permission: n.PARSER_TEST,
|
|
664
|
+
deniedBehavior: "disable",
|
|
665
|
+
children: /* @__PURE__ */ f(u, {
|
|
666
|
+
type: "button",
|
|
667
|
+
onClick: St,
|
|
668
|
+
disabled: Ue || !E.expression.trim(),
|
|
669
|
+
variant: "default",
|
|
670
|
+
className: "w-full",
|
|
671
|
+
children: Ue ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, { className: "w-4 h-4 mr-2 animate-spin" }), "Testing..."] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(_e, { className: "w-4 h-4 mr-2" }), "Run Test"] })
|
|
672
|
+
})
|
|
662
673
|
}),
|
|
663
674
|
/* @__PURE__ */ p("div", {
|
|
664
675
|
className: "grid gap-4 md:grid-cols-2",
|
|
@@ -673,23 +684,23 @@ var g = {
|
|
|
673
684
|
})]
|
|
674
685
|
}), /* @__PURE__ */ p("div", {
|
|
675
686
|
className: "flex items-center gap-2",
|
|
676
|
-
children: [
|
|
687
|
+
children: [E.inputSinkKey && !R && /* @__PURE__ */ p("button", {
|
|
677
688
|
type: "button",
|
|
678
|
-
onClick:
|
|
679
|
-
disabled:
|
|
689
|
+
onClick: yt,
|
|
690
|
+
disabled: Ge,
|
|
680
691
|
className: "inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-semibold text-action-primary-bg border border-action-primary-bg rounded-md hover:bg-action-primary-bg/10 transition-colors disabled:opacity-50",
|
|
681
|
-
children: [
|
|
692
|
+
children: [Ge ? /* @__PURE__ */ f(l, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ f(pe, { className: "w-3.5 h-3.5" }), "Load Sample"]
|
|
682
693
|
}), R && /* @__PURE__ */ p("button", {
|
|
683
694
|
type: "button",
|
|
684
|
-
onClick:
|
|
695
|
+
onClick: bt,
|
|
685
696
|
className: "inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-semibold text-text-primary border border-border-default rounded-md hover:bg-bg-sunken transition-colors",
|
|
686
|
-
children: [/* @__PURE__ */ f(
|
|
697
|
+
children: [/* @__PURE__ */ f(be, { className: "w-3.5 h-3.5" }), "Clear"]
|
|
687
698
|
})]
|
|
688
699
|
})]
|
|
689
700
|
}),
|
|
690
701
|
/* @__PURE__ */ f("textarea", {
|
|
691
702
|
value: A,
|
|
692
|
-
onChange:
|
|
703
|
+
onChange: vt,
|
|
693
704
|
readOnly: R,
|
|
694
705
|
placeholder: "Type sample JSON to test against it — or Load a sample from the source…",
|
|
695
706
|
rows: 8,
|
|
@@ -717,10 +728,10 @@ var g = {
|
|
|
717
728
|
children: P ? "Error Output" : "Output"
|
|
718
729
|
}), (M || P) && (P ? /* @__PURE__ */ p("span", {
|
|
719
730
|
className: "text-xs px-2 py-1 bg-status-error-bg/10 text-status-error-text rounded flex items-center gap-1",
|
|
720
|
-
children: [/* @__PURE__ */ f(
|
|
731
|
+
children: [/* @__PURE__ */ f(c, { className: "w-3 h-3" }), " Failed"]
|
|
721
732
|
}) : /* @__PURE__ */ p("span", {
|
|
722
733
|
className: "text-xs px-2 py-1 bg-status-success-bg/10 text-status-success-text rounded flex items-center gap-1",
|
|
723
|
-
children: [/* @__PURE__ */ f(
|
|
734
|
+
children: [/* @__PURE__ */ f(le, { className: "w-3 h-3" }), " Passed"]
|
|
724
735
|
}))]
|
|
725
736
|
}),
|
|
726
737
|
M || P ? /* @__PURE__ */ f("pre", {
|
|
@@ -757,9 +768,9 @@ var g = {
|
|
|
757
768
|
children: "How long should data be cached before refreshing?"
|
|
758
769
|
}),
|
|
759
770
|
/* @__PURE__ */ f(ne, {
|
|
760
|
-
value:
|
|
761
|
-
onChange:
|
|
762
|
-
error:
|
|
771
|
+
value: E.ttl,
|
|
772
|
+
onChange: gt,
|
|
773
|
+
error: O.ttl,
|
|
763
774
|
hideLabel: !0
|
|
764
775
|
})
|
|
765
776
|
] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
@@ -768,10 +779,10 @@ var g = {
|
|
|
768
779
|
}), /* @__PURE__ */ f("div", {
|
|
769
780
|
className: "border border-border-default rounded-lg overflow-hidden",
|
|
770
781
|
children: [
|
|
771
|
-
["Name",
|
|
772
|
-
["Output Key",
|
|
773
|
-
["Scope",
|
|
774
|
-
["Type", g[
|
|
782
|
+
["Name", E.name || "—"],
|
|
783
|
+
["Output Key", E.outputKey || "—"],
|
|
784
|
+
["Scope", T ? x === "default" ? "Global" : st.find((e) => e.id === x)?.name || x : "Dashboard"],
|
|
785
|
+
["Type", g[E.type].name],
|
|
775
786
|
["Source", X || "—"]
|
|
776
787
|
].map(([e, t]) => /* @__PURE__ */ p("div", {
|
|
777
788
|
className: "flex items-center justify-between gap-3 px-4 py-2.5 text-sm border-b border-border-default last:border-b-0",
|
|
@@ -797,21 +808,25 @@ var g = {
|
|
|
797
808
|
children: "Cancel"
|
|
798
809
|
}) : /* @__PURE__ */ p(u, {
|
|
799
810
|
type: "button",
|
|
800
|
-
onClick:
|
|
811
|
+
onClick: Dt,
|
|
801
812
|
variant: "secondary",
|
|
802
|
-
children: [/* @__PURE__ */ f(
|
|
803
|
-
}),
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
813
|
+
children: [/* @__PURE__ */ f(ce, { className: "w-4 h-4 mr-2" }), "Back"]
|
|
814
|
+
}), Ot ? /* @__PURE__ */ f(s, {
|
|
815
|
+
permission: Ie,
|
|
816
|
+
deniedBehavior: "disable",
|
|
817
|
+
children: /* @__PURE__ */ f(u, {
|
|
818
|
+
type: "button",
|
|
819
|
+
onClick: Ct,
|
|
820
|
+
disabled: !wt || ze || !Fe,
|
|
821
|
+
variant: "default",
|
|
822
|
+
children: ze ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, { className: "w-4 h-4 mr-2 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ve, { className: "w-4 h-4 mr-2" }), w ? "Save Changes" : "Create Parser"] })
|
|
823
|
+
})
|
|
809
824
|
}) : /* @__PURE__ */ p(u, {
|
|
810
825
|
type: "button",
|
|
811
|
-
onClick:
|
|
826
|
+
onClick: Et,
|
|
812
827
|
disabled: !Q(y),
|
|
813
828
|
variant: "default",
|
|
814
|
-
children: ["Next", /* @__PURE__ */ f(
|
|
829
|
+
children: ["Next", /* @__PURE__ */ f(de, { className: "w-4 h-4 ml-2" })]
|
|
815
830
|
})]
|
|
816
831
|
})
|
|
817
832
|
]
|