@flanksource/clicky-ui 0.3.84 → 0.3.85
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/components/Combobox.cjs +8 -6
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +8 -6
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +7 -4
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts +3 -2
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +7 -4
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/FilterBar.cjs +64 -47
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +20 -2
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +63 -46
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/TimeRange.cjs +156 -128
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts +8 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +156 -128
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/combobox-types.d.ts +5 -0
- package/dist/components/combobox-types.d.ts.map +1 -1
- package/dist/components/filter-bar-context.cjs.map +1 -1
- package/dist/components/filter-bar-context.d.ts +2 -0
- package/dist/components/filter-bar-context.d.ts.map +1 -1
- package/dist/components/filter-bar-context.js.map +1 -1
- package/dist/components/filter-bar-field-utils.cjs +18 -4
- package/dist/components/filter-bar-field-utils.cjs.map +1 -1
- package/dist/components/filter-bar-field-utils.d.ts +3 -2
- package/dist/components/filter-bar-field-utils.d.ts.map +1 -1
- package/dist/components/filter-bar-field-utils.js +19 -5
- package/dist/components/filter-bar-field-utils.js.map +1 -1
- package/dist/components/filter-bar-menu.cjs +189 -0
- package/dist/components/filter-bar-menu.cjs.map +1 -0
- package/dist/components/filter-bar-menu.d.ts +25 -0
- package/dist/components/filter-bar-menu.d.ts.map +1 -0
- package/dist/components/filter-bar-menu.js +189 -0
- package/dist/components/filter-bar-menu.js.map +1 -0
- package/dist/components/filter-bar-multi.cjs +1 -1
- package/dist/components/filter-bar-multi.cjs.map +1 -1
- package/dist/components/filter-bar-multi.js +2 -2
- package/dist/components/filter-bar-multi.js.map +1 -1
- package/dist/components/filter-bar-popup.cjs +37 -0
- package/dist/components/filter-bar-popup.cjs.map +1 -0
- package/dist/components/filter-bar-popup.d.ts +32 -0
- package/dist/components/filter-bar-popup.d.ts.map +1 -0
- package/dist/components/filter-bar-popup.js +37 -0
- package/dist/components/filter-bar-popup.js.map +1 -0
- package/dist/components/filter-bar-tree.cjs +1 -1
- package/dist/components/filter-bar-tree.cjs.map +1 -1
- package/dist/components/filter-bar-tree.js +2 -2
- package/dist/components/filter-bar-tree.js.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +5 -3
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +5 -3
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/connections/ConnectionPicker.cjs +6 -2
- package/dist/connections/ConnectionPicker.cjs.map +1 -1
- package/dist/connections/ConnectionPicker.d.ts.map +1 -1
- package/dist/connections/ConnectionPicker.js +6 -2
- package/dist/connections/ConnectionPicker.js.map +1 -1
- package/dist/connections/CreateConnectionDialog.cjs +8 -21
- package/dist/connections/CreateConnectionDialog.cjs.map +1 -1
- package/dist/connections/CreateConnectionDialog.d.ts +2 -1
- package/dist/connections/CreateConnectionDialog.d.ts.map +1 -1
- package/dist/connections/CreateConnectionDialog.js +8 -21
- package/dist/connections/CreateConnectionDialog.js.map +1 -1
- package/dist/data/ExpandableMarkdown.cjs +59 -0
- package/dist/data/ExpandableMarkdown.cjs.map +1 -0
- package/dist/data/ExpandableMarkdown.d.ts +17 -0
- package/dist/data/ExpandableMarkdown.d.ts.map +1 -0
- package/dist/data/ExpandableMarkdown.js +59 -0
- package/dist/data/ExpandableMarkdown.js.map +1 -0
- package/dist/data/MultiGaugeBar.cjs +49 -21
- package/dist/data/MultiGaugeBar.cjs.map +1 -1
- package/dist/data/MultiGaugeBar.d.ts +5 -2
- package/dist/data/MultiGaugeBar.d.ts.map +1 -1
- package/dist/data/MultiGaugeBar.js +49 -21
- package/dist/data/MultiGaugeBar.js.map +1 -1
- package/dist/data/flow-node/BoxNode.cjs +45 -0
- package/dist/data/flow-node/BoxNode.cjs.map +1 -0
- package/dist/data/flow-node/BoxNode.d.ts +28 -0
- package/dist/data/flow-node/BoxNode.d.ts.map +1 -0
- package/dist/data/flow-node/BoxNode.js +45 -0
- package/dist/data/flow-node/BoxNode.js.map +1 -0
- package/dist/data/flow-node/FlowMetrics.cjs +208 -0
- package/dist/data/flow-node/FlowMetrics.cjs.map +1 -0
- package/dist/data/flow-node/FlowMetrics.d.ts +60 -0
- package/dist/data/flow-node/FlowMetrics.d.ts.map +1 -0
- package/dist/data/flow-node/FlowMetrics.js +206 -0
- package/dist/data/flow-node/FlowMetrics.js.map +1 -0
- package/dist/data/flow-node/WorkloadNode.cjs +63 -0
- package/dist/data/flow-node/WorkloadNode.cjs.map +1 -0
- package/dist/data/flow-node/WorkloadNode.d.ts +42 -0
- package/dist/data/flow-node/WorkloadNode.d.ts.map +1 -0
- package/dist/data/flow-node/WorkloadNode.js +63 -0
- package/dist/data/flow-node/WorkloadNode.js.map +1 -0
- package/dist/data/flow-node/index.d.ts +5 -0
- package/dist/data/flow-node/index.d.ts.map +1 -0
- package/dist/data/flow-node/latency.cjs +37 -0
- package/dist/data/flow-node/latency.cjs.map +1 -0
- package/dist/data/flow-node/latency.d.ts +13 -0
- package/dist/data/flow-node/latency.d.ts.map +1 -0
- package/dist/data/flow-node/latency.js +35 -0
- package/dist/data/flow-node/latency.js.map +1 -0
- package/dist/data/traces/index.d.ts +1 -0
- package/dist/data/traces/index.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceDetail.cjs +4 -7
- package/dist/data/traces/otel/OtelTraceDetail.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceDetail.js +4 -7
- package/dist/data/traces/otel/OtelTraceDetail.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceSearch.cjs +90 -56
- package/dist/data/traces/otel/OtelTraceSearch.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceSearch.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceSearch.js +91 -57
- package/dist/data/traces/otel/OtelTraceSearch.js.map +1 -1
- package/dist/data/traces/otel/QueryBar.cjs +83 -10
- package/dist/data/traces/otel/QueryBar.cjs.map +1 -1
- package/dist/data/traces/otel/QueryBar.d.ts.map +1 -1
- package/dist/data/traces/otel/QueryBar.js +83 -10
- package/dist/data/traces/otel/QueryBar.js.map +1 -1
- package/dist/data/traces/otel/TraceResults.cjs +81 -13
- package/dist/data/traces/otel/TraceResults.cjs.map +1 -1
- package/dist/data/traces/otel/TraceResults.d.ts +11 -3
- package/dist/data/traces/otel/TraceResults.d.ts.map +1 -1
- package/dist/data/traces/otel/TraceResults.js +81 -13
- package/dist/data/traces/otel/TraceResults.js.map +1 -1
- package/dist/data/traces/otel/api.cjs.map +1 -1
- package/dist/data/traces/otel/api.d.ts +14 -0
- package/dist/data/traces/otel/api.d.ts.map +1 -1
- package/dist/data/traces/otel/api.js.map +1 -1
- package/dist/data/traces/otel/query.cjs +2 -2
- package/dist/data/traces/otel/query.cjs.map +1 -1
- package/dist/data/traces/otel/query.d.ts +1 -1
- package/dist/data/traces/otel/query.d.ts.map +1 -1
- package/dist/data/traces/otel/query.js +2 -2
- package/dist/data/traces/otel/query.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.cjs.map +1 -1
- package/dist/data/version-info.js +3 -3
- package/dist/data/version-info.js.map +1 -1
- package/dist/data/workload-panel/MemoryStack.cjs +38 -1
- package/dist/data/workload-panel/MemoryStack.cjs.map +1 -1
- package/dist/data/workload-panel/MemoryStack.d.ts.map +1 -1
- package/dist/data/workload-panel/MemoryStack.js +38 -1
- package/dist/data/workload-panel/MemoryStack.js.map +1 -1
- package/dist/data.cjs +18 -1
- package/dist/data.d.ts +2 -0
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +8 -2
- package/dist/file-findings/AnnotatedCode.cjs +18 -2
- package/dist/file-findings/AnnotatedCode.cjs.map +1 -1
- package/dist/file-findings/AnnotatedCode.d.ts +2 -0
- package/dist/file-findings/AnnotatedCode.d.ts.map +1 -1
- package/dist/file-findings/AnnotatedCode.js +18 -2
- package/dist/file-findings/AnnotatedCode.js.map +1 -1
- package/dist/file-findings/FileFindingsView.cjs.map +1 -1
- package/dist/file-findings/FileFindingsView.d.ts +2 -0
- package/dist/file-findings/FileFindingsView.d.ts.map +1 -1
- package/dist/file-findings/FileFindingsView.js.map +1 -1
- package/dist/file-findings/file-review/FileReview.cjs +2 -1
- package/dist/file-findings/file-review/FileReview.cjs.map +1 -1
- package/dist/file-findings/file-review/FileReview.d.ts +3 -1
- package/dist/file-findings/file-review/FileReview.d.ts.map +1 -1
- package/dist/file-findings/file-review/FileReview.js +2 -1
- package/dist/file-findings/file-review/FileReview.js.map +1 -1
- package/dist/index.cjs +18 -1
- package/dist/index.js +8 -2
- package/dist/profiles/editor/profileEditor.cjs +29 -30
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditor.js +29 -30
- package/dist/profiles/editor/profileEditor.js.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.cjs +44 -43
- package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.d.ts +10 -5
- package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.js +44 -43
- package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.cjs +153 -48
- package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts +16 -2
- package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.js +155 -50
- package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
- package/dist/profiles/editor/sampleError.cjs +29 -0
- package/dist/profiles/editor/sampleError.cjs.map +1 -0
- package/dist/profiles/editor/sampleError.d.ts +16 -0
- package/dist/profiles/editor/sampleError.d.ts.map +1 -0
- package/dist/profiles/editor/sampleError.js +27 -0
- package/dist/profiles/editor/sampleError.js.map +1 -0
- package/dist/profiles/query/profileSampleResult.cjs.map +1 -1
- package/dist/profiles/query/profileSampleResult.d.ts +2 -0
- package/dist/profiles/query/profileSampleResult.d.ts.map +1 -1
- package/dist/profiles/query/profileSampleResult.js.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.cjs +1 -0
- package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts +2 -0
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.js +1 -0
- package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
- package/dist/react-grab/core/index.js +1 -1
- package/dist/react-grab/{core-BERtFDWh.js → core-BK5CU6Lb.js} +2 -2
- package/dist/react-grab/index.js +1 -1
- package/dist/react-grab/{renderer-KT3FY3K2.js → renderer-DcHrsQ8k.js} +1 -1
- package/dist/rpc/apiClient.cjs +12 -15
- package/dist/rpc/apiClient.cjs.map +1 -1
- package/dist/rpc/apiClient.js +12 -15
- package/dist/rpc/apiClient.js.map +1 -1
- package/dist/runtime/barrels.json +6481 -6441
- package/dist/runtime/importmap.json +2198 -2190
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -4,19 +4,33 @@ const require_profile_spans = require("../../data/traces/otel/profile-spans.cjs"
|
|
|
4
4
|
const require_profile_listing = require("../../data/traces/otel/profile-listing.cjs");
|
|
5
5
|
const require_Clicky = require("../../data/Clicky.cjs");
|
|
6
6
|
const require_Callout = require("../../data/Callout.cjs");
|
|
7
|
+
const require_utils = require("../../lib/utils.cjs");
|
|
7
8
|
const require_profileApi = require("../profileApi.cjs");
|
|
9
|
+
const require_sampleError = require("./sampleError.cjs");
|
|
8
10
|
let react = require("react");
|
|
9
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
12
|
// src/profiles/editor/profileMappingPreview.tsx
|
|
11
|
-
|
|
13
|
+
var UNRESOLVED_REASONS = /* @__PURE__ */ new Set(["no_source", "no_value"]);
|
|
14
|
+
function ProfileMappingPreview({ profile, sampleId, onNormalized, filters, stale = false, onSampleExpired, onSelectColumn, onStatusChange }) {
|
|
12
15
|
const normalizedCallback = (0, react.useRef)(onNormalized);
|
|
13
|
-
|
|
16
|
+
const expiredCallback = (0, react.useRef)(onSampleExpired);
|
|
17
|
+
const statusCallback = (0, react.useRef)(onStatusChange);
|
|
14
18
|
const [result, setResult] = (0, react.useState)();
|
|
15
19
|
const filtersRef = (0, react.useRef)(filters);
|
|
16
|
-
|
|
20
|
+
(0, react.useLayoutEffect)(() => {
|
|
21
|
+
normalizedCallback.current = onNormalized;
|
|
22
|
+
expiredCallback.current = onSampleExpired;
|
|
23
|
+
statusCallback.current = onStatusChange;
|
|
24
|
+
filtersRef.current = filters;
|
|
25
|
+
}, [
|
|
26
|
+
onNormalized,
|
|
27
|
+
onSampleExpired,
|
|
28
|
+
onStatusChange,
|
|
29
|
+
filters
|
|
30
|
+
]);
|
|
17
31
|
const filterConfig = (0, react.useMemo)(() => filters && result?.resultColumns ? require_data_table_server_filters.serverFiltersToFilterBar(result.resultColumns, filters.selection, filters.onChange, filters.lookupValues ? { lookupValues: filters.lookupValues } : {}) : void 0, [filters, result]);
|
|
18
|
-
const idle =
|
|
19
|
-
const [
|
|
32
|
+
const idle = !sampleId;
|
|
33
|
+
const [failure, setFailure] = (0, react.useState)();
|
|
20
34
|
const [pending, setPending] = (0, react.useState)(false);
|
|
21
35
|
const [trace, setTrace] = (0, react.useState)();
|
|
22
36
|
const [span, setSpan] = (0, react.useState)();
|
|
@@ -32,13 +46,12 @@ function ProfileMappingPreview({ profile, rows, onNormalized, filters }) {
|
|
|
32
46
|
ignore: profile.ignore,
|
|
33
47
|
filters: profile.filters
|
|
34
48
|
},
|
|
35
|
-
|
|
49
|
+
sampleId
|
|
36
50
|
});
|
|
37
51
|
(0, react.useEffect)(() => {
|
|
38
52
|
if (idle) return;
|
|
39
53
|
const controller = new AbortController();
|
|
40
54
|
setPending(true);
|
|
41
|
-
setError("");
|
|
42
55
|
const timer = setTimeout(() => {
|
|
43
56
|
(async () => {
|
|
44
57
|
try {
|
|
@@ -48,16 +61,25 @@ function ProfileMappingPreview({ profile, rows, onNormalized, filters }) {
|
|
|
48
61
|
body,
|
|
49
62
|
signal: controller.signal
|
|
50
63
|
});
|
|
51
|
-
if (!response.ok)
|
|
64
|
+
if (!response.ok) {
|
|
65
|
+
const error = require_sampleError.parseSampleError(await response.text());
|
|
66
|
+
if (controller.signal.aborted) return;
|
|
67
|
+
setFailure(error);
|
|
68
|
+
if (error.code === "sample_expired") expiredCallback.current?.();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
52
71
|
const next = await response.json();
|
|
53
72
|
if (!next.document?.node) throw new Error("the mapping response carried no rendered document");
|
|
54
73
|
if (filtersRef.current && !Array.isArray(next.resultColumns)) throw new Error("the mapping response carried no resultColumns to build filters from");
|
|
74
|
+
const unknown = next.unresolvedColumns?.find((column) => !UNRESOLVED_REASONS.has(column.reason));
|
|
75
|
+
if (unknown) throw new Error(`the mapping response gave column ${unknown.name} an unknown unresolved reason ${String(unknown.reason)}`);
|
|
55
76
|
if (!controller.signal.aborted) {
|
|
56
77
|
setResult(next);
|
|
78
|
+
setFailure(void 0);
|
|
57
79
|
normalizedCallback.current?.(next.normalizedRows, next.availableColumns);
|
|
58
80
|
}
|
|
59
81
|
} catch (error) {
|
|
60
|
-
if (!controller.signal.aborted)
|
|
82
|
+
if (!controller.signal.aborted) setFailure({ message: error instanceof Error ? error.message : String(error) });
|
|
61
83
|
} finally {
|
|
62
84
|
if (!controller.signal.aborted) setPending(false);
|
|
63
85
|
}
|
|
@@ -68,56 +90,72 @@ function ProfileMappingPreview({ profile, rows, onNormalized, filters }) {
|
|
|
68
90
|
controller.abort();
|
|
69
91
|
};
|
|
70
92
|
}, [body, idle]);
|
|
93
|
+
const resampling = failure?.code === "sample_expired" && Boolean(onSampleExpired);
|
|
94
|
+
const status = idle ? "idle" : failure && !resampling ? "failed" : pending || !result || resampling ? "updating" : "ready";
|
|
95
|
+
(0, react.useEffect)(() => {
|
|
96
|
+
statusCallback.current?.(status);
|
|
97
|
+
}, [status]);
|
|
71
98
|
if (idle) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: "Run a sample in Query to preview mappings." });
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
99
|
+
const notice = failure ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MappingFailure, {
|
|
100
|
+
failure,
|
|
101
|
+
kept: Boolean(result),
|
|
102
|
+
resampling
|
|
103
|
+
}) : null;
|
|
104
|
+
if (!result) return notice ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
77
105
|
role: "status",
|
|
78
106
|
children: "Updating mapping preview…"
|
|
79
107
|
});
|
|
80
|
-
|
|
108
|
+
if (pending && !failure && profile.render === "traces") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
81
109
|
role: "status",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"No sampled row has a value for ",
|
|
90
|
-
result.unresolvedColumns.join(", "),
|
|
91
|
-
". They fill in once the data carries their source; otherwise check where they read from."
|
|
92
|
-
]
|
|
93
|
-
})
|
|
110
|
+
children: "Updating mapping preview…"
|
|
111
|
+
});
|
|
112
|
+
const dimmed = stale || Boolean(failure);
|
|
113
|
+
const unresolved = result.unresolvedColumns?.length ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnresolvedColumns, {
|
|
114
|
+
columns: result.unresolvedColumns,
|
|
115
|
+
dimmed,
|
|
116
|
+
...onSelectColumn ? { onSelectColumn } : {}
|
|
94
117
|
}) : null;
|
|
95
118
|
if (profile.render !== "traces") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
96
119
|
"aria-busy": pending,
|
|
97
120
|
className: "flex h-full min-h-0 flex-col",
|
|
98
|
-
children: [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
121
|
+
children: [
|
|
122
|
+
notice,
|
|
123
|
+
unresolved,
|
|
124
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Clicky.Clicky, {
|
|
125
|
+
data: result.document.node,
|
|
126
|
+
className: require_utils.cn("flex min-h-0 flex-1 flex-col", dimmed && "opacity-50"),
|
|
127
|
+
...filterConfig?.filters.length ? { externalFilters: filterConfig.filters } : {},
|
|
128
|
+
...filterConfig?.timeRange ? { timeRange: filterConfig.timeRange } : {}
|
|
129
|
+
})
|
|
130
|
+
]
|
|
104
131
|
});
|
|
105
132
|
try {
|
|
106
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
133
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
134
|
+
"aria-busy": pending,
|
|
135
|
+
className: "flex h-full min-h-0 flex-col",
|
|
136
|
+
children: [
|
|
137
|
+
notice,
|
|
138
|
+
unresolved,
|
|
139
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
140
|
+
className: require_utils.cn("min-h-0 flex-1", dimmed && "opacity-50"),
|
|
141
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_OtelTraceTable.OtelTraceTable, {
|
|
142
|
+
spans: require_profile_spans.profileSpans(result.rows),
|
|
143
|
+
listing: {
|
|
144
|
+
...require_profile_listing.profileTraceListing(result.rows, result.document.node),
|
|
145
|
+
linkRows: false
|
|
146
|
+
},
|
|
147
|
+
onSelectTrace: (id) => {
|
|
148
|
+
setTrace(id);
|
|
149
|
+
setSpan(void 0);
|
|
150
|
+
},
|
|
151
|
+
onSelectSpan: setSpan,
|
|
152
|
+
traceHref: (id) => `#trace=${encodeURIComponent(id)}`,
|
|
153
|
+
...trace ? { selectedTraceId: trace } : {},
|
|
154
|
+
...span ? { selectedSpanId: span } : {}
|
|
155
|
+
})
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
});
|
|
121
159
|
} catch (error) {
|
|
122
160
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
123
161
|
role: "alert",
|
|
@@ -129,6 +167,73 @@ function ProfileMappingPreview({ profile, rows, onNormalized, filters }) {
|
|
|
129
167
|
});
|
|
130
168
|
}
|
|
131
169
|
}
|
|
170
|
+
var FAILURE_TITLES = {
|
|
171
|
+
[require_sampleError.SAMPLE_EXPIRED]: "Sample expired",
|
|
172
|
+
[require_sampleError.PAYLOAD_TOO_LARGE]: "Preview request too large"
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* What went wrong, in the service's words, with its hint and with what the
|
|
176
|
+
* pane still shows. An expired sample the editor is replacing is a status, not
|
|
177
|
+
* an alert: nothing is wrong with the draft.
|
|
178
|
+
*/
|
|
179
|
+
function MappingFailure({ failure, kept, resampling }) {
|
|
180
|
+
const title = failure.code && FAILURE_TITLES[failure.code] || "Preview failed";
|
|
181
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
182
|
+
role: resampling ? "status" : "alert",
|
|
183
|
+
"aria-label": resampling ? title : void 0,
|
|
184
|
+
className: "shrink-0",
|
|
185
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Callout.Callout, {
|
|
186
|
+
variant: resampling ? "note" : "caution",
|
|
187
|
+
label: title,
|
|
188
|
+
className: "my-0 mb-2",
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: ["Cannot preview mappings: ", failure.message] }),
|
|
191
|
+
failure.hint ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: failure.hint }) : null,
|
|
192
|
+
resampling ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: "Sampling again…" }) : null,
|
|
193
|
+
kept ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
194
|
+
className: "text-muted-foreground",
|
|
195
|
+
children: "The table below is the last preview that succeeded."
|
|
196
|
+
}) : null
|
|
197
|
+
]
|
|
198
|
+
})
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function UnresolvedColumns({ columns, dimmed, onSelectColumn }) {
|
|
202
|
+
const names = (list) => list.map((column, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [index > 0 ? ", " : null, onSelectColumn ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
203
|
+
type: "button",
|
|
204
|
+
className: "font-medium underline underline-offset-2",
|
|
205
|
+
onClick: () => onSelectColumn(column.name),
|
|
206
|
+
children: column.name
|
|
207
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
208
|
+
className: "font-medium",
|
|
209
|
+
children: column.name
|
|
210
|
+
})] }, column.name));
|
|
211
|
+
const noSource = columns.filter((column) => column.reason === "no_source");
|
|
212
|
+
const noValue = columns.filter((column) => column.reason === "no_value");
|
|
213
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
214
|
+
role: "status",
|
|
215
|
+
"aria-label": "Unresolved columns",
|
|
216
|
+
className: require_utils.cn("shrink-0", dimmed && "opacity-50"),
|
|
217
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Callout.Callout, {
|
|
218
|
+
variant: "warning",
|
|
219
|
+
label: "No sampled values",
|
|
220
|
+
className: "my-0 mb-2",
|
|
221
|
+
children: [noSource.length ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [
|
|
222
|
+
names(noSource),
|
|
223
|
+
" ",
|
|
224
|
+
noSource.length === 1 ? "has" : "have",
|
|
225
|
+
" no source yet: pick a field or write an expression for",
|
|
226
|
+
" ",
|
|
227
|
+
noSource.length === 1 ? "it" : "them",
|
|
228
|
+
"."
|
|
229
|
+
] }) : null, noValue.length ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [
|
|
230
|
+
"No sampled row has a value for ",
|
|
231
|
+
names(noValue),
|
|
232
|
+
". They fill in once the data carries what they read; otherwise check their source."
|
|
233
|
+
] }) : null]
|
|
234
|
+
})
|
|
235
|
+
});
|
|
236
|
+
}
|
|
132
237
|
exports.ProfileMappingPreview = ProfileMappingPreview;
|
|
133
238
|
|
|
134
239
|
//# sourceMappingURL=profileMappingPreview.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileMappingPreview.cjs","names":["useRef","useState","useMemo","serverFiltersToFilterBar","profileApiPath","Callout","Clicky","_Fragment","OtelTraceTable","profileSpans","profileTraceListing"],"sources":["../../../src/profiles/editor/profileMappingPreview.tsx"],"sourcesContent":["import {\n useEffect,\n useMemo,\n useState,\n useRef,\n type Dispatch,\n type SetStateAction,\n} from \"react\";\nimport type { ProfileColumn } from \"../wizard/profileWizardModel\";\nimport type { DataTableFilterSelection } from \"../../data/data-table-filter-values\";\nimport {\n serverFiltersToFilterBar,\n type DataTableFilterLookup,\n type DataTableServerColumn,\n} from \"../../data/data-table-server-filters\";\nimport { OtelTraceTable } from \"../../data/traces/otel/OtelTraceTable\";\nimport { profileSpans } from \"../../data/traces/otel/profile-spans\";\nimport { profileTraceListing } from \"../../data/traces/otel/profile-listing\";\nimport { Clicky, type ClickyNode } from \"../../data/Clicky\";\nimport { Callout } from \"../../data/Callout\";\nimport { profileApiPath } from \"../profileApi\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\n\n/**\n * The filters a table preview offers. The controls are the ones the service\n * describes for the draft's columns (the result columns of the mapping\n * response), built by the same serverFiltersToFilterBar the profile query\n * results use; applying one is the caller's to do, server-side, by sampling\n * again — the table never filters the rows it was given.\n */\nexport type ProfileMappingFilters = {\n selection: DataTableFilterSelection;\n onChange: Dispatch<SetStateAction<DataTableFilterSelection>>;\n lookupValues?: DataTableFilterLookup;\n};\n\nexport function ProfileMappingPreview({\n profile,\n rows,\n onNormalized,\n filters,\n}: {\n profile: ProfileWizardDraft;\n rows: Record<string, unknown>[];\n onNormalized?: (\n rows: Record<string, unknown>[],\n columns: ProfileColumn[]\n ) => void;\n filters?: ProfileMappingFilters;\n}) {\n const normalizedCallback = useRef(onNormalized);\n normalizedCallback.current = onNormalized;\n const [result, setResult] = useState<{\n rows: Record<string, unknown>[];\n resultColumns?: DataTableServerColumn[];\n document: { node: ClickyNode };\n unresolvedColumns?: string[];\n }>();\n const filtersRef = useRef(filters);\n filtersRef.current = filters;\n const filterConfig = useMemo(\n () =>\n filters && result?.resultColumns\n ? serverFiltersToFilterBar(\n result.resultColumns,\n filters.selection,\n filters.onChange,\n filters.lookupValues ? { lookupValues: filters.lookupValues } : {}\n )\n : undefined,\n [filters, result]\n );\n // A filtered sample may legitimately be empty, and its filter bar is how the\n // filter is cleared, so a preview that offers filters renders zero rows too.\n const idle = rows.length === 0 && !filters;\n const [error, setError] = useState(\"\");\n const [pending, setPending] = useState(false);\n const [trace, setTrace] = useState<string>();\n const [span, setSpan] = useState<string>();\n const body = JSON.stringify({\n profile: {\n profile: profile.profile,\n provider: profile.provider,\n spans: profile.spans,\n search: profile.search,\n render: profile.render,\n columns: profile.columns,\n aliases: profile.aliases,\n ignore: profile.ignore,\n filters: profile.filters,\n },\n rows,\n });\n useEffect(() => {\n if (idle) return;\n const controller = new AbortController();\n setPending(true);\n setError(\"\");\n const timer = setTimeout(() => {\n void (async () => {\n try {\n const response = await fetch(\n profileApiPath(\"profile/sample/mapping\"),\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body,\n signal: controller.signal,\n }\n );\n if (!response.ok) throw new Error(await response.text());\n const next = (await response.json()) as {\n normalizedRows: Record<string, unknown>[];\n availableColumns: ProfileColumn[];\n rows: Record<string, unknown>[];\n resultColumns?: DataTableServerColumn[];\n document: { node: ClickyNode };\n unresolvedColumns?: string[];\n };\n if (!next.document?.node)\n throw new Error(\n \"the mapping response carried no rendered document\"\n );\n if (filtersRef.current && !Array.isArray(next.resultColumns))\n throw new Error(\n \"the mapping response carried no resultColumns to build filters from\"\n );\n if (!controller.signal.aborted) {\n setResult(next);\n normalizedCallback.current?.(\n next.normalizedRows,\n next.availableColumns\n );\n }\n } catch (error) {\n if (!controller.signal.aborted)\n setError(error instanceof Error ? error.message : String(error));\n } finally {\n if (!controller.signal.aborted) setPending(false);\n }\n })();\n }, 250);\n return () => {\n clearTimeout(timer);\n controller.abort();\n };\n }, [body, idle]);\n if (idle) return <p>Run a sample in Query to preview mappings.</p>;\n if (error) return <p role=\"alert\">Cannot preview mappings: {error}</p>;\n // A table keeps showing the last rendering while an edit is remapped, so the\n // preview updates in place instead of blinking to a status line per keystroke.\n if (!result || (pending && profile.render === \"traces\"))\n return <p role=\"status\">Updating mapping preview…</p>;\n // The service names the declared columns no sampled row has a value for. That\n // is a warning, never a refusal: the data may simply not carry them yet.\n const unresolved = result.unresolvedColumns?.length ? (\n <div role=\"status\" aria-label=\"Unresolved columns\" className=\"shrink-0\">\n <Callout\n variant=\"warning\"\n label=\"No sampled values\"\n className=\"my-0 mb-2\"\n >\n No sampled row has a value for {result.unresolvedColumns.join(\", \")}.\n They fill in once the data carries their source; otherwise check where\n they read from.\n </Callout>\n </div>\n ) : null;\n if (profile.render !== \"traces\")\n return (\n <div aria-busy={pending} className=\"flex h-full min-h-0 flex-col\">\n {unresolved}\n <Clicky\n data={result.document.node}\n className=\"flex min-h-0 flex-1 flex-col\"\n {...(filterConfig?.filters.length\n ? { externalFilters: filterConfig.filters }\n : {})}\n {...(filterConfig?.timeRange\n ? { timeRange: filterConfig.timeRange }\n : {})}\n />\n </div>\n );\n try {\n return (\n <>\n {unresolved}\n <OtelTraceTable\n spans={profileSpans(result.rows)}\n listing={{\n ...profileTraceListing(result.rows, result.document.node),\n linkRows: false,\n }}\n onSelectTrace={(id) => {\n setTrace(id);\n setSpan(undefined);\n }}\n onSelectSpan={setSpan}\n traceHref={(id) => `#trace=${encodeURIComponent(id)}`}\n {...(trace ? { selectedTraceId: trace } : {})}\n {...(span ? { selectedSpanId: span } : {})}\n />\n </>\n );\n } catch (error) {\n return (\n <p role=\"alert\">\n Cannot preview traces:{\" \"}\n {error instanceof Error ? error.message : String(error)}\n </p>\n );\n }\n}\n"],"mappings":";;;;;;;;;;AAoCA,SAAgB,sBAAsB,EACpC,SACA,MACA,cACA,WASC;CACD,MAAM,sBAAA,GAAqBA,MAAAA,OAAAA,CAAO,YAAY;CAC9C,mBAAmB,UAAU;CAC7B,MAAM,CAAC,QAAQ,cAAA,GAAaC,MAAAA,SAAAA,CAKzB;CACH,MAAM,cAAA,GAAaD,MAAAA,OAAAA,CAAO,OAAO;CACjC,WAAW,UAAU;CACrB,MAAM,gBAAA,GAAeE,MAAAA,QAAAA,OAEjB,WAAW,QAAQ,gBACfC,kCAAAA,yBACE,OAAO,eACP,QAAQ,WACR,QAAQ,UACR,QAAQ,eAAe,EAAE,cAAc,QAAQ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c,YACf,EAAE,WAAW,aAAa,UAAU,IACpC,CAAC;EACN,CAAA,CACE;;CAET,IAAI;EACF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAAC,kBAAAA,UAAA,EAAA,UAAA,CACG,YACD,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;GACE,OAAOC,sBAAAA,aAAa,OAAO,IAAI;GAC/B,SAAS;IACP,GAAGC,wBAAAA,oBAAoB,OAAO,MAAM,OAAO,SAAS,IAAI;IACxD,UAAU;GACZ;GACA,gBAAgB,OAAO;IACrB,SAAS,EAAE;IACX,QAAQ,KAAA,CAAS;GACnB;GACA,cAAc;GACd,YAAY,OAAO,UAAU,mBAAmB,EAAE;GAClD,GAAK,QAAQ,EAAE,iBAAiB,MAAM,IAAI,CAAC;GAC3C,GAAK,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;EACzC,CAAA,CACD,EAAA,CAAA;CAEN,SAAS,OAAO;EACd,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,KAAD;GAAG,MAAK;GAAR,UAAA;IAAgB;IACS;IACtB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GACrD;;CAEP;AACF"}
|
|
1
|
+
{"version":3,"file":"profileMappingPreview.cjs","names":["useRef","useState","useMemo","serverFiltersToFilterBar","profileApiPath","parseSampleError","Clicky","cn","OtelTraceTable","profileSpans","profileTraceListing","SAMPLE_EXPIRED","PAYLOAD_TOO_LARGE","Callout","Fragment"],"sources":["../../../src/profiles/editor/profileMappingPreview.tsx"],"sourcesContent":["import {\n Fragment,\n useEffect,\n useLayoutEffect,\n useMemo,\n useState,\n useRef,\n type Dispatch,\n type ReactNode,\n type SetStateAction,\n} from \"react\";\nimport type { ProfileColumn } from \"../wizard/profileWizardModel\";\nimport type { DataTableFilterSelection } from \"../../data/data-table-filter-values\";\nimport {\n serverFiltersToFilterBar,\n type DataTableFilterLookup,\n type DataTableServerColumn,\n} from \"../../data/data-table-server-filters\";\nimport { OtelTraceTable } from \"../../data/traces/otel/OtelTraceTable\";\nimport { profileSpans } from \"../../data/traces/otel/profile-spans\";\nimport { profileTraceListing } from \"../../data/traces/otel/profile-listing\";\nimport { Clicky, type ClickyNode } from \"../../data/Clicky\";\nimport { Callout } from \"../../data/Callout\";\nimport { cn } from \"../../lib/utils\";\nimport { profileApiPath } from \"../profileApi\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\nimport { parseSampleError, PAYLOAD_TOO_LARGE, SAMPLE_EXPIRED, type SampleError } from \"./sampleError\";\n\n/**\n * The filters a table preview offers. The controls are the ones the service\n * describes for the draft's columns (the result columns of the mapping\n * response), built by the same serverFiltersToFilterBar the profile query\n * results use; applying one is the caller's to do, server-side, by sampling\n * again — the table never filters the rows it was given.\n */\nexport type ProfileMappingFilters = {\n selection: DataTableFilterSelection;\n onChange: Dispatch<SetStateAction<DataTableFilterSelection>>;\n lookupValues?: DataTableFilterLookup;\n};\n\n/** Where the preview stands, for a caller that summarises it elsewhere. */\nexport type ProfileMappingPreviewStatus = \"idle\" | \"updating\" | \"ready\" | \"failed\";\n\n/** Why the service found no sampled value for a declared column. */\ntype UnresolvedColumn = { name: string; reason: \"no_source\" | \"no_value\" };\n\ntype MappingResult = {\n rows: Record<string, unknown>[];\n resultColumns?: DataTableServerColumn[];\n document: { node: ClickyNode };\n unresolvedColumns?: UnresolvedColumn[];\n};\n\nconst UNRESOLVED_REASONS = new Set([\"no_source\", \"no_value\"]);\n\nexport function ProfileMappingPreview({\n profile,\n sampleId,\n onNormalized,\n filters,\n stale = false,\n onSampleExpired,\n onSelectColumn,\n onStatusChange,\n}: {\n profile: ProfileWizardDraft;\n /**\n * The sample /profile/sample retained. The service maps its rows where they\n * are: they are its own output, often megabytes of documents, and sending\n * them back on every edit overran the request limit.\n */\n sampleId: string | undefined;\n onNormalized?: (\n rows: Record<string, unknown>[],\n columns: ProfileColumn[]\n ) => void;\n filters?: ProfileMappingFilters;\n /** The rows shown are not the ones last asked for; they are dimmed. */\n stale?: boolean;\n /** The service no longer holds the sample: sample again. */\n onSampleExpired?: () => void;\n /** Opens a column the unresolved-columns warning names. */\n onSelectColumn?: (name: string) => void;\n onStatusChange?: (status: ProfileMappingPreviewStatus) => void;\n}) {\n const normalizedCallback = useRef(onNormalized);\n const expiredCallback = useRef(onSampleExpired);\n const statusCallback = useRef(onStatusChange);\n const [result, setResult] = useState<MappingResult>();\n const filtersRef = useRef(filters);\n useLayoutEffect(() => {\n normalizedCallback.current = onNormalized;\n expiredCallback.current = onSampleExpired;\n statusCallback.current = onStatusChange;\n filtersRef.current = filters;\n }, [onNormalized, onSampleExpired, onStatusChange, filters]);\n const filterConfig = useMemo(\n () =>\n filters && result?.resultColumns\n ? serverFiltersToFilterBar(\n result.resultColumns,\n filters.selection,\n filters.onChange,\n filters.lookupValues ? { lookupValues: filters.lookupValues } : {}\n )\n : undefined,\n [filters, result]\n );\n const idle = !sampleId;\n const [failure, setFailure] = useState<SampleError>();\n const [pending, setPending] = useState(false);\n const [trace, setTrace] = useState<string>();\n const [span, setSpan] = useState<string>();\n const body = JSON.stringify({\n profile: {\n profile: profile.profile,\n provider: profile.provider,\n spans: profile.spans,\n search: profile.search,\n render: profile.render,\n columns: profile.columns,\n aliases: profile.aliases,\n ignore: profile.ignore,\n filters: profile.filters,\n },\n sampleId,\n });\n useEffect(() => {\n if (idle) return;\n const controller = new AbortController();\n setPending(true);\n const timer = setTimeout(() => {\n void (async () => {\n try {\n const response = await fetch(\n profileApiPath(\"profile/sample/mapping\"),\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body,\n signal: controller.signal,\n }\n );\n if (!response.ok) {\n const error = parseSampleError(await response.text());\n if (controller.signal.aborted) return;\n setFailure(error);\n if (error.code === SAMPLE_EXPIRED) expiredCallback.current?.();\n return;\n }\n const next = (await response.json()) as MappingResult & {\n normalizedRows: Record<string, unknown>[];\n availableColumns: ProfileColumn[];\n };\n if (!next.document?.node)\n throw new Error(\n \"the mapping response carried no rendered document\"\n );\n if (filtersRef.current && !Array.isArray(next.resultColumns))\n throw new Error(\n \"the mapping response carried no resultColumns to build filters from\"\n );\n const unknown = next.unresolvedColumns?.find((column) => !UNRESOLVED_REASONS.has(column.reason));\n if (unknown)\n throw new Error(\n `the mapping response gave column ${unknown.name} an unknown unresolved reason ${String(unknown.reason)}`\n );\n if (!controller.signal.aborted) {\n setResult(next);\n setFailure(undefined);\n normalizedCallback.current?.(\n next.normalizedRows,\n next.availableColumns\n );\n }\n } catch (error) {\n if (!controller.signal.aborted)\n setFailure({ message: error instanceof Error ? error.message : String(error) });\n } finally {\n if (!controller.signal.aborted) setPending(false);\n }\n })();\n }, 250);\n return () => {\n clearTimeout(timer);\n controller.abort();\n };\n }, [body, idle]);\n // An expired sample the caller is replacing is an update in progress, not a\n // failure the author has to act on.\n const resampling = failure?.code === SAMPLE_EXPIRED && Boolean(onSampleExpired);\n const status: ProfileMappingPreviewStatus = idle\n ? \"idle\"\n : failure && !resampling\n ? \"failed\"\n : pending || !result || resampling\n ? \"updating\"\n : \"ready\";\n useEffect(() => {\n statusCallback.current?.(status);\n }, [status]);\n\n if (idle) return <p>Run a sample in Query to preview mappings.</p>;\n const notice = failure ? (\n <MappingFailure failure={failure} kept={Boolean(result)} resampling={resampling} />\n ) : null;\n // A table keeps showing the last rendering while an edit is remapped, so the\n // preview updates in place instead of blinking to a status line per keystroke.\n if (!result)\n return notice ?? <p role=\"status\">Updating mapping preview…</p>;\n if (pending && !failure && profile.render === \"traces\")\n return <p role=\"status\">Updating mapping preview…</p>;\n // Everything under a failure describes the last preview that succeeded.\n const dimmed = stale || Boolean(failure);\n // The service names the declared columns no sampled row has a value for. That\n // is a warning, never a refusal: the data may simply not carry them yet.\n const unresolved = result.unresolvedColumns?.length ? (\n <UnresolvedColumns\n columns={result.unresolvedColumns}\n dimmed={dimmed}\n {...(onSelectColumn ? { onSelectColumn } : {})}\n />\n ) : null;\n if (profile.render !== \"traces\")\n return (\n <div aria-busy={pending} className=\"flex h-full min-h-0 flex-col\">\n {notice}\n {unresolved}\n <Clicky\n data={result.document.node}\n className={cn(\"flex min-h-0 flex-1 flex-col\", dimmed && \"opacity-50\")}\n {...(filterConfig?.filters.length\n ? { externalFilters: filterConfig.filters }\n : {})}\n {...(filterConfig?.timeRange\n ? { timeRange: filterConfig.timeRange }\n : {})}\n />\n </div>\n );\n try {\n return (\n <div aria-busy={pending} className=\"flex h-full min-h-0 flex-col\">\n {notice}\n {unresolved}\n <div className={cn(\"min-h-0 flex-1\", dimmed && \"opacity-50\")}>\n <OtelTraceTable\n spans={profileSpans(result.rows)}\n listing={{\n ...profileTraceListing(result.rows, result.document.node),\n linkRows: false,\n }}\n onSelectTrace={(id) => {\n setTrace(id);\n setSpan(undefined);\n }}\n onSelectSpan={setSpan}\n traceHref={(id) => `#trace=${encodeURIComponent(id)}`}\n {...(trace ? { selectedTraceId: trace } : {})}\n {...(span ? { selectedSpanId: span } : {})}\n />\n </div>\n </div>\n );\n } catch (error) {\n return (\n <p role=\"alert\">\n Cannot preview traces:{\" \"}\n {error instanceof Error ? error.message : String(error)}\n </p>\n );\n }\n}\n\nconst FAILURE_TITLES: Record<string, string> = {\n [SAMPLE_EXPIRED]: \"Sample expired\",\n [PAYLOAD_TOO_LARGE]: \"Preview request too large\",\n};\n\n/**\n * What went wrong, in the service's words, with its hint and with what the\n * pane still shows. An expired sample the editor is replacing is a status, not\n * an alert: nothing is wrong with the draft.\n */\nfunction MappingFailure({\n failure,\n kept,\n resampling,\n}: {\n failure: SampleError;\n kept: boolean;\n resampling: boolean;\n}) {\n const title = (failure.code && FAILURE_TITLES[failure.code]) || \"Preview failed\";\n return (\n <div\n role={resampling ? \"status\" : \"alert\"}\n aria-label={resampling ? title : undefined}\n className=\"shrink-0\"\n >\n <Callout variant={resampling ? \"note\" : \"caution\"} label={title} className=\"my-0 mb-2\">\n <p>Cannot preview mappings: {failure.message}</p>\n {failure.hint ? <p>{failure.hint}</p> : null}\n {resampling ? <p>Sampling again…</p> : null}\n {kept ? (\n <p className=\"text-muted-foreground\">\n The table below is the last preview that succeeded.\n </p>\n ) : null}\n </Callout>\n </div>\n );\n}\n\nfunction UnresolvedColumns({\n columns,\n dimmed,\n onSelectColumn,\n}: {\n columns: UnresolvedColumn[];\n dimmed: boolean;\n onSelectColumn?: (name: string) => void;\n}) {\n const names = (list: UnresolvedColumn[]): ReactNode =>\n list.map((column, index) => (\n <Fragment key={column.name}>\n {index > 0 ? \", \" : null}\n {onSelectColumn ? (\n <button\n type=\"button\"\n className=\"font-medium underline underline-offset-2\"\n onClick={() => onSelectColumn(column.name)}\n >\n {column.name}\n </button>\n ) : (\n <span className=\"font-medium\">{column.name}</span>\n )}\n </Fragment>\n ));\n const noSource = columns.filter((column) => column.reason === \"no_source\");\n const noValue = columns.filter((column) => column.reason === \"no_value\");\n return (\n <div role=\"status\" aria-label=\"Unresolved columns\" className={cn(\"shrink-0\", dimmed && \"opacity-50\")}>\n <Callout variant=\"warning\" label=\"No sampled values\" className=\"my-0 mb-2\">\n {noSource.length ? (\n <p>\n {names(noSource)} {noSource.length === 1 ? \"has\" : \"have\"} no source\n yet: pick a field or write an expression for{\" \"}\n {noSource.length === 1 ? \"it\" : \"them\"}.\n </p>\n ) : null}\n {noValue.length ? (\n <p>\n No sampled row has a value for {names(noValue)}. They fill in once\n the data carries what they read; otherwise check their source.\n </p>\n ) : null}\n </Callout>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAsDA,IAAM,qCAAqB,IAAI,IAAI,CAAC,aAAa,UAAU,CAAC;AAE5D,SAAgB,sBAAsB,EACpC,SACA,UACA,cACA,SACA,QAAQ,OACR,iBACA,gBACA,kBAqBC;CACD,MAAM,sBAAA,GAAqBA,MAAAA,OAAAA,CAAO,YAAY;CAC9C,MAAM,mBAAA,GAAkBA,MAAAA,OAAAA,CAAO,eAAe;CAC9C,MAAM,kBAAA,GAAiBA,MAAAA,OAAAA,CAAO,cAAc;CAC5C,MAAM,CAAC,QAA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MAAM,OAAO;IAAE;GAE9C,EAAA,CAAA,IACD,IACG;;CACN,CAAA;AAET"}
|
|
@@ -14,10 +14,24 @@ export type ProfileMappingFilters = {
|
|
|
14
14
|
onChange: Dispatch<SetStateAction<DataTableFilterSelection>>;
|
|
15
15
|
lookupValues?: DataTableFilterLookup;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
/** Where the preview stands, for a caller that summarises it elsewhere. */
|
|
18
|
+
export type ProfileMappingPreviewStatus = "idle" | "updating" | "ready" | "failed";
|
|
19
|
+
export declare function ProfileMappingPreview({ profile, sampleId, onNormalized, filters, stale, onSampleExpired, onSelectColumn, onStatusChange, }: {
|
|
18
20
|
profile: ProfileWizardDraft;
|
|
19
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The sample /profile/sample retained. The service maps its rows where they
|
|
23
|
+
* are: they are its own output, often megabytes of documents, and sending
|
|
24
|
+
* them back on every edit overran the request limit.
|
|
25
|
+
*/
|
|
26
|
+
sampleId: string | undefined;
|
|
20
27
|
onNormalized?: (rows: Record<string, unknown>[], columns: ProfileColumn[]) => void;
|
|
21
28
|
filters?: ProfileMappingFilters;
|
|
29
|
+
/** The rows shown are not the ones last asked for; they are dimmed. */
|
|
30
|
+
stale?: boolean;
|
|
31
|
+
/** The service no longer holds the sample: sample again. */
|
|
32
|
+
onSampleExpired?: () => void;
|
|
33
|
+
/** Opens a column the unresolved-columns warning names. */
|
|
34
|
+
onSelectColumn?: (name: string) => void;
|
|
35
|
+
onStatusChange?: (status: ProfileMappingPreviewStatus) => void;
|
|
22
36
|
}): import("react").JSX.Element;
|
|
23
37
|
//# sourceMappingURL=profileMappingPreview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileMappingPreview.d.ts","sourceRoot":"","sources":["../../../src/profiles/editor/profileMappingPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"profileMappingPreview.d.ts","sourceRoot":"","sources":["../../../src/profi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