@burdenoff/microfe-bigconsole 2026.1004.7 → 2026.1005.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/BigConsoleRoutes.d.ts +7 -1
- package/dist/bigconsole/BigConsoleRoutes.d.ts.map +1 -1
- package/dist/bigconsole/BigConsoleRoutes.js +154 -144
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.d.ts +11 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.d.ts.map +1 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +248 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js.map +1 -0
- package/dist/bigconsole/components/datasink/AlertRuleEditor.d.ts +23 -0
- package/dist/bigconsole/components/datasink/AlertRuleEditor.d.ts.map +1 -0
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +357 -0
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.d.ts +25 -0
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.d.ts.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +89 -0
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js.map +1 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +146 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts.map +1 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +221 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.js.map +1 -0
- package/dist/bigconsole/pages/DataSinkAlertsPage.d.ts +2 -0
- package/dist/bigconsole/pages/DataSinkAlertsPage.d.ts.map +1 -0
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +422 -0
- package/dist/bigconsole/pages/DataSinkAlertsPage.js.map +1 -0
- package/dist/bigconsole/pages/DataSinkViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +151 -144
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +4 -4
- package/dist/bigconsole/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +61 -60
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/utils/alertRules.d.ts +40 -0
- package/dist/bigconsole/utils/alertRules.d.ts.map +1 -0
- package/dist/bigconsole/utils/alertRules.js +83 -0
- package/dist/bigconsole/utils/alertRules.js.map +1 -0
- package/dist/bigconsole/workflowOpen.d.ts +78 -0
- package/dist/bigconsole/workflowOpen.d.ts.map +1 -0
- package/dist/bigconsole/workflowOpen.js +33 -0
- package/dist/bigconsole/workflowOpen.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +418 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +329 -200
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +122 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +7 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,66 +1,67 @@
|
|
|
1
1
|
import { useDataSinkStore as e } from "../store/dataSinkStore.js";
|
|
2
2
|
import { useAppNavigate as t } from "../contexts/NavigationContext.js";
|
|
3
3
|
import "../contexts/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { NEW_WORKFLOW_NAV as n } from "../workflowOpen.js";
|
|
5
|
+
import { newWorkflowPath as ee } from "../BigConsoleRoutes.js";
|
|
5
6
|
import "../components/common/sectionStyles.js";
|
|
6
|
-
import { Section as r, SectionStack as
|
|
7
|
+
import { Section as r, SectionStack as te } from "../components/common/Section.js";
|
|
7
8
|
import "../components/common/index.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
9
|
+
import ne from "../components/datasink/DataSinkTableViewer.js";
|
|
10
|
+
import re from "../hooks/useDataSinkOperations.js";
|
|
10
11
|
import { BIGCONSOLE_PERMISSIONS as i } from "../../constants/permissions.js";
|
|
11
12
|
import a from "../components/datasink/DataSinkStatusBadge.js";
|
|
12
|
-
import { isNative as o, nativeConfirm as
|
|
13
|
-
import
|
|
14
|
-
import { formatByteSize as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { memo as c, useCallback as l, useEffect as
|
|
22
|
-
import { useParams as
|
|
23
|
-
import { AccessDenied as
|
|
24
|
-
import { usePermissions as
|
|
25
|
-
import { AlertCircle as
|
|
26
|
-
import { Button as g, IllustratedEmptyState as
|
|
13
|
+
import { isNative as o, nativeConfirm as ie, nativeImpact as ae, nativeNotify as s } from "../../utils/nativeBridge.js";
|
|
14
|
+
import oe from "../hooks/useDataSinkSubscription.js";
|
|
15
|
+
import { formatByteSize as se } from "../utils/format.js";
|
|
16
|
+
import ce from "../components/datasink/DataSinkDataViewer.js";
|
|
17
|
+
import le from "../components/datasink/LinkedWorkflowsPanel.js";
|
|
18
|
+
import ue from "../components/datasink/LinkedParsersPanel.js";
|
|
19
|
+
import de from "../components/datasink/WorkflowStatusPanel.js";
|
|
20
|
+
import fe from "../components/datasink/ExportDataSinkDialog.js";
|
|
21
|
+
import pe from "../components/datasink/ImportDataGuideDialog.js";
|
|
22
|
+
import { memo as c, useCallback as l, useEffect as me, useState as u } from "react";
|
|
23
|
+
import { useParams as he } from "react-router";
|
|
24
|
+
import { AccessDenied as ge, PermissionButton as d } from "@burdenoff/fe-libs/shared/components";
|
|
25
|
+
import { usePermissions as _e } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
26
|
+
import { AlertCircle as ve, ArrowLeft as f, Bell as ye, Code as be, Database as p, Download as xe, Edit as Se, Eye as Ce, EyeOff as we, Grid3X3 as Te, Loader2 as m, RefreshCw as Ee, Trash2 as De, Upload as h } from "lucide-react";
|
|
27
|
+
import { Button as g, IllustratedEmptyState as Oe, NextSteps as ke, PagePurpose as Ae } from "@burdenoff/fe-libs/ui";
|
|
27
28
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
28
|
-
import { useI18n as
|
|
29
|
+
import { useI18n as je } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
29
30
|
import { formatDistanceToNow as b } from "date-fns";
|
|
30
31
|
//#region src/bigconsole/pages/DataSinkViewPage.tsx
|
|
31
32
|
var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function() {
|
|
32
|
-
let { dataSinkId: c } =
|
|
33
|
-
|
|
33
|
+
let { dataSinkId: c } = he(), S = t(), { t: C } = je(), { hasPermission: Me, isLoading: Ne } = _e(), Pe = Me(i.DATASINK_READ), [w, T] = u(!1), [E, D] = u(!1), [O, k] = u(!1), [Fe, A] = u(!1), [Ie, j] = u(!1), [M, Le] = u(null), [N, P] = u(!1), [F, I] = u("table"), [L, Re] = u(100), [R, ze] = u(0), [z, Be] = u(null), [Ve, He] = u(!1), B = e((e) => c ? e.dataSinks.get(c) : void 0), { loading: Ue, error: V, fetchDataSink: H, getDataSinkData: U, refreshDataSink: W, updateDataSink: G, deleteDataSink: K } = re({ skipFetch: !0 });
|
|
34
|
+
oe({
|
|
34
35
|
dataSinkId: c,
|
|
35
36
|
enabled: !!c
|
|
36
|
-
}),
|
|
37
|
-
c &&
|
|
38
|
-
}, [c,
|
|
39
|
-
let
|
|
37
|
+
}), me(() => {
|
|
38
|
+
c && H(c);
|
|
39
|
+
}, [c, H]);
|
|
40
|
+
let q = l(() => {
|
|
40
41
|
S("/datasinks");
|
|
41
|
-
}, [S]),
|
|
42
|
+
}, [S]), We = l(() => {
|
|
42
43
|
S(`/datasinks/${c}/edit`);
|
|
43
|
-
}, [S, c]),
|
|
44
|
+
}, [S, c]), J = l(async () => {
|
|
44
45
|
if (c) {
|
|
45
46
|
D(!0);
|
|
46
47
|
try {
|
|
47
|
-
await
|
|
48
|
+
await W({ id: c });
|
|
48
49
|
} catch {} finally {
|
|
49
50
|
D(!1);
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
}, [c,
|
|
53
|
+
}, [c, W]), Ge = l(async () => {
|
|
53
54
|
if (!c) return;
|
|
54
|
-
let e = await
|
|
55
|
+
let e = await ie({
|
|
55
56
|
title: C("bigconsole.dataSinks.view.deleteConfirmTitle", "Delete DataSink?"),
|
|
56
57
|
message: C("bigconsole.dataSinks.view.deleteConfirmMessage", "Are you sure you want to delete this DataSink?"),
|
|
57
58
|
okButtonTitle: C("bigconsole.dataSinks.view.delete", "Delete"),
|
|
58
59
|
cancelButtonTitle: C("bigconsole.dataSinks.view.cancel", "Cancel")
|
|
59
60
|
});
|
|
60
61
|
if (e === null ? window.confirm(C("bigconsole.dataSinks.view.deleteConfirmMessage", "Are you sure you want to delete this DataSink?")) : e) {
|
|
61
|
-
|
|
62
|
+
ae("medium"), k(!0);
|
|
62
63
|
try {
|
|
63
|
-
await
|
|
64
|
+
await K(c), o() && s("success"), S("/datasinks");
|
|
64
65
|
} catch {
|
|
65
66
|
o() && s("error");
|
|
66
67
|
} finally {
|
|
@@ -69,85 +70,85 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
69
70
|
}
|
|
70
71
|
}, [
|
|
71
72
|
c,
|
|
72
|
-
|
|
73
|
+
K,
|
|
73
74
|
S,
|
|
74
75
|
C
|
|
75
|
-
]),
|
|
76
|
+
]), Y = l(async (e, t) => {
|
|
76
77
|
if (c) {
|
|
77
|
-
|
|
78
|
+
P(!0);
|
|
78
79
|
try {
|
|
79
|
-
let n = await
|
|
80
|
+
let n = await U({ id: c }, {
|
|
80
81
|
limit: t,
|
|
81
82
|
offset: e
|
|
82
83
|
});
|
|
83
|
-
n && (
|
|
84
|
+
n && (Le(n.raw || {}), Be(typeof n.totalCount == "number" ? n.totalCount : null), He(!!n.hasMore), ze(e));
|
|
84
85
|
} catch {} finally {
|
|
85
|
-
|
|
86
|
+
P(!1);
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
|
-
}, [c,
|
|
89
|
+
}, [c, U]), X = l(async () => {
|
|
89
90
|
if (c) {
|
|
90
91
|
if (w) {
|
|
91
92
|
T(!1);
|
|
92
93
|
return;
|
|
93
94
|
}
|
|
94
|
-
await
|
|
95
|
+
await Y(0, L), T(!0);
|
|
95
96
|
}
|
|
96
97
|
}, [
|
|
97
98
|
c,
|
|
98
99
|
w,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
]),
|
|
102
|
-
|
|
103
|
-
}, [
|
|
100
|
+
Y,
|
|
101
|
+
L
|
|
102
|
+
]), Ke = l((e) => {
|
|
103
|
+
Re(e), Y(0, e);
|
|
104
|
+
}, [Y]), Z = l(() => {
|
|
105
|
+
A(!0);
|
|
106
|
+
}, []), Q = l(() => {
|
|
107
|
+
A(!1);
|
|
108
|
+
}, []), $ = l(() => {
|
|
104
109
|
j(!0);
|
|
105
|
-
}, []),
|
|
110
|
+
}, []), qe = l(() => {
|
|
106
111
|
j(!1);
|
|
107
|
-
}, []),
|
|
108
|
-
|
|
109
|
-
}, []),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, [S]), qe = l(async (e) => {
|
|
114
|
-
if (!V || !await K({
|
|
115
|
-
id: V.id,
|
|
116
|
-
version: V.version,
|
|
112
|
+
}, []), Je = l(() => {
|
|
113
|
+
j(!1), S(ee(), n);
|
|
114
|
+
}, [S]), Ye = l(async (e) => {
|
|
115
|
+
if (!B || !await G({
|
|
116
|
+
id: B.id,
|
|
117
|
+
version: B.version,
|
|
117
118
|
data: e
|
|
118
119
|
})) return !1;
|
|
119
120
|
try {
|
|
120
|
-
await
|
|
121
|
+
await Y(0, L), T(!0);
|
|
121
122
|
} catch {}
|
|
122
123
|
return !0;
|
|
123
124
|
}, [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
B,
|
|
126
|
+
G,
|
|
127
|
+
Y,
|
|
128
|
+
L
|
|
128
129
|
]);
|
|
129
|
-
return
|
|
130
|
+
return Ue && !B ? /* @__PURE__ */ v("div", {
|
|
130
131
|
className: "flex min-h-[240px] items-center justify-center p-card-padding",
|
|
131
132
|
children: /* @__PURE__ */ v(m, { className: "h-icon-lg w-icon-lg animate-spin text-text-secondary" })
|
|
132
|
-
}) :
|
|
133
|
+
}) : V && !B ? /* @__PURE__ */ v("div", {
|
|
133
134
|
className: "p-card-padding",
|
|
134
135
|
children: /* @__PURE__ */ v(r, {
|
|
135
136
|
tone: "danger",
|
|
136
137
|
headingLevel: 2,
|
|
137
138
|
title: C("bigconsole.dataSinks.view.loadError", "Failed to load DataSink"),
|
|
138
|
-
description:
|
|
139
|
-
icon: /* @__PURE__ */ v(
|
|
139
|
+
description: V.message,
|
|
140
|
+
icon: /* @__PURE__ */ v(ve, { className: "h-icon-sm w-icon-sm" }),
|
|
140
141
|
actions: /* @__PURE__ */ y(g, {
|
|
141
|
-
onClick:
|
|
142
|
+
onClick: q,
|
|
142
143
|
variant: "secondary",
|
|
143
144
|
size: "sm",
|
|
144
145
|
children: [/* @__PURE__ */ v(f, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.view.goBack", "Go back")]
|
|
145
146
|
})
|
|
146
147
|
})
|
|
147
|
-
}) : !
|
|
148
|
+
}) : !Ne && !Pe ? /* @__PURE__ */ v(ge, {
|
|
148
149
|
title: C("bigconsole.dataSinks.view.accessDeniedTitle", "Access Denied"),
|
|
149
150
|
description: C("bigconsole.dataSinks.view.accessDeniedDescription", "You don't have permission to view this data sink.")
|
|
150
|
-
}) :
|
|
151
|
+
}) : B ? /* @__PURE__ */ y("div", {
|
|
151
152
|
className: "min-w-0 p-card-padding",
|
|
152
153
|
children: [
|
|
153
154
|
/* @__PURE__ */ y("header", {
|
|
@@ -156,7 +157,7 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
156
157
|
className: "min-w-0 flex-1",
|
|
157
158
|
children: [
|
|
158
159
|
/* @__PURE__ */ y(g, {
|
|
159
|
-
onClick:
|
|
160
|
+
onClick: q,
|
|
160
161
|
variant: "ghost",
|
|
161
162
|
size: "sm",
|
|
162
163
|
className: "mb-4",
|
|
@@ -167,22 +168,22 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
167
168
|
children: [
|
|
168
169
|
/* @__PURE__ */ v("h1", {
|
|
169
170
|
className: "text-2xl font-bold text-text-primary",
|
|
170
|
-
children:
|
|
171
|
+
children: B.name || C("bigconsole.dataSinks.view.untitled", "Untitled")
|
|
171
172
|
}),
|
|
172
|
-
/* @__PURE__ */ v(a, { status:
|
|
173
|
+
/* @__PURE__ */ v(a, { status: B.status }),
|
|
173
174
|
/* @__PURE__ */ y("span", {
|
|
174
175
|
className: "rounded-pill border border-border-subtle px-2 py-1 text-xs text-text-secondary",
|
|
175
|
-
children: ["v",
|
|
176
|
+
children: ["v", B.version]
|
|
176
177
|
})
|
|
177
178
|
]
|
|
178
179
|
}),
|
|
179
180
|
/* @__PURE__ */ v("p", {
|
|
180
181
|
className: "mt-1 break-all font-mono text-sm text-text-muted",
|
|
181
|
-
children:
|
|
182
|
+
children: B.key
|
|
182
183
|
}),
|
|
183
|
-
|
|
184
|
+
B.description && /* @__PURE__ */ v("p", {
|
|
184
185
|
className: "mt-2 text-sm text-text-secondary",
|
|
185
|
-
children:
|
|
186
|
+
children: B.description
|
|
186
187
|
})
|
|
187
188
|
]
|
|
188
189
|
}), /* @__PURE__ */ y("div", {
|
|
@@ -192,11 +193,11 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
192
193
|
permission: i.DATASINK_EXECUTE,
|
|
193
194
|
deniedBehavior: "disable",
|
|
194
195
|
children: /* @__PURE__ */ y(g, {
|
|
195
|
-
onClick:
|
|
196
|
+
onClick: J,
|
|
196
197
|
disabled: E,
|
|
197
198
|
variant: "default",
|
|
198
199
|
size: "default",
|
|
199
|
-
children: [/* @__PURE__ */ v(
|
|
200
|
+
children: [/* @__PURE__ */ v(Ee, { className: `w-4 h-4 mr-2 ${E ? "animate-spin" : ""}` }), E ? C("bigconsole.dataSinks.view.refreshing", "Refreshing...") : C("bigconsole.dataSinks.view.refresh", "Refresh")]
|
|
200
201
|
})
|
|
201
202
|
}),
|
|
202
203
|
/* @__PURE__ */ y(g, {
|
|
@@ -206,40 +207,46 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
206
207
|
children: [/* @__PURE__ */ v(h, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.view.importData", "Import Data")]
|
|
207
208
|
}),
|
|
208
209
|
/* @__PURE__ */ y(g, {
|
|
209
|
-
onClick:
|
|
210
|
+
onClick: Z,
|
|
211
|
+
variant: "secondary",
|
|
212
|
+
size: "default",
|
|
213
|
+
children: [/* @__PURE__ */ v(xe, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.view.export", "Export")]
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ y(g, {
|
|
216
|
+
onClick: () => S(`/datasinks/${c}/alerts`),
|
|
210
217
|
variant: "secondary",
|
|
211
218
|
size: "default",
|
|
212
|
-
children: [/* @__PURE__ */ v(ye, { className: "w-4 h-4 mr-2" }), C("bigconsole.
|
|
219
|
+
children: [/* @__PURE__ */ v(ye, { className: "w-4 h-4 mr-2" }), C("bigconsole.alerts.title", "Alerts")]
|
|
213
220
|
}),
|
|
214
221
|
/* @__PURE__ */ v(d, {
|
|
215
222
|
permission: i.DATASINK_UPDATE,
|
|
216
223
|
deniedBehavior: "disable",
|
|
217
224
|
children: /* @__PURE__ */ y(g, {
|
|
218
|
-
onClick:
|
|
225
|
+
onClick: We,
|
|
219
226
|
variant: "secondary",
|
|
220
227
|
size: "default",
|
|
221
|
-
children: [/* @__PURE__ */ v(
|
|
228
|
+
children: [/* @__PURE__ */ v(Se, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.view.edit", "Edit")]
|
|
222
229
|
})
|
|
223
230
|
}),
|
|
224
231
|
/* @__PURE__ */ v(d, {
|
|
225
232
|
permission: i.DATASINK_DELETE,
|
|
226
233
|
deniedBehavior: "hide",
|
|
227
234
|
children: /* @__PURE__ */ y(g, {
|
|
228
|
-
onClick:
|
|
235
|
+
onClick: Ge,
|
|
229
236
|
disabled: O,
|
|
230
237
|
variant: "destructive",
|
|
231
238
|
size: "default",
|
|
232
|
-
children: [/* @__PURE__ */ v(
|
|
239
|
+
children: [/* @__PURE__ */ v(De, { className: "w-4 h-4 mr-2" }), O ? C("bigconsole.dataSinks.view.deleting", "Deleting...") : C("bigconsole.dataSinks.view.delete", "Delete")]
|
|
233
240
|
})
|
|
234
241
|
})
|
|
235
242
|
]
|
|
236
243
|
})]
|
|
237
244
|
}),
|
|
238
|
-
/* @__PURE__ */ v(
|
|
245
|
+
/* @__PURE__ */ v(Ae, {
|
|
239
246
|
className: "mb-section-gap",
|
|
240
247
|
children: C("bigconsole.dataSinks.view.pagePurpose", "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.")
|
|
241
248
|
}),
|
|
242
|
-
/* @__PURE__ */ y(
|
|
249
|
+
/* @__PURE__ */ y(te, {
|
|
243
250
|
className: "mt-section-gap",
|
|
244
251
|
children: [/* @__PURE__ */ y("div", {
|
|
245
252
|
className: "grid min-w-0 gap-section-gap lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]",
|
|
@@ -256,7 +263,7 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
256
263
|
className: "min-w-0 text-text-secondary",
|
|
257
264
|
children: C("bigconsole.dataSinks.view.status", "Status")
|
|
258
265
|
}), /* @__PURE__ */ v("dd", { children: /* @__PURE__ */ v(a, {
|
|
259
|
-
status:
|
|
266
|
+
status: B.status,
|
|
260
267
|
size: "sm"
|
|
261
268
|
}) })]
|
|
262
269
|
}),
|
|
@@ -267,7 +274,7 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
267
274
|
children: C("bigconsole.dataSinks.view.cacheTtl", "Cache TTL")
|
|
268
275
|
}), /* @__PURE__ */ v("dd", {
|
|
269
276
|
className: "font-medium text-text-primary",
|
|
270
|
-
children:
|
|
277
|
+
children: B.ttl ? `${B.ttl}s` : C("bigconsole.dataSinks.view.none", "None")
|
|
271
278
|
})]
|
|
272
279
|
}),
|
|
273
280
|
/* @__PURE__ */ y("div", {
|
|
@@ -277,7 +284,7 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
277
284
|
children: C("bigconsole.dataSinks.view.refreshType", "Refresh Type")
|
|
278
285
|
}), /* @__PURE__ */ v("dd", {
|
|
279
286
|
className: "font-medium capitalize text-text-primary",
|
|
280
|
-
children:
|
|
287
|
+
children: B.refresh?.type || C("bigconsole.dataSinks.view.manual", "Manual")
|
|
281
288
|
})]
|
|
282
289
|
}),
|
|
283
290
|
/* @__PURE__ */ y("div", {
|
|
@@ -287,7 +294,7 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
287
294
|
children: C("bigconsole.dataSinks.view.size", "Size")
|
|
288
295
|
}), /* @__PURE__ */ v("dd", {
|
|
289
296
|
className: "font-medium text-text-primary",
|
|
290
|
-
children:
|
|
297
|
+
children: se(B.sizeBytes || 0)
|
|
291
298
|
})]
|
|
292
299
|
}),
|
|
293
300
|
/* @__PURE__ */ y("div", {
|
|
@@ -297,7 +304,7 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
297
304
|
children: C("bigconsole.dataSinks.view.version", "Version")
|
|
298
305
|
}), /* @__PURE__ */ v("dd", {
|
|
299
306
|
className: "font-medium text-text-primary",
|
|
300
|
-
children:
|
|
307
|
+
children: B.version || 1
|
|
301
308
|
})]
|
|
302
309
|
}),
|
|
303
310
|
/* @__PURE__ */ y("div", {
|
|
@@ -307,7 +314,7 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
307
314
|
children: C("bigconsole.dataSinks.view.lastRefreshed", "Last Refreshed")
|
|
308
315
|
}), /* @__PURE__ */ v("dd", {
|
|
309
316
|
className: "font-medium text-text-primary",
|
|
310
|
-
children:
|
|
317
|
+
children: B.lastRefreshedAt ? b(new Date(B.lastRefreshedAt), { addSuffix: !0 }) : C("bigconsole.dataSinks.view.never", "Never")
|
|
311
318
|
})]
|
|
312
319
|
}),
|
|
313
320
|
/* @__PURE__ */ y("div", {
|
|
@@ -317,7 +324,7 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
317
324
|
children: C("bigconsole.dataSinks.view.created", "Created")
|
|
318
325
|
}), /* @__PURE__ */ v("dd", {
|
|
319
326
|
className: "font-medium text-text-primary",
|
|
320
|
-
children: b(new Date(
|
|
327
|
+
children: b(new Date(B.createdAt), { addSuffix: !0 })
|
|
321
328
|
})]
|
|
322
329
|
})
|
|
323
330
|
]
|
|
@@ -334,38 +341,38 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
334
341
|
className: "flex items-center overflow-hidden rounded-button border border-[var(--color-border-default)]",
|
|
335
342
|
children: [/* @__PURE__ */ v("button", {
|
|
336
343
|
type: "button",
|
|
337
|
-
onClick: () =>
|
|
338
|
-
"aria-pressed":
|
|
339
|
-
className: `flex h-control-md w-[var(--size-controlHeight-md)] items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${x} ${
|
|
344
|
+
onClick: () => I("table"),
|
|
345
|
+
"aria-pressed": F === "table",
|
|
346
|
+
className: `flex h-control-md w-[var(--size-controlHeight-md)] items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${x} ${F === "table" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
|
|
340
347
|
title: C("bigconsole.dataSinks.view.tableView", "Table view"),
|
|
341
|
-
children: /* @__PURE__ */ v(
|
|
348
|
+
children: /* @__PURE__ */ v(Te, { className: "w-4 h-4" })
|
|
342
349
|
}), /* @__PURE__ */ v("button", {
|
|
343
350
|
type: "button",
|
|
344
|
-
onClick: () =>
|
|
345
|
-
"aria-pressed":
|
|
346
|
-
className: `flex h-control-md w-[var(--size-controlHeight-md)] items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${x} ${
|
|
351
|
+
onClick: () => I("json"),
|
|
352
|
+
"aria-pressed": F === "json",
|
|
353
|
+
className: `flex h-control-md w-[var(--size-controlHeight-md)] items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${x} ${F === "json" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
|
|
347
354
|
title: C("bigconsole.dataSinks.view.jsonView", "JSON view"),
|
|
348
|
-
children: /* @__PURE__ */ v(
|
|
355
|
+
children: /* @__PURE__ */ v(be, { className: "w-4 h-4" })
|
|
349
356
|
})]
|
|
350
357
|
}), /* @__PURE__ */ v(g, {
|
|
351
|
-
onClick:
|
|
352
|
-
disabled:
|
|
358
|
+
onClick: X,
|
|
359
|
+
disabled: N,
|
|
353
360
|
variant: w ? "secondary" : "default",
|
|
354
361
|
size: "sm",
|
|
355
|
-
children:
|
|
362
|
+
children: N ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(m, { className: "w-4 h-4 mr-2 animate-spin" }), C("bigconsole.dataSinks.view.loading", "Loading...")] }) : w ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(we, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.view.hideData", "Hide Data")] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(Ce, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.view.showData", "Show Data")] })
|
|
356
363
|
})] }),
|
|
357
|
-
children: [w &&
|
|
358
|
-
data:
|
|
364
|
+
children: [w && M && /* @__PURE__ */ y(_, { children: [v(F === "table" ? ne : ce, {
|
|
365
|
+
data: M,
|
|
359
366
|
maxHeight: "400px"
|
|
360
|
-
}),
|
|
367
|
+
}), z !== null && /* @__PURE__ */ y("div", {
|
|
361
368
|
className: "mt-form-gap flex flex-wrap items-center justify-between gap-form-gap border-t border-[var(--color-border-subtle)] pt-form-gap",
|
|
362
369
|
children: [/* @__PURE__ */ y("label", {
|
|
363
370
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
364
371
|
children: [/* @__PURE__ */ v("span", { children: C("bigconsole.dataSinks.view.rowsPerPage", "Rows per page") }), /* @__PURE__ */ v("select", {
|
|
365
372
|
"aria-label": C("bigconsole.dataSinks.view.rowsPerPage", "Rows per page"),
|
|
366
373
|
className: "h-control-md rounded-input border border-[var(--color-border-default)] bg-bg-canvas px-2 text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
367
|
-
value:
|
|
368
|
-
onChange: (e) =>
|
|
374
|
+
value: L,
|
|
375
|
+
onChange: (e) => Ke(Number(e.target.value)),
|
|
369
376
|
children: [
|
|
370
377
|
100,
|
|
371
378
|
500,
|
|
@@ -378,28 +385,28 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
378
385
|
}), /* @__PURE__ */ y("div", {
|
|
379
386
|
className: "flex flex-wrap items-center gap-control-gap text-sm text-text-secondary",
|
|
380
387
|
children: [
|
|
381
|
-
/* @__PURE__ */ v("span", { children:
|
|
382
|
-
start:
|
|
383
|
-
end: Math.min(
|
|
384
|
-
total:
|
|
388
|
+
/* @__PURE__ */ v("span", { children: z === 0 ? C("bigconsole.dataSinks.view.zeroRows", "0 rows") : C("bigconsole.dataSinks.view.rowRange", "{{start}}–{{end}} of {{total}}", {
|
|
389
|
+
start: R + 1,
|
|
390
|
+
end: Math.min(R + L, z),
|
|
391
|
+
total: z
|
|
385
392
|
}) }),
|
|
386
393
|
/* @__PURE__ */ v(g, {
|
|
387
394
|
variant: "secondary",
|
|
388
395
|
size: "sm",
|
|
389
|
-
disabled:
|
|
390
|
-
onClick: () => void
|
|
396
|
+
disabled: R === 0 || N,
|
|
397
|
+
onClick: () => void Y(Math.max(0, R - L), L),
|
|
391
398
|
children: C("bigconsole.dataSinks.view.previous", "Previous")
|
|
392
399
|
}),
|
|
393
400
|
/* @__PURE__ */ v(g, {
|
|
394
401
|
variant: "secondary",
|
|
395
402
|
size: "sm",
|
|
396
|
-
disabled: !
|
|
397
|
-
onClick: () => void
|
|
403
|
+
disabled: !Ve || N,
|
|
404
|
+
onClick: () => void Y(R + L, L),
|
|
398
405
|
children: C("bigconsole.dataSinks.view.next", "Next")
|
|
399
406
|
})
|
|
400
407
|
]
|
|
401
408
|
})]
|
|
402
|
-
})] }), !w && (
|
|
409
|
+
})] }), !w && (B.sizeBytes > 0 || B.data && Object.keys(B.data).length > 0 ? /* @__PURE__ */ y("p", {
|
|
403
410
|
className: "flex items-center gap-icon-gap text-sm text-text-secondary",
|
|
404
411
|
children: [/* @__PURE__ */ v(p, {
|
|
405
412
|
"aria-hidden": "true",
|
|
@@ -428,35 +435,35 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
428
435
|
}), /* @__PURE__ */ y("div", {
|
|
429
436
|
className: "grid min-w-0 gap-section-gap md:grid-cols-2",
|
|
430
437
|
children: [
|
|
431
|
-
|
|
432
|
-
workflowId:
|
|
433
|
-
executionId:
|
|
434
|
-
lastRefreshedAt:
|
|
435
|
-
setupState:
|
|
436
|
-
status:
|
|
437
|
-
onRerunWorkflow:
|
|
438
|
+
B.fluidGridsWorkflowId && /* @__PURE__ */ v(de, {
|
|
439
|
+
workflowId: B.fluidGridsWorkflowId,
|
|
440
|
+
executionId: B.fluidGridsWorkflowExecutionId || void 0,
|
|
441
|
+
lastRefreshedAt: B.lastRefreshedAt || void 0,
|
|
442
|
+
setupState: B.setupState,
|
|
443
|
+
status: B.status,
|
|
444
|
+
onRerunWorkflow: J,
|
|
438
445
|
disabled: E,
|
|
439
446
|
isRerunning: E
|
|
440
447
|
}),
|
|
441
|
-
/* @__PURE__ */ v(
|
|
442
|
-
/* @__PURE__ */ v(
|
|
448
|
+
/* @__PURE__ */ v(le, { workflowLinks: B.workflowLinks }),
|
|
449
|
+
/* @__PURE__ */ v(ue, { dataSinkKey: B.key })
|
|
443
450
|
]
|
|
444
451
|
})]
|
|
445
452
|
}),
|
|
446
|
-
/* @__PURE__ */ v(
|
|
453
|
+
/* @__PURE__ */ v(ke, {
|
|
447
454
|
storageKey: "bigconsole-datasink-view",
|
|
448
455
|
steps: [
|
|
449
456
|
{
|
|
450
457
|
id: "preview",
|
|
451
458
|
label: C("bigconsole.dataSinks.view.nextSteps.previewLabel", "Preview the data"),
|
|
452
459
|
description: C("bigconsole.dataSinks.view.nextSteps.previewDescription", "Open the cached rows to confirm the sink holds what you expect."),
|
|
453
|
-
onClick:
|
|
460
|
+
onClick: X
|
|
454
461
|
},
|
|
455
462
|
{
|
|
456
463
|
id: "refresh",
|
|
457
464
|
label: C("bigconsole.dataSinks.view.nextSteps.refreshLabel", "Refresh from source"),
|
|
458
465
|
description: C("bigconsole.dataSinks.view.nextSteps.refreshDescription", "Re-run the linked workflow to pull the latest data."),
|
|
459
|
-
onClick:
|
|
466
|
+
onClick: J
|
|
460
467
|
},
|
|
461
468
|
{
|
|
462
469
|
id: "build-dashboard",
|
|
@@ -468,33 +475,33 @@ var x = "focus-visible:ring-inset focus-visible:ring-offset-0", S = c(function()
|
|
|
468
475
|
id: "export",
|
|
469
476
|
label: C("bigconsole.dataSinks.view.nextSteps.exportLabel", "Export the data"),
|
|
470
477
|
description: C("bigconsole.dataSinks.view.nextSteps.exportDescription", "Download the contents for use elsewhere."),
|
|
471
|
-
onClick:
|
|
478
|
+
onClick: Z
|
|
472
479
|
}
|
|
473
480
|
]
|
|
474
481
|
}),
|
|
475
|
-
/* @__PURE__ */ v(
|
|
476
|
-
isOpen:
|
|
482
|
+
/* @__PURE__ */ v(fe, {
|
|
483
|
+
isOpen: Fe,
|
|
477
484
|
dataSinkId: c || null,
|
|
478
|
-
dataSinkName:
|
|
479
|
-
onClose:
|
|
485
|
+
dataSinkName: B.name || B.key,
|
|
486
|
+
onClose: Q
|
|
480
487
|
}),
|
|
481
|
-
/* @__PURE__ */ v(
|
|
482
|
-
isOpen:
|
|
483
|
-
dataSinkName:
|
|
484
|
-
hasExistingData:
|
|
485
|
-
onClose:
|
|
486
|
-
onGoToWorkflows:
|
|
487
|
-
onImportCsv:
|
|
488
|
+
/* @__PURE__ */ v(pe, {
|
|
489
|
+
isOpen: Ie,
|
|
490
|
+
dataSinkName: B.name || B.key,
|
|
491
|
+
hasExistingData: B.sizeBytes > 0 || !!(B.data && Object.keys(B.data).length > 0),
|
|
492
|
+
onClose: qe,
|
|
493
|
+
onGoToWorkflows: Je,
|
|
494
|
+
onImportCsv: Ye
|
|
488
495
|
})
|
|
489
496
|
]
|
|
490
497
|
}) : /* @__PURE__ */ v("div", {
|
|
491
498
|
className: "flex min-h-[240px] items-center justify-center p-card-padding",
|
|
492
|
-
children: /* @__PURE__ */ v(
|
|
499
|
+
children: /* @__PURE__ */ v(Oe, {
|
|
493
500
|
illustration: "empty-data",
|
|
494
501
|
title: C("bigconsole.dataSinks.view.notFoundTitle", "DataSink not found"),
|
|
495
502
|
description: C("bigconsole.dataSinks.view.notFoundDescription", "The DataSink you're looking for doesn't exist or has been deleted."),
|
|
496
503
|
action: /* @__PURE__ */ y(g, {
|
|
497
|
-
onClick:
|
|
504
|
+
onClick: q,
|
|
498
505
|
variant: "default",
|
|
499
506
|
size: "default",
|
|
500
507
|
children: [/* @__PURE__ */ v(f, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.view.goBackToDataSinks", "Go back to DataSinks")]
|