@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
|
@@ -4,44 +4,47 @@ 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
|
|
9
|
-
import re from "
|
|
10
|
-
import ie from "../
|
|
11
|
-
import ae from "../components/datasink/
|
|
12
|
-
import oe from "../components/datasink/
|
|
13
|
-
import se from "../components/datasink/
|
|
14
|
-
import ce from "../components/datasink/
|
|
15
|
-
import le from "../components/datasink/
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
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";
|
|
10
|
+
import ie from "../hooks/useDataSinkSubscription.js";
|
|
11
|
+
import ae from "../components/datasink/DataSinkDataViewer.js";
|
|
12
|
+
import oe from "../components/datasink/LinkedWorkflowsPanel.js";
|
|
13
|
+
import se from "../components/datasink/LinkedParsersPanel.js";
|
|
14
|
+
import ce from "../components/datasink/WorkflowStatusPanel.js";
|
|
15
|
+
import le from "../components/datasink/ExportDataSinkDialog.js";
|
|
16
|
+
import ue from "../components/datasink/ImportDataGuideDialog.js";
|
|
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: s } =
|
|
25
|
-
|
|
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 });
|
|
28
|
+
ie({
|
|
26
29
|
dataSinkId: s,
|
|
27
30
|
enabled: !!s
|
|
28
|
-
}),
|
|
29
|
-
s &&
|
|
30
|
-
}, [s,
|
|
31
|
+
}), de(() => {
|
|
32
|
+
s && U(s);
|
|
33
|
+
}, [s, U]);
|
|
31
34
|
let J = c(() => {
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
}, [
|
|
35
|
+
w("/datasinks");
|
|
36
|
+
}, [w]), Be = c(() => {
|
|
37
|
+
w(`/datasinks/${s}/edit`);
|
|
38
|
+
}, [w, s]), Y = c(async () => {
|
|
36
39
|
if (s) {
|
|
37
|
-
|
|
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
|
-
}, [s,
|
|
47
|
+
}, [s, G]), Ve = c(async () => {
|
|
45
48
|
if (!s) return;
|
|
46
49
|
let e = await ne({
|
|
47
50
|
title: "Delete DataSink?",
|
|
@@ -50,154 +53,184 @@ var T = s(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
|
-
|
|
56
|
+
re("medium"), A(!0);
|
|
54
57
|
try {
|
|
55
|
-
await q(s),
|
|
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
66
|
s,
|
|
64
67
|
q,
|
|
65
|
-
|
|
68
|
+
w
|
|
66
69
|
]), X = c(async (e, t) => {
|
|
67
70
|
if (s) {
|
|
68
|
-
|
|
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
|
-
}, [s,
|
|
82
|
+
}, [s, W]), Z = c(async () => {
|
|
80
83
|
if (s) {
|
|
81
|
-
if (
|
|
82
|
-
|
|
84
|
+
if (T) {
|
|
85
|
+
E(!1);
|
|
83
86
|
return;
|
|
84
87
|
}
|
|
85
|
-
await X(0,
|
|
88
|
+
await X(0, R), E(!0);
|
|
86
89
|
}
|
|
87
90
|
}, [
|
|
88
91
|
s,
|
|
89
|
-
|
|
92
|
+
T,
|
|
90
93
|
X,
|
|
91
|
-
|
|
92
|
-
]),
|
|
93
|
-
|
|
94
|
+
R
|
|
95
|
+
]), He = c((e) => {
|
|
96
|
+
Pe(e), X(0, e);
|
|
94
97
|
}, [X]), Q = c(() => {
|
|
98
|
+
j(!0);
|
|
99
|
+
}, []), Ue = c(() => {
|
|
100
|
+
j(!1);
|
|
101
|
+
}, []), $ = c(() => {
|
|
95
102
|
M(!0);
|
|
96
|
-
}, []),
|
|
103
|
+
}, []), We = c(() => {
|
|
97
104
|
M(!1);
|
|
98
|
-
}, []),
|
|
99
|
-
|
|
100
|
-
}, []),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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,
|
|
111
|
+
data: e
|
|
112
|
+
})) return !1;
|
|
113
|
+
try {
|
|
114
|
+
await X(0, R), E(!0);
|
|
115
|
+
} catch {}
|
|
116
|
+
return !0;
|
|
117
|
+
}, [
|
|
118
|
+
V,
|
|
119
|
+
K,
|
|
120
|
+
X,
|
|
121
|
+
R
|
|
122
|
+
]);
|
|
123
|
+
return ze && !V ? /* @__PURE__ */ x("div", {
|
|
106
124
|
className: "flex items-center justify-center min-h-[400px]",
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
}) :
|
|
125
|
+
children: /* @__PURE__ */ x(m, { className: "w-8 h-8 text-text-secondary animate-spin" })
|
|
126
|
+
}) : H && !V ? /* @__PURE__ */ x("div", {
|
|
109
127
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
110
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ S("div", {
|
|
111
129
|
className: "text-center",
|
|
112
130
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ x(me, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
|
|
132
|
+
/* @__PURE__ */ x("p", {
|
|
115
133
|
className: "text-status-error-text text-body-sm font-medium mb-2",
|
|
116
134
|
children: "Failed to load DataSink"
|
|
117
135
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ x("p", {
|
|
119
137
|
className: "text-text-tertiary text-body-xs mb-6",
|
|
120
|
-
children:
|
|
138
|
+
children: H.message
|
|
121
139
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ S(g, {
|
|
123
141
|
onClick: J,
|
|
124
142
|
variant: "ghost",
|
|
125
143
|
size: "sm",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Go back"]
|
|
127
145
|
})
|
|
128
146
|
]
|
|
129
147
|
})
|
|
130
|
-
}) :
|
|
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", {
|
|
131
152
|
className: "p-card-padding space-y-6",
|
|
132
153
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ S("div", {
|
|
134
155
|
className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ S("div", {
|
|
136
157
|
className: "flex-1",
|
|
137
158
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ S(g, {
|
|
139
160
|
onClick: J,
|
|
140
161
|
variant: "ghost",
|
|
141
162
|
size: "sm",
|
|
142
163
|
className: "mb-4",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Back to DataSinks"]
|
|
144
165
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ S("div", {
|
|
146
167
|
className: "flex items-center gap-2 flex-wrap",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ x("h1", {
|
|
148
169
|
className: "text-heading-h1 font-bold text-text-primary",
|
|
149
|
-
children:
|
|
150
|
-
}), /* @__PURE__ */
|
|
170
|
+
children: V.name || "Untitled"
|
|
171
|
+
}), /* @__PURE__ */ x(i, { status: V.status })]
|
|
151
172
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ x("p", {
|
|
153
174
|
className: "text-body-sm text-text-tertiary font-mono mt-1",
|
|
154
|
-
children:
|
|
175
|
+
children: V.key
|
|
155
176
|
}),
|
|
156
|
-
|
|
177
|
+
V.description && /* @__PURE__ */ x("p", {
|
|
157
178
|
className: "text-body-sm text-text-secondary mt-2",
|
|
158
|
-
children:
|
|
179
|
+
children: V.description
|
|
159
180
|
})
|
|
160
181
|
]
|
|
161
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ S("div", {
|
|
162
183
|
className: "flex items-center gap-2 flex-wrap",
|
|
163
184
|
children: [
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
+
})
|
|
170
195
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ S(g, {
|
|
172
197
|
onClick: $,
|
|
173
198
|
variant: "secondary",
|
|
174
199
|
size: "default",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ x(h, { className: "w-4 h-4 mr-2" }), "Import Data"]
|
|
176
201
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ S(g, {
|
|
178
203
|
onClick: Q,
|
|
179
204
|
variant: "secondary",
|
|
180
205
|
size: "default",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ x(ge, { className: "w-4 h-4 mr-2" }), "Export"]
|
|
182
207
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
+
})
|
|
188
217
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
+
})
|
|
195
228
|
})
|
|
196
229
|
]
|
|
197
230
|
})]
|
|
198
231
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__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, {
|
|
201
234
|
storageKey: "bigconsole-datasink-view",
|
|
202
235
|
steps: [
|
|
203
236
|
{
|
|
@@ -216,7 +249,7 @@ var T = s(function() {
|
|
|
216
249
|
id: "build-dashboard",
|
|
217
250
|
label: "Visualize it on a dashboard",
|
|
218
251
|
description: "Add widgets that query this sink to see your data live.",
|
|
219
|
-
onClick: () =>
|
|
252
|
+
onClick: () => w("/dashboards")
|
|
220
253
|
},
|
|
221
254
|
{
|
|
222
255
|
id: "export",
|
|
@@ -226,225 +259,227 @@ var T = s(function() {
|
|
|
226
259
|
}
|
|
227
260
|
]
|
|
228
261
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ S("div", {
|
|
230
263
|
className: "grid gap-6 md:grid-cols-2",
|
|
231
264
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ S(we, {
|
|
233
266
|
treatment: "glass",
|
|
234
267
|
glow: !0,
|
|
235
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ x(v, { children: /* @__PURE__ */ x(y, { children: "Details" }) }), /* @__PURE__ */ x(_, { children: /* @__PURE__ */ S("dl", {
|
|
236
269
|
className: "space-y-4 text-body-sm",
|
|
237
270
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ S("div", {
|
|
239
272
|
className: "flex justify-between items-center",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
241
274
|
className: "text-text-secondary",
|
|
242
275
|
children: "Status"
|
|
243
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ x("dd", { children: /* @__PURE__ */ x(i, { status: V.status }) })]
|
|
244
277
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ S("div", {
|
|
246
279
|
className: "flex justify-between items-center",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
248
281
|
className: "text-text-secondary",
|
|
249
282
|
children: "Cache TTL"
|
|
250
|
-
}), /* @__PURE__ */
|
|
283
|
+
}), /* @__PURE__ */ x("dd", {
|
|
251
284
|
className: "text-text-primary font-medium",
|
|
252
|
-
children:
|
|
285
|
+
children: V.ttl ? `${V.ttl}s` : "None"
|
|
253
286
|
})]
|
|
254
287
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ S("div", {
|
|
256
289
|
className: "flex justify-between items-center",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
258
291
|
className: "text-text-secondary",
|
|
259
292
|
children: "Refresh Type"
|
|
260
|
-
}), /* @__PURE__ */
|
|
293
|
+
}), /* @__PURE__ */ x("dd", {
|
|
261
294
|
className: "text-text-primary font-medium capitalize",
|
|
262
|
-
children:
|
|
295
|
+
children: V.refresh?.type || "Manual"
|
|
263
296
|
})]
|
|
264
297
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ S("div", {
|
|
266
299
|
className: "flex justify-between items-center",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
268
301
|
className: "text-text-secondary",
|
|
269
302
|
children: "Size"
|
|
270
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ x("dd", {
|
|
271
304
|
className: "text-text-primary font-medium",
|
|
272
|
-
children:
|
|
305
|
+
children: V.sizeBytes ? `${(V.sizeBytes / 1024).toFixed(2)} KB` : "0 KB"
|
|
273
306
|
})]
|
|
274
307
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ S("div", {
|
|
276
309
|
className: "flex justify-between items-center",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
278
311
|
className: "text-text-secondary",
|
|
279
312
|
children: "Version"
|
|
280
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ x("dd", {
|
|
281
314
|
className: "text-text-primary font-medium",
|
|
282
|
-
children:
|
|
315
|
+
children: V.version || 1
|
|
283
316
|
})]
|
|
284
317
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ S("div", {
|
|
286
319
|
className: "flex justify-between items-center",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
288
321
|
className: "text-text-secondary",
|
|
289
322
|
children: "Last Refreshed"
|
|
290
|
-
}), /* @__PURE__ */
|
|
323
|
+
}), /* @__PURE__ */ x("dd", {
|
|
291
324
|
className: "text-text-primary font-medium",
|
|
292
|
-
children:
|
|
325
|
+
children: V.lastRefreshedAt ? C(new Date(V.lastRefreshedAt), { addSuffix: !0 }) : "Never"
|
|
293
326
|
})]
|
|
294
327
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ S("div", {
|
|
296
329
|
className: "flex justify-between items-center",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
298
331
|
className: "text-text-secondary",
|
|
299
332
|
children: "Created"
|
|
300
|
-
}), /* @__PURE__ */
|
|
333
|
+
}), /* @__PURE__ */ x("dd", {
|
|
301
334
|
className: "text-text-primary font-medium",
|
|
302
|
-
children:
|
|
335
|
+
children: C(new Date(V.createdAt), { addSuffix: !0 })
|
|
303
336
|
})]
|
|
304
337
|
})
|
|
305
338
|
]
|
|
306
339
|
}) })]
|
|
307
340
|
}),
|
|
308
|
-
|
|
309
|
-
workflowId:
|
|
310
|
-
executionId:
|
|
311
|
-
lastRefreshedAt:
|
|
312
|
-
setupState:
|
|
313
|
-
status:
|
|
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,
|
|
314
347
|
onRerunWorkflow: Y,
|
|
315
|
-
disabled:
|
|
316
|
-
isRerunning:
|
|
348
|
+
disabled: D,
|
|
349
|
+
isRerunning: D
|
|
317
350
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ x(oe, { workflowLinks: V.workflowLinks }),
|
|
352
|
+
/* @__PURE__ */ x(se, { dataSinkKey: V.key })
|
|
320
353
|
]
|
|
321
354
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ S(Ce, { children: [
|
|
356
|
+
/* @__PURE__ */ S(v, {
|
|
324
357
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ S(y, {
|
|
326
359
|
className: "flex items-center gap-2",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
328
|
-
}), /* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ x(p, { className: "w-4 h-4 text-text-secondary" }), "Data Preview"]
|
|
361
|
+
}), /* @__PURE__ */ S("div", {
|
|
329
362
|
className: "flex items-center gap-2",
|
|
330
|
-
children: [
|
|
363
|
+
children: [T && /* @__PURE__ */ S("div", {
|
|
331
364
|
className: "flex items-center border border-border-default rounded-md overflow-hidden",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ x("button", {
|
|
333
366
|
type: "button",
|
|
334
|
-
onClick: () =>
|
|
335
|
-
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"}`,
|
|
336
369
|
title: "Table view",
|
|
337
|
-
children: /* @__PURE__ */
|
|
338
|
-
}), /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ x(be, { className: "w-4 h-4" })
|
|
371
|
+
}), /* @__PURE__ */ x("button", {
|
|
339
372
|
type: "button",
|
|
340
|
-
onClick: () =>
|
|
341
|
-
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"}`,
|
|
342
375
|
title: "JSON view",
|
|
343
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ x(he, { className: "w-4 h-4" })
|
|
344
377
|
})]
|
|
345
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ x(g, {
|
|
346
379
|
onClick: Z,
|
|
347
|
-
disabled:
|
|
348
|
-
variant:
|
|
380
|
+
disabled: P,
|
|
381
|
+
variant: T ? "secondary" : "default",
|
|
349
382
|
size: "sm",
|
|
350
|
-
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"] })
|
|
351
384
|
})]
|
|
352
385
|
})]
|
|
353
386
|
}),
|
|
354
|
-
|
|
355
|
-
data:
|
|
387
|
+
T && N && /* @__PURE__ */ S(_, { children: [x(I === "table" ? ee : ae, {
|
|
388
|
+
data: N,
|
|
356
389
|
maxHeight: "400px"
|
|
357
|
-
}),
|
|
390
|
+
}), B !== null && /* @__PURE__ */ S("div", {
|
|
358
391
|
className: "flex items-center justify-between gap-4 mt-4 pt-4 border-t border-border-subtle",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ S("div", {
|
|
360
393
|
className: "flex items-center gap-2 text-body-sm text-text-secondary",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
394
|
+
children: [/* @__PURE__ */ x("span", { children: "Rows per page" }), /* @__PURE__ */ x("select", {
|
|
362
395
|
"aria-label": "Rows per page",
|
|
363
396
|
className: "bg-bg-canvas border border-border-default rounded px-2 py-0.5 text-text-primary",
|
|
364
|
-
value:
|
|
365
|
-
onChange: (e) =>
|
|
397
|
+
value: R,
|
|
398
|
+
onChange: (e) => He(Number(e.target.value)),
|
|
366
399
|
children: [
|
|
367
400
|
100,
|
|
368
401
|
500,
|
|
369
402
|
1e3
|
|
370
|
-
].map((e) => /* @__PURE__ */
|
|
403
|
+
].map((e) => /* @__PURE__ */ x("option", {
|
|
371
404
|
value: e,
|
|
372
405
|
children: e
|
|
373
406
|
}, e))
|
|
374
407
|
})]
|
|
375
|
-
}), /* @__PURE__ */
|
|
408
|
+
}), /* @__PURE__ */ S("div", {
|
|
376
409
|
className: "flex items-center gap-4 text-body-sm text-text-secondary",
|
|
377
410
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ x("span", { children: B === 0 ? "0 rows" : `${z + 1}–${Math.min(z + R, B)} of ${B}` }),
|
|
412
|
+
/* @__PURE__ */ x(g, {
|
|
380
413
|
variant: "secondary",
|
|
381
414
|
size: "sm",
|
|
382
|
-
disabled:
|
|
383
|
-
onClick: () => void X(Math.max(0,
|
|
415
|
+
disabled: z === 0 || P,
|
|
416
|
+
onClick: () => void X(Math.max(0, z - R), R),
|
|
384
417
|
children: "Previous"
|
|
385
418
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ x(g, {
|
|
387
420
|
variant: "secondary",
|
|
388
421
|
size: "sm",
|
|
389
|
-
disabled: !
|
|
390
|
-
onClick: () => void X(
|
|
422
|
+
disabled: !Le || P,
|
|
423
|
+
onClick: () => void X(z + R, R),
|
|
391
424
|
children: "Next"
|
|
392
425
|
})
|
|
393
426
|
]
|
|
394
427
|
})]
|
|
395
428
|
})] }),
|
|
396
|
-
!
|
|
429
|
+
!T && (V.data && Object.keys(V.data).length > 0 ? /* @__PURE__ */ S(_, {
|
|
397
430
|
className: "text-center p-8",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ x(p, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }), /* @__PURE__ */ x("p", {
|
|
399
432
|
className: "text-body-sm text-text-secondary",
|
|
400
433
|
children: "Click \"Show Data\" to preview the cached data."
|
|
401
434
|
})]
|
|
402
|
-
}) : /* @__PURE__ */
|
|
435
|
+
}) : /* @__PURE__ */ S(_, {
|
|
403
436
|
className: "text-center p-8",
|
|
404
437
|
children: [
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ x(p, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }),
|
|
439
|
+
/* @__PURE__ */ x("p", {
|
|
407
440
|
className: "text-body-sm text-text-secondary mb-4",
|
|
408
|
-
children: "This data sink has no data yet.
|
|
441
|
+
children: "This data sink has no data yet. Upload a CSV or build a workflow to import data."
|
|
409
442
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ S(g, {
|
|
411
444
|
onClick: $,
|
|
412
445
|
variant: "default",
|
|
413
446
|
size: "sm",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ x(h, { className: "w-4 h-4 mr-2" }), "Import Data"]
|
|
415
448
|
})
|
|
416
449
|
]
|
|
417
450
|
}))
|
|
418
451
|
] }),
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
isOpen:
|
|
452
|
+
/* @__PURE__ */ x(le, {
|
|
453
|
+
isOpen: je,
|
|
421
454
|
dataSinkId: s || null,
|
|
422
|
-
dataSinkName:
|
|
423
|
-
onClose:
|
|
455
|
+
dataSinkName: V.name || V.key,
|
|
456
|
+
onClose: Ue
|
|
424
457
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
isOpen:
|
|
427
|
-
dataSinkName:
|
|
428
|
-
|
|
429
|
-
|
|
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
|
|
430
465
|
})
|
|
431
466
|
]
|
|
432
|
-
}) : /* @__PURE__ */
|
|
467
|
+
}) : /* @__PURE__ */ x("div", {
|
|
433
468
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
434
|
-
children: /* @__PURE__ */
|
|
469
|
+
children: /* @__PURE__ */ x(Te, {
|
|
435
470
|
illustration: "empty-data",
|
|
436
471
|
title: "DataSink not found",
|
|
437
472
|
description: "The DataSink you're looking for doesn't exist or has been deleted.",
|
|
438
|
-
action: /* @__PURE__ */
|
|
473
|
+
action: /* @__PURE__ */ S(g, {
|
|
439
474
|
onClick: J,
|
|
440
475
|
variant: "default",
|
|
441
476
|
size: "default",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
477
|
+
children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Go back to DataSinks"]
|
|
443
478
|
})
|
|
444
479
|
})
|
|
445
480
|
});
|
|
446
481
|
});
|
|
447
482
|
//#endregion
|
|
448
|
-
export {
|
|
483
|
+
export { w as DataSinkViewPage, w as default };
|
|
449
484
|
|
|
450
485
|
//# sourceMappingURL=DataSinkViewPage.js.map
|