@burdenoff/microfe-bigconsole 2026.805.1 → 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/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 +237 -219
- 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/constants/permissions.js +83 -0
- package/dist/constants/permissions.js.map +1 -0
- package/package.json +1 -1
|
@@ -4,8 +4,9 @@ import "../contexts/index.js";
|
|
|
4
4
|
import { newWorkflowPath as n } from "../BigConsoleRoutes.js";
|
|
5
5
|
import ee from "../components/datasink/DataSinkTableViewer.js";
|
|
6
6
|
import te from "../hooks/useDataSinkOperations.js";
|
|
7
|
-
import r from "
|
|
8
|
-
import
|
|
7
|
+
import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
|
|
8
|
+
import i from "../components/datasink/DataSinkStatusBadge.js";
|
|
9
|
+
import { isNative as a, nativeConfirm as ne, nativeImpact as re, nativeNotify as o } from "../../utils/nativeBridge.js";
|
|
9
10
|
import ie from "../hooks/useDataSinkSubscription.js";
|
|
10
11
|
import ae from "../components/datasink/DataSinkDataViewer.js";
|
|
11
12
|
import oe from "../components/datasink/LinkedWorkflowsPanel.js";
|
|
@@ -13,36 +14,38 @@ import se from "../components/datasink/LinkedParsersPanel.js";
|
|
|
13
14
|
import ce from "../components/datasink/WorkflowStatusPanel.js";
|
|
14
15
|
import le from "../components/datasink/ExportDataSinkDialog.js";
|
|
15
16
|
import ue from "../components/datasink/ImportDataGuideDialog.js";
|
|
16
|
-
import { memo as
|
|
17
|
-
import { useParams as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
17
|
+
import { memo as s, useCallback as c, useEffect as de, useState as l } from "react";
|
|
18
|
+
import { useParams as u } from "react-router";
|
|
19
|
+
import { AccessDenied as fe, PermissionButton as d } from "@burdenoff/fe-libs/shared/components";
|
|
20
|
+
import { usePermissions as pe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
21
|
+
import { AlertCircle as me, ArrowLeft as f, Code as he, Database as p, Download as ge, Edit as _e, Eye as ve, EyeOff as ye, Grid3X3 as be, Loader2 as m, RefreshCw as xe, Trash2 as Se, Upload as h } from "lucide-react";
|
|
22
|
+
import { Button as g, Card as Ce, CardContent as _, CardHeader as v, CardTitle as y, GlassCard as we, IllustratedEmptyState as Te, NextSteps as Ee, PagePurpose as De } from "@burdenoff/fe-libs/ui";
|
|
23
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
24
|
+
import { formatDistanceToNow as C } from "date-fns";
|
|
22
25
|
//#region src/bigconsole/pages/DataSinkViewPage.tsx
|
|
23
|
-
var
|
|
24
|
-
let { dataSinkId:
|
|
26
|
+
var w = s(function() {
|
|
27
|
+
let { dataSinkId: s } = u(), w = t(), { hasPermission: Oe, isLoading: ke } = pe(), Ae = Oe(r.DATASINK_READ), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(!1), [je, j] = l(!1), [Me, M] = l(!1), [N, Ne] = l(null), [P, F] = l(!1), [I, L] = l("table"), [R, Pe] = l(100), [z, Fe] = l(0), [B, Ie] = l(null), [Le, Re] = l(!1), V = e((e) => s ? e.dataSinks.get(s) : void 0), { loading: ze, error: H, fetchDataSink: U, getDataSinkData: W, refreshDataSink: G, updateDataSink: K, deleteDataSink: q } = te({ skipFetch: !0 });
|
|
25
28
|
ie({
|
|
26
|
-
dataSinkId:
|
|
27
|
-
enabled: !!
|
|
29
|
+
dataSinkId: s,
|
|
30
|
+
enabled: !!s
|
|
28
31
|
}), de(() => {
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
if (
|
|
37
|
-
|
|
32
|
+
s && U(s);
|
|
33
|
+
}, [s, U]);
|
|
34
|
+
let J = c(() => {
|
|
35
|
+
w("/datasinks");
|
|
36
|
+
}, [w]), Be = c(() => {
|
|
37
|
+
w(`/datasinks/${s}/edit`);
|
|
38
|
+
}, [w, s]), Y = c(async () => {
|
|
39
|
+
if (s) {
|
|
40
|
+
O(!0);
|
|
38
41
|
try {
|
|
39
|
-
await
|
|
42
|
+
await G({ id: s });
|
|
40
43
|
} catch {} finally {
|
|
41
|
-
|
|
44
|
+
O(!1);
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
}, [
|
|
45
|
-
if (!
|
|
47
|
+
}, [s, G]), Ve = c(async () => {
|
|
48
|
+
if (!s) return;
|
|
46
49
|
let e = await ne({
|
|
47
50
|
title: "Delete DataSink?",
|
|
48
51
|
message: "Are you sure you want to delete this DataSink?",
|
|
@@ -50,188 +53,203 @@ var C = o(function() {
|
|
|
50
53
|
cancelButtonTitle: "Cancel"
|
|
51
54
|
});
|
|
52
55
|
if (e === null ? window.confirm("Are you sure you want to delete this DataSink?") : e) {
|
|
53
|
-
re("medium"),
|
|
56
|
+
re("medium"), A(!0);
|
|
54
57
|
try {
|
|
55
|
-
await
|
|
58
|
+
await q(s), a() && o("success"), w("/datasinks");
|
|
56
59
|
} catch {
|
|
57
|
-
|
|
60
|
+
a() && o("error");
|
|
58
61
|
} finally {
|
|
59
|
-
|
|
62
|
+
A(!1);
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
65
|
}, [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
]),
|
|
67
|
-
if (
|
|
68
|
-
|
|
66
|
+
s,
|
|
67
|
+
q,
|
|
68
|
+
w
|
|
69
|
+
]), X = c(async (e, t) => {
|
|
70
|
+
if (s) {
|
|
71
|
+
F(!0);
|
|
69
72
|
try {
|
|
70
|
-
let n = await
|
|
73
|
+
let n = await W({ id: s }, {
|
|
71
74
|
limit: t,
|
|
72
75
|
offset: e
|
|
73
76
|
});
|
|
74
|
-
n && (
|
|
77
|
+
n && (Ne(n.raw || {}), Ie(typeof n.totalCount == "number" ? n.totalCount : null), Re(!!n.hasMore), Fe(e));
|
|
75
78
|
} catch {} finally {
|
|
76
|
-
|
|
79
|
+
F(!1);
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
|
-
}, [
|
|
80
|
-
if (
|
|
81
|
-
if (
|
|
82
|
-
|
|
82
|
+
}, [s, W]), Z = c(async () => {
|
|
83
|
+
if (s) {
|
|
84
|
+
if (T) {
|
|
85
|
+
E(!1);
|
|
83
86
|
return;
|
|
84
87
|
}
|
|
85
|
-
await
|
|
88
|
+
await X(0, R), E(!0);
|
|
86
89
|
}
|
|
87
90
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
]),
|
|
93
|
-
|
|
94
|
-
}, [
|
|
95
|
-
A(!0);
|
|
96
|
-
}, []), Ie = s(() => {
|
|
97
|
-
A(!1);
|
|
98
|
-
}, []), $ = s(() => {
|
|
91
|
+
s,
|
|
92
|
+
T,
|
|
93
|
+
X,
|
|
94
|
+
R
|
|
95
|
+
]), He = c((e) => {
|
|
96
|
+
Pe(e), X(0, e);
|
|
97
|
+
}, [X]), Q = c(() => {
|
|
99
98
|
j(!0);
|
|
100
|
-
}, []),
|
|
99
|
+
}, []), Ue = c(() => {
|
|
101
100
|
j(!1);
|
|
102
|
-
}, []),
|
|
103
|
-
|
|
104
|
-
}, [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
}, []), $ = c(() => {
|
|
102
|
+
M(!0);
|
|
103
|
+
}, []), We = c(() => {
|
|
104
|
+
M(!1);
|
|
105
|
+
}, []), Ge = c(() => {
|
|
106
|
+
M(!1), w(n());
|
|
107
|
+
}, [w]), Ke = c(async (e) => {
|
|
108
|
+
if (!V || !await K({
|
|
109
|
+
id: V.id,
|
|
110
|
+
version: V.version,
|
|
108
111
|
data: e
|
|
109
112
|
})) return !1;
|
|
110
113
|
try {
|
|
111
|
-
await
|
|
114
|
+
await X(0, R), E(!0);
|
|
112
115
|
} catch {}
|
|
113
116
|
return !0;
|
|
114
117
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
V,
|
|
119
|
+
K,
|
|
120
|
+
X,
|
|
121
|
+
R
|
|
119
122
|
]);
|
|
120
|
-
return
|
|
123
|
+
return ze && !V ? /* @__PURE__ */ x("div", {
|
|
121
124
|
className: "flex items-center justify-center min-h-[400px]",
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
-
}) :
|
|
125
|
+
children: /* @__PURE__ */ x(m, { className: "w-8 h-8 text-text-secondary animate-spin" })
|
|
126
|
+
}) : H && !V ? /* @__PURE__ */ x("div", {
|
|
124
127
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
125
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ S("div", {
|
|
126
129
|
className: "text-center",
|
|
127
130
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ x(me, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
|
|
132
|
+
/* @__PURE__ */ x("p", {
|
|
130
133
|
className: "text-status-error-text text-body-sm font-medium mb-2",
|
|
131
134
|
children: "Failed to load DataSink"
|
|
132
135
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ x("p", {
|
|
134
137
|
className: "text-text-tertiary text-body-xs mb-6",
|
|
135
|
-
children:
|
|
138
|
+
children: H.message
|
|
136
139
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
onClick:
|
|
140
|
+
/* @__PURE__ */ S(g, {
|
|
141
|
+
onClick: J,
|
|
139
142
|
variant: "ghost",
|
|
140
143
|
size: "sm",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Go back"]
|
|
142
145
|
})
|
|
143
146
|
]
|
|
144
147
|
})
|
|
145
|
-
}) :
|
|
148
|
+
}) : !ke && !Ae ? /* @__PURE__ */ x(fe, {
|
|
149
|
+
title: "Access Denied",
|
|
150
|
+
description: "You don't have permission to view this data sink."
|
|
151
|
+
}) : V ? /* @__PURE__ */ S("div", {
|
|
146
152
|
className: "p-card-padding space-y-6",
|
|
147
153
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ S("div", {
|
|
149
155
|
className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ S("div", {
|
|
151
157
|
className: "flex-1",
|
|
152
158
|
children: [
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
onClick:
|
|
159
|
+
/* @__PURE__ */ S(g, {
|
|
160
|
+
onClick: J,
|
|
155
161
|
variant: "ghost",
|
|
156
162
|
size: "sm",
|
|
157
163
|
className: "mb-4",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Back to DataSinks"]
|
|
159
165
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ S("div", {
|
|
161
167
|
className: "flex items-center gap-2 flex-wrap",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ x("h1", {
|
|
163
169
|
className: "text-heading-h1 font-bold text-text-primary",
|
|
164
|
-
children:
|
|
165
|
-
}), /* @__PURE__ */
|
|
170
|
+
children: V.name || "Untitled"
|
|
171
|
+
}), /* @__PURE__ */ x(i, { status: V.status })]
|
|
166
172
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ x("p", {
|
|
168
174
|
className: "text-body-sm text-text-tertiary font-mono mt-1",
|
|
169
|
-
children:
|
|
175
|
+
children: V.key
|
|
170
176
|
}),
|
|
171
|
-
|
|
177
|
+
V.description && /* @__PURE__ */ x("p", {
|
|
172
178
|
className: "text-body-sm text-text-secondary mt-2",
|
|
173
|
-
children:
|
|
179
|
+
children: V.description
|
|
174
180
|
})
|
|
175
181
|
]
|
|
176
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ S("div", {
|
|
177
183
|
className: "flex items-center gap-2 flex-wrap",
|
|
178
184
|
children: [
|
|
179
|
-
/* @__PURE__ */ x(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
/* @__PURE__ */ x(d, {
|
|
186
|
+
permission: r.DATASINK_EXECUTE,
|
|
187
|
+
deniedBehavior: "disable",
|
|
188
|
+
children: /* @__PURE__ */ S(g, {
|
|
189
|
+
onClick: Y,
|
|
190
|
+
disabled: D,
|
|
191
|
+
variant: "secondary",
|
|
192
|
+
size: "default",
|
|
193
|
+
children: [/* @__PURE__ */ x(xe, { className: `w-4 h-4 mr-2 ${D ? "animate-spin" : ""}` }), D ? "Refreshing..." : "Refresh"]
|
|
194
|
+
})
|
|
185
195
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ S(g, {
|
|
187
197
|
onClick: $,
|
|
188
198
|
variant: "secondary",
|
|
189
199
|
size: "default",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ x(h, { className: "w-4 h-4 mr-2" }), "Import Data"]
|
|
191
201
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ S(g, {
|
|
193
203
|
onClick: Q,
|
|
194
204
|
variant: "secondary",
|
|
195
205
|
size: "default",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ x(ge, { className: "w-4 h-4 mr-2" }), "Export"]
|
|
197
207
|
}),
|
|
198
|
-
/* @__PURE__ */ x(
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
208
|
+
/* @__PURE__ */ x(d, {
|
|
209
|
+
permission: r.DATASINK_UPDATE,
|
|
210
|
+
deniedBehavior: "disable",
|
|
211
|
+
children: /* @__PURE__ */ S(g, {
|
|
212
|
+
onClick: Be,
|
|
213
|
+
variant: "secondary",
|
|
214
|
+
size: "default",
|
|
215
|
+
children: [/* @__PURE__ */ x(_e, { className: "w-4 h-4 mr-2" }), "Edit"]
|
|
216
|
+
})
|
|
203
217
|
}),
|
|
204
|
-
/* @__PURE__ */ x(
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
218
|
+
/* @__PURE__ */ x(d, {
|
|
219
|
+
permission: r.DATASINK_DELETE,
|
|
220
|
+
deniedBehavior: "hide",
|
|
221
|
+
children: /* @__PURE__ */ S(g, {
|
|
222
|
+
onClick: Ve,
|
|
223
|
+
disabled: k,
|
|
224
|
+
variant: "destructive",
|
|
225
|
+
size: "default",
|
|
226
|
+
children: [/* @__PURE__ */ x(Se, { className: "w-4 h-4 mr-2" }), k ? "Deleting..." : "Delete"]
|
|
227
|
+
})
|
|
210
228
|
})
|
|
211
229
|
]
|
|
212
230
|
})]
|
|
213
231
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ x(De, { children: "A data sink is a structured store that holds your processed data and serves it to dashboards. From here you can inspect its schema and stats, preview the cached rows, refresh it from its linked workflow, or export it." }),
|
|
233
|
+
/* @__PURE__ */ x(Ee, {
|
|
216
234
|
storageKey: "bigconsole-datasink-view",
|
|
217
235
|
steps: [
|
|
218
236
|
{
|
|
219
237
|
id: "preview",
|
|
220
238
|
label: "Preview the data",
|
|
221
239
|
description: "Open the cached rows to confirm the sink holds what you expect.",
|
|
222
|
-
onClick:
|
|
240
|
+
onClick: Z
|
|
223
241
|
},
|
|
224
242
|
{
|
|
225
243
|
id: "refresh",
|
|
226
244
|
label: "Refresh from source",
|
|
227
245
|
description: "Re-run the linked workflow to pull the latest data.",
|
|
228
|
-
onClick:
|
|
246
|
+
onClick: Y
|
|
229
247
|
},
|
|
230
248
|
{
|
|
231
249
|
id: "build-dashboard",
|
|
232
250
|
label: "Visualize it on a dashboard",
|
|
233
251
|
description: "Add widgets that query this sink to see your data live.",
|
|
234
|
-
onClick: () =>
|
|
252
|
+
onClick: () => w("/dashboards")
|
|
235
253
|
},
|
|
236
254
|
{
|
|
237
255
|
id: "export",
|
|
@@ -241,227 +259,227 @@ var C = o(function() {
|
|
|
241
259
|
}
|
|
242
260
|
]
|
|
243
261
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ S("div", {
|
|
245
263
|
className: "grid gap-6 md:grid-cols-2",
|
|
246
264
|
children: [
|
|
247
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ S(we, {
|
|
248
266
|
treatment: "glass",
|
|
249
267
|
glow: !0,
|
|
250
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ x(v, { children: /* @__PURE__ */ x(y, { children: "Details" }) }), /* @__PURE__ */ x(_, { children: /* @__PURE__ */ S("dl", {
|
|
251
269
|
className: "space-y-4 text-body-sm",
|
|
252
270
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ S("div", {
|
|
254
272
|
className: "flex justify-between items-center",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
256
274
|
className: "text-text-secondary",
|
|
257
275
|
children: "Status"
|
|
258
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ x("dd", { children: /* @__PURE__ */ x(i, { status: V.status }) })]
|
|
259
277
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ S("div", {
|
|
261
279
|
className: "flex justify-between items-center",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
263
281
|
className: "text-text-secondary",
|
|
264
282
|
children: "Cache TTL"
|
|
265
|
-
}), /* @__PURE__ */
|
|
283
|
+
}), /* @__PURE__ */ x("dd", {
|
|
266
284
|
className: "text-text-primary font-medium",
|
|
267
|
-
children:
|
|
285
|
+
children: V.ttl ? `${V.ttl}s` : "None"
|
|
268
286
|
})]
|
|
269
287
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ S("div", {
|
|
271
289
|
className: "flex justify-between items-center",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
273
291
|
className: "text-text-secondary",
|
|
274
292
|
children: "Refresh Type"
|
|
275
|
-
}), /* @__PURE__ */
|
|
293
|
+
}), /* @__PURE__ */ x("dd", {
|
|
276
294
|
className: "text-text-primary font-medium capitalize",
|
|
277
|
-
children:
|
|
295
|
+
children: V.refresh?.type || "Manual"
|
|
278
296
|
})]
|
|
279
297
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ S("div", {
|
|
281
299
|
className: "flex justify-between items-center",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
283
301
|
className: "text-text-secondary",
|
|
284
302
|
children: "Size"
|
|
285
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ x("dd", {
|
|
286
304
|
className: "text-text-primary font-medium",
|
|
287
|
-
children:
|
|
305
|
+
children: V.sizeBytes ? `${(V.sizeBytes / 1024).toFixed(2)} KB` : "0 KB"
|
|
288
306
|
})]
|
|
289
307
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ S("div", {
|
|
291
309
|
className: "flex justify-between items-center",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
293
311
|
className: "text-text-secondary",
|
|
294
312
|
children: "Version"
|
|
295
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ x("dd", {
|
|
296
314
|
className: "text-text-primary font-medium",
|
|
297
|
-
children:
|
|
315
|
+
children: V.version || 1
|
|
298
316
|
})]
|
|
299
317
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ S("div", {
|
|
301
319
|
className: "flex justify-between items-center",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
303
321
|
className: "text-text-secondary",
|
|
304
322
|
children: "Last Refreshed"
|
|
305
|
-
}), /* @__PURE__ */
|
|
323
|
+
}), /* @__PURE__ */ x("dd", {
|
|
306
324
|
className: "text-text-primary font-medium",
|
|
307
|
-
children:
|
|
325
|
+
children: V.lastRefreshedAt ? C(new Date(V.lastRefreshedAt), { addSuffix: !0 }) : "Never"
|
|
308
326
|
})]
|
|
309
327
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ S("div", {
|
|
311
329
|
className: "flex justify-between items-center",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
313
331
|
className: "text-text-secondary",
|
|
314
332
|
children: "Created"
|
|
315
|
-
}), /* @__PURE__ */
|
|
333
|
+
}), /* @__PURE__ */ x("dd", {
|
|
316
334
|
className: "text-text-primary font-medium",
|
|
317
|
-
children:
|
|
335
|
+
children: C(new Date(V.createdAt), { addSuffix: !0 })
|
|
318
336
|
})]
|
|
319
337
|
})
|
|
320
338
|
]
|
|
321
339
|
}) })]
|
|
322
340
|
}),
|
|
323
|
-
|
|
324
|
-
workflowId:
|
|
325
|
-
executionId:
|
|
326
|
-
lastRefreshedAt:
|
|
327
|
-
setupState:
|
|
328
|
-
status:
|
|
329
|
-
onRerunWorkflow:
|
|
330
|
-
disabled:
|
|
331
|
-
isRerunning:
|
|
341
|
+
V.fluidGridsWorkflowId && /* @__PURE__ */ x(ce, {
|
|
342
|
+
workflowId: V.fluidGridsWorkflowId,
|
|
343
|
+
executionId: V.fluidGridsWorkflowExecutionId || void 0,
|
|
344
|
+
lastRefreshedAt: V.lastRefreshedAt || void 0,
|
|
345
|
+
setupState: V.setupState,
|
|
346
|
+
status: V.status,
|
|
347
|
+
onRerunWorkflow: Y,
|
|
348
|
+
disabled: D,
|
|
349
|
+
isRerunning: D
|
|
332
350
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ x(oe, { workflowLinks: V.workflowLinks }),
|
|
352
|
+
/* @__PURE__ */ x(se, { dataSinkKey: V.key })
|
|
335
353
|
]
|
|
336
354
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ S(Ce, { children: [
|
|
356
|
+
/* @__PURE__ */ S(v, {
|
|
339
357
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ S(y, {
|
|
341
359
|
className: "flex items-center gap-2",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
343
|
-
}), /* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ x(p, { className: "w-4 h-4 text-text-secondary" }), "Data Preview"]
|
|
361
|
+
}), /* @__PURE__ */ S("div", {
|
|
344
362
|
className: "flex items-center gap-2",
|
|
345
|
-
children: [
|
|
363
|
+
children: [T && /* @__PURE__ */ S("div", {
|
|
346
364
|
className: "flex items-center border border-border-default rounded-md overflow-hidden",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ x("button", {
|
|
348
366
|
type: "button",
|
|
349
|
-
onClick: () =>
|
|
350
|
-
className: `p-1.5 ${
|
|
367
|
+
onClick: () => L("table"),
|
|
368
|
+
className: `p-1.5 ${I === "table" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
|
|
351
369
|
title: "Table view",
|
|
352
|
-
children: /* @__PURE__ */
|
|
353
|
-
}), /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ x(be, { className: "w-4 h-4" })
|
|
371
|
+
}), /* @__PURE__ */ x("button", {
|
|
354
372
|
type: "button",
|
|
355
|
-
onClick: () =>
|
|
356
|
-
className: `p-1.5 ${
|
|
373
|
+
onClick: () => L("json"),
|
|
374
|
+
className: `p-1.5 ${I === "json" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
|
|
357
375
|
title: "JSON view",
|
|
358
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ x(he, { className: "w-4 h-4" })
|
|
359
377
|
})]
|
|
360
|
-
}), /* @__PURE__ */
|
|
361
|
-
onClick:
|
|
362
|
-
disabled:
|
|
363
|
-
variant:
|
|
378
|
+
}), /* @__PURE__ */ x(g, {
|
|
379
|
+
onClick: Z,
|
|
380
|
+
disabled: P,
|
|
381
|
+
variant: T ? "secondary" : "default",
|
|
364
382
|
size: "sm",
|
|
365
|
-
children:
|
|
383
|
+
children: P ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(m, { className: "w-4 h-4 mr-2 animate-spin" }), "Loading..."] }) : T ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ye, { className: "w-4 h-4 mr-2" }), "Hide Data"] }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ve, { className: "w-4 h-4 mr-2" }), "Show Data"] })
|
|
366
384
|
})]
|
|
367
385
|
})]
|
|
368
386
|
}),
|
|
369
|
-
|
|
370
|
-
data:
|
|
387
|
+
T && N && /* @__PURE__ */ S(_, { children: [x(I === "table" ? ee : ae, {
|
|
388
|
+
data: N,
|
|
371
389
|
maxHeight: "400px"
|
|
372
|
-
}),
|
|
390
|
+
}), B !== null && /* @__PURE__ */ S("div", {
|
|
373
391
|
className: "flex items-center justify-between gap-4 mt-4 pt-4 border-t border-border-subtle",
|
|
374
|
-
children: [/* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ S("div", {
|
|
375
393
|
className: "flex items-center gap-2 text-body-sm text-text-secondary",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
394
|
+
children: [/* @__PURE__ */ x("span", { children: "Rows per page" }), /* @__PURE__ */ x("select", {
|
|
377
395
|
"aria-label": "Rows per page",
|
|
378
396
|
className: "bg-bg-canvas border border-border-default rounded px-2 py-0.5 text-text-primary",
|
|
379
|
-
value:
|
|
380
|
-
onChange: (e) =>
|
|
397
|
+
value: R,
|
|
398
|
+
onChange: (e) => He(Number(e.target.value)),
|
|
381
399
|
children: [
|
|
382
400
|
100,
|
|
383
401
|
500,
|
|
384
402
|
1e3
|
|
385
|
-
].map((e) => /* @__PURE__ */
|
|
403
|
+
].map((e) => /* @__PURE__ */ x("option", {
|
|
386
404
|
value: e,
|
|
387
405
|
children: e
|
|
388
406
|
}, e))
|
|
389
407
|
})]
|
|
390
|
-
}), /* @__PURE__ */
|
|
408
|
+
}), /* @__PURE__ */ S("div", {
|
|
391
409
|
className: "flex items-center gap-4 text-body-sm text-text-secondary",
|
|
392
410
|
children: [
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ x("span", { children: B === 0 ? "0 rows" : `${z + 1}–${Math.min(z + R, B)} of ${B}` }),
|
|
412
|
+
/* @__PURE__ */ x(g, {
|
|
395
413
|
variant: "secondary",
|
|
396
414
|
size: "sm",
|
|
397
|
-
disabled:
|
|
398
|
-
onClick: () => void
|
|
415
|
+
disabled: z === 0 || P,
|
|
416
|
+
onClick: () => void X(Math.max(0, z - R), R),
|
|
399
417
|
children: "Previous"
|
|
400
418
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ x(g, {
|
|
402
420
|
variant: "secondary",
|
|
403
421
|
size: "sm",
|
|
404
|
-
disabled: !
|
|
405
|
-
onClick: () => void
|
|
422
|
+
disabled: !Le || P,
|
|
423
|
+
onClick: () => void X(z + R, R),
|
|
406
424
|
children: "Next"
|
|
407
425
|
})
|
|
408
426
|
]
|
|
409
427
|
})]
|
|
410
428
|
})] }),
|
|
411
|
-
!
|
|
429
|
+
!T && (V.data && Object.keys(V.data).length > 0 ? /* @__PURE__ */ S(_, {
|
|
412
430
|
className: "text-center p-8",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ x(p, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }), /* @__PURE__ */ x("p", {
|
|
414
432
|
className: "text-body-sm text-text-secondary",
|
|
415
433
|
children: "Click \"Show Data\" to preview the cached data."
|
|
416
434
|
})]
|
|
417
|
-
}) : /* @__PURE__ */
|
|
435
|
+
}) : /* @__PURE__ */ S(_, {
|
|
418
436
|
className: "text-center p-8",
|
|
419
437
|
children: [
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ x(p, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }),
|
|
439
|
+
/* @__PURE__ */ x("p", {
|
|
422
440
|
className: "text-body-sm text-text-secondary mb-4",
|
|
423
441
|
children: "This data sink has no data yet. Upload a CSV or build a workflow to import data."
|
|
424
442
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ S(g, {
|
|
426
444
|
onClick: $,
|
|
427
445
|
variant: "default",
|
|
428
446
|
size: "sm",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ x(h, { className: "w-4 h-4 mr-2" }), "Import Data"]
|
|
430
448
|
})
|
|
431
449
|
]
|
|
432
450
|
}))
|
|
433
451
|
] }),
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
isOpen:
|
|
436
|
-
dataSinkId:
|
|
437
|
-
dataSinkName:
|
|
438
|
-
onClose:
|
|
452
|
+
/* @__PURE__ */ x(le, {
|
|
453
|
+
isOpen: je,
|
|
454
|
+
dataSinkId: s || null,
|
|
455
|
+
dataSinkName: V.name || V.key,
|
|
456
|
+
onClose: Ue
|
|
439
457
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
isOpen:
|
|
442
|
-
dataSinkName:
|
|
443
|
-
hasExistingData: !!(
|
|
444
|
-
onClose:
|
|
445
|
-
onGoToWorkflows:
|
|
446
|
-
onImportCsv:
|
|
458
|
+
/* @__PURE__ */ x(ue, {
|
|
459
|
+
isOpen: Me,
|
|
460
|
+
dataSinkName: V.name || V.key,
|
|
461
|
+
hasExistingData: !!(V.data && Object.keys(V.data).length > 0),
|
|
462
|
+
onClose: We,
|
|
463
|
+
onGoToWorkflows: Ge,
|
|
464
|
+
onImportCsv: Ke
|
|
447
465
|
})
|
|
448
466
|
]
|
|
449
|
-
}) : /* @__PURE__ */
|
|
467
|
+
}) : /* @__PURE__ */ x("div", {
|
|
450
468
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
451
|
-
children: /* @__PURE__ */
|
|
469
|
+
children: /* @__PURE__ */ x(Te, {
|
|
452
470
|
illustration: "empty-data",
|
|
453
471
|
title: "DataSink not found",
|
|
454
472
|
description: "The DataSink you're looking for doesn't exist or has been deleted.",
|
|
455
|
-
action: /* @__PURE__ */
|
|
456
|
-
onClick:
|
|
473
|
+
action: /* @__PURE__ */ S(g, {
|
|
474
|
+
onClick: J,
|
|
457
475
|
variant: "default",
|
|
458
476
|
size: "default",
|
|
459
|
-
children: [/* @__PURE__ */
|
|
477
|
+
children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Go back to DataSinks"]
|
|
460
478
|
})
|
|
461
479
|
})
|
|
462
480
|
});
|
|
463
481
|
});
|
|
464
482
|
//#endregion
|
|
465
|
-
export {
|
|
483
|
+
export { w as DataSinkViewPage, w as default };
|
|
466
484
|
|
|
467
485
|
//# sourceMappingURL=DataSinkViewPage.js.map
|