@burdenoff/microfe-bigconsole 2026.803.4 → 2026.804.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/components/datasink/ImportDataGuideDialog.js +66 -0
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -0
- package/dist/bigconsole/components/parser/DataSinkSelector.js +129 -106
- package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +183 -144
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/form/FormWidget.js +155 -121
- package/dist/bigconsole/components/widgets/form/FormWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/form/index.js +2 -2
- package/dist/bigconsole/components/widgets/index.js +2 -0
- package/dist/bigconsole/contexts/NavigationContext.js +6 -2
- package/dist/bigconsole/contexts/NavigationContext.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +136 -101
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationContext.js","names":[],"sources":["../../../src/bigconsole/contexts/NavigationContext.tsx"],"sourcesContent":["/**\n * NavigationContext\n *\n * Provides basePath-aware navigation for BigConsole microfrontend.\n * Ensures all internal navigation stays within the /bigconsole route prefix.\n */\n\nimport { createContext, useContext, useCallback, useMemo, forwardRef, type ReactNode } from 'react';\nimport { useNavigate as useRouterNavigate, Link, type NavigateOptions, type LinkProps } from 'react-router';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface NavigationContextValue {\n /** Base path for all routes (e.g., '/bigconsole') */\n basePath: string;\n /** Navigate to a path within the microfrontend */\n navigate: (to: string, options?: NavigateOptions) => void;\n /** Build a full path with basePath prefix */\n buildPath: (path: string) => string;\n}\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst NavigationContext = createContext<NavigationContextValue | null>(null);\n\n// ============================================================================\n// Provider\n// ============================================================================\n\ninterface NavigationProviderProps {\n /** Base path for the microfrontend (e.g., '/bigconsole') */\n basePath: string;\n children: ReactNode;\n}\n\nexport function NavigationProvider({ basePath, children }: NavigationProviderProps) {\n const routerNavigate = useRouterNavigate();\n\n // Normalize basePath (remove trailing slash)\n const normalizedBasePath = useMemo(() => {\n return basePath.endsWith('/') ? basePath.slice(0, -1) : basePath;\n }, [basePath]);\n\n // Build full path with basePath prefix\n const buildPath = useCallback(\n (path: string): string => {\n // If path is empty or just '/', return basePath\n if (!path || path === '/') {\n return normalizedBasePath || '/';\n }\n\n // If path already starts with basePath, return as-is.\n // Guard against false prefix matches (e.g. basePath '/big' matching '/bigconsole/foo')\n // and empty normalizedBasePath (when basePath is '/') which is a prefix of everything.\n if (normalizedBasePath && (path === normalizedBasePath || path.startsWith(normalizedBasePath + '/'))) {\n return path;\n }\n\n // If path starts with '/', it's an absolute path within the microfrontend\n // Prepend basePath\n if (path.startsWith('/')) {\n return `${normalizedBasePath}${path}`;\n }\n\n // Relative path - just prepend basePath with slash\n return `${normalizedBasePath}/${path}`;\n },\n [normalizedBasePath]\n );\n\n // Navigate with basePath support\n const navigate = useCallback(\n (to: string, options?: NavigateOptions) => {\n const fullPath = buildPath(to);\n routerNavigate(fullPath, options);\n },\n [buildPath, routerNavigate]\n );\n\n const value = useMemo(\n () => ({\n basePath: normalizedBasePath,\n navigate,\n buildPath,\n }),\n [normalizedBasePath, navigate, buildPath]\n );\n\n return <NavigationContext.Provider value={value}>{children}</NavigationContext.Provider>;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Hook to access navigation context\n * @throws Error if used outside NavigationProvider\n */\nexport function useNavigation(): NavigationContextValue {\n const context = useContext(NavigationContext);\n if (!context) {\n throw new Error('useNavigation must be used within a NavigationProvider');\n }\n return context;\n}\n\n/**\n * Hook for basePath-aware navigation\n * Returns a navigate function that automatically prepends basePath\n */\nexport function useAppNavigate() {\n const { navigate } = useNavigation();\n return navigate;\n}\n\n/**\n * Hook to build full paths with basePath prefix\n */\nexport function useBuildPath() {\n const { buildPath } = useNavigation();\n return buildPath;\n}\n\n/**\n * Hook to get the current basePath\n */\nexport function useBasePath() {\n const { basePath } = useNavigation();\n return basePath;\n}\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * AppLink - basePath-aware Link component\n * Automatically prepends basePath to the 'to' prop\n */\nexport interface AppLinkProps extends Omit<LinkProps, 'to'> {\n to: string;\n}\n\nexport const AppLink = forwardRef<HTMLAnchorElement, AppLinkProps>(function AppLink({ to, ...props }, ref) {\n const { buildPath } = useNavigation();\n const fullPath = buildPath(to);\n return <Link ref={ref} to={fullPath} {...props} />;\n});\n"],"mappings":";;;;AA2BA,IAAM,IAAoB,EAA6C,KAAK;AAY5E,SAAgB,EAAmB,EAAE,aAAU,eAAqC;CAClF,IAAM,IAAiB,GAAmB,EAGpC,IAAqB,QAClB,EAAS,SAAS,IAAI,GAAG,EAAS,MAAM,GAAG,GAAG,GAAG,GACvD,CAAC,EAAS,CAAC,EAGR,IAAY,GACf,MAEK,CAAC,KAAQ,MAAS,MACb,KAAsB,MAM3B,MAAuB,MAAS,KAAsB,EAAK,WAAW,IAAqB,IAAI,IAC1F,IAKL,EAAK,WAAW,IAAI,GACf,GAAG,IAAqB,MAI1B,GAAG,EAAmB,GAAG,KAElC,CAAC,EAAmB,CACrB,EAGK,IAAW,GACd,GAAY,MAA8B;AAEzC,IADiB,EAAU,EAAG,EACL,EAAQ;IAEnC,CAAC,GAAW,EAAe,CAC5B,EAEK,IAAQ,SACL;EACL,UAAU;EACV;EACA;EACD,GACD;EAAC;EAAoB;EAAU;EAAU,CAC1C;AAED,QAAO,kBAAC,EAAkB,UAAnB;EAAmC;EAAQ;EAAsC,CAAA;;AAW1F,SAAgB,IAAwC;CACtD,IAAM,IAAU,EAAW,EAAkB;AAC7C,KAAI,CAAC,EACH,OAAU,MAAM,yDAAyD;AAE3E,QAAO;;AAOT,SAAgB,IAAiB;CAC/B,IAAM,EAAE,gBAAa,GAAe;AACpC,QAAO;;
|
|
1
|
+
{"version":3,"file":"NavigationContext.js","names":[],"sources":["../../../src/bigconsole/contexts/NavigationContext.tsx"],"sourcesContent":["/**\n * NavigationContext\n *\n * Provides basePath-aware navigation for BigConsole microfrontend.\n * Ensures all internal navigation stays within the /bigconsole route prefix.\n */\n\nimport { createContext, useContext, useCallback, useMemo, forwardRef, type ReactNode } from 'react';\nimport { useNavigate as useRouterNavigate, Link, type NavigateOptions, type LinkProps } from 'react-router';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface NavigationContextValue {\n /** Base path for all routes (e.g., '/bigconsole') */\n basePath: string;\n /** Navigate to a path within the microfrontend */\n navigate: (to: string, options?: NavigateOptions) => void;\n /** Build a full path with basePath prefix */\n buildPath: (path: string) => string;\n}\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst NavigationContext = createContext<NavigationContextValue | null>(null);\n\n// ============================================================================\n// Provider\n// ============================================================================\n\ninterface NavigationProviderProps {\n /** Base path for the microfrontend (e.g., '/bigconsole') */\n basePath: string;\n children: ReactNode;\n}\n\nexport function NavigationProvider({ basePath, children }: NavigationProviderProps) {\n const routerNavigate = useRouterNavigate();\n\n // Normalize basePath (remove trailing slash)\n const normalizedBasePath = useMemo(() => {\n return basePath.endsWith('/') ? basePath.slice(0, -1) : basePath;\n }, [basePath]);\n\n // Build full path with basePath prefix\n const buildPath = useCallback(\n (path: string): string => {\n // If path is empty or just '/', return basePath\n if (!path || path === '/') {\n return normalizedBasePath || '/';\n }\n\n // If path already starts with basePath, return as-is.\n // Guard against false prefix matches (e.g. basePath '/big' matching '/bigconsole/foo')\n // and empty normalizedBasePath (when basePath is '/') which is a prefix of everything.\n if (normalizedBasePath && (path === normalizedBasePath || path.startsWith(normalizedBasePath + '/'))) {\n return path;\n }\n\n // If path starts with '/', it's an absolute path within the microfrontend\n // Prepend basePath\n if (path.startsWith('/')) {\n return `${normalizedBasePath}${path}`;\n }\n\n // Relative path - just prepend basePath with slash\n return `${normalizedBasePath}/${path}`;\n },\n [normalizedBasePath]\n );\n\n // Navigate with basePath support\n const navigate = useCallback(\n (to: string, options?: NavigateOptions) => {\n const fullPath = buildPath(to);\n routerNavigate(fullPath, options);\n },\n [buildPath, routerNavigate]\n );\n\n const value = useMemo(\n () => ({\n basePath: normalizedBasePath,\n navigate,\n buildPath,\n }),\n [normalizedBasePath, navigate, buildPath]\n );\n\n return <NavigationContext.Provider value={value}>{children}</NavigationContext.Provider>;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Hook to access navigation context\n * @throws Error if used outside NavigationProvider\n */\nexport function useNavigation(): NavigationContextValue {\n const context = useContext(NavigationContext);\n if (!context) {\n throw new Error('useNavigation must be used within a NavigationProvider');\n }\n return context;\n}\n\n/**\n * Hook for basePath-aware navigation\n * Returns a navigate function that automatically prepends basePath\n */\nexport function useAppNavigate() {\n const { navigate } = useNavigation();\n return navigate;\n}\n\n/**\n * Hook to build full paths with basePath prefix\n */\nexport function useBuildPath() {\n const { buildPath } = useNavigation();\n return buildPath;\n}\n\n/**\n * Hook to get the current basePath\n */\nexport function useBasePath() {\n const { basePath } = useNavigation();\n return basePath;\n}\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * AppLink - basePath-aware Link component\n * Automatically prepends basePath to the 'to' prop\n */\nexport interface AppLinkProps extends Omit<LinkProps, 'to'> {\n to: string;\n}\n\nexport const AppLink = forwardRef<HTMLAnchorElement, AppLinkProps>(function AppLink({ to, ...props }, ref) {\n const { buildPath } = useNavigation();\n const fullPath = buildPath(to);\n return <Link ref={ref} to={fullPath} {...props} />;\n});\n"],"mappings":";;;;AA2BA,IAAM,IAAoB,EAA6C,KAAK;AAY5E,SAAgB,EAAmB,EAAE,aAAU,eAAqC;CAClF,IAAM,IAAiB,GAAmB,EAGpC,IAAqB,QAClB,EAAS,SAAS,IAAI,GAAG,EAAS,MAAM,GAAG,GAAG,GAAG,GACvD,CAAC,EAAS,CAAC,EAGR,IAAY,GACf,MAEK,CAAC,KAAQ,MAAS,MACb,KAAsB,MAM3B,MAAuB,MAAS,KAAsB,EAAK,WAAW,IAAqB,IAAI,IAC1F,IAKL,EAAK,WAAW,IAAI,GACf,GAAG,IAAqB,MAI1B,GAAG,EAAmB,GAAG,KAElC,CAAC,EAAmB,CACrB,EAGK,IAAW,GACd,GAAY,MAA8B;AAEzC,IADiB,EAAU,EAAG,EACL,EAAQ;IAEnC,CAAC,GAAW,EAAe,CAC5B,EAEK,IAAQ,SACL;EACL,UAAU;EACV;EACA;EACD,GACD;EAAC;EAAoB;EAAU;EAAU,CAC1C;AAED,QAAO,kBAAC,EAAkB,UAAnB;EAAmC;EAAQ;EAAsC,CAAA;;AAW1F,SAAgB,IAAwC;CACtD,IAAM,IAAU,EAAW,EAAkB;AAC7C,KAAI,CAAC,EACH,OAAU,MAAM,yDAAyD;AAE3E,QAAO;;AAOT,SAAgB,IAAiB;CAC/B,IAAM,EAAE,gBAAa,GAAe;AACpC,QAAO;;AAMT,SAAgB,IAAe;CAC7B,IAAM,EAAE,iBAAc,GAAe;AACrC,QAAO;;AAuBT,IAAa,IAAU,EAA4C,SAAiB,EAAE,OAAI,GAAG,KAAS,GAAK;CACzG,IAAM,EAAE,iBAAc,GAAe;AAErC,QAAO,kBAAC,GAAD;EAAW;EAAK,IADN,EAAU,EAAG;EACO,GAAI;EAAS,CAAA;EAClD"}
|
|
@@ -1,47 +1,49 @@
|
|
|
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 n from "../
|
|
5
|
-
import ee from "../
|
|
4
|
+
import { newWorkflowPath as n } from "../BigConsoleRoutes.js";
|
|
5
|
+
import ee from "../components/datasink/DataSinkTableViewer.js";
|
|
6
|
+
import te from "../hooks/useDataSinkOperations.js";
|
|
6
7
|
import r from "../components/datasink/DataSinkStatusBadge.js";
|
|
7
|
-
import { isNative as i, nativeConfirm as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
8
|
+
import { isNative as i, nativeConfirm as ne, nativeImpact as a, nativeNotify as o } from "../../utils/nativeBridge.js";
|
|
9
|
+
import re from "../hooks/useDataSinkSubscription.js";
|
|
10
|
+
import ie from "../components/datasink/DataSinkDataViewer.js";
|
|
11
|
+
import ae from "../components/datasink/LinkedWorkflowsPanel.js";
|
|
12
|
+
import oe from "../components/datasink/LinkedParsersPanel.js";
|
|
13
|
+
import se from "../components/datasink/WorkflowStatusPanel.js";
|
|
14
|
+
import ce from "../components/datasink/ExportDataSinkDialog.js";
|
|
15
|
+
import le from "../components/datasink/ImportDataGuideDialog.js";
|
|
16
|
+
import { memo as s, useCallback as c, useEffect as l, useState as u } from "react";
|
|
17
|
+
import { useParams as ue } from "react-router";
|
|
18
|
+
import { AlertCircle as de, ArrowLeft as d, Code as fe, Database as f, Download as pe, Edit as me, Eye as he, EyeOff as ge, Grid3X3 as p, Loader2 as m, RefreshCw as _e, Trash2 as ve, Upload as h } from "lucide-react";
|
|
19
|
+
import { Button as g, Card as _, CardContent as v, CardHeader as y, CardTitle as b, GlassCard as ye, IllustratedEmptyState as be, NextSteps as xe, PagePurpose as Se } from "@burdenoff/fe-libs/ui";
|
|
18
20
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
19
21
|
import { formatDistanceToNow as w } from "date-fns";
|
|
20
22
|
//#region src/bigconsole/pages/DataSinkViewPage.tsx
|
|
21
23
|
var T = s(function() {
|
|
22
|
-
let { dataSinkId: s } =
|
|
23
|
-
|
|
24
|
+
let { dataSinkId: s } = ue(), T = t(), [E, D] = u(!1), [O, k] = u(!1), [A, j] = u(!1), [Ce, M] = u(!1), [we, N] = u(!1), [P, Te] = u(null), [F, I] = u(!1), [L, R] = u("table"), [z, Ee] = u(100), [B, De] = u(0), [V, Oe] = u(null), [ke, Ae] = u(!1), H = e((e) => s ? e.dataSinks.get(s) : void 0), { loading: je, error: U, fetchDataSink: W, getDataSinkData: G, refreshDataSink: K, deleteDataSink: q } = te({ skipFetch: !0 });
|
|
25
|
+
re({
|
|
24
26
|
dataSinkId: s,
|
|
25
27
|
enabled: !!s
|
|
26
|
-
}),
|
|
27
|
-
s &&
|
|
28
|
-
}, [s,
|
|
29
|
-
let
|
|
28
|
+
}), l(() => {
|
|
29
|
+
s && W(s);
|
|
30
|
+
}, [s, W]);
|
|
31
|
+
let J = c(() => {
|
|
30
32
|
T("/datasinks");
|
|
31
|
-
}, [T]),
|
|
33
|
+
}, [T]), Me = c(() => {
|
|
32
34
|
T(`/datasinks/${s}/edit`);
|
|
33
|
-
}, [T, s]),
|
|
35
|
+
}, [T, s]), Y = c(async () => {
|
|
34
36
|
if (s) {
|
|
35
37
|
k(!0);
|
|
36
38
|
try {
|
|
37
|
-
await
|
|
39
|
+
await K({ id: s });
|
|
38
40
|
} catch {} finally {
|
|
39
41
|
k(!1);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
}, [s,
|
|
44
|
+
}, [s, K]), Ne = c(async () => {
|
|
43
45
|
if (!s) return;
|
|
44
|
-
let e = await
|
|
46
|
+
let e = await ne({
|
|
45
47
|
title: "Delete DataSink?",
|
|
46
48
|
message: "Are you sure you want to delete this DataSink?",
|
|
47
49
|
okButtonTitle: "Delete",
|
|
@@ -50,7 +52,7 @@ var T = s(function() {
|
|
|
50
52
|
if (e === null ? window.confirm("Are you sure you want to delete this DataSink?") : e) {
|
|
51
53
|
a("medium"), j(!0);
|
|
52
54
|
try {
|
|
53
|
-
await
|
|
55
|
+
await q(s), i() && o("success"), T("/datasinks");
|
|
54
56
|
} catch {
|
|
55
57
|
i() && o("error");
|
|
56
58
|
} finally {
|
|
@@ -59,67 +61,73 @@ var T = s(function() {
|
|
|
59
61
|
}
|
|
60
62
|
}, [
|
|
61
63
|
s,
|
|
62
|
-
|
|
64
|
+
q,
|
|
63
65
|
T
|
|
64
|
-
]),
|
|
66
|
+
]), X = c(async (e, t) => {
|
|
65
67
|
if (s) {
|
|
66
68
|
I(!0);
|
|
67
69
|
try {
|
|
68
|
-
let n = await
|
|
70
|
+
let n = await G({ id: s }, {
|
|
69
71
|
limit: t,
|
|
70
72
|
offset: e
|
|
71
73
|
});
|
|
72
|
-
n && (
|
|
74
|
+
n && (Te(n.raw || {}), Oe(typeof n.totalCount == "number" ? n.totalCount : null), Ae(!!n.hasMore), De(e));
|
|
73
75
|
} catch {} finally {
|
|
74
76
|
I(!1);
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
|
-
}, [s,
|
|
79
|
+
}, [s, G]), Z = c(async () => {
|
|
78
80
|
if (s) {
|
|
79
81
|
if (E) {
|
|
80
82
|
D(!1);
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
|
-
await
|
|
85
|
+
await X(0, z), D(!0);
|
|
84
86
|
}
|
|
85
87
|
}, [
|
|
86
88
|
s,
|
|
87
89
|
E,
|
|
88
|
-
|
|
90
|
+
X,
|
|
89
91
|
z
|
|
90
|
-
]),
|
|
91
|
-
|
|
92
|
-
}, [
|
|
92
|
+
]), Pe = c((e) => {
|
|
93
|
+
Ee(e), X(0, e);
|
|
94
|
+
}, [X]), Q = c(() => {
|
|
95
|
+
M(!0);
|
|
96
|
+
}, []), Fe = c(() => {
|
|
97
|
+
M(!1);
|
|
98
|
+
}, []), $ = c(() => {
|
|
93
99
|
N(!0);
|
|
94
|
-
}, []),
|
|
100
|
+
}, []), Ie = c(() => {
|
|
95
101
|
N(!1);
|
|
96
|
-
}, [])
|
|
97
|
-
|
|
102
|
+
}, []), Le = c(() => {
|
|
103
|
+
N(!1), T(n());
|
|
104
|
+
}, [T]);
|
|
105
|
+
return je && !H ? /* @__PURE__ */ S("div", {
|
|
98
106
|
className: "flex items-center justify-center min-h-[400px]",
|
|
99
107
|
children: /* @__PURE__ */ S(m, { className: "w-8 h-8 text-text-secondary animate-spin" })
|
|
100
|
-
}) :
|
|
108
|
+
}) : U ? /* @__PURE__ */ S("div", {
|
|
101
109
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
102
110
|
children: /* @__PURE__ */ C("div", {
|
|
103
111
|
className: "text-center",
|
|
104
112
|
children: [
|
|
105
|
-
/* @__PURE__ */ S(
|
|
113
|
+
/* @__PURE__ */ S(de, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
|
|
106
114
|
/* @__PURE__ */ S("p", {
|
|
107
115
|
className: "text-status-error-text text-body-sm font-medium mb-2",
|
|
108
116
|
children: "Failed to load DataSink"
|
|
109
117
|
}),
|
|
110
118
|
/* @__PURE__ */ S("p", {
|
|
111
119
|
className: "text-text-tertiary text-body-xs mb-6",
|
|
112
|
-
children:
|
|
120
|
+
children: U.message
|
|
113
121
|
}),
|
|
114
122
|
/* @__PURE__ */ C(g, {
|
|
115
|
-
onClick:
|
|
123
|
+
onClick: J,
|
|
116
124
|
variant: "ghost",
|
|
117
125
|
size: "sm",
|
|
118
|
-
children: [/* @__PURE__ */ S(
|
|
126
|
+
children: [/* @__PURE__ */ S(d, { className: "w-4 h-4 mr-2" }), "Go back"]
|
|
119
127
|
})
|
|
120
128
|
]
|
|
121
129
|
})
|
|
122
|
-
}) :
|
|
130
|
+
}) : H ? /* @__PURE__ */ C("div", {
|
|
123
131
|
className: "p-card-padding space-y-6",
|
|
124
132
|
children: [
|
|
125
133
|
/* @__PURE__ */ C("div", {
|
|
@@ -128,75 +136,81 @@ var T = s(function() {
|
|
|
128
136
|
className: "flex-1",
|
|
129
137
|
children: [
|
|
130
138
|
/* @__PURE__ */ C(g, {
|
|
131
|
-
onClick:
|
|
139
|
+
onClick: J,
|
|
132
140
|
variant: "ghost",
|
|
133
141
|
size: "sm",
|
|
134
142
|
className: "mb-4",
|
|
135
|
-
children: [/* @__PURE__ */ S(
|
|
143
|
+
children: [/* @__PURE__ */ S(d, { className: "w-4 h-4 mr-2" }), "Back to DataSinks"]
|
|
136
144
|
}),
|
|
137
145
|
/* @__PURE__ */ C("div", {
|
|
138
146
|
className: "flex items-center gap-2 flex-wrap",
|
|
139
147
|
children: [/* @__PURE__ */ S("h1", {
|
|
140
148
|
className: "text-heading-h1 font-bold text-text-primary",
|
|
141
|
-
children:
|
|
142
|
-
}), /* @__PURE__ */ S(r, { status:
|
|
149
|
+
children: H.name || "Untitled"
|
|
150
|
+
}), /* @__PURE__ */ S(r, { status: H.status })]
|
|
143
151
|
}),
|
|
144
152
|
/* @__PURE__ */ S("p", {
|
|
145
153
|
className: "text-body-sm text-text-tertiary font-mono mt-1",
|
|
146
|
-
children:
|
|
154
|
+
children: H.key
|
|
147
155
|
}),
|
|
148
|
-
|
|
156
|
+
H.description && /* @__PURE__ */ S("p", {
|
|
149
157
|
className: "text-body-sm text-text-secondary mt-2",
|
|
150
|
-
children:
|
|
158
|
+
children: H.description
|
|
151
159
|
})
|
|
152
160
|
]
|
|
153
161
|
}), /* @__PURE__ */ C("div", {
|
|
154
162
|
className: "flex items-center gap-2 flex-wrap",
|
|
155
163
|
children: [
|
|
156
164
|
/* @__PURE__ */ C(g, {
|
|
157
|
-
onClick:
|
|
165
|
+
onClick: Y,
|
|
158
166
|
disabled: O,
|
|
159
167
|
variant: "secondary",
|
|
160
168
|
size: "default",
|
|
161
|
-
children: [/* @__PURE__ */ S(
|
|
169
|
+
children: [/* @__PURE__ */ S(_e, { className: `w-4 h-4 mr-2 ${O ? "animate-spin" : ""}` }), O ? "Refreshing..." : "Refresh"]
|
|
162
170
|
}),
|
|
163
171
|
/* @__PURE__ */ C(g, {
|
|
164
172
|
onClick: $,
|
|
165
173
|
variant: "secondary",
|
|
166
174
|
size: "default",
|
|
167
|
-
children: [/* @__PURE__ */ S(
|
|
175
|
+
children: [/* @__PURE__ */ S(h, { className: "w-4 h-4 mr-2" }), "Import Data"]
|
|
168
176
|
}),
|
|
169
177
|
/* @__PURE__ */ C(g, {
|
|
170
|
-
onClick:
|
|
178
|
+
onClick: Q,
|
|
171
179
|
variant: "secondary",
|
|
172
180
|
size: "default",
|
|
173
|
-
children: [/* @__PURE__ */ S(pe, { className: "w-4 h-4 mr-2" }), "
|
|
181
|
+
children: [/* @__PURE__ */ S(pe, { className: "w-4 h-4 mr-2" }), "Export"]
|
|
174
182
|
}),
|
|
175
183
|
/* @__PURE__ */ C(g, {
|
|
176
|
-
onClick:
|
|
184
|
+
onClick: Me,
|
|
185
|
+
variant: "secondary",
|
|
186
|
+
size: "default",
|
|
187
|
+
children: [/* @__PURE__ */ S(me, { className: "w-4 h-4 mr-2" }), "Edit"]
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ C(g, {
|
|
190
|
+
onClick: Ne,
|
|
177
191
|
disabled: A,
|
|
178
192
|
variant: "destructive",
|
|
179
193
|
size: "default",
|
|
180
|
-
children: [/* @__PURE__ */ S(
|
|
194
|
+
children: [/* @__PURE__ */ S(ve, { className: "w-4 h-4 mr-2" }), A ? "Deleting..." : "Delete"]
|
|
181
195
|
})
|
|
182
196
|
]
|
|
183
197
|
})]
|
|
184
198
|
}),
|
|
185
|
-
/* @__PURE__ */ S(
|
|
186
|
-
/* @__PURE__ */ S(
|
|
199
|
+
/* @__PURE__ */ S(Se, { 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." }),
|
|
200
|
+
/* @__PURE__ */ S(xe, {
|
|
187
201
|
storageKey: "bigconsole-datasink-view",
|
|
188
202
|
steps: [
|
|
189
203
|
{
|
|
190
204
|
id: "preview",
|
|
191
205
|
label: "Preview the data",
|
|
192
206
|
description: "Open the cached rows to confirm the sink holds what you expect.",
|
|
193
|
-
onClick:
|
|
207
|
+
onClick: Z
|
|
194
208
|
},
|
|
195
209
|
{
|
|
196
210
|
id: "refresh",
|
|
197
211
|
label: "Refresh from source",
|
|
198
212
|
description: "Re-run the linked workflow to pull the latest data.",
|
|
199
|
-
onClick:
|
|
213
|
+
onClick: Y
|
|
200
214
|
},
|
|
201
215
|
{
|
|
202
216
|
id: "build-dashboard",
|
|
@@ -208,14 +222,14 @@ var T = s(function() {
|
|
|
208
222
|
id: "export",
|
|
209
223
|
label: "Export the data",
|
|
210
224
|
description: "Download the contents for use elsewhere.",
|
|
211
|
-
onClick:
|
|
225
|
+
onClick: Q
|
|
212
226
|
}
|
|
213
227
|
]
|
|
214
228
|
}),
|
|
215
229
|
/* @__PURE__ */ C("div", {
|
|
216
230
|
className: "grid gap-6 md:grid-cols-2",
|
|
217
231
|
children: [
|
|
218
|
-
/* @__PURE__ */ C(
|
|
232
|
+
/* @__PURE__ */ C(ye, {
|
|
219
233
|
treatment: "glass",
|
|
220
234
|
glow: !0,
|
|
221
235
|
children: [/* @__PURE__ */ S(y, { children: /* @__PURE__ */ S(b, { children: "Details" }) }), /* @__PURE__ */ S(v, { children: /* @__PURE__ */ C("dl", {
|
|
@@ -226,7 +240,7 @@ var T = s(function() {
|
|
|
226
240
|
children: [/* @__PURE__ */ S("dt", {
|
|
227
241
|
className: "text-text-secondary",
|
|
228
242
|
children: "Status"
|
|
229
|
-
}), /* @__PURE__ */ S("dd", { children: /* @__PURE__ */ S(r, { status:
|
|
243
|
+
}), /* @__PURE__ */ S("dd", { children: /* @__PURE__ */ S(r, { status: H.status }) })]
|
|
230
244
|
}),
|
|
231
245
|
/* @__PURE__ */ C("div", {
|
|
232
246
|
className: "flex justify-between items-center",
|
|
@@ -235,7 +249,7 @@ var T = s(function() {
|
|
|
235
249
|
children: "Cache TTL"
|
|
236
250
|
}), /* @__PURE__ */ S("dd", {
|
|
237
251
|
className: "text-text-primary font-medium",
|
|
238
|
-
children:
|
|
252
|
+
children: H.ttl ? `${H.ttl}s` : "None"
|
|
239
253
|
})]
|
|
240
254
|
}),
|
|
241
255
|
/* @__PURE__ */ C("div", {
|
|
@@ -245,7 +259,7 @@ var T = s(function() {
|
|
|
245
259
|
children: "Refresh Type"
|
|
246
260
|
}), /* @__PURE__ */ S("dd", {
|
|
247
261
|
className: "text-text-primary font-medium capitalize",
|
|
248
|
-
children:
|
|
262
|
+
children: H.refresh?.type || "Manual"
|
|
249
263
|
})]
|
|
250
264
|
}),
|
|
251
265
|
/* @__PURE__ */ C("div", {
|
|
@@ -255,7 +269,7 @@ var T = s(function() {
|
|
|
255
269
|
children: "Size"
|
|
256
270
|
}), /* @__PURE__ */ S("dd", {
|
|
257
271
|
className: "text-text-primary font-medium",
|
|
258
|
-
children:
|
|
272
|
+
children: H.sizeBytes ? `${(H.sizeBytes / 1024).toFixed(2)} KB` : "0 KB"
|
|
259
273
|
})]
|
|
260
274
|
}),
|
|
261
275
|
/* @__PURE__ */ C("div", {
|
|
@@ -265,7 +279,7 @@ var T = s(function() {
|
|
|
265
279
|
children: "Version"
|
|
266
280
|
}), /* @__PURE__ */ S("dd", {
|
|
267
281
|
className: "text-text-primary font-medium",
|
|
268
|
-
children:
|
|
282
|
+
children: H.version || 1
|
|
269
283
|
})]
|
|
270
284
|
}),
|
|
271
285
|
/* @__PURE__ */ C("div", {
|
|
@@ -275,7 +289,7 @@ var T = s(function() {
|
|
|
275
289
|
children: "Last Refreshed"
|
|
276
290
|
}), /* @__PURE__ */ S("dd", {
|
|
277
291
|
className: "text-text-primary font-medium",
|
|
278
|
-
children:
|
|
292
|
+
children: H.lastRefreshedAt ? w(new Date(H.lastRefreshedAt), { addSuffix: !0 }) : "Never"
|
|
279
293
|
})]
|
|
280
294
|
}),
|
|
281
295
|
/* @__PURE__ */ C("div", {
|
|
@@ -285,24 +299,24 @@ var T = s(function() {
|
|
|
285
299
|
children: "Created"
|
|
286
300
|
}), /* @__PURE__ */ S("dd", {
|
|
287
301
|
className: "text-text-primary font-medium",
|
|
288
|
-
children: w(new Date(
|
|
302
|
+
children: w(new Date(H.createdAt), { addSuffix: !0 })
|
|
289
303
|
})]
|
|
290
304
|
})
|
|
291
305
|
]
|
|
292
306
|
}) })]
|
|
293
307
|
}),
|
|
294
|
-
|
|
295
|
-
workflowId:
|
|
296
|
-
executionId:
|
|
297
|
-
lastRefreshedAt:
|
|
298
|
-
setupState:
|
|
299
|
-
status:
|
|
300
|
-
onRerunWorkflow:
|
|
308
|
+
H.fluidGridsWorkflowId && /* @__PURE__ */ S(se, {
|
|
309
|
+
workflowId: H.fluidGridsWorkflowId,
|
|
310
|
+
executionId: H.fluidGridsWorkflowExecutionId || void 0,
|
|
311
|
+
lastRefreshedAt: H.lastRefreshedAt || void 0,
|
|
312
|
+
setupState: H.setupState,
|
|
313
|
+
status: H.status,
|
|
314
|
+
onRerunWorkflow: Y,
|
|
301
315
|
disabled: O,
|
|
302
316
|
isRerunning: O
|
|
303
317
|
}),
|
|
304
|
-
/* @__PURE__ */ S(
|
|
305
|
-
/* @__PURE__ */ S(
|
|
318
|
+
/* @__PURE__ */ S(ae, { workflowLinks: H.workflowLinks }),
|
|
319
|
+
/* @__PURE__ */ S(oe, { dataSinkKey: H.key })
|
|
306
320
|
]
|
|
307
321
|
}),
|
|
308
322
|
/* @__PURE__ */ C(_, { children: [
|
|
@@ -310,7 +324,7 @@ var T = s(function() {
|
|
|
310
324
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
311
325
|
children: [/* @__PURE__ */ C(b, {
|
|
312
326
|
className: "flex items-center gap-2",
|
|
313
|
-
children: [/* @__PURE__ */ S(
|
|
327
|
+
children: [/* @__PURE__ */ S(f, { className: "w-4 h-4 text-text-secondary" }), "Data Preview"]
|
|
314
328
|
}), /* @__PURE__ */ C("div", {
|
|
315
329
|
className: "flex items-center gap-2",
|
|
316
330
|
children: [E && /* @__PURE__ */ C("div", {
|
|
@@ -326,21 +340,21 @@ var T = s(function() {
|
|
|
326
340
|
onClick: () => R("json"),
|
|
327
341
|
className: `p-1.5 ${L === "json" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
|
|
328
342
|
title: "JSON view",
|
|
329
|
-
children: /* @__PURE__ */ S(
|
|
343
|
+
children: /* @__PURE__ */ S(fe, { className: "w-4 h-4" })
|
|
330
344
|
})]
|
|
331
345
|
}), /* @__PURE__ */ S(g, {
|
|
332
|
-
onClick:
|
|
346
|
+
onClick: Z,
|
|
333
347
|
disabled: F,
|
|
334
348
|
variant: E ? "secondary" : "default",
|
|
335
349
|
size: "sm",
|
|
336
|
-
children: F ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(m, { className: "w-4 h-4 mr-2 animate-spin" }), "Loading..."] }) : E ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
350
|
+
children: F ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(m, { className: "w-4 h-4 mr-2 animate-spin" }), "Loading..."] }) : E ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(ge, { className: "w-4 h-4 mr-2" }), "Hide Data"] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(he, { className: "w-4 h-4 mr-2" }), "Show Data"] })
|
|
337
351
|
})]
|
|
338
352
|
})]
|
|
339
353
|
}),
|
|
340
|
-
E && P && /* @__PURE__ */ C(v, { children: [S(L === "table" ?
|
|
354
|
+
E && P && /* @__PURE__ */ C(v, { children: [S(L === "table" ? ee : ie, {
|
|
341
355
|
data: P,
|
|
342
356
|
maxHeight: "400px"
|
|
343
|
-
}),
|
|
357
|
+
}), V !== null && /* @__PURE__ */ C("div", {
|
|
344
358
|
className: "flex items-center justify-between gap-4 mt-4 pt-4 border-t border-border-subtle",
|
|
345
359
|
children: [/* @__PURE__ */ C("div", {
|
|
346
360
|
className: "flex items-center gap-2 text-body-sm text-text-secondary",
|
|
@@ -348,7 +362,7 @@ var T = s(function() {
|
|
|
348
362
|
"aria-label": "Rows per page",
|
|
349
363
|
className: "bg-bg-canvas border border-border-default rounded px-2 py-0.5 text-text-primary",
|
|
350
364
|
value: z,
|
|
351
|
-
onChange: (e) =>
|
|
365
|
+
onChange: (e) => Pe(Number(e.target.value)),
|
|
352
366
|
children: [
|
|
353
367
|
100,
|
|
354
368
|
500,
|
|
@@ -361,50 +375,71 @@ var T = s(function() {
|
|
|
361
375
|
}), /* @__PURE__ */ C("div", {
|
|
362
376
|
className: "flex items-center gap-4 text-body-sm text-text-secondary",
|
|
363
377
|
children: [
|
|
364
|
-
/* @__PURE__ */ S("span", { children:
|
|
378
|
+
/* @__PURE__ */ S("span", { children: V === 0 ? "0 rows" : `${B + 1}–${Math.min(B + z, V)} of ${V}` }),
|
|
365
379
|
/* @__PURE__ */ S(g, {
|
|
366
380
|
variant: "secondary",
|
|
367
381
|
size: "sm",
|
|
368
382
|
disabled: B === 0 || F,
|
|
369
|
-
onClick: () => void
|
|
383
|
+
onClick: () => void X(Math.max(0, B - z), z),
|
|
370
384
|
children: "Previous"
|
|
371
385
|
}),
|
|
372
386
|
/* @__PURE__ */ S(g, {
|
|
373
387
|
variant: "secondary",
|
|
374
388
|
size: "sm",
|
|
375
|
-
disabled: !
|
|
376
|
-
onClick: () => void
|
|
389
|
+
disabled: !ke || F,
|
|
390
|
+
onClick: () => void X(B + z, z),
|
|
377
391
|
children: "Next"
|
|
378
392
|
})
|
|
379
393
|
]
|
|
380
394
|
})]
|
|
381
395
|
})] }),
|
|
382
|
-
!E && /* @__PURE__ */ C(v, {
|
|
396
|
+
!E && (H.data && Object.keys(H.data).length > 0 ? /* @__PURE__ */ C(v, {
|
|
383
397
|
className: "text-center p-8",
|
|
384
|
-
children: [/* @__PURE__ */ S(
|
|
398
|
+
children: [/* @__PURE__ */ S(f, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }), /* @__PURE__ */ S("p", {
|
|
385
399
|
className: "text-body-sm text-text-secondary",
|
|
386
400
|
children: "Click \"Show Data\" to preview the cached data."
|
|
387
401
|
})]
|
|
388
|
-
})
|
|
402
|
+
}) : /* @__PURE__ */ C(v, {
|
|
403
|
+
className: "text-center p-8",
|
|
404
|
+
children: [
|
|
405
|
+
/* @__PURE__ */ S(f, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }),
|
|
406
|
+
/* @__PURE__ */ S("p", {
|
|
407
|
+
className: "text-body-sm text-text-secondary mb-4",
|
|
408
|
+
children: "This data sink has no data yet. Import data by building a workflow."
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ C(g, {
|
|
411
|
+
onClick: $,
|
|
412
|
+
variant: "default",
|
|
413
|
+
size: "sm",
|
|
414
|
+
children: [/* @__PURE__ */ S(h, { className: "w-4 h-4 mr-2" }), "Import Data"]
|
|
415
|
+
})
|
|
416
|
+
]
|
|
417
|
+
}))
|
|
389
418
|
] }),
|
|
390
|
-
/* @__PURE__ */ S(
|
|
391
|
-
isOpen:
|
|
419
|
+
/* @__PURE__ */ S(ce, {
|
|
420
|
+
isOpen: Ce,
|
|
392
421
|
dataSinkId: s || null,
|
|
393
|
-
dataSinkName:
|
|
394
|
-
onClose:
|
|
422
|
+
dataSinkName: H.name || H.key,
|
|
423
|
+
onClose: Fe
|
|
424
|
+
}),
|
|
425
|
+
/* @__PURE__ */ S(le, {
|
|
426
|
+
isOpen: we,
|
|
427
|
+
dataSinkName: H.name || H.key,
|
|
428
|
+
onClose: Ie,
|
|
429
|
+
onGoToWorkflows: Le
|
|
395
430
|
})
|
|
396
431
|
]
|
|
397
432
|
}) : /* @__PURE__ */ S("div", {
|
|
398
433
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
399
|
-
children: /* @__PURE__ */ S(
|
|
434
|
+
children: /* @__PURE__ */ S(be, {
|
|
400
435
|
illustration: "empty-data",
|
|
401
436
|
title: "DataSink not found",
|
|
402
437
|
description: "The DataSink you're looking for doesn't exist or has been deleted.",
|
|
403
438
|
action: /* @__PURE__ */ C(g, {
|
|
404
|
-
onClick:
|
|
439
|
+
onClick: J,
|
|
405
440
|
variant: "default",
|
|
406
441
|
size: "default",
|
|
407
|
-
children: [/* @__PURE__ */ S(
|
|
442
|
+
children: [/* @__PURE__ */ S(d, { className: "w-4 h-4 mr-2" }), "Go back to DataSinks"]
|
|
408
443
|
})
|
|
409
444
|
})
|
|
410
445
|
});
|