@burdenoff/microfe-bigconsole 2026.805.3 → 2026.812.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/components/DrilldownDashboardRenderer.js +118 -106
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.js +54 -50
- package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
- package/dist/bigconsole/components/builder/BuilderCanvas.js +2 -2
- package/dist/bigconsole/components/builder/BuilderCanvas.js.map +1 -1
- package/dist/bigconsole/components/builder/BuilderTopbar.js +3 -3
- package/dist/bigconsole/components/builder/BuilderTopbar.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/AdvancedSection.js +24 -25
- package/dist/bigconsole/components/builder/inspector/AdvancedSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +40 -29
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +135 -97
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/GeneralSection.js +58 -44
- package/dist/bigconsole/components/builder/inspector/GeneralSection.js.map +1 -1
- package/dist/bigconsole/components/common/Section.js +70 -0
- package/dist/bigconsole/components/common/Section.js.map +1 -0
- package/dist/bigconsole/components/common/index.js +2 -0
- package/dist/bigconsole/components/common/sectionStyles.js +42 -0
- package/dist/bigconsole/components/common/sectionStyles.js.map +1 -0
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +209 -193
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +213 -231
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.js +12 -18
- package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +109 -102
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +81 -70
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +125 -159
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +25 -23
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +3 -3
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +5 -3
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +170 -284
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +147 -151
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/LiveBoardBanner.js +45 -53
- package/dist/bigconsole/components/dashboard/LiveBoardBanner.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +157 -148
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +17 -8
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -95
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +20 -18
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -1
- package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js +26 -58
- package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js.map +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +307 -231
- package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +29 -29
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +78 -79
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDataViewer.js +33 -34
- package/dist/bigconsole/components/datasink/DataSinkDataViewer.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +79 -56
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +75 -65
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +1 -1
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +20 -19
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js.map +1 -1
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +127 -171
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +263 -243
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/LinkedParsersPanel.js +65 -66
- package/dist/bigconsole/components/datasink/LinkedParsersPanel.js.map +1 -1
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +121 -127
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js.map +1 -1
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +33 -26
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +3 -3
- package/dist/bigconsole/components/datasink/SetupStateBadge.js.map +1 -1
- package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js +95 -95
- package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js.map +1 -1
- package/dist/bigconsole/components/parser/DataSinkSelector.js +154 -123
- package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ExpressionEditor.js +3 -3
- package/dist/bigconsole/components/parser/ExpressionEditor.js.map +1 -1
- package/dist/bigconsole/components/parser/ImportParserDialog.js +235 -275
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserCard.js +133 -114
- package/dist/bigconsole/components/parser/ParserCard.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +191 -174
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +2 -2
- package/dist/bigconsole/components/parser/ParserStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserTypeBadge.js +4 -4
- package/dist/bigconsole/components/parser/ParserTypeBadge.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.js +134 -89
- package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js +77 -64
- package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +7 -10
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewContent.js +31 -32
- package/dist/bigconsole/components/preview/AiPreviewContent.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +152 -106
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +193 -152
- package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/previewShared.js +41 -23
- package/dist/bigconsole/components/preview/previewShared.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +342 -308
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +262 -238
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +712 -803
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js +7 -5
- package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +7 -8
- package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +8 -7
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js +1 -1
- package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +2 -2
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +11 -5
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +19 -15
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +154 -102
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +28 -13
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +35 -24
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +2 -2
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js +2 -2
- package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/list/ListConfig.js +8 -2
- package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/list/ListItem.js +1 -1
- package/dist/bigconsole/components/widgets/list/ListItem.js.map +1 -1
- package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +1 -1
- package/dist/bigconsole/components/widgets/map-widget/MapWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +9 -3
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +3 -3
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +34 -25
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/retention/RetentionWidget.js +3 -3
- package/dist/bigconsole/components/widgets/retention/RetentionWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.js +6 -4
- package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/ErrorState.js +7 -5
- package/dist/bigconsole/components/widgets/states/ErrorState.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/LoadingState.js +5 -4
- package/dist/bigconsole/components/widgets/states/LoadingState.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +10 -4
- package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableHeader.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableWidget.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +1 -1
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js +3 -3
- package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.js +2 -2
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.js.map +1 -1
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +112 -85
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +28 -20
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowCard.js +92 -77
- package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js +70 -51
- package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +16 -17
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +6 -4
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +360 -338
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
- package/dist/bigconsole/hooks/useModalFocusTrap.js +53 -0
- package/dist/bigconsole/hooks/useModalFocusTrap.js.map +1 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.js +209 -203
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +126 -120
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +838 -800
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +263 -315
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +301 -341
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +346 -339
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +356 -458
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSourcesPage.js +7 -2
- package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
- package/dist/bigconsole/pages/HomePage.js +186 -193
- package/dist/bigconsole/pages/HomePage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +887 -740
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +679 -637
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +368 -342
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +537 -444
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +412 -377
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +248 -298
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +251 -153
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +381 -371
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +171 -286
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
import { useAppNavigate as e } from "../contexts/NavigationContext.js";
|
|
2
2
|
import "../contexts/index.js";
|
|
3
|
-
import t from "../
|
|
4
|
-
import
|
|
5
|
-
import ee from "../hooks/
|
|
3
|
+
import { Section as t, SectionStack as n } from "../components/common/Section.js";
|
|
4
|
+
import "../components/common/index.js";
|
|
5
|
+
import ee from "../hooks/useDashboardOperations.js";
|
|
6
|
+
import te from "../hooks/useDataSinkOperations.js";
|
|
7
|
+
import ne from "../hooks/useParserOperations.js";
|
|
6
8
|
import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
|
|
7
|
-
import
|
|
8
|
-
import { memo as i, useCallback as a, useEffect as o, useMemo as s, useRef as
|
|
9
|
-
import { useParams as
|
|
10
|
-
import { AccessDenied as
|
|
11
|
-
import { usePermissions as
|
|
12
|
-
import { AlertCircle as
|
|
13
|
-
import { useI18n as
|
|
14
|
-
import { Button as
|
|
15
|
-
import { Fragment as
|
|
9
|
+
import re from "../components/datasink/CacheTTLSelector.js";
|
|
10
|
+
import { memo as i, useCallback as a, useEffect as o, useMemo as s, useRef as ie, useState as c } from "react";
|
|
11
|
+
import { useParams as ae } from "react-router";
|
|
12
|
+
import { AccessDenied as oe, PermissionButton as se } from "@burdenoff/fe-libs/shared/components";
|
|
13
|
+
import { usePermissions as ce } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
|
+
import { AlertCircle as l, ArrowLeft as le, CheckCircle2 as ue, ChevronDown as de, ChevronRight as fe, Code as pe, Download as me, Eye as he, FileCode2 as ge, LayoutDashboard as _e, Loader2 as u, Play as ve, Save as ye, Settings as be, X as xe } from "lucide-react";
|
|
15
|
+
import { useI18n as Se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
16
|
+
import { Button as d, PagePurpose as Ce, Stepper as we } from "@burdenoff/fe-libs/ui";
|
|
17
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
16
18
|
//#region src/bigconsole/pages/ParserBuilderPage.tsx
|
|
17
|
-
var
|
|
19
|
+
var h = "w-full min-w-0 min-h-control-md rounded-md border bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-action-primary-bg motion-safe:transition-colors disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60";
|
|
20
|
+
function g(e = !1, t = "") {
|
|
21
|
+
return `${h} ${e ? "border-status-error-border" : "border-[var(--color-border-default)]"} ${t}`.trim();
|
|
22
|
+
}
|
|
23
|
+
var _ = "block text-sm font-medium text-text-primary mb-2", v = "text-xs text-text-muted mt-1.5", y = 25, Te = "default", Ee = [
|
|
18
24
|
"details",
|
|
19
25
|
"source",
|
|
20
26
|
"expression",
|
|
21
27
|
"review"
|
|
22
28
|
];
|
|
23
|
-
function
|
|
29
|
+
function De(e) {
|
|
24
30
|
return [
|
|
25
31
|
{
|
|
26
32
|
key: "details",
|
|
@@ -44,14 +50,14 @@ function Ae(e) {
|
|
|
44
50
|
}
|
|
45
51
|
];
|
|
46
52
|
}
|
|
47
|
-
function
|
|
53
|
+
function Oe(e) {
|
|
48
54
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
|
|
49
55
|
}
|
|
50
|
-
function
|
|
56
|
+
function ke(e, t) {
|
|
51
57
|
let n = {};
|
|
52
58
|
return e.name.trim() ? e.name.length < 2 && (n.name = t("bigconsole.parsers.builder.validation.nameMinLength", "Name must be at least 2 characters")) : n.name = t("bigconsole.parsers.builder.validation.nameRequired", "Name is required"), e.outputKey.trim() ? /^[a-z0-9_]+$/.test(e.outputKey) || (n.outputKey = t("bigconsole.parsers.builder.validation.outputKeyInvalid", "Output key can only contain lowercase letters, numbers, and underscores")) : n.outputKey = t("bigconsole.parsers.builder.validation.outputKeyRequired", "Output key is required"), e.expression.trim() || (n.expression = t("bigconsole.parsers.builder.validation.expressionRequired", "Expression is required")), e.inputSinkKey.trim() || (n.inputSinkKey = t("bigconsole.parsers.builder.validation.inputSinkRequired", "Source DataSink is required")), e.ttl != null && e.ttl > 0 && (e.ttl < 30 || e.ttl > 86400) && (n.ttl = t("bigconsole.parsers.builder.validation.cacheDurationRange", "Cache duration must be between 30 and 86400 seconds")), n;
|
|
53
59
|
}
|
|
54
|
-
function
|
|
60
|
+
function Ae(e) {
|
|
55
61
|
return {
|
|
56
62
|
jq: {
|
|
57
63
|
name: e("bigconsole.parsers.builder.parserType.jq.name", "JQ"),
|
|
@@ -67,8 +73,8 @@ function Ne(e) {
|
|
|
67
73
|
}
|
|
68
74
|
};
|
|
69
75
|
}
|
|
70
|
-
var
|
|
71
|
-
let { parserId: i, consoleId:
|
|
76
|
+
var b = i(function() {
|
|
77
|
+
let { parserId: i, consoleId: h } = ae(), b = e(), { t: x } = Se(), je = s(() => De(x), [x]), S = s(() => Ae(x), [x]), C = je.length, [w, T] = c(0), [E, Me] = c(Te), Ne = h || E || Te, D = i !== "new" && !!i, { hasPermission: Pe, isLoading: Fe } = ce(), Ie = Pe(r.PARSER_READ), Le = Pe(D ? r.PARSER_UPDATE : r.PARSER_CREATE), Re = D ? r.PARSER_UPDATE : r.PARSER_CREATE, O = !h, [k, A] = c({
|
|
72
78
|
name: "",
|
|
73
79
|
outputKey: "",
|
|
74
80
|
description: "",
|
|
@@ -76,25 +82,25 @@ var h = "w-full px-3 py-2.5 text-sm text-text-primary bg-bg-surface border round
|
|
|
76
82
|
expression: "",
|
|
77
83
|
inputSinkKey: "",
|
|
78
84
|
ttl: 900
|
|
79
|
-
}), [
|
|
85
|
+
}), [j, M] = c({}), [ze, Be] = c(!1), [Ve, He] = c(!1), [Ue, We] = c(null), [N, P] = c("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [F, I] = c(""), [L, R] = c(null), [Ge, Ke] = c(!1), [z, B] = c(null), [V, H] = c(!1), [U, qe] = c(null), [Je, Ye] = c(!1), W = ie(k.inputSinkKey);
|
|
80
86
|
o(() => {
|
|
81
|
-
|
|
82
|
-
}, [
|
|
83
|
-
let [
|
|
84
|
-
consoleId:
|
|
87
|
+
W.current = k.inputSinkKey;
|
|
88
|
+
}, [k.inputSinkKey]);
|
|
89
|
+
let [G, Xe] = c(!1), [Ze, Qe] = c(null), [$e, et] = c(!1), [tt, K] = c(null), [q, nt] = c(null), { loading: rt, error: it, parsers: at, fetchParser: ot, createParser: st, updateParser: ct, testParserExpression: lt } = ne({
|
|
90
|
+
consoleId: Ne || "",
|
|
85
91
|
skipFetch: !0
|
|
86
|
-
}), { dataSinks: J, fetchDataSinks: ut, getDataSinkData: Y } =
|
|
92
|
+
}), { dataSinks: J, fetchDataSinks: ut, getDataSinkData: Y } = te({ skipFetch: !0 }), { dashboards: dt, fetchDashboards: ft, loading: pt } = ee(), X = D ? at.find((e) => e.id === i) : null;
|
|
87
93
|
o(() => {
|
|
88
|
-
ut(),
|
|
94
|
+
ut(), D && i && ot(i), O && ft();
|
|
89
95
|
}, [
|
|
90
|
-
|
|
96
|
+
D,
|
|
91
97
|
i,
|
|
92
98
|
ot,
|
|
93
99
|
ut,
|
|
94
|
-
|
|
100
|
+
O,
|
|
95
101
|
ft
|
|
96
102
|
]), o(() => {
|
|
97
|
-
X && (
|
|
103
|
+
X && (A({
|
|
98
104
|
name: X.name || "",
|
|
99
105
|
outputKey: X.outputKey || "",
|
|
100
106
|
description: X.description || "",
|
|
@@ -102,790 +108,826 @@ var h = "w-full px-3 py-2.5 text-sm text-text-primary bg-bg-surface border round
|
|
|
102
108
|
expression: X.expression || "",
|
|
103
109
|
inputSinkKey: X.inputSinkKey || "",
|
|
104
110
|
ttl: X.ttl ?? null
|
|
105
|
-
}),
|
|
111
|
+
}), Be(!0), X.consoleId && Me(X.consoleId));
|
|
106
112
|
}, [X]);
|
|
107
|
-
let Z = s(() => J.find((e) => e.key ===
|
|
113
|
+
let Z = s(() => J.find((e) => e.key === k.inputSinkKey)?.name || k.inputSinkKey, [J, k.inputSinkKey]), mt = a((e) => {
|
|
108
114
|
let t = e.target.value;
|
|
109
|
-
|
|
115
|
+
A((e) => ({
|
|
110
116
|
...e,
|
|
111
117
|
name: t,
|
|
112
|
-
outputKey:
|
|
113
|
-
})),
|
|
118
|
+
outputKey: ze ? e.outputKey : Oe(t)
|
|
119
|
+
})), M((e) => ({
|
|
114
120
|
...e,
|
|
115
121
|
name: void 0
|
|
116
122
|
}));
|
|
117
|
-
}, [
|
|
123
|
+
}, [ze]), ht = a((e) => {
|
|
118
124
|
let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
119
|
-
|
|
125
|
+
A((e) => ({
|
|
120
126
|
...e,
|
|
121
127
|
outputKey: t
|
|
122
|
-
})),
|
|
128
|
+
})), Be(!0), M((e) => ({
|
|
123
129
|
...e,
|
|
124
130
|
outputKey: void 0
|
|
125
131
|
}));
|
|
126
132
|
}, []), gt = a((e) => {
|
|
127
|
-
|
|
133
|
+
A((t) => ({
|
|
128
134
|
...t,
|
|
129
135
|
description: e.target.value
|
|
130
136
|
}));
|
|
131
137
|
}, []), _t = a((e) => {
|
|
132
|
-
|
|
138
|
+
A((t) => ({
|
|
133
139
|
...t,
|
|
134
140
|
type: e
|
|
135
|
-
})),
|
|
141
|
+
})), I(""), R(null);
|
|
136
142
|
}, []), vt = a((e) => {
|
|
137
|
-
|
|
143
|
+
A((t) => ({
|
|
138
144
|
...t,
|
|
139
145
|
expression: e.target.value
|
|
140
|
-
})),
|
|
146
|
+
})), M((e) => ({
|
|
141
147
|
...e,
|
|
142
148
|
expression: void 0
|
|
143
149
|
}));
|
|
144
150
|
}, []), yt = a((e) => {
|
|
145
|
-
|
|
151
|
+
A((t) => ({
|
|
146
152
|
...t,
|
|
147
153
|
inputSinkKey: e.target.value
|
|
148
|
-
})),
|
|
154
|
+
})), M((e) => ({
|
|
149
155
|
...e,
|
|
150
156
|
inputSinkKey: void 0
|
|
151
|
-
})),
|
|
152
|
-
}, [
|
|
153
|
-
|
|
157
|
+
})), Xe(!1), Qe(null), nt(null), K(null), V && (P(""), H(!1)), qe(null), I(""), R(null), B(null);
|
|
158
|
+
}, [V]), bt = a((e) => {
|
|
159
|
+
A((t) => ({
|
|
154
160
|
...t,
|
|
155
161
|
ttl: e
|
|
156
|
-
})),
|
|
162
|
+
})), M((e) => ({
|
|
157
163
|
...e,
|
|
158
164
|
ttl: void 0
|
|
159
165
|
}));
|
|
160
166
|
}, []), xt = a((e) => {
|
|
161
|
-
|
|
167
|
+
Me(e.target.value);
|
|
162
168
|
}, []), St = a((e) => {
|
|
163
|
-
|
|
169
|
+
P(e.target.value);
|
|
164
170
|
}, []), Ct = a(async () => {
|
|
165
|
-
let e =
|
|
171
|
+
let e = k.inputSinkKey;
|
|
166
172
|
if (e) {
|
|
167
|
-
|
|
173
|
+
Ye(!0);
|
|
168
174
|
try {
|
|
169
|
-
let t = await Y({ key: e }, { limit:
|
|
170
|
-
if (
|
|
171
|
-
t?.raw !== void 0 && t?.raw !== null ? (
|
|
175
|
+
let t = await Y({ key: e }, { limit: y });
|
|
176
|
+
if (W.current !== e) return;
|
|
177
|
+
t?.raw !== void 0 && t?.raw !== null ? (P(JSON.stringify(t.raw, null, 2)), H(!0), qe({
|
|
172
178
|
total: t.totalCount ?? null,
|
|
173
179
|
hasMore: t.hasMore ?? null,
|
|
174
180
|
sinkName: Z
|
|
175
|
-
}),
|
|
181
|
+
}), I(""), R(null), B(null)) : R(x("bigconsole.parsers.builder.errors.loadSampleFailed", "Could not load a sample from the selected DataSink."));
|
|
176
182
|
} catch (t) {
|
|
177
|
-
if (
|
|
178
|
-
|
|
183
|
+
if (W.current !== e) return;
|
|
184
|
+
R(t instanceof Error ? t.message : x("bigconsole.parsers.builder.errors.loadSampleDataFailed", "Failed to load sample data"));
|
|
179
185
|
} finally {
|
|
180
|
-
|
|
186
|
+
Ye(!1);
|
|
181
187
|
}
|
|
182
188
|
}
|
|
183
189
|
}, [
|
|
184
|
-
|
|
190
|
+
k.inputSinkKey,
|
|
185
191
|
Y,
|
|
186
192
|
Z,
|
|
187
|
-
|
|
193
|
+
x
|
|
188
194
|
]), wt = a(() => {
|
|
189
|
-
|
|
195
|
+
P(""), H(!1), qe(null), B(null), I(""), R(null);
|
|
190
196
|
}, []), Tt = a(async () => {
|
|
191
|
-
if (
|
|
192
|
-
|
|
197
|
+
if (G) {
|
|
198
|
+
Xe(!1);
|
|
193
199
|
return;
|
|
194
200
|
}
|
|
195
|
-
if (!
|
|
196
|
-
K(
|
|
201
|
+
if (!k.inputSinkKey) {
|
|
202
|
+
K(x("bigconsole.parsers.builder.errors.selectSourceFirst", "Please select a source DataSink first"));
|
|
197
203
|
return;
|
|
198
204
|
}
|
|
199
|
-
|
|
200
|
-
let e =
|
|
205
|
+
Xe(!0), et(!0), K(null);
|
|
206
|
+
let e = k.inputSinkKey;
|
|
201
207
|
try {
|
|
202
|
-
let t = await Y({ key: e }, { limit:
|
|
203
|
-
if (
|
|
208
|
+
let t = await Y({ key: e }, { limit: y });
|
|
209
|
+
if (W.current !== e) return;
|
|
204
210
|
t?.raw !== void 0 && t?.raw !== null ? (Qe(t.raw), nt({
|
|
205
211
|
total: t.totalCount ?? null,
|
|
206
212
|
hasMore: t.hasMore ?? null,
|
|
207
213
|
sinkName: Z
|
|
208
|
-
})) : K(
|
|
214
|
+
})) : K(x("bigconsole.parsers.builder.errors.noDataInSink", "No data available in selected DataSink"));
|
|
209
215
|
} catch (t) {
|
|
210
|
-
if (
|
|
211
|
-
K(t instanceof Error ? t.message :
|
|
216
|
+
if (W.current !== e) return;
|
|
217
|
+
K(t instanceof Error ? t.message : x("bigconsole.parsers.builder.errors.loadDataFailed", "Failed to load data"));
|
|
212
218
|
} finally {
|
|
213
219
|
et(!1);
|
|
214
220
|
}
|
|
215
221
|
}, [
|
|
216
|
-
|
|
217
|
-
|
|
222
|
+
G,
|
|
223
|
+
k.inputSinkKey,
|
|
218
224
|
Y,
|
|
219
225
|
Z,
|
|
220
|
-
|
|
226
|
+
x
|
|
221
227
|
]), Et = a(async () => {
|
|
222
|
-
if (!
|
|
223
|
-
|
|
228
|
+
if (!k.expression.trim()) {
|
|
229
|
+
R(x("bigconsole.parsers.builder.validation.expressionRequired", "Expression is required"));
|
|
224
230
|
return;
|
|
225
231
|
}
|
|
226
232
|
let e;
|
|
227
|
-
if (
|
|
228
|
-
type:
|
|
229
|
-
expression:
|
|
230
|
-
dataSinkKey:
|
|
231
|
-
sampleLimit:
|
|
233
|
+
if (V) e = {
|
|
234
|
+
type: k.type,
|
|
235
|
+
expression: k.expression,
|
|
236
|
+
dataSinkKey: k.inputSinkKey,
|
|
237
|
+
sampleLimit: y
|
|
232
238
|
};
|
|
233
239
|
else {
|
|
234
240
|
let t;
|
|
235
241
|
try {
|
|
236
|
-
t = JSON.parse(
|
|
242
|
+
t = JSON.parse(N);
|
|
237
243
|
} catch {
|
|
238
|
-
|
|
244
|
+
R(x("bigconsole.parsers.builder.errors.invalidInputJson", "Input JSON is not valid JSON"));
|
|
239
245
|
return;
|
|
240
246
|
}
|
|
241
247
|
e = {
|
|
242
|
-
type:
|
|
243
|
-
expression:
|
|
248
|
+
type: k.type,
|
|
249
|
+
expression: k.expression,
|
|
244
250
|
sampleData: t
|
|
245
251
|
};
|
|
246
252
|
}
|
|
247
|
-
|
|
253
|
+
Ke(!0), R(null), I(""), B(null);
|
|
248
254
|
try {
|
|
249
255
|
let t = await lt(e);
|
|
250
|
-
t ? t.success ? (
|
|
256
|
+
t ? t.success ? (I(JSON.stringify(t.output, null, 2)), t.sampled && B({
|
|
251
257
|
sampledRows: t.sampledRows ?? null,
|
|
252
258
|
totalRows: t.totalRows ?? null
|
|
253
|
-
})) :
|
|
259
|
+
})) : R(t.error || x("bigconsole.parsers.builder.errors.testFailed", "Test failed")) : R(x("bigconsole.parsers.builder.errors.testRequestFailed", "Test request failed — please try again."));
|
|
254
260
|
} catch (e) {
|
|
255
|
-
|
|
261
|
+
R(e instanceof Error ? e.message : x("bigconsole.parsers.builder.errors.testFailed", "Test failed"));
|
|
256
262
|
} finally {
|
|
257
|
-
|
|
263
|
+
Ke(!1);
|
|
258
264
|
}
|
|
259
265
|
}, [
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
266
|
+
k.type,
|
|
267
|
+
k.expression,
|
|
268
|
+
k.inputSinkKey,
|
|
269
|
+
N,
|
|
270
|
+
V,
|
|
265
271
|
lt,
|
|
266
|
-
|
|
272
|
+
x
|
|
267
273
|
]), Q = a(() => {
|
|
268
|
-
|
|
269
|
-
}, [
|
|
270
|
-
|
|
271
|
-
let e =
|
|
274
|
+
b(h ? `/dashboards/${h}/parsers` : "/parsers");
|
|
275
|
+
}, [b, h]), Dt = a(async () => {
|
|
276
|
+
We(null);
|
|
277
|
+
let e = ke(k, x);
|
|
272
278
|
if (Object.keys(e).length > 0) {
|
|
273
|
-
|
|
279
|
+
M(e), e.name || e.outputKey ? T(0) : e.inputSinkKey ? T(1) : e.expression && T(2);
|
|
274
280
|
return;
|
|
275
281
|
}
|
|
276
|
-
|
|
282
|
+
He(!0);
|
|
277
283
|
try {
|
|
278
|
-
if (
|
|
284
|
+
if (D && X) {
|
|
279
285
|
if (!await ct(X.id, {
|
|
280
|
-
name:
|
|
281
|
-
description:
|
|
282
|
-
expression:
|
|
283
|
-
inputSinkKey:
|
|
284
|
-
outputKey:
|
|
285
|
-
ttl:
|
|
286
|
-
}, X.version)) throw Error(
|
|
286
|
+
name: k.name,
|
|
287
|
+
description: k.description || void 0,
|
|
288
|
+
expression: k.expression,
|
|
289
|
+
inputSinkKey: k.inputSinkKey,
|
|
290
|
+
outputKey: k.outputKey,
|
|
291
|
+
ttl: k.ttl
|
|
292
|
+
}, X.version)) throw Error(x("bigconsole.parsers.builder.errors.updateFailed", "Failed to update parser"));
|
|
287
293
|
} else if (!await st({
|
|
288
|
-
consoleId:
|
|
289
|
-
name:
|
|
290
|
-
type:
|
|
291
|
-
expression:
|
|
292
|
-
inputSinkKey:
|
|
293
|
-
outputKey:
|
|
294
|
-
description:
|
|
295
|
-
ttl:
|
|
296
|
-
})) throw Error(
|
|
294
|
+
consoleId: Ne || "",
|
|
295
|
+
name: k.name,
|
|
296
|
+
type: k.type,
|
|
297
|
+
expression: k.expression,
|
|
298
|
+
inputSinkKey: k.inputSinkKey,
|
|
299
|
+
outputKey: k.outputKey,
|
|
300
|
+
description: k.description || void 0,
|
|
301
|
+
ttl: k.ttl ?? void 0
|
|
302
|
+
})) throw Error(x("bigconsole.parsers.builder.errors.createFailed", "Failed to create parser"));
|
|
297
303
|
Q();
|
|
298
304
|
} catch (e) {
|
|
299
|
-
|
|
305
|
+
We(e instanceof Error ? e.message : x("bigconsole.parsers.builder.errors.saveFailed", "Failed to save parser"));
|
|
300
306
|
} finally {
|
|
301
|
-
|
|
307
|
+
He(!1);
|
|
302
308
|
}
|
|
303
309
|
}, [
|
|
310
|
+
k,
|
|
304
311
|
D,
|
|
305
|
-
T,
|
|
306
312
|
X,
|
|
307
313
|
st,
|
|
308
314
|
ct,
|
|
309
|
-
|
|
315
|
+
Ne,
|
|
310
316
|
Q,
|
|
311
|
-
|
|
312
|
-
]), Ot = s(() =>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
]),
|
|
318
|
-
switch (
|
|
319
|
-
case "details": return
|
|
320
|
-
case "source": return
|
|
321
|
-
case "expression": return
|
|
317
|
+
x
|
|
318
|
+
]), Ot = s(() => k.name.trim().length >= 2 && k.expression.trim().length > 0 && k.inputSinkKey.trim().length > 0 && k.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(k.outputKey), [
|
|
319
|
+
k.name,
|
|
320
|
+
k.expression,
|
|
321
|
+
k.inputSinkKey,
|
|
322
|
+
k.outputKey
|
|
323
|
+
]), kt = a((e) => {
|
|
324
|
+
switch (Ee[e]) {
|
|
325
|
+
case "details": return k.name.trim().length >= 2 && k.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(k.outputKey);
|
|
326
|
+
case "source": return k.inputSinkKey.trim().length > 0;
|
|
327
|
+
case "expression": return k.expression.trim().length > 0;
|
|
322
328
|
default: return !0;
|
|
323
329
|
}
|
|
324
330
|
}, [
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
]),
|
|
330
|
-
let t = Math.max(0, Math.min(e,
|
|
331
|
-
if (t >
|
|
332
|
-
for (let e =
|
|
331
|
+
k.name,
|
|
332
|
+
k.outputKey,
|
|
333
|
+
k.inputSinkKey,
|
|
334
|
+
k.expression
|
|
335
|
+
]), At = a((e) => {
|
|
336
|
+
let t = Math.max(0, Math.min(e, C - 1));
|
|
337
|
+
if (t > w) {
|
|
338
|
+
for (let e = w; e < t; e++) if (!kt(e)) return;
|
|
333
339
|
}
|
|
334
|
-
|
|
340
|
+
T(t);
|
|
335
341
|
}, [
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
]),
|
|
340
|
-
|
|
341
|
-
}, [
|
|
342
|
-
|
|
342
|
+
w,
|
|
343
|
+
kt,
|
|
344
|
+
C
|
|
345
|
+
]), jt = a(() => {
|
|
346
|
+
T((e) => Math.min(e + 1, C - 1));
|
|
347
|
+
}, [C]), Mt = a(() => {
|
|
348
|
+
T((e) => Math.max(e - 1, 0));
|
|
343
349
|
}, []);
|
|
344
|
-
if (rt &&
|
|
350
|
+
if (rt && D || Fe) return /* @__PURE__ */ p("div", {
|
|
345
351
|
className: "flex items-center justify-center min-h-[400px]",
|
|
346
|
-
children: /* @__PURE__ */
|
|
352
|
+
children: /* @__PURE__ */ p(u, { className: "w-8 h-8 text-text-secondary animate-spin" })
|
|
347
353
|
});
|
|
348
|
-
if (
|
|
349
|
-
title:
|
|
350
|
-
description:
|
|
354
|
+
if (D && !Ie) return /* @__PURE__ */ p(oe, {
|
|
355
|
+
title: x("bigconsole.parsers.builder.accessDenied.title", "Access Denied"),
|
|
356
|
+
description: x("bigconsole.parsers.builder.accessDenied.description", "You don't have permission to view this parser.")
|
|
351
357
|
});
|
|
352
|
-
if (it) return /* @__PURE__ */
|
|
353
|
-
className: "
|
|
354
|
-
children: /* @__PURE__ */ p(
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
358
|
+
if (it) return /* @__PURE__ */ p("div", {
|
|
359
|
+
className: "p-card-padding",
|
|
360
|
+
children: /* @__PURE__ */ p(t, {
|
|
361
|
+
tone: "danger",
|
|
362
|
+
headingLevel: 2,
|
|
363
|
+
title: x("bigconsole.parsers.builder.errors.loadParserFailed", "Failed to load Parser"),
|
|
364
|
+
description: "The parser could not be fetched, so the form cannot be filled in.",
|
|
365
|
+
icon: /* @__PURE__ */ p(l, { className: "h-icon-md w-icon-md text-[var(--color-status-error-text)]" }),
|
|
366
|
+
actions: /* @__PURE__ */ m(d, {
|
|
367
|
+
onClick: Q,
|
|
368
|
+
variant: "secondary",
|
|
369
|
+
size: "sm",
|
|
370
|
+
children: [/* @__PURE__ */ p(le, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
|
|
371
|
+
}),
|
|
372
|
+
"data-testid": "parser-builder-load-error",
|
|
373
|
+
children: /* @__PURE__ */ p("p", {
|
|
374
|
+
className: "font-mono text-xs break-words text-text-secondary",
|
|
375
|
+
children: it.message
|
|
376
|
+
})
|
|
377
|
+
})
|
|
378
|
+
});
|
|
379
|
+
let Nt = S[k.type], Pt = w === C - 1, $ = /* @__PURE__ */ p("span", {
|
|
380
|
+
className: "text-xs font-medium text-text-muted",
|
|
381
|
+
children: x("bigconsole.parsers.builder.header.stepCounter", "Step {{current}} of {{total}}", {
|
|
382
|
+
current: w + 1,
|
|
383
|
+
total: C
|
|
367
384
|
})
|
|
368
385
|
});
|
|
369
|
-
|
|
370
|
-
return /* @__PURE__ */ f("div", {
|
|
386
|
+
return /* @__PURE__ */ p("div", {
|
|
371
387
|
className: "min-h-screen bg-bg-canvas",
|
|
372
388
|
children: /* @__PURE__ */ p("div", {
|
|
373
389
|
className: "max-w-4xl mx-auto p-card-padding pb-10",
|
|
374
|
-
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
className: "
|
|
390
|
+
children: /* @__PURE__ */ m(n, { children: [
|
|
391
|
+
/* @__PURE__ */ m("div", {
|
|
392
|
+
className: "border-b border-[var(--color-border-subtle)] pb-form-gap",
|
|
377
393
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ m(d, {
|
|
379
395
|
onClick: Q,
|
|
380
396
|
variant: "ghost",
|
|
381
397
|
size: "sm",
|
|
382
398
|
className: "mb-4",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
399
|
+
children: [/* @__PURE__ */ p(le, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
|
|
384
400
|
}),
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
className: "text-
|
|
387
|
-
children:
|
|
401
|
+
/* @__PURE__ */ p("h1", {
|
|
402
|
+
className: "text-2xl font-bold text-text-primary sm:text-3xl",
|
|
403
|
+
children: D ? x("bigconsole.parsers.builder.header.editTitle", "Edit Parser") : x("bigconsole.parsers.builder.header.createTitle", "Create Parser")
|
|
388
404
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
className: "text-
|
|
391
|
-
children:
|
|
405
|
+
/* @__PURE__ */ p("p", {
|
|
406
|
+
className: "text-sm text-text-secondary mt-1",
|
|
407
|
+
children: x("bigconsole.parsers.builder.header.subtitle", "Transform data using JQ or JSONata expressions.")
|
|
392
408
|
})
|
|
393
409
|
]
|
|
394
410
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
className: "
|
|
397
|
-
children:
|
|
411
|
+
/* @__PURE__ */ p(Ce, {
|
|
412
|
+
className: "max-w-[80ch]",
|
|
413
|
+
children: x("bigconsole.parsers.builder.header.purpose", "A parser maps raw input into structured fields using a JQ or JSONata expression. Write the expression, run it against a sample to confirm the output, and save it once it produces the shape you need — then reuse it across pipelines to normalise any source.")
|
|
398
414
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
className: "
|
|
401
|
-
children: /* @__PURE__ */
|
|
402
|
-
steps:
|
|
403
|
-
active:
|
|
404
|
-
onStepClick:
|
|
415
|
+
/* @__PURE__ */ p("div", {
|
|
416
|
+
className: "min-w-0 overflow-x-auto",
|
|
417
|
+
children: /* @__PURE__ */ p(we, {
|
|
418
|
+
steps: je,
|
|
419
|
+
active: w,
|
|
420
|
+
onStepClick: At
|
|
405
421
|
})
|
|
406
422
|
}),
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
423
|
+
Ue && /* @__PURE__ */ p(t, {
|
|
424
|
+
tone: "danger",
|
|
425
|
+
headingLevel: 2,
|
|
426
|
+
title: x("bigconsole.parsers.builder.errors.saveParserFailed", "Failed to save Parser"),
|
|
427
|
+
icon: /* @__PURE__ */ p(l, { className: "h-icon-sm w-icon-sm text-[var(--color-status-error-text)]" }),
|
|
428
|
+
"data-testid": "parser-submit-error",
|
|
429
|
+
children: /* @__PURE__ */ p("p", {
|
|
430
|
+
className: "font-mono text-xs break-words text-text-secondary",
|
|
431
|
+
children: Ue
|
|
432
|
+
})
|
|
416
433
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
k.name && /* @__PURE__ */ f("p", {
|
|
473
|
-
className: "text-xs text-status-error-text mt-1.5",
|
|
474
|
-
children: k.name
|
|
475
|
-
})
|
|
476
|
-
] }), /* @__PURE__ */ p("div", { children: [
|
|
477
|
-
/* @__PURE__ */ p("label", {
|
|
478
|
-
htmlFor: "outputKey",
|
|
479
|
-
className: "block text-sm font-medium text-text-primary mb-2",
|
|
480
|
-
children: [
|
|
481
|
-
_("bigconsole.parsers.builder.fields.outputKey.label", "Output Key"),
|
|
482
|
-
" ",
|
|
483
|
-
/* @__PURE__ */ f("span", {
|
|
484
|
-
className: "text-status-error-text",
|
|
485
|
-
children: "*"
|
|
486
|
-
})
|
|
487
|
-
]
|
|
488
|
-
}),
|
|
489
|
-
/* @__PURE__ */ f("input", {
|
|
490
|
-
id: "outputKey",
|
|
491
|
-
type: "text",
|
|
492
|
-
value: D.outputKey,
|
|
493
|
-
onChange: ht,
|
|
494
|
-
placeholder: "user_analytics_parser",
|
|
495
|
-
disabled: T,
|
|
496
|
-
className: `${h} font-mono ${k.outputKey ? "border-status-error-border" : "border-border-default"} disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60`
|
|
497
|
-
}),
|
|
498
|
-
k.outputKey && /* @__PURE__ */ f("p", {
|
|
499
|
-
className: "text-xs text-status-error-text mt-1.5",
|
|
500
|
-
children: k.outputKey
|
|
501
|
-
}),
|
|
502
|
-
!T && /* @__PURE__ */ f("p", {
|
|
503
|
-
className: "text-xs text-text-tertiary mt-1.5",
|
|
504
|
-
children: _("bigconsole.parsers.builder.fields.outputKey.helper", "Auto-generated from name. Customize if needed.")
|
|
505
|
-
})
|
|
506
|
-
] })]
|
|
507
|
-
}),
|
|
508
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
509
|
-
htmlFor: "description",
|
|
510
|
-
className: "block text-sm font-medium text-text-primary mb-2",
|
|
511
|
-
children: _("bigconsole.parsers.builder.fields.description.label", "Description")
|
|
512
|
-
}), /* @__PURE__ */ f("textarea", {
|
|
513
|
-
id: "description",
|
|
514
|
-
value: D.description,
|
|
515
|
-
onChange: gt,
|
|
516
|
-
placeholder: _("bigconsole.parsers.builder.fields.description.placeholder", "Describe what this parser does..."),
|
|
517
|
-
rows: 2,
|
|
518
|
-
className: `${h} border-border-default resize-y`
|
|
519
|
-
})] }),
|
|
520
|
-
E && /* @__PURE__ */ p("div", { children: [
|
|
521
|
-
/* @__PURE__ */ f("label", {
|
|
522
|
-
htmlFor: "dashboard",
|
|
523
|
-
className: "block text-sm font-medium text-text-primary mb-2",
|
|
524
|
-
children: /* @__PURE__ */ p("span", {
|
|
525
|
-
className: "flex items-center gap-2",
|
|
526
|
-
children: [/* @__PURE__ */ f(ge, { className: "w-4 h-4" }), _("bigconsole.parsers.builder.fields.dashboard.label", "Dashboard Scope")]
|
|
527
|
-
})
|
|
434
|
+
/* @__PURE__ */ m("form", {
|
|
435
|
+
className: "flex flex-col gap-section-gap",
|
|
436
|
+
onSubmit: (e) => {
|
|
437
|
+
e.preventDefault(), Pt && Dt();
|
|
438
|
+
},
|
|
439
|
+
children: [
|
|
440
|
+
w === 0 && /* @__PURE__ */ m(t, {
|
|
441
|
+
emphasis: "primary",
|
|
442
|
+
headingLevel: 2,
|
|
443
|
+
title: "Basic information",
|
|
444
|
+
description: "Essential details for your parser.",
|
|
445
|
+
icon: /* @__PURE__ */ p(ge, { className: "h-icon-sm w-icon-sm" }),
|
|
446
|
+
meta: $,
|
|
447
|
+
bodyClassName: "space-y-5",
|
|
448
|
+
"data-testid": "parser-basic-information",
|
|
449
|
+
children: [
|
|
450
|
+
/* @__PURE__ */ m("div", {
|
|
451
|
+
className: "grid gap-5 sm:grid-cols-2",
|
|
452
|
+
children: [/* @__PURE__ */ m("div", { children: [
|
|
453
|
+
/* @__PURE__ */ m("label", {
|
|
454
|
+
htmlFor: "name",
|
|
455
|
+
className: _,
|
|
456
|
+
children: [
|
|
457
|
+
x("bigconsole.parsers.builder.fields.name.label", "Name"),
|
|
458
|
+
" ",
|
|
459
|
+
/* @__PURE__ */ p("span", {
|
|
460
|
+
className: "text-status-error-text",
|
|
461
|
+
children: "*"
|
|
462
|
+
})
|
|
463
|
+
]
|
|
464
|
+
}),
|
|
465
|
+
/* @__PURE__ */ p("input", {
|
|
466
|
+
id: "name",
|
|
467
|
+
type: "text",
|
|
468
|
+
value: k.name,
|
|
469
|
+
onChange: mt,
|
|
470
|
+
placeholder: x("bigconsole.parsers.builder.fields.name.placeholder", "e.g., User Analytics Parser"),
|
|
471
|
+
className: g(!!j.name)
|
|
472
|
+
}),
|
|
473
|
+
j.name && /* @__PURE__ */ p("p", {
|
|
474
|
+
className: "text-xs text-status-error-text mt-1.5",
|
|
475
|
+
children: j.name
|
|
476
|
+
})
|
|
477
|
+
] }), /* @__PURE__ */ m("div", { children: [
|
|
478
|
+
/* @__PURE__ */ m("label", {
|
|
479
|
+
htmlFor: "outputKey",
|
|
480
|
+
className: _,
|
|
481
|
+
children: [
|
|
482
|
+
x("bigconsole.parsers.builder.fields.outputKey.label", "Output Key"),
|
|
483
|
+
" ",
|
|
484
|
+
/* @__PURE__ */ p("span", {
|
|
485
|
+
className: "text-status-error-text",
|
|
486
|
+
children: "*"
|
|
487
|
+
})
|
|
488
|
+
]
|
|
528
489
|
}),
|
|
529
|
-
/* @__PURE__ */ p("
|
|
530
|
-
id: "
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
}, e.id))]
|
|
490
|
+
/* @__PURE__ */ p("input", {
|
|
491
|
+
id: "outputKey",
|
|
492
|
+
type: "text",
|
|
493
|
+
value: k.outputKey,
|
|
494
|
+
onChange: ht,
|
|
495
|
+
placeholder: "user_analytics_parser",
|
|
496
|
+
disabled: D,
|
|
497
|
+
className: g(!!j.outputKey, "font-mono")
|
|
498
|
+
}),
|
|
499
|
+
j.outputKey && /* @__PURE__ */ p("p", {
|
|
500
|
+
className: "text-xs text-status-error-text mt-1.5",
|
|
501
|
+
children: j.outputKey
|
|
542
502
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
className:
|
|
545
|
-
children:
|
|
503
|
+
!D && /* @__PURE__ */ p("p", {
|
|
504
|
+
className: v,
|
|
505
|
+
children: x("bigconsole.parsers.builder.fields.outputKey.helper", "Auto-generated from name. Customize if needed.")
|
|
546
506
|
})
|
|
547
|
-
] })
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
507
|
+
] })]
|
|
508
|
+
}),
|
|
509
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
510
|
+
htmlFor: "description",
|
|
511
|
+
className: _,
|
|
512
|
+
children: x("bigconsole.parsers.builder.fields.description.label", "Description")
|
|
513
|
+
}), /* @__PURE__ */ p("textarea", {
|
|
514
|
+
id: "description",
|
|
515
|
+
value: k.description,
|
|
516
|
+
onChange: gt,
|
|
517
|
+
placeholder: x("bigconsole.parsers.builder.fields.description.placeholder", "Describe what this parser does..."),
|
|
518
|
+
rows: 3,
|
|
519
|
+
className: g(!1, "resize-y")
|
|
520
|
+
})] }),
|
|
521
|
+
O && /* @__PURE__ */ m("div", { children: [
|
|
522
|
+
/* @__PURE__ */ m("label", {
|
|
523
|
+
htmlFor: "dashboard",
|
|
524
|
+
className: `${_} flex items-center gap-2`,
|
|
525
|
+
children: [/* @__PURE__ */ p(_e, {
|
|
526
|
+
"aria-hidden": "true",
|
|
527
|
+
className: "w-4 h-4"
|
|
528
|
+
}), x("bigconsole.parsers.builder.fields.dashboard.label", "Dashboard Scope")]
|
|
529
|
+
}),
|
|
530
|
+
/* @__PURE__ */ m("select", {
|
|
531
|
+
id: "dashboard",
|
|
532
|
+
value: E,
|
|
533
|
+
onChange: xt,
|
|
534
|
+
disabled: pt || D,
|
|
535
|
+
className: g(),
|
|
536
|
+
children: [/* @__PURE__ */ p("option", {
|
|
537
|
+
value: "default",
|
|
538
|
+
children: x("bigconsole.parsers.builder.fields.dashboard.globalOption", "Global (available everywhere)")
|
|
539
|
+
}), dt.map((e) => /* @__PURE__ */ p("option", {
|
|
540
|
+
value: e.id,
|
|
541
|
+
children: e.name
|
|
542
|
+
}, e.id))]
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ p("p", {
|
|
545
|
+
className: v,
|
|
546
|
+
children: D ? x("bigconsole.parsers.builder.fields.dashboard.helperLocked", "Dashboard scope cannot be changed after creation.") : E === "default" ? x("bigconsole.parsers.builder.fields.dashboard.helperGlobal", "Global parsers are available across all dashboards.") : x("bigconsole.parsers.builder.fields.dashboard.helperScoped", "This parser will only be available in the selected dashboard.")
|
|
547
|
+
})
|
|
548
|
+
] })
|
|
549
|
+
]
|
|
550
|
+
}),
|
|
551
|
+
w === 1 && /* @__PURE__ */ m(t, {
|
|
552
|
+
emphasis: "primary",
|
|
553
|
+
headingLevel: 2,
|
|
554
|
+
title: "Parser configuration",
|
|
555
|
+
description: "Pick the language and point it at a source.",
|
|
556
|
+
icon: /* @__PURE__ */ p(pe, { className: "h-icon-sm w-icon-sm" }),
|
|
557
|
+
meta: $,
|
|
558
|
+
bodyClassName: "space-y-5",
|
|
559
|
+
"data-testid": "parser-configuration",
|
|
560
|
+
children: [/* @__PURE__ */ m("fieldset", {
|
|
561
|
+
className: "min-w-0 border-0 p-0 m-0",
|
|
562
|
+
children: [/* @__PURE__ */ m("legend", {
|
|
563
|
+
className: "mb-3 text-sm font-medium text-text-primary",
|
|
554
564
|
children: [
|
|
555
|
-
|
|
565
|
+
x("bigconsole.parsers.builder.fields.parserType.label", "Parser Type"),
|
|
556
566
|
" ",
|
|
557
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ p("span", {
|
|
558
568
|
className: "text-status-error-text",
|
|
559
569
|
children: "*"
|
|
560
570
|
})
|
|
561
571
|
]
|
|
562
|
-
}), /* @__PURE__ */
|
|
563
|
-
className: "
|
|
564
|
-
children: Object.keys(
|
|
565
|
-
let t =
|
|
566
|
-
return /* @__PURE__ */
|
|
567
|
-
className: `
|
|
568
|
-
|
|
572
|
+
}), /* @__PURE__ */ p("div", {
|
|
573
|
+
className: "space-y-2",
|
|
574
|
+
children: Object.keys(S).map((e) => {
|
|
575
|
+
let t = S[e];
|
|
576
|
+
return /* @__PURE__ */ m("label", {
|
|
577
|
+
className: `
|
|
578
|
+
flex items-start gap-3 p-3
|
|
579
|
+
rounded-md border
|
|
580
|
+
cursor-pointer
|
|
581
|
+
motion-safe:transition-colors
|
|
582
|
+
${k.type === e ? "border-action-primary-bg bg-action-primary-bg/5" : "border-transparent bg-bg-sunken hover:border-[var(--color-border-subtle)]"}
|
|
583
|
+
`,
|
|
584
|
+
children: [/* @__PURE__ */ p("input", {
|
|
569
585
|
type: "radio",
|
|
570
586
|
name: "parserType",
|
|
571
587
|
value: e,
|
|
572
|
-
checked:
|
|
588
|
+
checked: k.type === e,
|
|
573
589
|
onChange: () => _t(e),
|
|
574
590
|
className: "mt-1 w-4 h-4 text-action-primary-bg"
|
|
575
|
-
}), /* @__PURE__ */
|
|
576
|
-
className: "
|
|
577
|
-
children:
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
591
|
+
}), /* @__PURE__ */ m("span", {
|
|
592
|
+
className: "min-w-0",
|
|
593
|
+
children: [/* @__PURE__ */ p("span", {
|
|
594
|
+
className: "block text-sm font-medium text-text-primary",
|
|
595
|
+
children: t.name
|
|
596
|
+
}), /* @__PURE__ */ p("span", {
|
|
597
|
+
className: "mt-0.5 block text-xs text-text-secondary",
|
|
598
|
+
children: t.description
|
|
599
|
+
})]
|
|
600
|
+
})]
|
|
582
601
|
}, e);
|
|
583
602
|
})
|
|
584
|
-
})]
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
603
|
+
})]
|
|
604
|
+
}), /* @__PURE__ */ m("div", { children: [
|
|
605
|
+
/* @__PURE__ */ m("label", {
|
|
606
|
+
htmlFor: "inputSinkKey",
|
|
607
|
+
className: _,
|
|
608
|
+
children: [
|
|
609
|
+
x("bigconsole.parsers.builder.fields.sourceDataSink.label", "Source DataSink"),
|
|
610
|
+
" ",
|
|
611
|
+
/* @__PURE__ */ p("span", {
|
|
612
|
+
className: "text-status-error-text",
|
|
613
|
+
children: "*"
|
|
614
|
+
})
|
|
615
|
+
]
|
|
616
|
+
}),
|
|
617
|
+
/* @__PURE__ */ m("select", {
|
|
618
|
+
id: "inputSinkKey",
|
|
619
|
+
value: k.inputSinkKey,
|
|
620
|
+
onChange: yt,
|
|
621
|
+
className: g(!!j.inputSinkKey),
|
|
622
|
+
children: [/* @__PURE__ */ p("option", {
|
|
623
|
+
value: "",
|
|
624
|
+
children: x("bigconsole.parsers.builder.fields.sourceDataSink.placeholder", "Select a DataSink...")
|
|
625
|
+
}), J.map((e) => /* @__PURE__ */ p("option", {
|
|
626
|
+
value: e.key,
|
|
627
|
+
children: e.name || e.key
|
|
628
|
+
}, e.id))]
|
|
629
|
+
}),
|
|
630
|
+
j.inputSinkKey && /* @__PURE__ */ p("p", {
|
|
631
|
+
className: "text-xs text-status-error-text mt-1.5",
|
|
632
|
+
children: j.inputSinkKey
|
|
633
|
+
}),
|
|
634
|
+
J.length === 0 ? /* @__PURE__ */ p("p", {
|
|
635
|
+
className: v,
|
|
636
|
+
children: x("bigconsole.parsers.builder.fields.sourceDataSink.emptyState", "No DataSinks yet — create one first, then return here to build a parser for it.")
|
|
637
|
+
}) : /* @__PURE__ */ p("p", {
|
|
638
|
+
className: v,
|
|
639
|
+
children: "Select the data source for this parser to transform."
|
|
640
|
+
}),
|
|
641
|
+
k.inputSinkKey && /* @__PURE__ */ m("div", {
|
|
642
|
+
className: "mt-3",
|
|
643
|
+
children: [/* @__PURE__ */ m("button", {
|
|
644
|
+
type: "button",
|
|
645
|
+
onClick: Tt,
|
|
646
|
+
"aria-expanded": G,
|
|
647
|
+
"aria-controls": "parser-data-preview",
|
|
648
|
+
className: "inline-flex min-h-control-md items-center gap-2 rounded-md text-sm text-action-primary-bg hover:text-action-primary-bgHover motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
588
649
|
children: [
|
|
589
|
-
|
|
650
|
+
p(G ? de : fe, { className: "w-4 h-4" }),
|
|
651
|
+
/* @__PURE__ */ p(he, { className: "w-4 h-4" }),
|
|
652
|
+
x("bigconsole.parsers.builder.dataPreview.toggle", "Show Data Preview")
|
|
653
|
+
]
|
|
654
|
+
}), G && /* @__PURE__ */ p(t, {
|
|
655
|
+
id: "parser-data-preview",
|
|
656
|
+
emphasis: "muted",
|
|
657
|
+
padding: "compact",
|
|
658
|
+
headingLevel: 3,
|
|
659
|
+
title: "Sample data",
|
|
660
|
+
description: "A slice of the payload stored on the selected DataSink.",
|
|
661
|
+
className: "mt-3",
|
|
662
|
+
"data-testid": "parser-data-preview",
|
|
663
|
+
children: $e ? /* @__PURE__ */ m("div", {
|
|
664
|
+
className: "flex items-center justify-center p-4",
|
|
665
|
+
children: [/* @__PURE__ */ p(u, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ p("span", {
|
|
666
|
+
className: "ml-2 text-sm text-text-secondary",
|
|
667
|
+
children: x("bigconsole.parsers.builder.dataPreview.loading", "Loading sample…")
|
|
668
|
+
})]
|
|
669
|
+
}) : tt ? /* @__PURE__ */ p("p", {
|
|
670
|
+
className: "text-sm text-status-error-text",
|
|
671
|
+
children: tt
|
|
672
|
+
}) : Ze ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("pre", {
|
|
673
|
+
className: "max-h-48 min-w-0 overflow-auto rounded-md bg-bg-canvas p-3 font-mono text-xs text-text-primary",
|
|
674
|
+
children: JSON.stringify(Ze, null, 2)
|
|
675
|
+
}), q && /* @__PURE__ */ m("p", {
|
|
676
|
+
className: v,
|
|
677
|
+
children: [
|
|
678
|
+
x("bigconsole.parsers.builder.dataPreview.previewingSample", "Previewing a sample"),
|
|
679
|
+
q.total == null ? "" : x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
|
|
680
|
+
shown: Math.min(y, q.total),
|
|
681
|
+
total: q.total
|
|
682
|
+
}),
|
|
683
|
+
" · ",
|
|
684
|
+
q.sinkName
|
|
685
|
+
]
|
|
686
|
+
})] }) : /* @__PURE__ */ p("p", {
|
|
687
|
+
className: "text-center text-sm text-text-secondary",
|
|
688
|
+
children: x("bigconsole.parsers.builder.dataPreview.noData", "No data available")
|
|
689
|
+
})
|
|
690
|
+
})]
|
|
691
|
+
})
|
|
692
|
+
] })]
|
|
693
|
+
}),
|
|
694
|
+
w === 2 && /* @__PURE__ */ m(t, {
|
|
695
|
+
emphasis: "primary",
|
|
696
|
+
headingLevel: 2,
|
|
697
|
+
title: "Test expression",
|
|
698
|
+
description: "Write the expression, then run it against sample data before you save.",
|
|
699
|
+
icon: /* @__PURE__ */ p(ve, { className: "h-icon-sm w-icon-sm" }),
|
|
700
|
+
meta: $,
|
|
701
|
+
bodyClassName: "space-y-5",
|
|
702
|
+
"data-testid": "parser-test-expression",
|
|
703
|
+
children: [
|
|
704
|
+
/* @__PURE__ */ m("div", { children: [
|
|
705
|
+
/* @__PURE__ */ m("label", {
|
|
706
|
+
htmlFor: "expression",
|
|
707
|
+
className: _,
|
|
708
|
+
children: [
|
|
709
|
+
x("bigconsole.parsers.builder.fields.expression.label", "Expression"),
|
|
590
710
|
" ",
|
|
591
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ p("span", {
|
|
592
712
|
className: "text-status-error-text",
|
|
593
713
|
children: "*"
|
|
594
714
|
})
|
|
595
715
|
]
|
|
596
716
|
}),
|
|
597
|
-
/* @__PURE__ */ p("
|
|
598
|
-
id: "
|
|
599
|
-
value:
|
|
600
|
-
onChange:
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
children: _("bigconsole.parsers.builder.fields.sourceDataSink.placeholder", "Select a DataSink...")
|
|
605
|
-
}), J.map((e) => /* @__PURE__ */ f("option", {
|
|
606
|
-
value: e.key,
|
|
607
|
-
children: e.name || e.key
|
|
608
|
-
}, e.id))]
|
|
717
|
+
/* @__PURE__ */ p("textarea", {
|
|
718
|
+
id: "expression",
|
|
719
|
+
value: k.expression,
|
|
720
|
+
onChange: vt,
|
|
721
|
+
placeholder: Nt.placeholder,
|
|
722
|
+
rows: 8,
|
|
723
|
+
className: g(!!j.expression, "font-mono resize-y min-h-[12rem]")
|
|
609
724
|
}),
|
|
610
|
-
|
|
725
|
+
j.expression && /* @__PURE__ */ p("p", {
|
|
611
726
|
className: "text-xs text-status-error-text mt-1.5",
|
|
612
|
-
children:
|
|
727
|
+
children: j.expression
|
|
613
728
|
}),
|
|
614
|
-
|
|
615
|
-
className:
|
|
616
|
-
children:
|
|
617
|
-
}),
|
|
618
|
-
D.inputSinkKey && /* @__PURE__ */ p("div", {
|
|
619
|
-
className: "mt-3",
|
|
620
|
-
children: [/* @__PURE__ */ p("button", {
|
|
621
|
-
type: "button",
|
|
622
|
-
onClick: Tt,
|
|
623
|
-
className: "inline-flex items-center gap-2 text-sm text-action-primary-bg hover:text-action-primary-bgHover transition-colors",
|
|
624
|
-
children: [
|
|
625
|
-
f(W ? ue : de, { className: "w-4 h-4" }),
|
|
626
|
-
/* @__PURE__ */ f(me, { className: "w-4 h-4" }),
|
|
627
|
-
_("bigconsole.parsers.builder.dataPreview.toggle", "Show Data Preview")
|
|
628
|
-
]
|
|
629
|
-
}), W && /* @__PURE__ */ f("div", {
|
|
630
|
-
className: "mt-3 border border-border-default rounded-md overflow-hidden",
|
|
631
|
-
children: $e ? /* @__PURE__ */ p("div", {
|
|
632
|
-
className: "p-4 flex items-center justify-center",
|
|
633
|
-
children: [/* @__PURE__ */ f(l, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ f("span", {
|
|
634
|
-
className: "ml-2 text-sm text-text-secondary",
|
|
635
|
-
children: _("bigconsole.parsers.builder.dataPreview.loading", "Loading sample…")
|
|
636
|
-
})]
|
|
637
|
-
}) : tt ? /* @__PURE__ */ f("div", {
|
|
638
|
-
className: "p-4 bg-status-error-bg/5",
|
|
639
|
-
children: /* @__PURE__ */ f("p", {
|
|
640
|
-
className: "text-sm text-status-error-text",
|
|
641
|
-
children: tt
|
|
642
|
-
})
|
|
643
|
-
}) : Ze ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("pre", {
|
|
644
|
-
className: "p-3 text-xs font-mono bg-bg-sunken text-text-primary overflow-auto max-h-48",
|
|
645
|
-
children: JSON.stringify(Ze, null, 2)
|
|
646
|
-
}), q && /* @__PURE__ */ p("p", {
|
|
647
|
-
className: "px-3 py-2 text-xs text-text-tertiary border-t border-border-default",
|
|
648
|
-
children: [
|
|
649
|
-
_("bigconsole.parsers.builder.dataPreview.previewingSample", "Previewing a sample"),
|
|
650
|
-
q.total == null ? "" : _("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
|
|
651
|
-
shown: Math.min(m, q.total),
|
|
652
|
-
total: q.total
|
|
653
|
-
}),
|
|
654
|
-
" · ",
|
|
655
|
-
q.sinkName
|
|
656
|
-
]
|
|
657
|
-
})] }) : /* @__PURE__ */ f("div", {
|
|
658
|
-
className: "p-4 text-sm text-text-secondary text-center",
|
|
659
|
-
children: _("bigconsole.parsers.builder.dataPreview.noData", "No data available")
|
|
660
|
-
})
|
|
661
|
-
})]
|
|
729
|
+
/* @__PURE__ */ p("p", {
|
|
730
|
+
className: v,
|
|
731
|
+
children: x("bigconsole.parsers.builder.fields.expression.example", "Example: {{example}}", { example: Nt.example })
|
|
662
732
|
})
|
|
663
|
-
] })
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
})
|
|
689
|
-
k.expression && /* @__PURE__ */ f("p", {
|
|
690
|
-
className: "text-xs text-status-error-text mt-1.5",
|
|
691
|
-
children: k.expression
|
|
692
|
-
}),
|
|
693
|
-
/* @__PURE__ */ f("p", {
|
|
694
|
-
className: "text-xs text-text-tertiary mt-1.5",
|
|
695
|
-
children: _("bigconsole.parsers.builder.fields.expression.example", "Example: {{example}}", { example: Mt.example })
|
|
696
|
-
})
|
|
697
|
-
] }),
|
|
698
|
-
/* @__PURE__ */ f(ae, {
|
|
699
|
-
permission: r.PARSER_TEST,
|
|
700
|
-
deniedBehavior: "disable",
|
|
701
|
-
children: /* @__PURE__ */ f(u, {
|
|
702
|
-
type: "button",
|
|
703
|
-
onClick: Et,
|
|
704
|
-
disabled: qe || !D.expression.trim(),
|
|
705
|
-
variant: "default",
|
|
706
|
-
className: "w-full",
|
|
707
|
-
children: qe ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, { className: "w-4 h-4 mr-2 animate-spin" }), _("bigconsole.parsers.builder.actions.testing", "Testing...")] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(_e, { className: "w-4 h-4 mr-2" }), _("bigconsole.parsers.builder.actions.runTest", "Run Test")] })
|
|
708
|
-
})
|
|
733
|
+
] }),
|
|
734
|
+
/* @__PURE__ */ m("div", { children: [
|
|
735
|
+
/* @__PURE__ */ m("div", {
|
|
736
|
+
className: "mb-2 flex flex-wrap items-center justify-between gap-control-gap",
|
|
737
|
+
children: [/* @__PURE__ */ m("label", {
|
|
738
|
+
htmlFor: "test-input",
|
|
739
|
+
className: `${_} mb-0 flex flex-wrap items-center gap-2`,
|
|
740
|
+
children: [x("bigconsole.parsers.builder.test.inputJsonLabel", "Input JSON"), /* @__PURE__ */ p("span", {
|
|
741
|
+
className: `rounded border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${V ? "text-action-primary-bg bg-action-primary-bg/10 border-action-primary-bg/30" : "text-text-secondary bg-bg-sunken border-[var(--color-border-subtle)]"}`,
|
|
742
|
+
children: V ? x("bigconsole.parsers.builder.test.referenceMode", "Reference mode") : x("bigconsole.parsers.builder.test.sampleMode", "Sample mode")
|
|
743
|
+
})]
|
|
744
|
+
}), /* @__PURE__ */ m("div", {
|
|
745
|
+
className: "flex flex-wrap items-center gap-2",
|
|
746
|
+
children: [k.inputSinkKey && !V && /* @__PURE__ */ m("button", {
|
|
747
|
+
type: "button",
|
|
748
|
+
onClick: Ct,
|
|
749
|
+
disabled: Je,
|
|
750
|
+
className: "inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-action-primary-bg px-2.5 py-1.5 text-xs font-semibold text-action-primary-bg hover:bg-action-primary-bg/10 motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface disabled:opacity-50 disabled:cursor-not-allowed",
|
|
751
|
+
children: [Je ? /* @__PURE__ */ p(u, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ p(me, { className: "w-3.5 h-3.5" }), x("bigconsole.parsers.builder.actions.loadSample", "Load Sample")]
|
|
752
|
+
}), V && /* @__PURE__ */ m("button", {
|
|
753
|
+
type: "button",
|
|
754
|
+
onClick: wt,
|
|
755
|
+
className: "inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-[var(--color-border-default)] px-2.5 py-1.5 text-xs font-semibold text-text-primary hover:bg-bg-sunken motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
756
|
+
children: [/* @__PURE__ */ p(xe, { className: "w-3.5 h-3.5" }), x("bigconsole.parsers.builder.actions.clear", "Clear")]
|
|
757
|
+
})]
|
|
758
|
+
})]
|
|
709
759
|
}),
|
|
710
|
-
/* @__PURE__ */ p("
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
disabled: Ye,
|
|
727
|
-
className: "inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-semibold text-action-primary-bg border border-action-primary-bg rounded-md hover:bg-action-primary-bg/10 transition-colors disabled:opacity-50",
|
|
728
|
-
children: [Ye ? /* @__PURE__ */ f(l, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ f(pe, { className: "w-3.5 h-3.5" }), _("bigconsole.parsers.builder.actions.loadSample", "Load Sample")]
|
|
729
|
-
}), z && /* @__PURE__ */ p("button", {
|
|
730
|
-
type: "button",
|
|
731
|
-
onClick: wt,
|
|
732
|
-
className: "inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-semibold text-text-primary border border-border-default rounded-md hover:bg-bg-sunken transition-colors",
|
|
733
|
-
children: [/* @__PURE__ */ f(be, { className: "w-3.5 h-3.5" }), _("bigconsole.parsers.builder.actions.clear", "Clear")]
|
|
734
|
-
})]
|
|
735
|
-
})]
|
|
736
|
-
}),
|
|
737
|
-
/* @__PURE__ */ f("textarea", {
|
|
738
|
-
value: j,
|
|
739
|
-
onChange: St,
|
|
740
|
-
readOnly: z,
|
|
741
|
-
placeholder: _("bigconsole.parsers.builder.test.inputPlaceholder", "Type sample JSON to test against it — or Load a sample from the source…"),
|
|
742
|
-
rows: 8,
|
|
743
|
-
className: `${h} min-h-[220px] text-xs font-mono leading-relaxed resize-y border-border-default ${z ? "bg-bg-sunken opacity-80 cursor-not-allowed" : ""}`
|
|
744
|
-
}),
|
|
745
|
-
z && V ? /* @__PURE__ */ p("p", {
|
|
746
|
-
className: "text-xs text-text-tertiary mt-1.5",
|
|
747
|
-
children: [
|
|
748
|
-
_("bigconsole.parsers.builder.test.loadedSample", "Loaded a small sample"),
|
|
749
|
-
V.total == null ? "" : _("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
|
|
750
|
-
shown: Math.min(m, V.total),
|
|
751
|
-
total: V.total
|
|
752
|
-
}),
|
|
753
|
-
" ",
|
|
754
|
-
_("bigconsole.parsers.builder.test.loadedSampleFrom", "from {{sinkName}} · locked — press Clear to edit.", { sinkName: V.sinkName })
|
|
755
|
-
]
|
|
756
|
-
}) : /* @__PURE__ */ f("p", {
|
|
757
|
-
className: "text-xs text-text-tertiary mt-1.5",
|
|
758
|
-
children: _("bigconsole.parsers.builder.test.inputHelper", "Type sample JSON to test against it, or Load a sample from the source.")
|
|
759
|
-
})
|
|
760
|
-
] }), /* @__PURE__ */ p("div", { children: [
|
|
761
|
-
/* @__PURE__ */ p("div", {
|
|
762
|
-
className: "flex items-center justify-between mb-2",
|
|
763
|
-
children: [/* @__PURE__ */ f("label", {
|
|
764
|
-
className: "text-sm font-medium text-text-primary",
|
|
765
|
-
children: F ? _("bigconsole.parsers.builder.test.errorOutputLabel", "Error Output") : _("bigconsole.parsers.builder.test.outputLabel", "Output")
|
|
766
|
-
}), (N || F) && (F ? /* @__PURE__ */ p("span", {
|
|
767
|
-
className: "text-xs px-2 py-1 bg-status-error-bg/10 text-status-error-text rounded flex items-center gap-1",
|
|
768
|
-
children: [
|
|
769
|
-
/* @__PURE__ */ f(se, { className: "w-3 h-3" }),
|
|
770
|
-
" ",
|
|
771
|
-
_("bigconsole.parsers.builder.test.failed", "Failed")
|
|
772
|
-
]
|
|
773
|
-
}) : /* @__PURE__ */ p("span", {
|
|
774
|
-
className: "text-xs px-2 py-1 bg-status-success-bg/10 text-status-success-text rounded flex items-center gap-1",
|
|
775
|
-
children: [
|
|
776
|
-
/* @__PURE__ */ f(le, { className: "w-3 h-3" }),
|
|
777
|
-
" ",
|
|
778
|
-
_("bigconsole.parsers.builder.test.passed", "Passed")
|
|
779
|
-
]
|
|
780
|
-
}))]
|
|
781
|
-
}),
|
|
782
|
-
N || F ? /* @__PURE__ */ f("pre", {
|
|
783
|
-
className: `w-full px-3 py-2.5 text-xs font-mono leading-relaxed border rounded-md overflow-auto min-h-[220px] max-h-[220px] resize-y ${F ? "bg-status-error-bg/5 text-status-error-text border-status-error-border/30" : "bg-status-success-bg/5 text-text-primary border-status-success-border/30"}`,
|
|
784
|
-
children: F || N
|
|
785
|
-
}) : /* @__PURE__ */ f("div", {
|
|
786
|
-
className: "min-h-[220px] p-3 bg-bg-sunken rounded-md border border-border-default",
|
|
787
|
-
children: /* @__PURE__ */ p("p", {
|
|
788
|
-
className: "text-xs text-text-secondary leading-relaxed",
|
|
789
|
-
children: [
|
|
790
|
-
/* @__PURE__ */ f("strong", { children: _("bigconsole.parsers.builder.test.tipLabel", "Tip:") }),
|
|
791
|
-
" ",
|
|
792
|
-
_("bigconsole.parsers.builder.test.tipBody", "write your expression and click “Run Test” to see the transformation.")
|
|
793
|
-
]
|
|
794
|
-
})
|
|
760
|
+
/* @__PURE__ */ p("textarea", {
|
|
761
|
+
id: "test-input",
|
|
762
|
+
value: N,
|
|
763
|
+
onChange: St,
|
|
764
|
+
readOnly: V,
|
|
765
|
+
placeholder: x("bigconsole.parsers.builder.test.inputPlaceholder", "Type sample JSON to test against it — or Load a sample from the source…"),
|
|
766
|
+
rows: 8,
|
|
767
|
+
className: g(!1, `font-mono leading-relaxed resize-y ${V ? "bg-bg-sunken opacity-80 cursor-not-allowed" : ""}`)
|
|
768
|
+
}),
|
|
769
|
+
V && U ? /* @__PURE__ */ m("p", {
|
|
770
|
+
className: v,
|
|
771
|
+
children: [
|
|
772
|
+
x("bigconsole.parsers.builder.test.loadedSample", "Loaded a small sample"),
|
|
773
|
+
U.total == null ? "" : x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
|
|
774
|
+
shown: Math.min(y, U.total),
|
|
775
|
+
total: U.total
|
|
795
776
|
}),
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
total: L.totalRows
|
|
803
|
-
}) : "",
|
|
804
|
-
_("bigconsole.parsers.builder.test.testedSampleNote", " — a saved parser runs over the full source, so results may differ.")
|
|
805
|
-
]
|
|
806
|
-
})
|
|
807
|
-
] })]
|
|
777
|
+
" ",
|
|
778
|
+
x("bigconsole.parsers.builder.test.loadedSampleFrom", "from {{sinkName}} · locked — press Clear to edit.", { sinkName: U.sinkName })
|
|
779
|
+
]
|
|
780
|
+
}) : /* @__PURE__ */ p("p", {
|
|
781
|
+
className: v,
|
|
782
|
+
children: x("bigconsole.parsers.builder.test.inputHelper", "Type sample JSON to test against it, or Load a sample from the source.")
|
|
808
783
|
})
|
|
809
|
-
]
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
className: "
|
|
820
|
-
|
|
784
|
+
] }),
|
|
785
|
+
/* @__PURE__ */ p(se, {
|
|
786
|
+
permission: r.PARSER_TEST,
|
|
787
|
+
deniedBehavior: "disable",
|
|
788
|
+
children: /* @__PURE__ */ p(d, {
|
|
789
|
+
type: "button",
|
|
790
|
+
onClick: Et,
|
|
791
|
+
disabled: Ge || !k.expression.trim(),
|
|
792
|
+
variant: "default",
|
|
793
|
+
className: "w-full",
|
|
794
|
+
children: Ge ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { className: "w-4 h-4 mr-2 animate-spin" }), x("bigconsole.parsers.builder.actions.testing", "Testing...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ve, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.actions.runTest", "Run Test")] })
|
|
795
|
+
})
|
|
796
|
+
}),
|
|
797
|
+
(F || L) && /* @__PURE__ */ m(t, {
|
|
798
|
+
emphasis: "muted",
|
|
799
|
+
padding: "compact",
|
|
800
|
+
headingLevel: 3,
|
|
801
|
+
tone: L ? "danger" : "success",
|
|
802
|
+
title: L ? x("bigconsole.parsers.builder.test.errorOutputLabel", "Error Output") : x("bigconsole.parsers.builder.test.outputLabel", "Output"),
|
|
803
|
+
meta: L ? /* @__PURE__ */ m("span", {
|
|
804
|
+
className: "inline-flex items-center gap-1 text-xs text-[var(--color-status-error-text)]",
|
|
805
|
+
children: [
|
|
806
|
+
/* @__PURE__ */ p(l, { className: "w-3 h-3" }),
|
|
807
|
+
" ",
|
|
808
|
+
x("bigconsole.parsers.builder.test.failed", "Failed")
|
|
809
|
+
]
|
|
810
|
+
}) : /* @__PURE__ */ m("span", {
|
|
811
|
+
className: "inline-flex items-center gap-1 text-xs text-status-success-text",
|
|
812
|
+
children: [
|
|
813
|
+
/* @__PURE__ */ p(ue, { className: "w-3 h-3" }),
|
|
814
|
+
" ",
|
|
815
|
+
x("bigconsole.parsers.builder.test.passed", "Passed")
|
|
816
|
+
]
|
|
821
817
|
}),
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
818
|
+
"data-testid": "parser-test-output",
|
|
819
|
+
children: [/* @__PURE__ */ p("pre", {
|
|
820
|
+
className: "max-h-[150px] min-w-0 overflow-auto rounded-md bg-bg-canvas px-3 py-2.5 font-mono text-xs leading-relaxed text-text-primary",
|
|
821
|
+
children: L || F
|
|
822
|
+
}), z && !L && /* @__PURE__ */ m("p", {
|
|
823
|
+
className: v,
|
|
824
|
+
children: [
|
|
825
|
+
x("bigconsole.parsers.builder.test.testedSample", "Tested a sample"),
|
|
826
|
+
z.sampledRows != null && z.totalRows != null ? x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
|
|
827
|
+
shown: z.sampledRows,
|
|
828
|
+
total: z.totalRows
|
|
829
|
+
}) : "",
|
|
830
|
+
x("bigconsole.parsers.builder.test.testedSampleNote", " — a saved parser runs over the full source, so results may differ.")
|
|
831
|
+
]
|
|
832
|
+
})]
|
|
833
|
+
}),
|
|
834
|
+
!F && !L && /* @__PURE__ */ p(t, {
|
|
835
|
+
emphasis: "muted",
|
|
836
|
+
padding: "compact",
|
|
837
|
+
headingLevel: 3,
|
|
838
|
+
title: "No run yet",
|
|
839
|
+
"data-testid": "parser-test-empty",
|
|
840
|
+
children: /* @__PURE__ */ m("p", {
|
|
841
|
+
className: "text-xs leading-relaxed text-text-secondary",
|
|
842
|
+
children: [
|
|
843
|
+
/* @__PURE__ */ p("strong", { children: x("bigconsole.parsers.builder.test.tipLabel", "Tip:") }),
|
|
844
|
+
" ",
|
|
845
|
+
x("bigconsole.parsers.builder.test.tipBody", "write your expression and click “Run Test” to see the transformation.")
|
|
846
|
+
]
|
|
827
847
|
})
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
}), /* @__PURE__ */ f("span", {
|
|
845
|
-
className: "font-medium text-text-primary text-right break-words",
|
|
846
|
-
children: t
|
|
847
|
-
})]
|
|
848
|
-
}, e))
|
|
849
|
-
})] })]
|
|
848
|
+
})
|
|
849
|
+
]
|
|
850
|
+
}),
|
|
851
|
+
w === 3 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(t, {
|
|
852
|
+
emphasis: "primary",
|
|
853
|
+
headingLevel: 2,
|
|
854
|
+
title: x("bigconsole.parsers.builder.review.cacheDurationLabel", "Cache Duration"),
|
|
855
|
+
description: x("bigconsole.parsers.builder.review.cacheDurationHelper", "How long should data be cached before refreshing?"),
|
|
856
|
+
icon: /* @__PURE__ */ p(be, { className: "h-icon-sm w-icon-sm" }),
|
|
857
|
+
meta: $,
|
|
858
|
+
"data-testid": "parser-advanced-settings",
|
|
859
|
+
children: /* @__PURE__ */ p(re, {
|
|
860
|
+
value: k.ttl,
|
|
861
|
+
onChange: bt,
|
|
862
|
+
error: j.ttl,
|
|
863
|
+
hideLabel: !0
|
|
850
864
|
})
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
865
|
+
}), /* @__PURE__ */ p(t, {
|
|
866
|
+
emphasis: "muted",
|
|
867
|
+
headingLevel: 2,
|
|
868
|
+
title: x("bigconsole.parsers.builder.review.label", "Review"),
|
|
869
|
+
description: "Check these details before you save.",
|
|
870
|
+
"data-testid": "parser-review",
|
|
871
|
+
children: /* @__PURE__ */ p("div", {
|
|
872
|
+
className: "overflow-hidden rounded-lg border border-[var(--color-border-subtle)]",
|
|
873
|
+
children: [
|
|
874
|
+
[x("bigconsole.parsers.builder.review.name", "Name"), k.name || "—"],
|
|
875
|
+
[x("bigconsole.parsers.builder.review.outputKey", "Output Key"), k.outputKey || "—"],
|
|
876
|
+
[x("bigconsole.parsers.builder.review.scope", "Scope"), O ? E === "default" ? x("bigconsole.parsers.builder.review.scopeGlobal", "Global") : dt.find((e) => e.id === E)?.name || E : x("bigconsole.parsers.builder.review.scopeDashboard", "Dashboard")],
|
|
877
|
+
[x("bigconsole.parsers.builder.review.type", "Type"), S[k.type].name],
|
|
878
|
+
[x("bigconsole.parsers.builder.review.source", "Source"), Z || "—"]
|
|
879
|
+
].map(([e, t]) => /* @__PURE__ */ m("div", {
|
|
880
|
+
className: "flex flex-wrap items-center justify-between gap-3 border-b border-[var(--color-border-subtle)] px-4 py-2.5 text-sm last:border-b-0",
|
|
881
|
+
children: [/* @__PURE__ */ p("span", {
|
|
882
|
+
className: "text-text-secondary",
|
|
883
|
+
children: e
|
|
884
|
+
}), /* @__PURE__ */ p("span", {
|
|
885
|
+
className: "min-w-0 break-words text-right font-medium text-text-primary",
|
|
886
|
+
children: t
|
|
887
|
+
})]
|
|
888
|
+
}, e))
|
|
889
|
+
})
|
|
890
|
+
})] }),
|
|
891
|
+
/* @__PURE__ */ m("div", {
|
|
892
|
+
className: "sticky bottom-0 z-10 flex flex-col-reverse gap-control-gap border-t border-[var(--color-border-subtle)] bg-bg-canvas py-form-gap sm:flex-row sm:items-center sm:justify-between",
|
|
893
|
+
children: [w === 0 ? /* @__PURE__ */ p(d, {
|
|
894
|
+
type: "button",
|
|
895
|
+
onClick: Q,
|
|
896
|
+
variant: "secondary",
|
|
897
|
+
className: "w-full sm:w-auto",
|
|
898
|
+
children: x("bigconsole.parsers.builder.actions.cancel", "Cancel")
|
|
899
|
+
}) : /* @__PURE__ */ m(d, {
|
|
900
|
+
type: "button",
|
|
901
|
+
onClick: Mt,
|
|
902
|
+
variant: "secondary",
|
|
903
|
+
className: "w-full sm:w-auto",
|
|
904
|
+
children: [/* @__PURE__ */ p(le, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.actions.back", "Back")]
|
|
905
|
+
}), Pt ? /* @__PURE__ */ p(se, {
|
|
906
|
+
permission: Re,
|
|
907
|
+
deniedBehavior: "disable",
|
|
908
|
+
children: /* @__PURE__ */ p(d, {
|
|
909
|
+
type: "submit",
|
|
910
|
+
disabled: !Ot || Ve || !Le,
|
|
911
|
+
variant: "default",
|
|
912
|
+
className: "w-full sm:w-auto",
|
|
913
|
+
children: Ve ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { className: "w-4 h-4 mr-2 animate-spin" }), x("bigconsole.parsers.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ye, { className: "w-4 h-4 mr-2" }), D ? x("bigconsole.parsers.builder.actions.saveChanges", "Save Changes") : x("bigconsole.parsers.builder.actions.createParser", "Create Parser")] })
|
|
914
|
+
})
|
|
915
|
+
}) : /* @__PURE__ */ m(d, {
|
|
916
|
+
type: "button",
|
|
917
|
+
onClick: jt,
|
|
918
|
+
disabled: !kt(w),
|
|
919
|
+
variant: "default",
|
|
920
|
+
className: "w-full sm:w-auto",
|
|
921
|
+
children: [x("bigconsole.parsers.builder.actions.next", "Next"), /* @__PURE__ */ p(fe, { className: "w-4 h-4 ml-2" })]
|
|
922
|
+
})]
|
|
875
923
|
})
|
|
876
|
-
|
|
877
|
-
type: "button",
|
|
878
|
-
onClick: At,
|
|
879
|
-
disabled: !$(x),
|
|
880
|
-
variant: "default",
|
|
881
|
-
children: [_("bigconsole.parsers.builder.actions.next", "Next"), /* @__PURE__ */ f(de, { className: "w-4 h-4 ml-2" })]
|
|
882
|
-
})]
|
|
924
|
+
]
|
|
883
925
|
})
|
|
884
|
-
]
|
|
926
|
+
] })
|
|
885
927
|
})
|
|
886
928
|
});
|
|
887
929
|
});
|
|
888
930
|
//#endregion
|
|
889
|
-
export {
|
|
931
|
+
export { b as ParserBuilderPage, b as default };
|
|
890
932
|
|
|
891
933
|
//# sourceMappingURL=ParserBuilderPage.js.map
|