@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.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/asof/AsOfControl.js +2 -2
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
- package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
- package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
- package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
- package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
- package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
- package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
- package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.d.ts +4 -0
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +174 -184
- package/dist/bigconsole/components/fleet/FleetCopySection.d.ts +13 -0
- package/dist/bigconsole/components/fleet/FleetCopySection.js +266 -0
- package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
- package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
- package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
- package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
- package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
- package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
- package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
- package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
- package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
- package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
- package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
- package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
- package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
- package/dist/bigconsole/hooks/useFleetBreadcrumb.d.ts +8 -1
- package/dist/bigconsole/hooks/useFleetBreadcrumb.js +4 -1
- package/dist/bigconsole/hooks/useFleetChildren.d.ts +2 -0
- package/dist/bigconsole/hooks/useFleetChildren.js +10 -6
- package/dist/bigconsole/hooks/useFleetCopyActions.d.ts +23 -0
- package/dist/bigconsole/hooks/useFleetCopyActions.js +74 -0
- package/dist/bigconsole/hooks/useFleetFlags.d.ts +16 -0
- package/dist/bigconsole/hooks/useFleetFlags.js +79 -0
- package/dist/bigconsole/hooks/useOwnerBoundRun.d.ts +33 -0
- package/dist/bigconsole/hooks/useOwnerBoundRun.js +41 -0
- package/dist/bigconsole/pages/AdminPage.js +147 -146
- package/dist/bigconsole/pages/DashboardViewPage.js +292 -287
- package/dist/bigconsole/pages/DashboardsPage.js +647 -864
- package/dist/bigconsole/pages/DataParsersPage.js +5 -0
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
- package/dist/bigconsole/pages/DataSinksPage.js +210 -186
- package/dist/bigconsole/pages/InsightsPage.js +386 -383
- package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
- package/dist/bigconsole/pages/ParserViewPage.js +2 -0
- package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
- package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
- package/dist/bigconsole/pages/PipelinesPage.js +198 -165
- package/dist/bigconsole/pages/SettingsPage.js +160 -160
- package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
- package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
- package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
- package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
- package/dist/bigconsole/utils/dashboardGallery.js +93 -0
- package/dist/bigconsole/utils/fleetFlags.d.ts +22 -0
- package/dist/bigconsole/utils/fleetFlags.js +40 -0
- package/dist/bigconsole/utils/fleetTree.d.ts +9 -0
- package/dist/bigconsole/utils/fleetTree.js +5 -1
- package/dist/bigconsole/utils/statusTone.d.ts +17 -0
- package/dist/bigconsole/utils/statusTone.js +44 -0
- package/dist/generated/wspace-operations.d.ts +101 -0
- package/dist/generated/wspace-operations.js +609 -90
- package/dist/generated/wspace-types.js +6 -4
- package/package.json +4 -4
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useTr as e } from "../../../shared/hooks/useTr.js";
|
|
2
2
|
import { ExpressionEditor as t } from "../parser/ExpressionEditor.js";
|
|
3
3
|
import { ExploreHistoryDocument as n, ExploreSavedQueriesDocument as r, ExploreSavedQueryDocument as i, ExploreSourcesDocument as a, SaveExploreDocument as o } from "../../../generated/wspace-operations.js";
|
|
4
|
-
import { Control as s, VisualBuilder as ee, controlClass as
|
|
5
|
-
import { emptyVisual as
|
|
6
|
-
import { useExploreRun as
|
|
4
|
+
import { Control as s, VisualBuilder as ee, controlClass as te } from "./VisualBuilder.js";
|
|
5
|
+
import { emptyVisual as ne, visualSql as re } from "./visualSql.js";
|
|
6
|
+
import { useExploreRun as ie, workspaceRequest as c } from "./useExploreRun.js";
|
|
7
7
|
import { exploreErrorMessage as l, withoutError as u } from "./exploreErrors.js";
|
|
8
8
|
import { QueryResults as ae } from "./QueryResults.js";
|
|
9
9
|
import { CreateQueryWidget as oe } from "./CreateQueryWidget.js";
|
|
10
|
-
import { useCallback as se, useEffect as d, useRef as
|
|
11
|
-
import { Button as
|
|
12
|
-
import { useUnsavedChanges as
|
|
13
|
-
import { useApolloClient as
|
|
14
|
-
import { Fragment as
|
|
10
|
+
import { useCallback as se, useEffect as d, useRef as ce, useState as f } from "react";
|
|
11
|
+
import { Button as p, ThemedSelect as le } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { useUnsavedChanges as ue } from "@burdenoff/fe-libs/shared/hooks";
|
|
13
|
+
import { useApolloClient as de } from "@apollo/client/react";
|
|
14
|
+
import { Fragment as fe, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
15
|
// src/bigconsole/components/explore/SqlDraftEditor.tsx
|
|
16
|
-
var
|
|
16
|
+
var g = [
|
|
17
17
|
"SELECT",
|
|
18
18
|
"FROM",
|
|
19
19
|
"WHERE",
|
|
@@ -35,35 +35,35 @@ var _ = [
|
|
|
35
35
|
"MAX",
|
|
36
36
|
"LIMIT"
|
|
37
37
|
];
|
|
38
|
-
function
|
|
39
|
-
let
|
|
40
|
-
|
|
38
|
+
function _({ workspaceId: _ }) {
|
|
39
|
+
let v = e(), y = de(), [b, x] = f("sql"), [S, pe] = f(""), [C, me] = f(ne), [w, T] = f([]), [E, D] = f([]), [he, O] = f([]), [k, A] = f(0), [ge, _e] = f(-1), j = k !== ge, [M, N] = f(""), [P, F] = f(""), [ve, I] = f(""), L = b === "sql" ? P : ve, [R, z] = f(""), [B, V] = f(!1), [H, U] = f(""), [W, G] = f(""), [K, ye] = f(!1), [be, xe] = f(!1), Se = !P && !!S.length || be, q = ce(null), { run: Ce, cancel: we, result: Te, error: Ee, running: J, cancelling: De, clearResult: Y } = ie(_), X = re(C, w), Z = b === "sql" ? S : X, Oe = v("bigconsole.assistant.unsaved.sqlDraft", "the query draft");
|
|
40
|
+
ue({
|
|
41
41
|
id: "bigconsole-sql-draft",
|
|
42
|
-
label:
|
|
43
|
-
dirty:
|
|
42
|
+
label: Oe,
|
|
43
|
+
dirty: Se
|
|
44
44
|
});
|
|
45
|
-
let
|
|
45
|
+
let Q = ce(w);
|
|
46
46
|
d(() => {
|
|
47
|
-
|
|
48
|
-
}, [
|
|
47
|
+
Q.current = w;
|
|
48
|
+
}, [w]), d(() => {
|
|
49
49
|
let e = new AbortController();
|
|
50
|
-
return
|
|
51
|
-
e.abort(),
|
|
50
|
+
return q.current = e, () => {
|
|
51
|
+
e.abort(), q.current = null;
|
|
52
52
|
};
|
|
53
53
|
}, []), d(() => {
|
|
54
|
-
let e = new AbortController(), t =
|
|
54
|
+
let e = new AbortController(), t = c(_, e.signal);
|
|
55
55
|
return Promise.all([
|
|
56
|
-
|
|
56
|
+
y.query({
|
|
57
57
|
query: a,
|
|
58
58
|
fetchPolicy: "no-cache",
|
|
59
59
|
context: t
|
|
60
60
|
}),
|
|
61
|
-
|
|
61
|
+
y.query({
|
|
62
62
|
query: r,
|
|
63
63
|
fetchPolicy: "no-cache",
|
|
64
64
|
context: t
|
|
65
65
|
}),
|
|
66
|
-
|
|
66
|
+
y.query({
|
|
67
67
|
query: n,
|
|
68
68
|
fetchPolicy: "no-cache",
|
|
69
69
|
context: t
|
|
@@ -72,110 +72,110 @@ function v({ workspaceId: v }) {
|
|
|
72
72
|
if (e.signal.aborted) return;
|
|
73
73
|
let i = u(t), a = u(n), o = u(r);
|
|
74
74
|
if (!i.data || !a.data || !o.data) throw Error("Incomplete catalog");
|
|
75
|
-
|
|
75
|
+
N(""), T(i.data.bigconsoleExploreSources), O(a.data.bigconsoleSavedQueries), D(o.data.bigconsoleExploreHistory);
|
|
76
76
|
}).catch((t) => {
|
|
77
|
-
e.signal.aborted || (
|
|
77
|
+
e.signal.aborted || (T([]), O([]), D([]), N(l(t, v)));
|
|
78
78
|
}).finally(() => {
|
|
79
|
-
e.signal.aborted ||
|
|
79
|
+
e.signal.aborted || _e(k);
|
|
80
80
|
}), () => e.abort();
|
|
81
81
|
}, [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
y,
|
|
83
|
+
_,
|
|
84
|
+
k,
|
|
85
|
+
v
|
|
86
86
|
]);
|
|
87
|
-
let
|
|
87
|
+
let ke = se((e, t) => {
|
|
88
88
|
let n = e.getModel();
|
|
89
89
|
if (!n) return;
|
|
90
90
|
let r = t.languages.registerCompletionItemProvider("sql", {
|
|
91
91
|
triggerCharacters: ["."],
|
|
92
92
|
provideCompletionItems(e, r) {
|
|
93
93
|
if (e !== n) return { suggestions: [] };
|
|
94
|
-
let i = n.getWordUntilPosition(r), a = new t.Range(r.lineNumber, i.startColumn, r.lineNumber, i.endColumn), o = n.getLineContent(r.lineNumber).slice(0, i.startColumn - 1).match(/"?([a-z_][a-z0-9_]*)"?\.$/i)?.[1].toLowerCase(), s =
|
|
94
|
+
let i = n.getWordUntilPosition(r), a = new t.Range(r.lineNumber, i.startColumn, r.lineNumber, i.endColumn), o = n.getLineContent(r.lineNumber).slice(0, i.startColumn - 1).match(/"?([a-z_][a-z0-9_]*)"?\.$/i)?.[1].toLowerCase(), s = Q.current;
|
|
95
95
|
return { suggestions: (o ? s.find((e) => e.name === o)?.fields.map((e) => e.name) ?? [] : [
|
|
96
|
-
...
|
|
96
|
+
...g,
|
|
97
97
|
...s.map((e) => e.name),
|
|
98
98
|
...s.flatMap((e) => e.fields.map((t) => e.name + "." + t.name))
|
|
99
99
|
]).map((e) => ({
|
|
100
100
|
label: e,
|
|
101
|
-
insertText:
|
|
102
|
-
kind:
|
|
101
|
+
insertText: g.includes(e) ? e : e.split(".").map((e) => "\"" + e.replaceAll("\"", "\"\"") + "\"").join("."),
|
|
102
|
+
kind: g.includes(e) ? t.languages.CompletionItemKind.Keyword : t.languages.CompletionItemKind.Field,
|
|
103
103
|
range: a
|
|
104
104
|
})) };
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
e.onDidDispose(() => r.dispose());
|
|
108
108
|
}, []);
|
|
109
|
-
function
|
|
110
|
-
|
|
109
|
+
function Ae(e) {
|
|
110
|
+
pe(e), F(""), V(!1), U(""), G(""), Y();
|
|
111
111
|
}
|
|
112
|
-
async function
|
|
113
|
-
|
|
112
|
+
async function je() {
|
|
113
|
+
G(""), U(""), await Ce(L ? { savedQueryId: L } : { sql: Z }), q.current && !q.current.signal.aborted && A((e) => e + 1);
|
|
114
114
|
}
|
|
115
|
-
async function
|
|
116
|
-
let n =
|
|
117
|
-
if (!(!n || n.aborted ||
|
|
118
|
-
|
|
115
|
+
async function Me(e, t) {
|
|
116
|
+
let n = q.current?.signal;
|
|
117
|
+
if (!(!n || n.aborted || K)) {
|
|
118
|
+
ye(!0), G(""), U(""), V(!1), Y();
|
|
119
119
|
try {
|
|
120
|
-
let r =
|
|
120
|
+
let r = c(_, n), a = e === "open" && t ? u(await y.query({
|
|
121
121
|
query: i,
|
|
122
122
|
variables: { id: t },
|
|
123
123
|
fetchPolicy: "no-cache",
|
|
124
124
|
context: r
|
|
125
|
-
})).data?.bigconsoleSavedQuery : u(await
|
|
125
|
+
})).data?.bigconsoleSavedQuery : u(await y.mutate({
|
|
126
126
|
mutation: o,
|
|
127
127
|
variables: {
|
|
128
|
-
name:
|
|
129
|
-
sql:
|
|
128
|
+
name: R.trim(),
|
|
129
|
+
sql: Z
|
|
130
130
|
},
|
|
131
131
|
fetchPolicy: "no-cache",
|
|
132
132
|
context: r
|
|
133
133
|
})).data?.bigconsoleSaveExplore;
|
|
134
134
|
if (n.aborted) return;
|
|
135
135
|
if (!a) throw Error("Missing saved definition");
|
|
136
|
-
|
|
136
|
+
z(a.name), e === "save" && b === "visual" ? (I(a.id), xe(!1)) : (F(a.id), x("sql"), pe(a.sql)), U(e === "open" ? "Saved query opened." : "Query saved."), A((e) => e + 1);
|
|
137
137
|
} catch (e) {
|
|
138
|
-
n.aborted || (
|
|
138
|
+
n.aborted || (G(l(e, v)), A((e) => e + 1));
|
|
139
139
|
} finally {
|
|
140
|
-
n.aborted ||
|
|
140
|
+
n.aborted || ye(!1);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
async function
|
|
144
|
+
async function Ne() {
|
|
145
145
|
try {
|
|
146
|
-
await navigator.clipboard.writeText(
|
|
146
|
+
await navigator.clipboard.writeText(Z), U(v("bigconsole.explore.copied", "Draft copied."));
|
|
147
147
|
} catch {
|
|
148
|
-
|
|
148
|
+
U(v("bigconsole.explore.copyFailed", "Select and copy the draft in the editor."));
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
let $ =
|
|
152
|
-
return /* @__PURE__ */
|
|
151
|
+
let $ = J || K;
|
|
152
|
+
return /* @__PURE__ */ h("div", {
|
|
153
153
|
className: "mt-3 space-y-4",
|
|
154
154
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ h("section", {
|
|
156
156
|
"aria-label": "Authorized schema",
|
|
157
157
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ m("h3", {
|
|
159
159
|
className: "font-medium",
|
|
160
160
|
children: "Available sources"
|
|
161
161
|
}),
|
|
162
|
-
|
|
162
|
+
j && /* @__PURE__ */ m("span", {
|
|
163
163
|
role: "status",
|
|
164
164
|
children: "Loading schema…"
|
|
165
165
|
}),
|
|
166
|
-
|
|
166
|
+
M && /* @__PURE__ */ m("p", {
|
|
167
167
|
role: "alert",
|
|
168
|
-
children:
|
|
168
|
+
children: M
|
|
169
169
|
}),
|
|
170
|
-
!
|
|
171
|
-
/* @__PURE__ */
|
|
170
|
+
!j && !M && !w.length && /* @__PURE__ */ m("p", { children: "No sources are authorized for this workspace." }),
|
|
171
|
+
/* @__PURE__ */ m("div", {
|
|
172
172
|
className: "flex flex-wrap gap-3",
|
|
173
|
-
children:
|
|
173
|
+
children: w.map((e) => /* @__PURE__ */ h("details", { children: [/* @__PURE__ */ m("summary", {
|
|
174
174
|
className: "cursor-pointer",
|
|
175
175
|
children: e.name
|
|
176
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ m("ul", {
|
|
177
177
|
className: "ml-4 text-sm",
|
|
178
|
-
children: e.fields.map((e) => /* @__PURE__ */
|
|
178
|
+
children: e.fields.map((e) => /* @__PURE__ */ h("li", { children: [
|
|
179
179
|
e.name,
|
|
180
180
|
" · ",
|
|
181
181
|
e.type,
|
|
@@ -184,188 +184,188 @@ function v({ workspaceId: v }) {
|
|
|
184
184
|
] }, e.id))
|
|
185
185
|
})] }, e.id))
|
|
186
186
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ m("button", {
|
|
188
188
|
className: "mt-1 text-sm underline",
|
|
189
189
|
type: "button",
|
|
190
|
-
disabled: $ ||
|
|
190
|
+
disabled: $ || j,
|
|
191
191
|
onClick: () => {
|
|
192
|
-
|
|
192
|
+
Y(), A((e) => e + 1);
|
|
193
193
|
},
|
|
194
194
|
children: "Refresh schema"
|
|
195
195
|
})
|
|
196
196
|
]
|
|
197
197
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ h("div", {
|
|
199
199
|
"aria-label": "Query mode",
|
|
200
200
|
className: "flex gap-2",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ m(p, {
|
|
202
202
|
size: "sm",
|
|
203
203
|
type: "button",
|
|
204
|
-
"aria-pressed":
|
|
204
|
+
"aria-pressed": b === "sql",
|
|
205
205
|
disabled: $,
|
|
206
206
|
onClick: () => {
|
|
207
|
-
|
|
207
|
+
x("sql"), V(!1), Y(), G("");
|
|
208
208
|
},
|
|
209
209
|
children: "SQL"
|
|
210
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ m(p, {
|
|
211
211
|
size: "sm",
|
|
212
212
|
type: "button",
|
|
213
|
-
"aria-pressed":
|
|
213
|
+
"aria-pressed": b === "visual",
|
|
214
214
|
disabled: $,
|
|
215
215
|
onClick: () => {
|
|
216
|
-
|
|
216
|
+
x("visual"), V(!1), Y(), G("");
|
|
217
217
|
},
|
|
218
218
|
children: "Explore"
|
|
219
219
|
})]
|
|
220
220
|
}),
|
|
221
|
-
|
|
221
|
+
b === "sql" ? /* @__PURE__ */ m(t, {
|
|
222
222
|
language: "sql",
|
|
223
|
-
value:
|
|
224
|
-
onChange:
|
|
225
|
-
onEditorMount:
|
|
223
|
+
value: S,
|
|
224
|
+
onChange: Ae,
|
|
225
|
+
onEditorMount: ke,
|
|
226
226
|
readOnly: $,
|
|
227
227
|
saveViewState: !1,
|
|
228
228
|
inputOptions: {
|
|
229
|
-
ariaLabel:
|
|
229
|
+
ariaLabel: v("bigconsole.explore.sqlEditor", "SQL editor"),
|
|
230
230
|
wordBasedSuggestions: "off"
|
|
231
231
|
}
|
|
232
|
-
}) : /* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
232
|
+
}) : /* @__PURE__ */ h(fe, { children: [
|
|
233
|
+
/* @__PURE__ */ m("p", {
|
|
234
234
|
className: "text-sm text-text-secondary",
|
|
235
235
|
children: "Explore builds a separate query. Return to SQL to see your original text."
|
|
236
236
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ m("fieldset", {
|
|
238
238
|
disabled: $,
|
|
239
|
-
children: /* @__PURE__ */
|
|
240
|
-
sources:
|
|
241
|
-
value:
|
|
239
|
+
children: /* @__PURE__ */ m(ee, {
|
|
240
|
+
sources: w,
|
|
241
|
+
value: C,
|
|
242
242
|
onChange: (e) => {
|
|
243
|
-
|
|
243
|
+
me(e), I(""), xe(!0), Y(), G("");
|
|
244
244
|
}
|
|
245
245
|
})
|
|
246
246
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ m("h3", {
|
|
248
248
|
className: "font-medium",
|
|
249
249
|
children: "Generated SQL"
|
|
250
250
|
}),
|
|
251
|
-
|
|
251
|
+
X ? /* @__PURE__ */ m("pre", {
|
|
252
252
|
className: "max-w-full overflow-auto rounded bg-bg-surface p-2",
|
|
253
|
-
children:
|
|
254
|
-
}) : /* @__PURE__ */
|
|
253
|
+
children: X
|
|
254
|
+
}) : /* @__PURE__ */ m("p", {
|
|
255
255
|
className: "text-sm",
|
|
256
256
|
children: "Choose fields or an aggregate. Complete each filter and join, and group any projected fields when aggregating."
|
|
257
257
|
})
|
|
258
258
|
] }),
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ h("div", {
|
|
260
260
|
className: "flex flex-wrap gap-2",
|
|
261
261
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ m(p, {
|
|
263
263
|
size: "sm",
|
|
264
264
|
type: "button",
|
|
265
|
-
disabled: $ || !
|
|
266
|
-
onClick: () => void
|
|
265
|
+
disabled: $ || !Z.trim() || !w.length || j || !!M,
|
|
266
|
+
onClick: () => void je(),
|
|
267
267
|
children: "Run"
|
|
268
268
|
}),
|
|
269
|
-
|
|
269
|
+
J && /* @__PURE__ */ m(p, {
|
|
270
270
|
size: "sm",
|
|
271
271
|
type: "button",
|
|
272
|
-
disabled:
|
|
273
|
-
onClick: () => void
|
|
274
|
-
children:
|
|
272
|
+
disabled: De,
|
|
273
|
+
onClick: () => void we(),
|
|
274
|
+
children: De ? "Cancelling…" : "Cancel"
|
|
275
275
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ m(p, {
|
|
277
277
|
size: "sm",
|
|
278
278
|
type: "button",
|
|
279
279
|
variant: "secondary",
|
|
280
|
-
disabled: !
|
|
281
|
-
onClick: () => void
|
|
282
|
-
children:
|
|
280
|
+
disabled: !Z.trim(),
|
|
281
|
+
onClick: () => void Ne(),
|
|
282
|
+
children: v("bigconsole.explore.copy", "Copy draft")
|
|
283
283
|
})
|
|
284
284
|
]
|
|
285
285
|
}),
|
|
286
|
-
|
|
286
|
+
J && /* @__PURE__ */ m("p", {
|
|
287
287
|
role: "status",
|
|
288
288
|
children: "Running query…"
|
|
289
289
|
}),
|
|
290
|
-
|
|
290
|
+
Ee && /* @__PURE__ */ m("p", {
|
|
291
291
|
role: "alert",
|
|
292
|
-
children:
|
|
292
|
+
children: Ee
|
|
293
293
|
}),
|
|
294
|
-
|
|
295
|
-
/* @__PURE__ */
|
|
294
|
+
Te && /* @__PURE__ */ m(ae, { result: Te }),
|
|
295
|
+
/* @__PURE__ */ h("fieldset", {
|
|
296
296
|
disabled: $,
|
|
297
297
|
className: "flex flex-wrap items-end gap-2",
|
|
298
298
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ m("legend", {
|
|
300
300
|
className: "font-medium",
|
|
301
301
|
children: "Saved queries"
|
|
302
302
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ m(s, {
|
|
304
304
|
label: "Open saved query",
|
|
305
|
-
children: /* @__PURE__ */
|
|
306
|
-
className:
|
|
307
|
-
value:
|
|
305
|
+
children: /* @__PURE__ */ h(le, {
|
|
306
|
+
className: te,
|
|
307
|
+
value: L,
|
|
308
308
|
onChange: (e) => {
|
|
309
|
-
e.target.value &&
|
|
309
|
+
e.target.value && Me("open", e.target.value);
|
|
310
310
|
},
|
|
311
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ m("option", {
|
|
312
312
|
value: "",
|
|
313
313
|
children: "Choose a query"
|
|
314
|
-
}),
|
|
314
|
+
}), he.map((e) => /* @__PURE__ */ m("option", {
|
|
315
315
|
value: e.id,
|
|
316
316
|
children: e.name
|
|
317
317
|
}, e.id))]
|
|
318
318
|
})
|
|
319
319
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ m(s, {
|
|
321
321
|
label: "Query name",
|
|
322
|
-
children: /* @__PURE__ */
|
|
323
|
-
className:
|
|
324
|
-
value:
|
|
325
|
-
onChange: (e) =>
|
|
322
|
+
children: /* @__PURE__ */ m("input", {
|
|
323
|
+
className: te,
|
|
324
|
+
value: R,
|
|
325
|
+
onChange: (e) => z(e.target.value)
|
|
326
326
|
})
|
|
327
327
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ m(p, {
|
|
329
329
|
size: "sm",
|
|
330
330
|
type: "button",
|
|
331
|
-
disabled: !
|
|
332
|
-
onClick: () => void
|
|
331
|
+
disabled: !Z.trim() || !R.trim() || !!M || j || !w.length,
|
|
332
|
+
onClick: () => void Me("save"),
|
|
333
333
|
children: "Save as new query"
|
|
334
334
|
}),
|
|
335
|
-
|
|
335
|
+
L && /* @__PURE__ */ m(p, {
|
|
336
336
|
size: "sm",
|
|
337
337
|
type: "button",
|
|
338
|
-
onClick: () =>
|
|
338
|
+
onClick: () => V(!B),
|
|
339
339
|
children: "Add to dashboard"
|
|
340
340
|
})
|
|
341
341
|
]
|
|
342
342
|
}),
|
|
343
|
-
|
|
343
|
+
H && /* @__PURE__ */ m("p", {
|
|
344
344
|
role: "status",
|
|
345
|
-
children:
|
|
345
|
+
children: H
|
|
346
346
|
}),
|
|
347
|
-
|
|
347
|
+
W && /* @__PURE__ */ m("p", {
|
|
348
348
|
role: "alert",
|
|
349
|
-
children:
|
|
349
|
+
children: W
|
|
350
350
|
}),
|
|
351
|
-
|
|
352
|
-
savedId:
|
|
353
|
-
name:
|
|
354
|
-
workspaceId:
|
|
355
|
-
},
|
|
356
|
-
/* @__PURE__ */
|
|
351
|
+
B && L && /* @__PURE__ */ m(oe, {
|
|
352
|
+
savedId: L,
|
|
353
|
+
name: R,
|
|
354
|
+
workspaceId: _
|
|
355
|
+
}, L),
|
|
356
|
+
/* @__PURE__ */ h("details", { children: [/* @__PURE__ */ m("summary", {
|
|
357
357
|
className: "cursor-pointer font-medium",
|
|
358
358
|
children: "Query history"
|
|
359
|
-
}),
|
|
359
|
+
}), E.length ? /* @__PURE__ */ m("ul", {
|
|
360
360
|
className: "mt-1 text-sm",
|
|
361
|
-
children:
|
|
361
|
+
children: E.map((e) => /* @__PURE__ */ h("li", { children: [
|
|
362
362
|
e.startedAt,
|
|
363
363
|
" · ",
|
|
364
364
|
e.status,
|
|
365
365
|
e.durationMs == null ? "" : " · " + e.durationMs + " ms"
|
|
366
366
|
] }, e.id))
|
|
367
|
-
}) : /* @__PURE__ */
|
|
367
|
+
}) : /* @__PURE__ */ m("p", { children: "No query runs to show." })] })
|
|
368
368
|
]
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
export {
|
|
371
|
+
export { _ as default };
|