@burdenoff/microfe-bigconsole 2026.1119.7 → 2026.1119.9
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/dashboard/ExportDashboardDialog.js +129 -117
- package/dist/bigconsole/components/embed/widgets/ChartEmbed.js +70 -66
- package/dist/bigconsole/components/insights/GeneratedFormattingReview.d.ts +21 -0
- package/dist/bigconsole/components/insights/GeneratedFormattingReview.js +90 -44
- package/dist/bigconsole/components/parser/ParserCard.d.ts +3 -1
- package/dist/bigconsole/components/parser/ParserCard.js +125 -120
- package/dist/bigconsole/components/parser/ParserScopeBadge.d.ts +6 -0
- package/dist/bigconsole/components/parser/ParserScopeBadge.js +23 -0
- package/dist/bigconsole/components/widgets/chart/ChartWidget.js +1 -0
- package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +5 -1
- package/dist/bigconsole/components/widgets/chart/charts/AreaChart.js +4 -1
- package/dist/bigconsole/components/widgets/chart/charts/BarChart.js +53 -45
- package/dist/bigconsole/components/widgets/chart/charts/ComboChart.js +5 -1
- package/dist/bigconsole/components/widgets/chart/charts/LineChart.js +4 -1
- package/dist/bigconsole/components/widgets/chart/charts/referenceElements.d.ts +13 -11
- package/dist/bigconsole/components/widgets/chart/charts/referenceElements.js +58 -29
- package/dist/bigconsole/components/widgets/chart/charts/types.d.ts +8 -1
- package/dist/bigconsole/components/widgets/chart/referenceLineDraft.js +26 -23
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.d.ts +41 -0
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.js +80 -44
- package/dist/bigconsole/hooks/useExportDashboard.d.ts +14 -2
- package/dist/bigconsole/hooks/useExportDashboard.js +45 -41
- package/dist/bigconsole/hooks/useParserOperations.d.ts +6 -0
- package/dist/bigconsole/hooks/useParserOperations.js +64 -65
- package/dist/bigconsole/pages/DataParsersPage.js +201 -172
- package/dist/bigconsole/pages/InsightsPage.js +458 -451
- package/dist/bigconsole/store/parserScope.js +9 -6
- package/dist/bigconsole/types/index.d.ts +16 -0
- package/dist/bigconsole/utils/parserScopeFilter.d.ts +14 -0
- package/dist/bigconsole/utils/parserScopeFilter.js +25 -0
- package/dist/bigconsole/utils/pipelineExecutionTimeline.d.ts +13 -1
- package/dist/bigconsole/utils/pipelineExecutionTimeline.js +26 -3
- package/dist/generated/global-operations.d.ts +45 -6
- package/dist/generated/global-types.d.ts +5839 -804
- package/dist/generated/wspace-operations.d.ts +48 -1
- package/dist/generated/wspace-operations.js +86 -7
- package/dist/generated/wspace-types.d.ts +1339 -6
- package/package.json +1 -1
|
@@ -4,43 +4,47 @@ import "../context/index.js";
|
|
|
4
4
|
import { useCallback as n, useLayoutEffect as r, useRef as i, useState as a } from "react";
|
|
5
5
|
import { useApolloClient as o } from "@apollo/client/react";
|
|
6
6
|
// src/bigconsole/hooks/useExportDashboard.ts
|
|
7
|
-
function s(e
|
|
7
|
+
function s(e) {
|
|
8
|
+
return {
|
|
9
|
+
includeDataSourceRefs: e.includeDataSourceRefs ?? !1,
|
|
10
|
+
includeWebhookMappings: e.includeWebhookMappings ?? !1,
|
|
11
|
+
includeExportedAt: e.includeExportedAt ?? !0,
|
|
12
|
+
prettyPrint: e.prettyPrint ?? !0
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function c(e, t) {
|
|
8
16
|
let n = new Blob([e], { type: "application/json" }), r = URL.createObjectURL(n), i = document.createElement("a");
|
|
9
17
|
i.href = r, i.download = t, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
|
|
10
18
|
}
|
|
11
|
-
function
|
|
19
|
+
function l(e) {
|
|
12
20
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").substring(0, 50);
|
|
13
21
|
}
|
|
14
|
-
function
|
|
15
|
-
let [
|
|
16
|
-
r(() => (
|
|
17
|
-
|
|
18
|
-
}), [
|
|
19
|
-
let
|
|
20
|
-
if (!
|
|
22
|
+
function u() {
|
|
23
|
+
let [u, d] = a(!1), [f, p] = a(null), m = o(), { currentUser: h, workspaceId: g } = t(), _ = `${h?.id ?? ""}|${g ?? ""}`, v = i(_), y = i(0);
|
|
24
|
+
r(() => (v.current = _, y.current++, d(!1), p(null), () => {
|
|
25
|
+
v.current = "";
|
|
26
|
+
}), [_]);
|
|
27
|
+
let b = n(() => {
|
|
28
|
+
if (!g || !h?.id || v.current !== _) throw Error("Select a workspace before exporting a dashboard.");
|
|
21
29
|
return {
|
|
22
30
|
requiredWorkspaceAuth: !0,
|
|
23
|
-
requiredWorkspaceId:
|
|
31
|
+
requiredWorkspaceId: g,
|
|
24
32
|
queryDeduplication: !1
|
|
25
33
|
};
|
|
26
34
|
}, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
]),
|
|
31
|
-
let r = ++
|
|
35
|
+
g,
|
|
36
|
+
h?.id,
|
|
37
|
+
_
|
|
38
|
+
]), x = n(async (t, n = {}) => {
|
|
39
|
+
let r = ++y.current, i = () => v.current === _ && y.current === r;
|
|
32
40
|
try {
|
|
33
|
-
let r =
|
|
34
|
-
|
|
35
|
-
let a = await
|
|
41
|
+
let r = b();
|
|
42
|
+
d(!0), p(null);
|
|
43
|
+
let a = await m.query({
|
|
36
44
|
query: e,
|
|
37
45
|
variables: {
|
|
38
46
|
id: t,
|
|
39
|
-
options:
|
|
40
|
-
includeDataSourceRefs: n.includeDataSourceRefs ?? !1,
|
|
41
|
-
includeWebhookMappings: n.includeWebhookMappings ?? !1,
|
|
42
|
-
prettyPrint: n.prettyPrint ?? !0
|
|
43
|
-
}
|
|
47
|
+
options: s(n)
|
|
44
48
|
},
|
|
45
49
|
fetchPolicy: "no-cache",
|
|
46
50
|
errorPolicy: "none",
|
|
@@ -58,43 +62,43 @@ function l() {
|
|
|
58
62
|
} catch (e) {
|
|
59
63
|
if (!i()) return null;
|
|
60
64
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to export dashboard");
|
|
61
|
-
return
|
|
65
|
+
return p(t), null;
|
|
62
66
|
} finally {
|
|
63
|
-
i() &&
|
|
67
|
+
i() && d(!1);
|
|
64
68
|
}
|
|
65
69
|
}, [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
m,
|
|
71
|
+
_,
|
|
72
|
+
b
|
|
69
73
|
]);
|
|
70
74
|
return {
|
|
71
|
-
loading:
|
|
72
|
-
error:
|
|
73
|
-
exportDashboard:
|
|
75
|
+
loading: u,
|
|
76
|
+
error: f,
|
|
77
|
+
exportDashboard: x,
|
|
74
78
|
downloadDashboard: n(async (e, t, n = {}) => {
|
|
75
79
|
try {
|
|
76
|
-
|
|
77
|
-
let r = n.preparedContent ?? await
|
|
80
|
+
b();
|
|
81
|
+
let r = n.preparedContent ?? await x(e, n);
|
|
78
82
|
if (!r) return !1;
|
|
79
83
|
let i = t;
|
|
80
84
|
if (!i) {
|
|
81
85
|
let e = JSON.parse(r);
|
|
82
86
|
e && typeof e == "object" && "dashboard" in e && e.dashboard && typeof e.dashboard == "object" && "name" in e.dashboard && typeof e.dashboard.name == "string" && (i = e.dashboard.name);
|
|
83
87
|
}
|
|
84
|
-
return
|
|
88
|
+
return c(r, `${l(i || "dashboard")}-export-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.json`), !0;
|
|
85
89
|
} catch (e) {
|
|
86
|
-
if (
|
|
90
|
+
if (v.current !== _) return !1;
|
|
87
91
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to download dashboard");
|
|
88
|
-
return
|
|
92
|
+
return p(t), !1;
|
|
89
93
|
}
|
|
90
94
|
}, [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
x,
|
|
96
|
+
_,
|
|
97
|
+
b
|
|
94
98
|
]),
|
|
95
99
|
clearError: n(() => {
|
|
96
|
-
|
|
100
|
+
y.current++, d(!1), p(null);
|
|
97
101
|
}, [])
|
|
98
102
|
};
|
|
99
103
|
}
|
|
100
|
-
export {
|
|
104
|
+
export { u as default, u as useExportDashboard, s as exportOptionsInput };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Parser, ParserType, ParserStatus } from '../types';
|
|
2
2
|
interface UseParserOperationsOptions {
|
|
3
3
|
consoleId?: string;
|
|
4
|
+
/**
|
|
5
|
+
* List every parser the caller can see — the global ones plus each readable
|
|
6
|
+
* dashboard's — instead of one console's (BOFF-9770). `consoleId` is then
|
|
7
|
+
* ignored for listing.
|
|
8
|
+
*/
|
|
9
|
+
allScopes?: boolean;
|
|
4
10
|
skipFetch?: boolean;
|
|
5
11
|
}
|
|
6
12
|
interface ParserFilters {
|
|
@@ -5,69 +5,68 @@ import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "r
|
|
|
5
5
|
import { useApolloClient as p } from "@apollo/client/react";
|
|
6
6
|
// src/bigconsole/hooks/useParserOperations.ts
|
|
7
7
|
function m(m = {}) {
|
|
8
|
-
let { consoleId: h,
|
|
8
|
+
let { consoleId: h, allScopes: g = !1, skipFetch: _ = !1 } = m, [v, y] = f(!1), [b, x] = f(null), S = p(), C = e((e) => e.parsers), w = e((e) => e.setParsers), T = e((e) => e.replaceParsersInScope), E = e((e) => e.addParser), D = e((e) => e.updateParser), O = e((e) => e.removeParser), k = e((e) => e.setParserTesting), A = d(() => g ? { kind: "all" } : h ? {
|
|
9
9
|
kind: "console",
|
|
10
10
|
consoleId: h
|
|
11
|
-
} : null, [h]),
|
|
12
|
-
if (!
|
|
11
|
+
} : null, [g, h]), j = d(() => A ? t(C, A) : [], [C, A]), M = l(async (e) => {
|
|
12
|
+
if (!A) return [];
|
|
13
13
|
try {
|
|
14
|
-
|
|
15
|
-
let t = ((await
|
|
14
|
+
y(!0), x(null);
|
|
15
|
+
let t = ((await S.query({
|
|
16
16
|
query: o,
|
|
17
17
|
variables: {
|
|
18
|
-
consoleId:
|
|
18
|
+
...A.kind === "all" ? { scope: "ALL" } : { consoleId: A.consoleId },
|
|
19
19
|
type: e?.type,
|
|
20
20
|
status: e?.status,
|
|
21
21
|
first: 100
|
|
22
22
|
},
|
|
23
23
|
fetchPolicy: "network-only"
|
|
24
24
|
})).data?.listParsers?.edges || []).map((e) => e.node);
|
|
25
|
-
return e?.type || e?.status ?
|
|
25
|
+
return e?.type || e?.status ? w(t) : T(A, t), t;
|
|
26
26
|
} catch (e) {
|
|
27
27
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch parsers");
|
|
28
|
-
return
|
|
28
|
+
return x(t), [];
|
|
29
29
|
} finally {
|
|
30
|
-
|
|
30
|
+
y(!1);
|
|
31
31
|
}
|
|
32
32
|
}, [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
]), M = l(async (e) => {
|
|
33
|
+
S,
|
|
34
|
+
A,
|
|
35
|
+
w,
|
|
36
|
+
T
|
|
37
|
+
]), N = l(async (e) => {
|
|
39
38
|
try {
|
|
40
|
-
|
|
41
|
-
let t = (await
|
|
39
|
+
y(!0), x(null);
|
|
40
|
+
let t = (await S.query({
|
|
42
41
|
query: a,
|
|
43
42
|
variables: { id: e },
|
|
44
43
|
fetchPolicy: "network-only"
|
|
45
44
|
})).data?.parser;
|
|
46
|
-
return t ? (
|
|
45
|
+
return t ? (E(t), t) : null;
|
|
47
46
|
} catch (e) {
|
|
48
47
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch parser");
|
|
49
|
-
return
|
|
48
|
+
return x(t), null;
|
|
50
49
|
} finally {
|
|
51
|
-
|
|
50
|
+
y(!1);
|
|
52
51
|
}
|
|
53
|
-
}, [
|
|
52
|
+
}, [S, E]), P = l(async (e) => {
|
|
54
53
|
try {
|
|
55
|
-
|
|
56
|
-
let t = (await
|
|
54
|
+
y(!0), x(null);
|
|
55
|
+
let t = (await S.mutate({
|
|
57
56
|
mutation: n,
|
|
58
57
|
variables: { input: e }
|
|
59
58
|
})).data?.createParser;
|
|
60
|
-
return t ? (
|
|
59
|
+
return t ? (E(t), t) : null;
|
|
61
60
|
} catch (e) {
|
|
62
61
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create parser");
|
|
63
|
-
return
|
|
62
|
+
return x(t), null;
|
|
64
63
|
} finally {
|
|
65
|
-
|
|
64
|
+
y(!1);
|
|
66
65
|
}
|
|
67
|
-
}, [
|
|
66
|
+
}, [S, E]), F = l(async (e, t, n) => {
|
|
68
67
|
try {
|
|
69
|
-
|
|
70
|
-
let r = (await
|
|
68
|
+
y(!0), x(null);
|
|
69
|
+
let r = (await S.mutate({
|
|
71
70
|
mutation: c,
|
|
72
71
|
variables: {
|
|
73
72
|
id: e,
|
|
@@ -75,29 +74,29 @@ function m(m = {}) {
|
|
|
75
74
|
version: n
|
|
76
75
|
}
|
|
77
76
|
})).data?.updateParser;
|
|
78
|
-
return r ? (
|
|
77
|
+
return r ? (D(e, r), r) : null;
|
|
79
78
|
} catch (e) {
|
|
80
79
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to update parser");
|
|
81
|
-
return
|
|
80
|
+
return x(t), null;
|
|
82
81
|
} finally {
|
|
83
|
-
|
|
82
|
+
y(!1);
|
|
84
83
|
}
|
|
85
|
-
}, [
|
|
84
|
+
}, [S, D]), I = l(async (e) => {
|
|
86
85
|
try {
|
|
87
|
-
return
|
|
86
|
+
return y(!0), x(null), await S.mutate({
|
|
88
87
|
mutation: r,
|
|
89
88
|
variables: { id: e }
|
|
90
|
-
}),
|
|
89
|
+
}), O(e), !0;
|
|
91
90
|
} catch (e) {
|
|
92
91
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to delete parser");
|
|
93
|
-
return
|
|
92
|
+
return x(t), !1;
|
|
94
93
|
} finally {
|
|
95
|
-
|
|
94
|
+
y(!1);
|
|
96
95
|
}
|
|
97
|
-
}, [
|
|
96
|
+
}, [S, O]), L = l(async (e) => {
|
|
98
97
|
try {
|
|
99
|
-
|
|
100
|
-
let t = (await
|
|
98
|
+
y(!0), x(null), k(e, !0);
|
|
99
|
+
let t = (await S.mutate({
|
|
101
100
|
mutation: i,
|
|
102
101
|
variables: { id: e }
|
|
103
102
|
})).data?.executeParser;
|
|
@@ -111,14 +110,14 @@ function m(m = {}) {
|
|
|
111
110
|
} : null;
|
|
112
111
|
} catch (e) {
|
|
113
112
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to execute parser");
|
|
114
|
-
return
|
|
113
|
+
return x(t), null;
|
|
115
114
|
} finally {
|
|
116
|
-
|
|
115
|
+
y(!1), k(e, !1);
|
|
117
116
|
}
|
|
118
|
-
}, [
|
|
117
|
+
}, [S, k]), R = l(async (e) => {
|
|
119
118
|
try {
|
|
120
|
-
|
|
121
|
-
let t = (await
|
|
119
|
+
y(!0), x(null);
|
|
120
|
+
let t = (await S.query({
|
|
122
121
|
query: s,
|
|
123
122
|
variables: { input: e },
|
|
124
123
|
fetchPolicy: "network-only"
|
|
@@ -134,31 +133,31 @@ function m(m = {}) {
|
|
|
134
133
|
} : null;
|
|
135
134
|
} catch (e) {
|
|
136
135
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to test expression");
|
|
137
|
-
return
|
|
136
|
+
return x(t), null;
|
|
138
137
|
} finally {
|
|
139
|
-
|
|
138
|
+
y(!1);
|
|
140
139
|
}
|
|
141
|
-
}, [
|
|
142
|
-
await
|
|
143
|
-
}, [
|
|
140
|
+
}, [S]), z = l(async () => {
|
|
141
|
+
await M();
|
|
142
|
+
}, [M]);
|
|
144
143
|
return u(() => {
|
|
145
|
-
|
|
144
|
+
A && !_ && M();
|
|
146
145
|
}, [
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
A,
|
|
147
|
+
_,
|
|
148
|
+
M
|
|
150
149
|
]), {
|
|
151
|
-
loading:
|
|
152
|
-
error:
|
|
153
|
-
parsers:
|
|
154
|
-
fetchParsers:
|
|
155
|
-
fetchParser:
|
|
156
|
-
createParser:
|
|
157
|
-
updateParser:
|
|
158
|
-
deleteParser:
|
|
159
|
-
executeParser:
|
|
160
|
-
testParserExpression:
|
|
161
|
-
refetch:
|
|
150
|
+
loading: v,
|
|
151
|
+
error: b,
|
|
152
|
+
parsers: j,
|
|
153
|
+
fetchParsers: M,
|
|
154
|
+
fetchParser: N,
|
|
155
|
+
createParser: P,
|
|
156
|
+
updateParser: F,
|
|
157
|
+
deleteParser: I,
|
|
158
|
+
executeParser: L,
|
|
159
|
+
testParserExpression: R,
|
|
160
|
+
refetch: z
|
|
162
161
|
};
|
|
163
162
|
}
|
|
164
163
|
export { m as default, m as useParserOperations };
|