@flanksource/clicky-ui 0.3.80 → 0.3.82
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/json-schema-form-connection.cjs +31 -2
- package/dist/components/json-schema-form-connection.cjs.map +1 -1
- package/dist/components/json-schema-form-connection.d.ts.map +1 -1
- package/dist/components/json-schema-form-connection.js +32 -3
- package/dist/components/json-schema-form-connection.js.map +1 -1
- package/dist/components/json-schema-form-date-math.cjs +48 -0
- package/dist/components/json-schema-form-date-math.cjs.map +1 -0
- package/dist/components/json-schema-form-date-math.d.ts +9 -0
- package/dist/components/json-schema-form-date-math.d.ts.map +1 -0
- package/dist/components/json-schema-form-date-math.js +48 -0
- package/dist/components/json-schema-form-date-math.js.map +1 -0
- package/dist/components/json-schema-form-fields.cjs +11 -2
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +11 -2
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +1 -1
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +1 -1
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +1 -1
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +1 -1
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +1 -1
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/data/LogDetails.cjs +4 -10
- package/dist/data/LogDetails.cjs.map +1 -1
- package/dist/data/LogDetails.d.ts.map +1 -1
- package/dist/data/LogDetails.js +4 -10
- package/dist/data/LogDetails.js.map +1 -1
- package/dist/data/data-table-filter-values.cjs +28 -7
- package/dist/data/data-table-filter-values.cjs.map +1 -1
- package/dist/data/data-table-filter-values.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.js +29 -8
- package/dist/data/data-table-filter-values.js.map +1 -1
- package/dist/data/properties-copy.cjs +28 -0
- package/dist/data/properties-copy.cjs.map +1 -0
- package/dist/data/properties-copy.d.ts +10 -0
- package/dist/data/properties-copy.d.ts.map +1 -0
- package/dist/data/properties-copy.js +27 -0
- package/dist/data/properties-copy.js.map +1 -0
- package/dist/data/server-timing.cjs +22 -0
- package/dist/data/server-timing.cjs.map +1 -1
- package/dist/data/server-timing.d.ts +6 -0
- package/dist/data/server-timing.d.ts.map +1 -1
- package/dist/data/server-timing.js +22 -1
- package/dist/data/server-timing.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceDetail.cjs +4 -6
- package/dist/data/traces/otel/OtelTraceDetail.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceDetail.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceDetail.js +4 -6
- package/dist/data/traces/otel/OtelTraceDetail.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.cjs +8 -4
- package/dist/data/traces/otel/OtelTraceTable.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.d.ts +2 -0
- package/dist/data/traces/otel/OtelTraceTable.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.js +8 -4
- package/dist/data/traces/otel/OtelTraceTable.js.map +1 -1
- package/dist/data/traces/otel/profile-listing.cjs +1 -0
- package/dist/data/traces/otel/profile-listing.cjs.map +1 -1
- package/dist/data/traces/otel/profile-listing.d.ts.map +1 -1
- package/dist/data/traces/otel/profile-listing.js +1 -0
- package/dist/data/traces/otel/profile-listing.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +2 -2
- package/dist/devtools/ExecutionDetail.cjs +5 -2
- package/dist/devtools/ExecutionDetail.cjs.map +1 -1
- package/dist/devtools/ExecutionDetail.js +5 -2
- package/dist/devtools/ExecutionDetail.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.js +2 -2
- package/dist/profiles/editor/profileEditor.cjs +1 -2
- 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 +2 -3
- package/dist/profiles/editor/profileEditor.js.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.cjs +21 -5
- package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.js +22 -6
- package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
- package/dist/profiles/editor/spanColumns.cjs +0 -4
- package/dist/profiles/editor/spanColumns.cjs.map +1 -1
- package/dist/profiles/editor/spanColumns.d.ts +0 -1
- package/dist/profiles/editor/spanColumns.d.ts.map +1 -1
- package/dist/profiles/editor/spanColumns.js +1 -4
- package/dist/profiles/editor/spanColumns.js.map +1 -1
- package/dist/rpc/ExplorerNav.cjs +13 -0
- package/dist/rpc/ExplorerNav.cjs.map +1 -1
- package/dist/rpc/ExplorerNav.d.ts.map +1 -1
- package/dist/rpc/ExplorerNav.js +14 -1
- package/dist/rpc/ExplorerNav.js.map +1 -1
- package/dist/runtime/barrels.json +1569 -1567
- package/dist/runtime/importmap.json +2170 -2168
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileEditor.cjs","names":["lazy","sampleRequestProfile","profileApiPath","useOperationLookupFetcher","useMemo","cloneProfileDraft","useState","defaultSpanColumns","profileSampleSignature","obsoleteSpanColumns","validateProfileEditorDraft","useProfileInspection","profileConnectionID","profileColumnResetState","useProfileFieldState","processorCatalog","profileSchema","useCallback","resolveProfileUpdatePath","profileUpdateConflictTarget","mergeSampledProfileColumns","useQuery","resetProfileColumns","Button","ProfileGeneralSection","ProfileSourceCard","ProfileSchemaSection","profileGeneralOptionKeys","ProfileQuerySection","_Fragment","ProfileSpansSection","ProfileFieldEditorForm","profileFieldEditorEmptyMessage","ProfileParameterDetail","ProcessorPipeline","Suspense","UiListTree","ProfileEditorRail","profileEditorSectionStatus","ProfileFieldSidebarList","ProfileParameterSidebar","UiTable","ProfileEditorPreview","JsonPathSampleRowsContext","Icon","UiPlay","Workspace","Modal","ProfileSaveAsDialog","profileEditorSections"],"sources":["../../../src/profiles/editor/profileEditor.tsx"],"sourcesContent":["import { Button } from \"../../components/button\";\nimport { Workspace } from \"../../layout/Workspace\";\nimport type { WorkspacePaneSpec } from \"../../layout/Workspace\";\nimport { Modal } from \"../../overlay/Modal\";\nimport { useOperationLookupFetcher } from \"../../rpc/operationLookupFetcher\";\nimport type { ResolvedOperation } from \"../../rpc/types\";\nimport type { OperationsApiClient } from \"../../rpc/useOperations\";\nimport { Icon } from \"../../data/Icon\";\nimport { UiListTree, UiPlay, UiTable } from \"../../icons\";\nimport {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport {\n cloneProfileDraft,\n mergeSampledProfileColumns,\n profileColumnResetState,\n profileEditorSectionStatus,\n profileEditorSections,\n profileGeneralOptionKeys,\n profileSampleSignature,\n profileUpdateConflictTarget,\n resetProfileColumns,\n validateProfileEditorDraft,\n type ProfileEditorSection,\n} from \"./profileEditorModel\";\nimport { ProfileEditorPreview } from \"./profileEditorPreview\";\nimport { ProfileEditorRail } from \"./profileEditorRail\";\nimport { ProfileSaveAsDialog } from \"./profileSaveAsDialog\";\nimport {\n ProfileGeneralSection,\n ProfileSchemaSection,\n ProfileQuerySection,\n ProfileSourceCard,\n} from \"./profileEditorSections\";\nimport { ProfileFieldSidebarList } from \"../fields/profileFieldList\";\nimport {\n ProfileFieldEditorForm,\n profileFieldEditorEmptyMessage,\n} from \"../fields/profileFieldEditor\";\nimport { useProfileFieldState } from \"../fields/profileFieldState\";\nimport type { ProfileSample } from \"../wizard/profileWizardQueryStep\";\nimport { useProfileInspection } from \"../wizard/useProfileInspection\";\nimport {\n profileConnectionID,\n type ProfileColumn,\n type ProfileWizardDraft,\n} from \"../wizard/profileWizardModel\";\nimport { resolveProfileUpdatePath } from \"./profileEditorRoutes\";\nimport {\n ProfileParameterDetail,\n ProfileParameterSidebar,\n} from \"./profileParameterEditor\";\nimport { ProcessorPipeline } from \"../processor/processorPipeline\";\nimport {\n processorCatalog,\n type ProcessorSpec,\n} from \"../processor/processorConfig\";\nimport { profileSchema } from \"../profileApi\";\nimport { profileApiPath } from \"../profileApi\";\nimport { sampleRequestProfile, JsonPathSampleRowsContext } from \"../query/jsonPathSample\";\nimport { defaultSpanColumns, obsoleteSpanColumns } from \"./spanColumns\";\nimport { ProfileSpansSection } from \"./profileSpansSection\";\nimport { useQuery } from \"@tanstack/react-query\";\n\nconst ProfileEditorRaw = lazy(() =>\n import(\"./profileEditorRaw\").then((module) => ({\n default: module.ProfileEditorRaw,\n })),\n);\n\n/** The server answers a failed sample with a JSON diagnostics envelope; its `error` is the message, anything else is shown as sent. */\nfunction sampleErrorMessage(body: string): string {\n try {\n const parsed: unknown = JSON.parse(body);\n if (typeof parsed === \"object\" && parsed !== null && \"error\" in parsed && typeof parsed.error === \"string\") return parsed.error;\n } catch {\n // Not JSON: the body is the message.\n }\n return body;\n}\n\n/** The one request the editor makes to sample a profile: used by the traces source sample and by Run. */\nasync function fetchEditorSample(draft: ProfileWizardDraft): Promise<Omit<ProfileSample, \"sourceDraft\">> {\n const profile = sampleRequestProfile(draft);\n if (!profile) throw new Error(\"Cannot sample a profile without a provider\");\n const response = await fetch(profileApiPath(\"profile/sample\"), {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ profile, params: {}, previewProcessors: true }),\n });\n if (!response.ok) throw new Error(sampleErrorMessage(await response.text()));\n return (await response.json()) as Omit<ProfileSample, \"sourceDraft\">;\n}\n\n/**\n * The profile editor as a route rather than a dialog.\n *\n * Six sections, ~130 discoverable fields and a CEL editor per column outgrew a\n * modal: the layout is a clicky-ui Workspace, so the section rail, the column\n * grid and the sampled preview are panes the user can resize, collapse and keep\n * across visits. Collection fields stay in the rail while the selected item is\n * edited in the center, keeping names and icons visible throughout the edit.\n */\nexport function ProfileEditor({\n client,\n action,\n createAction,\n surfaceKey,\n initialValue,\n onClose,\n onSuccess,\n}: {\n client: OperationsApiClient;\n action: ResolvedOperation;\n /** The profiles collection's create operation; when given, the header offers\n * \"Save as new…\", which saves the draft under a new name and leaves the\n * edited profile as it was. */\n createAction?: ResolvedOperation | undefined;\n surfaceKey: string;\n initialValue: Record<string, unknown>;\n onClose: () => void;\n onSuccess: (name: string) => void | Promise<void>;\n}) {\n const lookupFetcher = useOperationLookupFetcher(client);\n const initialDraft = useMemo(\n () => cloneProfileDraft(initialValue),\n [initialValue],\n );\n const initialSerialized = useMemo(\n () => JSON.stringify(initialDraft),\n [initialDraft],\n );\n const [draft, setDraft] = useState<ProfileWizardDraft>(initialDraft);\n const [section, setSection] = useState<ProfileEditorSection>(initialDraft.render === \"traces\" ? \"spans\" : \"general\");\n const [discovered, setDiscovered] = useState<ProfileColumn[]>(\n initialDraft.render === \"traces\" ? defaultSpanColumns() : initialDraft.columns ?? [],\n );\n const [sampledColumns, setSampledColumns] = useState<ProfileColumn[]>([]);\n const [sampleRows, setSampleRows] = useState<Record<string, unknown>[]>([]);\n const [mappingRows, setMappingRows] = useState<Record<string, unknown>[]>([]);\n const [activeField, setActiveField] = useState(\n initialDraft.columns?.[0]?.name ?? \"\",\n );\n const [activeParameter, setActiveParameter] = useState(0);\n const [activeProcessor, setActiveProcessor] = useState(0);\n const [lastSampleSignature, setLastSampleSignature] = useState(() =>\n profileSampleSignature(initialDraft),\n );\n const [rawValid, setRawValid] = useState(true);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState(\"\");\n const [replaceTarget, setReplaceTarget] = useState(\"\");\n const [savingAs, setSavingAs] = useState(false);\n const [confirmDiscard, setConfirmDiscard] = useState(false);\n const [confirmResetColumns, setConfirmResetColumns] = useState(false);\n // The Source section's query workspace portals its Run button here, so Run\n // sits beside Save profile and keeps the workspace's own pending/selection state.\n const [runSlot, setRunSlot] = useState<HTMLElement | null>(null);\n const dirty = JSON.stringify(draft) !== initialSerialized;\n const [normalizedRows, setNormalizedRows] = useState<Record<string, unknown>[]>([]);\n const traces = draft.render === \"traces\";\n const obsolete = traces ? obsoleteSpanColumns(draft.columns ?? [], discovered) : [];\n const validationError = validateProfileEditorDraft(draft) ?? (obsolete.length ? `Columns require normalized sources: ${obsolete.join(\", \")}. Reset to default or remove them.` : null);\n const saveBlocked = saving || Boolean(validationError) || (section === \"raw\" && !rawValid);\n const sampleStale = profileSampleSignature(draft) !== lastSampleSignature;\n // The same inspection the Query workspace reads, so the source field pickers\n // and the workspace share one fetch of the index's mapped fields.\n const sourceInspection = useProfileInspection({\n connectionID: profileConnectionID(draft.provider?.connection ?? \"\"),\n providerOptions: draft.provider?.options ?? {},\n });\n const indexFields =\n sourceInspection.inspection.completion?.kind === \"json-fields\"\n ? sourceInspection.inspection.completion.fields\n : [];\n const resetState = traces ? {visible:true, disabled:false, title:\"Reset to default\"} : profileColumnResetState({\n providerType: draft.provider?.type ?? \"\",\n sampledColumnCount: sampledColumns.length,\n sampleStale,\n });\n\n const fields = useProfileFieldState({\n normalizedOnly: traces,\n discovered,\n configured: draft.columns ?? [],\n activeName: activeField,\n onConfiguredChange: (columns) =>\n setDraft((current) => ({ ...current, columns })),\n onActiveNameChange: setActiveField,\n });\n const processors = Array.isArray(draft.processors)\n ? (draft.processors as ProcessorSpec[])\n : [];\n const pipelineCatalog = useMemo(\n () => processorCatalog(profileSchema().properties?.processors),\n [],\n );\n const setProcessors = useCallback(\n (next: ProcessorSpec[]) =>\n setDraft((current) => ({ ...current, processors: next })),\n [],\n );\n\n // A route can be refreshed or navigated away from; the dialog used to guard\n // unsaved edits with confirmClose, so the route has to guard them too.\n useEffect(() => {\n if (!dirty) return;\n const warn = (event: BeforeUnloadEvent) => event.preventDefault();\n window.addEventListener(\"beforeunload\", warn);\n return () => window.removeEventListener(\"beforeunload\", warn);\n }, [dirty]);\n\n const save = async (replaceExisting = false) => {\n if (validationError) {\n setError(validationError);\n return;\n }\n if (!client.submitForm) {\n setError(\"Profile updates are unavailable\");\n return;\n }\n setSaving(true);\n setError(\"\");\n try {\n const body = {\n ...draft,\n id: surfaceKey,\n ...(replaceExisting ? { replaceExisting: true } : {}),\n };\n const response = await client.submitForm(\n resolveProfileUpdatePath(action.path, surfaceKey),\n action.method,\n body,\n );\n if (!response.success) {\n const message =\n response.error || response.message || \"Profile update failed\";\n const target = profileUpdateConflictTarget(message);\n if (target && !replaceExisting) {\n setReplaceTarget(target);\n return;\n }\n throw new Error(message);\n }\n await onSuccess(draft.profile!.trim());\n } catch (saveError) {\n setError(\n saveError instanceof Error\n ? saveError.message\n : \"Profile update failed\",\n );\n } finally {\n setSaving(false);\n }\n };\n\n const acceptSample = useCallback(({ columns, rows, sourceDraft, mappingInputRows }: ProfileSample) => {\n if (!mappingInputRows) throw new Error(\"Sample response is missing mappingInputRows\");\n setMappingRows(mappingInputRows);\n setSampledColumns(structuredClone(columns));\n if (sourceDraft.render !== \"traces\") setDiscovered(columns);\n setSampleRows(rows);\n setDraft((current) => ({\n ...current,\n columns: current.render === \"traces\" ? current.columns ?? defaultSpanColumns() : mergeSampledProfileColumns(current.columns ?? [], columns),\n }));\n setActiveField((current) => current || columns[0]?.name || \"\");\n setLastSampleSignature(profileSampleSignature(sourceDraft));\n }, []);\n\n const sourceSample = useQuery({\n queryKey:[\"profile-editor-source\", profileSampleSignature(initialDraft)],\n enabled:initialDraft.render === \"traces\", staleTime:Infinity, retry:false, refetchOnWindowFocus:false,\n queryFn:() => fetchEditorSample(initialDraft),\n });\n // Run on Columns and Spans: the same request the traces source sample makes,\n // for the draft as it stands, accepted the same way.\n const [sampling, setSampling] = useState(false);\n const runSample = async () => {\n setSampling(true);\n setError(\"\");\n try {\n acceptSample({ ...(await fetchEditorSample(draft)), sourceDraft: draft });\n } catch (sampleError) {\n setError(sampleError instanceof Error ? sampleError.message : \"Sample failed\");\n } finally {\n setSampling(false);\n }\n };\n useEffect(() => {\n if (sourceSample.data) acceptSample({...sourceSample.data,sourceDraft:initialDraft});\n if (sourceSample.error) setError(sourceSample.error.message);\n }, [sourceSample.data,sourceSample.error,initialDraft,acceptSample]);\n\n const acceptNormalized = useCallback((rows: Record<string, unknown>[], columns: ProfileColumn[]) => {\n setNormalizedRows(rows);\n setDiscovered(columns);\n }, []);\n\n const resetColumns = () => {\n const defaults = traces ? defaultSpanColumns() : sampledColumns;\n const first = defaults[0];\n if (!first) throw new Error(\"cannot reset columns without a sample\");\n setDraft((current) => resetProfileColumns(current, defaults));\n setActiveField(first.name);\n setConfirmResetColumns(false);\n };\n\n const sectionContent = (\n <div className=\"@container h-full overflow-auto p-5\">\n {traces && (section === \"spans\" || section === \"columns\") ? <div className=\"mb-4 flex items-center gap-3\">\n <Button type=\"button\" variant=\"outline\" onClick={() => setConfirmResetColumns(true)}>Reset to default</Button>\n {validationError ? <p role=\"alert\" className=\"text-sm text-destructive\">{validationError}</p> : null}\n </div> : null}\n {section === \"general\" ? (\n <div className=\"space-y-4\">\n <ProfileGeneralSection draft={draft} onChange={setDraft} />\n <ProfileSourceCard\n draft={draft}\n // The provider's documents as read, ahead of any processor, are what\n // a source field name or an unwrap rule refers to.\n indexFields={indexFields}\n sampleRows={mappingRows.length ? mappingRows : sampleRows}\n {...(lookupFetcher ? { lookupFetcher } : {})}\n onChange={setDraft}\n />\n <ProfileSchemaSection\n draft={draft}\n keys={profileGeneralOptionKeys}\n title=\"General options\"\n description=\"Compose profiles with imports and aliases, choose the output fields, and ignore values that should not be retained.\"\n idPrefix=\"profile-general-options\"\n {...(lookupFetcher ? { lookupFetcher } : {})}\n onChange={setDraft}\n />\n </div>\n ) : null}\n {section === \"source\" ? (\n <ProfileQuerySection\n draft={draft}\n discovered={discovered}\n sampleStale={sampleStale}\n runSlot={runSlot}\n onChange={setDraft}\n onSample={acceptSample}\n />\n ) : null}\n {section === \"spans\" && traces ? <>\n <ProfileSpansSection draft={draft} rows={mappingRows} normalizedRows={normalizedRows} onChange={setDraft} />\n <details className=\"mt-4\"><summary>Source sample</summary><pre className=\"overflow-auto text-xs\">{JSON.stringify(mappingRows[0] ?? {}, null, 2)}</pre></details>\n </> : null}\n {section === \"columns\" ? (\n fields.activeField ? (\n <section className=\"rounded-xl border bg-card p-5\">\n <div className=\"max-w-6xl\">\n <ProfileFieldEditorForm\n field={fields.activeField}\n onChange={fields.updateActiveField}\n providerType={draft.provider?.type}\n />\n </div>\n </section>\n ) : (\n <div className=\"grid h-full place-items-center text-sm text-muted-foreground\">\n {profileFieldEditorEmptyMessage}\n </div>\n )\n ) : null}\n {section === \"parameters\" ? (\n <ProfileParameterDetail\n draft={draft}\n activeIndex={activeParameter}\n onChange={setDraft}\n />\n ) : null}\n {section === \"processors\" ? (\n <div className=\"max-w-5xl\">\n <ProcessorPipeline\n steps={processors}\n catalog={pipelineCatalog}\n profile={draft}\n selectedIndex={activeProcessor}\n showSteps={false}\n onSelectedIndexChange={setActiveProcessor}\n onChange={setProcessors}\n />\n </div>\n ) : null}\n {section === \"raw\" ? (\n <Suspense\n fallback={\n <p className=\"text-sm text-muted-foreground\">\n Loading YAML editor…\n </p>\n }\n >\n <ProfileEditorRaw\n draft={draft}\n onChange={setDraft}\n onValidityChange={setRawValid}\n />\n </Suspense>\n ) : null}\n </div>\n );\n\n const panes = useMemo<WorkspacePaneSpec[]>(() => {\n const rail: WorkspacePaneSpec = {\n id: \"sections\",\n label: \"Profile\",\n icon: <UiListTree />,\n location: \"left\",\n width: 340,\n minWidth: 280,\n maxWidth: 480,\n content: (\n <ProfileEditorRail\n traces={traces}\n value={section}\n status={profileEditorSectionStatus({\n draft,\n availableColumns: fields.available.length,\n sampleStale,\n })}\n collections={{\n columns: (\n <ProfileFieldSidebarList\n state={fields}\n onFieldSelect={(name) => {\n fields.setActiveName(name);\n setSection(\"columns\");\n }}\n onAdd={() => setSection(\"columns\")}\n {...(resetState.visible\n ? {\n reset: {\n disabled: resetState.disabled,\n title: resetState.title,\n onReset: () => setConfirmResetColumns(true),\n },\n }\n : {})}\n />\n ),\n parameters: (\n <ProfileParameterSidebar\n draft={draft}\n activeIndex={activeParameter}\n onActiveIndexChange={(index) => {\n setActiveParameter(index);\n setSection(\"parameters\");\n }}\n onChange={setDraft}\n />\n ),\n processors: (\n <ProcessorPipeline\n steps={processors}\n catalog={pipelineCatalog}\n profile={draft}\n selectedIndex={activeProcessor}\n showEditor={false}\n tree\n onSelectedIndexChange={(index) => {\n setActiveProcessor(index);\n setSection(\"processors\");\n }}\n onChange={setProcessors}\n />\n ),\n }}\n onChange={setSection}\n />\n ),\n };\n\n const result: WorkspacePaneSpec[] = [\n rail,\n {\n id: \"section\",\n label: sectionLabel(section),\n location: \"center\",\n collapsible: false,\n showHeader: false,\n contentClassName: \"p-0\",\n content: sectionContent,\n },\n ];\n if (section === \"columns\" || section === \"spans\" || (section === \"source\" && draft.search)) {\n result.push({\n id: \"preview\",\n label: \"Preview\",\n icon: <UiTable />,\n location: \"bottom\",\n height: 400,\n minHeightFraction: 0.2,\n maxHeightFraction: 0.8,\n slots: {\n headerTrailing: (\n <span className=\"text-[11px] text-muted-foreground\">\n {sampleRows.length\n ? `${sampleRows.length} sampled rows · updates as you edit`\n : \"No sample yet\"}\n </span>\n ),\n },\n content: (\n <ProfileEditorPreview\n profile={draft}\n columns={draft.columns ?? []}\n rows={mappingRows}\n stale={sampleStale}\n onNormalized={acceptNormalized}\n />\n ),\n });\n }\n return result;\n }, [\n activeParameter,\n activeProcessor,\n draft,\n fields,\n resetState,\n sampleRows,\n mappingRows,\n sampleStale,\n section,\n sectionContent,\n pipelineCatalog,\n processors,\n setProcessors,\n traces,\n acceptNormalized,\n ]);\n\n const leave = () => (dirty ? setConfirmDiscard(true) : onClose());\n\n return (\n <JsonPathSampleRowsContext.Provider value={section === \"spans\" ? mappingRows : normalizedRows.length ? normalizedRows : sampleRows}>\n <div className=\"grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] bg-background\">\n <header className=\"flex items-center gap-3 border-b border-border px-4 py-2.5\">\n <nav className=\"flex min-w-0 items-center gap-1.5 text-sm text-muted-foreground\">\n <button\n type=\"button\"\n className=\"hover:text-foreground\"\n onClick={leave}\n >\n Profiles\n </button>\n <span>/</span>\n <button\n type=\"button\"\n className=\"min-w-0 truncate hover:text-foreground\"\n onClick={leave}\n >\n {initialDraft.profile ?? surfaceKey}\n </button>\n <span>/</span>\n <span className=\"font-medium text-foreground\">Edit</span>\n </nav>\n {error ? (\n <span className=\"min-w-0 truncate text-sm text-destructive\" title={error}>{error}</span>\n ) : null}\n <span className=\"ml-auto hidden shrink-0 text-xs text-muted-foreground md:block\">\n {dirty ? \"Unsaved changes\" : \"No changes\"}\n </span>\n <Button type=\"button\" size=\"sm\" variant=\"ghost\" onClick={leave}>\n Discard\n </Button>\n {createAction ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={saveBlocked}\n title={validationError ?? undefined}\n onClick={() => setSavingAs(true)}\n >\n Save as new…\n </Button>\n ) : null}\n <span ref={setRunSlot} className=\"contents\" />\n {section === \"columns\" || section === \"spans\" ? (\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={!draft.provider?.type}\n title={draft.provider?.type ? undefined : \"Choose a provider before running a sample\"}\n loading={sampling}\n loadingLabel=\"Running\"\n onClick={() => void runSample()}\n >\n <Icon icon={UiPlay} className=\"size-4\" />\n Run\n </Button>\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={saveBlocked}\n title={validationError ?? undefined}\n onClick={() => void save()}\n >\n {saving ? \"Saving…\" : \"Save profile\"}\n </Button>\n </header>\n\n <Workspace panes={panes} storageKey=\"profile-editor-v2\" />\n </div>\n\n {confirmDiscard ? (\n <Modal\n open\n onClose={() => setConfirmDiscard(false)}\n title=\"Discard profile changes?\"\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setConfirmDiscard(false)}\n >\n Keep editing\n </Button>\n <Button type=\"button\" variant=\"destructive\" onClick={onClose}>\n Discard changes\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n Your unsaved profile changes will be lost.\n </p>\n </Modal>\n ) : null}\n\n {confirmResetColumns ? (\n <Modal\n open\n onClose={() => setConfirmResetColumns(false)}\n title={traces ? \"Reset to default?\" : \"Reset columns from latest sample?\"}\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setConfirmResetColumns(false)}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n disabled={resetState.disabled}\n onClick={resetColumns}\n >\n {traces ? \"Reset to default\" : \"Reset columns\"}\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n Replace {fields.configuredCount} configured column\n {fields.configuredCount === 1 ? \"\" : \"s\"} with{\" \"}\n {traces ? \"the canonical default columns\" : `${sampledColumns.length} columns from the latest sample`}.\n Custom labels, expressions, formatting, filtering, ordering, and\n manually added columns will be removed. The profile will remain\n unsaved until you save it.\n </p>\n </Modal>\n ) : null}\n\n {savingAs && createAction ? (\n <ProfileSaveAsDialog\n client={client}\n action={createAction}\n draft={draft}\n onCancel={() => setSavingAs(false)}\n onSaved={async (name) => {\n await onSuccess(name);\n setSavingAs(false);\n }}\n />\n ) : null}\n\n {replaceTarget ? (\n <Modal\n open\n onClose={() => setReplaceTarget(\"\")}\n title={`Replace ${replaceTarget}?`}\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setReplaceTarget(\"\")}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n disabled={saving}\n onClick={() => {\n setReplaceTarget(\"\");\n void save(true);\n }}\n >\n Replace profile\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n A profile named {replaceTarget} already exists. Its definition will\n be overwritten, the current profile will be renamed, and dependent\n imports will be updated atomically.\n </p>\n </Modal>\n ) : null}\n </JsonPathSampleRowsContext.Provider>\n );\n}\n\nfunction sectionLabel(section: ProfileEditorSection): string {\n return profileEditorSections.find((entry) => entry.id === section)!.label;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,IAAM,oBAAA,GAAmBA,MAAAA,KAAAA,OAAAA,QAAAA,QAAAA,CAAAA,CAAAA,WAAAA,QACvB,wBAAA,CAAA,CAAA,CAA6B,MAAM,YAAY,EAC7C,SAAS,OAAO,iBAClB,EAAE,CACJ;;AAGA,SAAS,mBAAmB,MAAsB;CAChD,IAAI;EACF,MAAM,SAAkB,KAAK,MAAM,IAAI;EACvC,IAAI,OAAO,WAAW,YAAY,WAAW,QAAQ,WAAW,UAAU,OAAO,OAAO,UAAU,UAAU,OAAO,OAAO;CAC5H,QAAQ,CAER;CACA,OAAO;AACT;;AAGA,eAAe,kBAAkB,OAAwE;CACvG,MAAM,UAAUC,uBAAAA,qBAAqB,KAAK;CAC1C,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,4CAA4C;CAC1E,MAAM,WAAW,MAAM,MAAMC,mBAAAA,eAAe,gBAAgB,GAAG;EAC7D,QAAQ;EACR,SAAS,EAAE,gBAAgB,mBAAmB;EAC9C,MAAM,KAAK,UAAU;GAAE;GAAS,QAAQ,CAAC;GAAG,mBAAmB;EAAK,CAAC;CACvE,CAAC;CACD,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,MAAM,mBAAmB,MAAM,SAAS,KAAK,CAAC,CAAC;CAC3E,OAAQ,MAAM,SAAS,KAAK;AAC9B;;;;;;;;;;AAWA,SAAgB,cAAc,EAC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K;IACL,QACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACxB,eAAAA,QAAD;MACE,MAAK;MACL,SAAQ;MACR,eAAe,iBAAiB,EAAE;MACnC,UAAA;KAEO,CAAA,GACR,iBAAA,GAAA,kBAAA,IAAA,CAACA,eAAAA,QAAD;MACE,MAAK;MACL,SAAQ;MACR,UAAU;MACV,eAAe;OACb,iBAAiB,EAAE;OACnB,KAAU,IAAI;MAChB;MACD,UAAA;KAEO,CAAA,CACL;;IAGP,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,KAAD;KAAG,WAAU;KAAb,UAAA;MAA6C;MAC1B;MAAc;KAG9B;;GACE,CAAA,IACL;EAC8B;;AAExC;AAEA,SAAS,aAAa,SAAuC;CAC3D,OAAO0B,2BAAAA,sBAAsB,MAAM,UAAU,MAAM,OAAO,OAAO,CAAC,CAAE;AACtE"}
|
|
1
|
+
{"version":3,"file":"profileEditor.cjs","names":["lazy","sampleRequestProfile","profileApiPath","useOperationLookupFetcher","useMemo","cloneProfileDraft","useState","defaultSpanColumns","profileSampleSignature","validateProfileEditorDraft","useProfileInspection","profileConnectionID","profileColumnResetState","useProfileFieldState","processorCatalog","profileSchema","useCallback","resolveProfileUpdatePath","profileUpdateConflictTarget","mergeSampledProfileColumns","useQuery","resetProfileColumns","Button","ProfileGeneralSection","ProfileSourceCard","ProfileSchemaSection","profileGeneralOptionKeys","ProfileQuerySection","_Fragment","ProfileSpansSection","ProfileFieldEditorForm","profileFieldEditorEmptyMessage","ProfileParameterDetail","ProcessorPipeline","Suspense","UiListTree","ProfileEditorRail","profileEditorSectionStatus","ProfileFieldSidebarList","ProfileParameterSidebar","UiTable","ProfileEditorPreview","JsonPathSampleRowsContext","Icon","UiPlay","Workspace","Modal","ProfileSaveAsDialog","profileEditorSections"],"sources":["../../../src/profiles/editor/profileEditor.tsx"],"sourcesContent":["import { Button } from \"../../components/button\";\nimport { Workspace } from \"../../layout/Workspace\";\nimport type { WorkspacePaneSpec } from \"../../layout/Workspace\";\nimport { Modal } from \"../../overlay/Modal\";\nimport { useOperationLookupFetcher } from \"../../rpc/operationLookupFetcher\";\nimport type { ResolvedOperation } from \"../../rpc/types\";\nimport type { OperationsApiClient } from \"../../rpc/useOperations\";\nimport { Icon } from \"../../data/Icon\";\nimport { UiListTree, UiPlay, UiTable } from \"../../icons\";\nimport {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport {\n cloneProfileDraft,\n mergeSampledProfileColumns,\n profileColumnResetState,\n profileEditorSectionStatus,\n profileEditorSections,\n profileGeneralOptionKeys,\n profileSampleSignature,\n profileUpdateConflictTarget,\n resetProfileColumns,\n validateProfileEditorDraft,\n type ProfileEditorSection,\n} from \"./profileEditorModel\";\nimport { ProfileEditorPreview } from \"./profileEditorPreview\";\nimport { ProfileEditorRail } from \"./profileEditorRail\";\nimport { ProfileSaveAsDialog } from \"./profileSaveAsDialog\";\nimport {\n ProfileGeneralSection,\n ProfileSchemaSection,\n ProfileQuerySection,\n ProfileSourceCard,\n} from \"./profileEditorSections\";\nimport { ProfileFieldSidebarList } from \"../fields/profileFieldList\";\nimport {\n ProfileFieldEditorForm,\n profileFieldEditorEmptyMessage,\n} from \"../fields/profileFieldEditor\";\nimport { useProfileFieldState } from \"../fields/profileFieldState\";\nimport type { ProfileSample } from \"../wizard/profileWizardQueryStep\";\nimport { useProfileInspection } from \"../wizard/useProfileInspection\";\nimport {\n profileConnectionID,\n type ProfileColumn,\n type ProfileWizardDraft,\n} from \"../wizard/profileWizardModel\";\nimport { resolveProfileUpdatePath } from \"./profileEditorRoutes\";\nimport {\n ProfileParameterDetail,\n ProfileParameterSidebar,\n} from \"./profileParameterEditor\";\nimport { ProcessorPipeline } from \"../processor/processorPipeline\";\nimport {\n processorCatalog,\n type ProcessorSpec,\n} from \"../processor/processorConfig\";\nimport { profileSchema } from \"../profileApi\";\nimport { profileApiPath } from \"../profileApi\";\nimport { sampleRequestProfile, JsonPathSampleRowsContext } from \"../query/jsonPathSample\";\nimport { defaultSpanColumns } from \"./spanColumns\";\nimport { ProfileSpansSection } from \"./profileSpansSection\";\nimport { useQuery } from \"@tanstack/react-query\";\n\nconst ProfileEditorRaw = lazy(() =>\n import(\"./profileEditorRaw\").then((module) => ({\n default: module.ProfileEditorRaw,\n })),\n);\n\n/** The server answers a failed sample with a JSON diagnostics envelope; its `error` is the message, anything else is shown as sent. */\nfunction sampleErrorMessage(body: string): string {\n try {\n const parsed: unknown = JSON.parse(body);\n if (typeof parsed === \"object\" && parsed !== null && \"error\" in parsed && typeof parsed.error === \"string\") return parsed.error;\n } catch {\n // Not JSON: the body is the message.\n }\n return body;\n}\n\n/** The one request the editor makes to sample a profile: used by the traces source sample and by Run. */\nasync function fetchEditorSample(draft: ProfileWizardDraft): Promise<Omit<ProfileSample, \"sourceDraft\">> {\n const profile = sampleRequestProfile(draft);\n if (!profile) throw new Error(\"Cannot sample a profile without a provider\");\n const response = await fetch(profileApiPath(\"profile/sample\"), {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ profile, params: {}, previewProcessors: true }),\n });\n if (!response.ok) throw new Error(sampleErrorMessage(await response.text()));\n return (await response.json()) as Omit<ProfileSample, \"sourceDraft\">;\n}\n\n/**\n * The profile editor as a route rather than a dialog.\n *\n * Six sections, ~130 discoverable fields and a CEL editor per column outgrew a\n * modal: the layout is a clicky-ui Workspace, so the section rail, the column\n * grid and the sampled preview are panes the user can resize, collapse and keep\n * across visits. Collection fields stay in the rail while the selected item is\n * edited in the center, keeping names and icons visible throughout the edit.\n */\nexport function ProfileEditor({\n client,\n action,\n createAction,\n surfaceKey,\n initialValue,\n onClose,\n onSuccess,\n}: {\n client: OperationsApiClient;\n action: ResolvedOperation;\n /** The profiles collection's create operation; when given, the header offers\n * \"Save as new…\", which saves the draft under a new name and leaves the\n * edited profile as it was. */\n createAction?: ResolvedOperation | undefined;\n surfaceKey: string;\n initialValue: Record<string, unknown>;\n onClose: () => void;\n onSuccess: (name: string) => void | Promise<void>;\n}) {\n const lookupFetcher = useOperationLookupFetcher(client);\n const initialDraft = useMemo(\n () => cloneProfileDraft(initialValue),\n [initialValue],\n );\n const initialSerialized = useMemo(\n () => JSON.stringify(initialDraft),\n [initialDraft],\n );\n const [draft, setDraft] = useState<ProfileWizardDraft>(initialDraft);\n const [section, setSection] = useState<ProfileEditorSection>(initialDraft.render === \"traces\" ? \"spans\" : \"general\");\n const [discovered, setDiscovered] = useState<ProfileColumn[]>(\n initialDraft.render === \"traces\" ? defaultSpanColumns() : initialDraft.columns ?? [],\n );\n const [sampledColumns, setSampledColumns] = useState<ProfileColumn[]>([]);\n const [sampleRows, setSampleRows] = useState<Record<string, unknown>[]>([]);\n const [mappingRows, setMappingRows] = useState<Record<string, unknown>[]>([]);\n const [activeField, setActiveField] = useState(\n initialDraft.columns?.[0]?.name ?? \"\",\n );\n const [activeParameter, setActiveParameter] = useState(0);\n const [activeProcessor, setActiveProcessor] = useState(0);\n const [lastSampleSignature, setLastSampleSignature] = useState(() =>\n profileSampleSignature(initialDraft),\n );\n const [rawValid, setRawValid] = useState(true);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState(\"\");\n const [replaceTarget, setReplaceTarget] = useState(\"\");\n const [savingAs, setSavingAs] = useState(false);\n const [confirmDiscard, setConfirmDiscard] = useState(false);\n const [confirmResetColumns, setConfirmResetColumns] = useState(false);\n // The Source section's query workspace portals its Run button here, so Run\n // sits beside Save profile and keeps the workspace's own pending/selection state.\n const [runSlot, setRunSlot] = useState<HTMLElement | null>(null);\n const dirty = JSON.stringify(draft) !== initialSerialized;\n const [normalizedRows, setNormalizedRows] = useState<Record<string, unknown>[]>([]);\n const traces = draft.render === \"traces\";\n const validationError = validateProfileEditorDraft(draft);\n const saveBlocked = saving || Boolean(validationError) || (section === \"raw\" && !rawValid);\n const sampleStale = profileSampleSignature(draft) !== lastSampleSignature;\n // The same inspection the Query workspace reads, so the source field pickers\n // and the workspace share one fetch of the index's mapped fields.\n const sourceInspection = useProfileInspection({\n connectionID: profileConnectionID(draft.provider?.connection ?? \"\"),\n providerOptions: draft.provider?.options ?? {},\n });\n const indexFields =\n sourceInspection.inspection.completion?.kind === \"json-fields\"\n ? sourceInspection.inspection.completion.fields\n : [];\n const resetState = traces ? {visible:true, disabled:false, title:\"Reset to default\"} : profileColumnResetState({\n providerType: draft.provider?.type ?? \"\",\n sampledColumnCount: sampledColumns.length,\n sampleStale,\n });\n\n const fields = useProfileFieldState({\n normalizedOnly: traces,\n discovered,\n configured: draft.columns ?? [],\n activeName: activeField,\n onConfiguredChange: (columns) =>\n setDraft((current) => ({ ...current, columns })),\n onActiveNameChange: setActiveField,\n });\n const processors = Array.isArray(draft.processors)\n ? (draft.processors as ProcessorSpec[])\n : [];\n const pipelineCatalog = useMemo(\n () => processorCatalog(profileSchema().properties?.processors),\n [],\n );\n const setProcessors = useCallback(\n (next: ProcessorSpec[]) =>\n setDraft((current) => ({ ...current, processors: next })),\n [],\n );\n\n // A route can be refreshed or navigated away from; the dialog used to guard\n // unsaved edits with confirmClose, so the route has to guard them too.\n useEffect(() => {\n if (!dirty) return;\n const warn = (event: BeforeUnloadEvent) => event.preventDefault();\n window.addEventListener(\"beforeunload\", warn);\n return () => window.removeEventListener(\"beforeunload\", warn);\n }, [dirty]);\n\n const save = async (replaceExisting = false) => {\n if (validationError) {\n setError(validationError);\n return;\n }\n if (!client.submitForm) {\n setError(\"Profile updates are unavailable\");\n return;\n }\n setSaving(true);\n setError(\"\");\n try {\n const body = {\n ...draft,\n id: surfaceKey,\n ...(replaceExisting ? { replaceExisting: true } : {}),\n };\n const response = await client.submitForm(\n resolveProfileUpdatePath(action.path, surfaceKey),\n action.method,\n body,\n );\n if (!response.success) {\n const message =\n response.error || response.message || \"Profile update failed\";\n const target = profileUpdateConflictTarget(message);\n if (target && !replaceExisting) {\n setReplaceTarget(target);\n return;\n }\n throw new Error(message);\n }\n await onSuccess(draft.profile!.trim());\n } catch (saveError) {\n setError(\n saveError instanceof Error\n ? saveError.message\n : \"Profile update failed\",\n );\n } finally {\n setSaving(false);\n }\n };\n\n const acceptSample = useCallback(({ columns, rows, sourceDraft, mappingInputRows }: ProfileSample) => {\n if (!mappingInputRows) throw new Error(\"Sample response is missing mappingInputRows\");\n setMappingRows(mappingInputRows);\n setSampledColumns(structuredClone(columns));\n if (sourceDraft.render !== \"traces\") setDiscovered(columns);\n setSampleRows(rows);\n setDraft((current) => ({\n ...current,\n columns: current.render === \"traces\" ? current.columns ?? defaultSpanColumns() : mergeSampledProfileColumns(current.columns ?? [], columns),\n }));\n setActiveField((current) => current || columns[0]?.name || \"\");\n setLastSampleSignature(profileSampleSignature(sourceDraft));\n }, []);\n\n const sourceSample = useQuery({\n queryKey:[\"profile-editor-source\", profileSampleSignature(initialDraft)],\n enabled:initialDraft.render === \"traces\", staleTime:Infinity, retry:false, refetchOnWindowFocus:false,\n queryFn:() => fetchEditorSample(initialDraft),\n });\n // Run on Columns and Spans: the same request the traces source sample makes,\n // for the draft as it stands, accepted the same way.\n const [sampling, setSampling] = useState(false);\n const runSample = async () => {\n setSampling(true);\n setError(\"\");\n try {\n acceptSample({ ...(await fetchEditorSample(draft)), sourceDraft: draft });\n } catch (sampleError) {\n setError(sampleError instanceof Error ? sampleError.message : \"Sample failed\");\n } finally {\n setSampling(false);\n }\n };\n useEffect(() => {\n if (sourceSample.data) acceptSample({...sourceSample.data,sourceDraft:initialDraft});\n if (sourceSample.error) setError(sourceSample.error.message);\n }, [sourceSample.data,sourceSample.error,initialDraft,acceptSample]);\n\n const acceptNormalized = useCallback((rows: Record<string, unknown>[], columns: ProfileColumn[]) => {\n setNormalizedRows(rows);\n setDiscovered(columns);\n }, []);\n\n const resetColumns = () => {\n const defaults = traces ? defaultSpanColumns() : sampledColumns;\n const first = defaults[0];\n if (!first) throw new Error(\"cannot reset columns without a sample\");\n setDraft((current) => resetProfileColumns(current, defaults));\n setActiveField(first.name);\n setConfirmResetColumns(false);\n };\n\n const sectionContent = (\n <div className=\"@container h-full overflow-auto p-5\">\n {traces && (section === \"spans\" || section === \"columns\") ? <div className=\"mb-4 flex items-center gap-3\">\n <Button type=\"button\" variant=\"outline\" onClick={() => setConfirmResetColumns(true)}>Reset to default</Button>\n {validationError ? <p role=\"alert\" className=\"text-sm text-destructive\">{validationError}</p> : null}\n </div> : null}\n {section === \"general\" ? (\n <div className=\"space-y-4\">\n <ProfileGeneralSection draft={draft} onChange={setDraft} />\n <ProfileSourceCard\n draft={draft}\n // The provider's documents as read, ahead of any processor, are what\n // a source field name or an unwrap rule refers to.\n indexFields={indexFields}\n sampleRows={mappingRows.length ? mappingRows : sampleRows}\n {...(lookupFetcher ? { lookupFetcher } : {})}\n onChange={setDraft}\n />\n <ProfileSchemaSection\n draft={draft}\n keys={profileGeneralOptionKeys}\n title=\"General options\"\n description=\"Compose profiles with imports and aliases, choose the output fields, and ignore values that should not be retained.\"\n idPrefix=\"profile-general-options\"\n {...(lookupFetcher ? { lookupFetcher } : {})}\n onChange={setDraft}\n />\n </div>\n ) : null}\n {section === \"source\" ? (\n <ProfileQuerySection\n draft={draft}\n discovered={discovered}\n sampleStale={sampleStale}\n runSlot={runSlot}\n onChange={setDraft}\n onSample={acceptSample}\n />\n ) : null}\n {section === \"spans\" && traces ? <>\n <ProfileSpansSection draft={draft} rows={mappingRows} normalizedRows={normalizedRows} onChange={setDraft} />\n <details className=\"mt-4\"><summary>Source sample</summary><pre className=\"overflow-auto text-xs\">{JSON.stringify(mappingRows[0] ?? {}, null, 2)}</pre></details>\n </> : null}\n {section === \"columns\" ? (\n fields.activeField ? (\n <section className=\"rounded-xl border bg-card p-5\">\n <div className=\"max-w-6xl\">\n <ProfileFieldEditorForm\n field={fields.activeField}\n onChange={fields.updateActiveField}\n providerType={draft.provider?.type}\n />\n </div>\n </section>\n ) : (\n <div className=\"grid h-full place-items-center text-sm text-muted-foreground\">\n {profileFieldEditorEmptyMessage}\n </div>\n )\n ) : null}\n {section === \"parameters\" ? (\n <ProfileParameterDetail\n draft={draft}\n activeIndex={activeParameter}\n onChange={setDraft}\n />\n ) : null}\n {section === \"processors\" ? (\n <div className=\"max-w-5xl\">\n <ProcessorPipeline\n steps={processors}\n catalog={pipelineCatalog}\n profile={draft}\n selectedIndex={activeProcessor}\n showSteps={false}\n onSelectedIndexChange={setActiveProcessor}\n onChange={setProcessors}\n />\n </div>\n ) : null}\n {section === \"raw\" ? (\n <Suspense\n fallback={\n <p className=\"text-sm text-muted-foreground\">\n Loading YAML editor…\n </p>\n }\n >\n <ProfileEditorRaw\n draft={draft}\n onChange={setDraft}\n onValidityChange={setRawValid}\n />\n </Suspense>\n ) : null}\n </div>\n );\n\n const panes = useMemo<WorkspacePaneSpec[]>(() => {\n const rail: WorkspacePaneSpec = {\n id: \"sections\",\n label: \"Profile\",\n icon: <UiListTree />,\n location: \"left\",\n width: 340,\n minWidth: 280,\n maxWidth: 480,\n content: (\n <ProfileEditorRail\n traces={traces}\n value={section}\n status={profileEditorSectionStatus({\n draft,\n availableColumns: fields.available.length,\n sampleStale,\n })}\n collections={{\n columns: (\n <ProfileFieldSidebarList\n state={fields}\n onFieldSelect={(name) => {\n fields.setActiveName(name);\n setSection(\"columns\");\n }}\n onAdd={() => setSection(\"columns\")}\n {...(resetState.visible\n ? {\n reset: {\n disabled: resetState.disabled,\n title: resetState.title,\n onReset: () => setConfirmResetColumns(true),\n },\n }\n : {})}\n />\n ),\n parameters: (\n <ProfileParameterSidebar\n draft={draft}\n activeIndex={activeParameter}\n onActiveIndexChange={(index) => {\n setActiveParameter(index);\n setSection(\"parameters\");\n }}\n onChange={setDraft}\n />\n ),\n processors: (\n <ProcessorPipeline\n steps={processors}\n catalog={pipelineCatalog}\n profile={draft}\n selectedIndex={activeProcessor}\n showEditor={false}\n tree\n onSelectedIndexChange={(index) => {\n setActiveProcessor(index);\n setSection(\"processors\");\n }}\n onChange={setProcessors}\n />\n ),\n }}\n onChange={setSection}\n />\n ),\n };\n\n const result: WorkspacePaneSpec[] = [\n rail,\n {\n id: \"section\",\n label: sectionLabel(section),\n location: \"center\",\n collapsible: false,\n showHeader: false,\n contentClassName: \"p-0\",\n content: sectionContent,\n },\n ];\n if (section === \"columns\" || section === \"spans\" || (section === \"source\" && draft.search)) {\n result.push({\n id: \"preview\",\n label: \"Preview\",\n icon: <UiTable />,\n location: \"bottom\",\n height: 400,\n minHeightFraction: 0.2,\n maxHeightFraction: 0.8,\n slots: {\n headerTrailing: (\n <span className=\"text-[11px] text-muted-foreground\">\n {sampleRows.length\n ? `${sampleRows.length} sampled rows · updates as you edit`\n : \"No sample yet\"}\n </span>\n ),\n },\n content: (\n <ProfileEditorPreview\n profile={draft}\n columns={draft.columns ?? []}\n rows={mappingRows}\n stale={sampleStale}\n onNormalized={acceptNormalized}\n />\n ),\n });\n }\n return result;\n }, [\n activeParameter,\n activeProcessor,\n draft,\n fields,\n resetState,\n sampleRows,\n mappingRows,\n sampleStale,\n section,\n sectionContent,\n pipelineCatalog,\n processors,\n setProcessors,\n traces,\n acceptNormalized,\n ]);\n\n const leave = () => (dirty ? setConfirmDiscard(true) : onClose());\n\n return (\n <JsonPathSampleRowsContext.Provider value={section === \"spans\" ? mappingRows : normalizedRows.length ? normalizedRows : sampleRows}>\n <div className=\"grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] bg-background\">\n <header className=\"flex items-center gap-3 border-b border-border px-4 py-2.5\">\n <nav className=\"flex min-w-0 items-center gap-1.5 text-sm text-muted-foreground\">\n <button\n type=\"button\"\n className=\"hover:text-foreground\"\n onClick={leave}\n >\n Profiles\n </button>\n <span>/</span>\n <button\n type=\"button\"\n className=\"min-w-0 truncate hover:text-foreground\"\n onClick={leave}\n >\n {initialDraft.profile ?? surfaceKey}\n </button>\n <span>/</span>\n <span className=\"font-medium text-foreground\">Edit</span>\n </nav>\n {error ? (\n <span className=\"min-w-0 truncate text-sm text-destructive\" title={error}>{error}</span>\n ) : null}\n <span className=\"ml-auto hidden shrink-0 text-xs text-muted-foreground md:block\">\n {dirty ? \"Unsaved changes\" : \"No changes\"}\n </span>\n <Button type=\"button\" size=\"sm\" variant=\"ghost\" onClick={leave}>\n Discard\n </Button>\n {createAction ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={saveBlocked}\n title={validationError ?? undefined}\n onClick={() => setSavingAs(true)}\n >\n Save as new…\n </Button>\n ) : null}\n <span ref={setRunSlot} className=\"contents\" />\n {section === \"columns\" || section === \"spans\" ? (\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={!draft.provider?.type}\n title={draft.provider?.type ? undefined : \"Choose a provider before running a sample\"}\n loading={sampling}\n loadingLabel=\"Running\"\n onClick={() => void runSample()}\n >\n <Icon icon={UiPlay} className=\"size-4\" />\n Run\n </Button>\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={saveBlocked}\n title={validationError ?? undefined}\n onClick={() => void save()}\n >\n {saving ? \"Saving…\" : \"Save profile\"}\n </Button>\n </header>\n\n <Workspace panes={panes} storageKey=\"profile-editor-v2\" />\n </div>\n\n {confirmDiscard ? (\n <Modal\n open\n onClose={() => setConfirmDiscard(false)}\n title=\"Discard profile changes?\"\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setConfirmDiscard(false)}\n >\n Keep editing\n </Button>\n <Button type=\"button\" variant=\"destructive\" onClick={onClose}>\n Discard changes\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n Your unsaved profile changes will be lost.\n </p>\n </Modal>\n ) : null}\n\n {confirmResetColumns ? (\n <Modal\n open\n onClose={() => setConfirmResetColumns(false)}\n title={traces ? \"Reset to default?\" : \"Reset columns from latest sample?\"}\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setConfirmResetColumns(false)}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n disabled={resetState.disabled}\n onClick={resetColumns}\n >\n {traces ? \"Reset to default\" : \"Reset columns\"}\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n Replace {fields.configuredCount} configured column\n {fields.configuredCount === 1 ? \"\" : \"s\"} with{\" \"}\n {traces ? \"the canonical default columns\" : `${sampledColumns.length} columns from the latest sample`}.\n Custom labels, expressions, formatting, filtering, ordering, and\n manually added columns will be removed. The profile will remain\n unsaved until you save it.\n </p>\n </Modal>\n ) : null}\n\n {savingAs && createAction ? (\n <ProfileSaveAsDialog\n client={client}\n action={createAction}\n draft={draft}\n onCancel={() => setSavingAs(false)}\n onSaved={async (name) => {\n await onSuccess(name);\n setSavingAs(false);\n }}\n />\n ) : null}\n\n {replaceTarget ? (\n <Modal\n open\n onClose={() => setReplaceTarget(\"\")}\n title={`Replace ${replaceTarget}?`}\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setReplaceTarget(\"\")}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n disabled={saving}\n onClick={() => {\n setReplaceTarget(\"\");\n void save(true);\n }}\n >\n Replace profile\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n A profile named {replaceTarget} already exists. Its definition will\n be overwritten, the current profile will be renamed, and dependent\n imports will be updated atomically.\n </p>\n </Modal>\n ) : null}\n </JsonPathSampleRowsContext.Provider>\n );\n}\n\nfunction sectionLabel(section: ProfileEditorSection): string {\n return profileEditorSections.find((entry) => entry.id === section)!.label;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,IAAM,oBAAA,GAAmBA,MAAAA,KAAAA,OAAAA,QAAAA,QAAAA,CAAAA,CAAAA,WAAAA,QACvB,wBAAA,CAAA,CAAA,CAA6B,MAAM,Y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":3,"file":"profileEditor.d.ts","sourceRoot":"","sources":["../../../src/profiles/editor/profileEditor.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AA6FnE;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,MAAM,EACN,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,OAAO,EACP,SAAS,GACV,EAAE;IACD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;mCAE+B;IAC/B,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD,+
|
|
1
|
+
{"version":3,"file":"profileEditor.d.ts","sourceRoot":"","sources":["../../../src/profiles/editor/profileEditor.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AA6FnE;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,MAAM,EACN,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,OAAO,EACP,SAAS,GACV,EAAE;IACD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;mCAE+B;IAC/B,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD,+BA2lBA"}
|
|
@@ -22,7 +22,7 @@ import { ProcessorPipeline } from "../processor/processorPipeline.js";
|
|
|
22
22
|
import { processorCatalog } from "../processor/processorConfig.js";
|
|
23
23
|
import { profileApiPath, profileSchema } from "../profileApi.js";
|
|
24
24
|
import { JsonPathSampleRowsContext, sampleRequestProfile } from "../query/jsonPathSample.js";
|
|
25
|
-
import { defaultSpanColumns
|
|
25
|
+
import { defaultSpanColumns } from "./spanColumns.js";
|
|
26
26
|
import { ProfileSpansSection } from "./profileSpansSection.js";
|
|
27
27
|
import { Suspense, lazy, useCallback, useEffect, useMemo, useState } from "react";
|
|
28
28
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -87,8 +87,7 @@ function ProfileEditor({ client, action, createAction, surfaceKey, initialValue,
|
|
|
87
87
|
const dirty = JSON.stringify(draft) !== initialSerialized;
|
|
88
88
|
const [normalizedRows, setNormalizedRows] = useState([]);
|
|
89
89
|
const traces = draft.render === "traces";
|
|
90
|
-
const
|
|
91
|
-
const validationError = validateProfileEditorDraft(draft) ?? (obsolete.length ? `Columns require normalized sources: ${obsolete.join(", ")}. Reset to default or remove them.` : null);
|
|
90
|
+
const validationError = validateProfileEditorDraft(draft);
|
|
92
91
|
const saveBlocked = saving || Boolean(validationError) || section === "raw" && !rawValid;
|
|
93
92
|
const sampleStale = profileSampleSignature(draft) !== lastSampleSignature;
|
|
94
93
|
const sourceInspection = useProfileInspection({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileEditor.js","names":["_Fragment"],"sources":["../../../src/profiles/editor/profileEditor.tsx"],"sourcesContent":["import { Button } from \"../../components/button\";\nimport { Workspace } from \"../../layout/Workspace\";\nimport type { WorkspacePaneSpec } from \"../../layout/Workspace\";\nimport { Modal } from \"../../overlay/Modal\";\nimport { useOperationLookupFetcher } from \"../../rpc/operationLookupFetcher\";\nimport type { ResolvedOperation } from \"../../rpc/types\";\nimport type { OperationsApiClient } from \"../../rpc/useOperations\";\nimport { Icon } from \"../../data/Icon\";\nimport { UiListTree, UiPlay, UiTable } from \"../../icons\";\nimport {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport {\n cloneProfileDraft,\n mergeSampledProfileColumns,\n profileColumnResetState,\n profileEditorSectionStatus,\n profileEditorSections,\n profileGeneralOptionKeys,\n profileSampleSignature,\n profileUpdateConflictTarget,\n resetProfileColumns,\n validateProfileEditorDraft,\n type ProfileEditorSection,\n} from \"./profileEditorModel\";\nimport { ProfileEditorPreview } from \"./profileEditorPreview\";\nimport { ProfileEditorRail } from \"./profileEditorRail\";\nimport { ProfileSaveAsDialog } from \"./profileSaveAsDialog\";\nimport {\n ProfileGeneralSection,\n ProfileSchemaSection,\n ProfileQuerySection,\n ProfileSourceCard,\n} from \"./profileEditorSections\";\nimport { ProfileFieldSidebarList } from \"../fields/profileFieldList\";\nimport {\n ProfileFieldEditorForm,\n profileFieldEditorEmptyMessage,\n} from \"../fields/profileFieldEditor\";\nimport { useProfileFieldState } from \"../fields/profileFieldState\";\nimport type { ProfileSample } from \"../wizard/profileWizardQueryStep\";\nimport { useProfileInspection } from \"../wizard/useProfileInspection\";\nimport {\n profileConnectionID,\n type ProfileColumn,\n type ProfileWizardDraft,\n} from \"../wizard/profileWizardModel\";\nimport { resolveProfileUpdatePath } from \"./profileEditorRoutes\";\nimport {\n ProfileParameterDetail,\n ProfileParameterSidebar,\n} from \"./profileParameterEditor\";\nimport { ProcessorPipeline } from \"../processor/processorPipeline\";\nimport {\n processorCatalog,\n type ProcessorSpec,\n} from \"../processor/processorConfig\";\nimport { profileSchema } from \"../profileApi\";\nimport { profileApiPath } from \"../profileApi\";\nimport { sampleRequestProfile, JsonPathSampleRowsContext } from \"../query/jsonPathSample\";\nimport { defaultSpanColumns, obsoleteSpanColumns } from \"./spanColumns\";\nimport { ProfileSpansSection } from \"./profileSpansSection\";\nimport { useQuery } from \"@tanstack/react-query\";\n\nconst ProfileEditorRaw = lazy(() =>\n import(\"./profileEditorRaw\").then((module) => ({\n default: module.ProfileEditorRaw,\n })),\n);\n\n/** The server answers a failed sample with a JSON diagnostics envelope; its `error` is the message, anything else is shown as sent. */\nfunction sampleErrorMessage(body: string): string {\n try {\n const parsed: unknown = JSON.parse(body);\n if (typeof parsed === \"object\" && parsed !== null && \"error\" in parsed && typeof parsed.error === \"string\") return parsed.error;\n } catch {\n // Not JSON: the body is the message.\n }\n return body;\n}\n\n/** The one request the editor makes to sample a profile: used by the traces source sample and by Run. */\nasync function fetchEditorSample(draft: ProfileWizardDraft): Promise<Omit<ProfileSample, \"sourceDraft\">> {\n const profile = sampleRequestProfile(draft);\n if (!profile) throw new Error(\"Cannot sample a profile without a provider\");\n const response = await fetch(profileApiPath(\"profile/sample\"), {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ profile, params: {}, previewProcessors: true }),\n });\n if (!response.ok) throw new Error(sampleErrorMessage(await response.text()));\n return (await response.json()) as Omit<ProfileSample, \"sourceDraft\">;\n}\n\n/**\n * The profile editor as a route rather than a dialog.\n *\n * Six sections, ~130 discoverable fields and a CEL editor per column outgrew a\n * modal: the layout is a clicky-ui Workspace, so the section rail, the column\n * grid and the sampled preview are panes the user can resize, collapse and keep\n * across visits. Collection fields stay in the rail while the selected item is\n * edited in the center, keeping names and icons visible throughout the edit.\n */\nexport function ProfileEditor({\n client,\n action,\n createAction,\n surfaceKey,\n initialValue,\n onClose,\n onSuccess,\n}: {\n client: OperationsApiClient;\n action: ResolvedOperation;\n /** The profiles collection's create operation; when given, the header offers\n * \"Save as new…\", which saves the draft under a new name and leaves the\n * edited profile as it was. */\n createAction?: ResolvedOperation | undefined;\n surfaceKey: string;\n initialValue: Record<string, unknown>;\n onClose: () => void;\n onSuccess: (name: string) => void | Promise<void>;\n}) {\n const lookupFetcher = useOperationLookupFetcher(client);\n const initialDraft = useMemo(\n () => cloneProfileDraft(initialValue),\n [initialValue],\n );\n const initialSerialized = useMemo(\n () => JSON.stringify(initialDraft),\n [initialDraft],\n );\n const [draft, setDraft] = useState<ProfileWizardDraft>(initialDraft);\n const [section, setSection] = useState<ProfileEditorSection>(initialDraft.render === \"traces\" ? \"spans\" : \"general\");\n const [discovered, setDiscovered] = useState<ProfileColumn[]>(\n initialDraft.render === \"traces\" ? defaultSpanColumns() : initialDraft.columns ?? [],\n );\n const [sampledColumns, setSampledColumns] = useState<ProfileColumn[]>([]);\n const [sampleRows, setSampleRows] = useState<Record<string, unknown>[]>([]);\n const [mappingRows, setMappingRows] = useState<Record<string, unknown>[]>([]);\n const [activeField, setActiveField] = useState(\n initialDraft.columns?.[0]?.name ?? \"\",\n );\n const [activeParameter, setActiveParameter] = useState(0);\n const [activeProcessor, setActiveProcessor] = useState(0);\n const [lastSampleSignature, setLastSampleSignature] = useState(() =>\n profileSampleSignature(initialDraft),\n );\n const [rawValid, setRawValid] = useState(true);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState(\"\");\n const [replaceTarget, setReplaceTarget] = useState(\"\");\n const [savingAs, setSavingAs] = useState(false);\n const [confirmDiscard, setConfirmDiscard] = useState(false);\n const [confirmResetColumns, setConfirmResetColumns] = useState(false);\n // The Source section's query workspace portals its Run button here, so Run\n // sits beside Save profile and keeps the workspace's own pending/selection state.\n const [runSlot, setRunSlot] = useState<HTMLElement | null>(null);\n const dirty = JSON.stringify(draft) !== initialSerialized;\n const [normalizedRows, setNormalizedRows] = useState<Record<string, unknown>[]>([]);\n const traces = draft.render === \"traces\";\n const obsolete = traces ? obsoleteSpanColumns(draft.columns ?? [], discovered) : [];\n const validationError = validateProfileEditorDraft(draft) ?? (obsolete.length ? `Columns require normalized sources: ${obsolete.join(\", \")}. Reset to default or remove them.` : null);\n const saveBlocked = saving || Boolean(validationError) || (section === \"raw\" && !rawValid);\n const sampleStale = profileSampleSignature(draft) !== lastSampleSignature;\n // The same inspection the Query workspace reads, so the source field pickers\n // and the workspace share one fetch of the index's mapped fields.\n const sourceInspection = useProfileInspection({\n connectionID: profileConnectionID(draft.provider?.connection ?? \"\"),\n providerOptions: draft.provider?.options ?? {},\n });\n const indexFields =\n sourceInspection.inspection.completion?.kind === \"json-fields\"\n ? sourceInspection.inspection.completion.fields\n : [];\n const resetState = traces ? {visible:true, disabled:false, title:\"Reset to default\"} : profileColumnResetState({\n providerType: draft.provider?.type ?? \"\",\n sampledColumnCount: sampledColumns.length,\n sampleStale,\n });\n\n const fields = useProfileFieldState({\n normalizedOnly: traces,\n discovered,\n configured: draft.columns ?? [],\n activeName: activeField,\n onConfiguredChange: (columns) =>\n setDraft((current) => ({ ...current, columns })),\n onActiveNameChange: setActiveField,\n });\n const processors = Array.isArray(draft.processors)\n ? (draft.processors as ProcessorSpec[])\n : [];\n const pipelineCatalog = useMemo(\n () => processorCatalog(profileSchema().properties?.processors),\n [],\n );\n const setProcessors = useCallback(\n (next: ProcessorSpec[]) =>\n setDraft((current) => ({ ...current, processors: next })),\n [],\n );\n\n // A route can be refreshed or navigated away from; the dialog used to guard\n // unsaved edits with confirmClose, so the route has to guard them too.\n useEffect(() => {\n if (!dirty) return;\n const warn = (event: BeforeUnloadEvent) => event.preventDefault();\n window.addEventListener(\"beforeunload\", warn);\n return () => window.removeEventListener(\"beforeunload\", warn);\n }, [dirty]);\n\n const save = async (replaceExisting = false) => {\n if (validationError) {\n setError(validationError);\n return;\n }\n if (!client.submitForm) {\n setError(\"Profile updates are unavailable\");\n return;\n }\n setSaving(true);\n setError(\"\");\n try {\n const body = {\n ...draft,\n id: surfaceKey,\n ...(replaceExisting ? { replaceExisting: true } : {}),\n };\n const response = await client.submitForm(\n resolveProfileUpdatePath(action.path, surfaceKey),\n action.method,\n body,\n );\n if (!response.success) {\n const message =\n response.error || response.message || \"Profile update failed\";\n const target = profileUpdateConflictTarget(message);\n if (target && !replaceExisting) {\n setReplaceTarget(target);\n return;\n }\n throw new Error(message);\n }\n await onSuccess(draft.profile!.trim());\n } catch (saveError) {\n setError(\n saveError instanceof Error\n ? saveError.message\n : \"Profile update failed\",\n );\n } finally {\n setSaving(false);\n }\n };\n\n const acceptSample = useCallback(({ columns, rows, sourceDraft, mappingInputRows }: ProfileSample) => {\n if (!mappingInputRows) throw new Error(\"Sample response is missing mappingInputRows\");\n setMappingRows(mappingInputRows);\n setSampledColumns(structuredClone(columns));\n if (sourceDraft.render !== \"traces\") setDiscovered(columns);\n setSampleRows(rows);\n setDraft((current) => ({\n ...current,\n columns: current.render === \"traces\" ? current.columns ?? defaultSpanColumns() : mergeSampledProfileColumns(current.columns ?? [], columns),\n }));\n setActiveField((current) => current || columns[0]?.name || \"\");\n setLastSampleSignature(profileSampleSignature(sourceDraft));\n }, []);\n\n const sourceSample = useQuery({\n queryKey:[\"profile-editor-source\", profileSampleSignature(initialDraft)],\n enabled:initialDraft.render === \"traces\", staleTime:Infinity, retry:false, refetchOnWindowFocus:false,\n queryFn:() => fetchEditorSample(initialDraft),\n });\n // Run on Columns and Spans: the same request the traces source sample makes,\n // for the draft as it stands, accepted the same way.\n const [sampling, setSampling] = useState(false);\n const runSample = async () => {\n setSampling(true);\n setError(\"\");\n try {\n acceptSample({ ...(await fetchEditorSample(draft)), sourceDraft: draft });\n } catch (sampleError) {\n setError(sampleError instanceof Error ? sampleError.message : \"Sample failed\");\n } finally {\n setSampling(false);\n }\n };\n useEffect(() => {\n if (sourceSample.data) acceptSample({...sourceSample.data,sourceDraft:initialDraft});\n if (sourceSample.error) setError(sourceSample.error.message);\n }, [sourceSample.data,sourceSample.error,initialDraft,acceptSample]);\n\n const acceptNormalized = useCallback((rows: Record<string, unknown>[], columns: ProfileColumn[]) => {\n setNormalizedRows(rows);\n setDiscovered(columns);\n }, []);\n\n const resetColumns = () => {\n const defaults = traces ? defaultSpanColumns() : sampledColumns;\n const first = defaults[0];\n if (!first) throw new Error(\"cannot reset columns without a sample\");\n setDraft((current) => resetProfileColumns(current, defaults));\n setActiveField(first.name);\n setConfirmResetColumns(false);\n };\n\n const sectionContent = (\n <div className=\"@container h-full overflow-auto p-5\">\n {traces && (section === \"spans\" || section === \"columns\") ? <div className=\"mb-4 flex items-center gap-3\">\n <Button type=\"button\" variant=\"outline\" onClick={() => setConfirmResetColumns(true)}>Reset to default</Button>\n {validationError ? <p role=\"alert\" className=\"text-sm text-destructive\">{validationError}</p> : null}\n </div> : null}\n {section === \"general\" ? (\n <div className=\"space-y-4\">\n <ProfileGeneralSection draft={draft} onChange={setDraft} />\n <ProfileSourceCard\n draft={draft}\n // The provider's documents as read, ahead of any processor, are what\n // a source field name or an unwrap rule refers to.\n indexFields={indexFields}\n sampleRows={mappingRows.length ? mappingRows : sampleRows}\n {...(lookupFetcher ? { lookupFetcher } : {})}\n onChange={setDraft}\n />\n <ProfileSchemaSection\n draft={draft}\n keys={profileGeneralOptionKeys}\n title=\"General options\"\n description=\"Compose profiles with imports and aliases, choose the output fields, and ignore values that should not be retained.\"\n idPrefix=\"profile-general-options\"\n {...(lookupFetcher ? { lookupFetcher } : {})}\n onChange={setDraft}\n />\n </div>\n ) : null}\n {section === \"source\" ? (\n <ProfileQuerySection\n draft={draft}\n discovered={discovered}\n sampleStale={sampleStale}\n runSlot={runSlot}\n onChange={setDraft}\n onSample={acceptSample}\n />\n ) : null}\n {section === \"spans\" && traces ? <>\n <ProfileSpansSection draft={draft} rows={mappingRows} normalizedRows={normalizedRows} onChange={setDraft} />\n <details className=\"mt-4\"><summary>Source sample</summary><pre className=\"overflow-auto text-xs\">{JSON.stringify(mappingRows[0] ?? {}, null, 2)}</pre></details>\n </> : null}\n {section === \"columns\" ? (\n fields.activeField ? (\n <section className=\"rounded-xl border bg-card p-5\">\n <div className=\"max-w-6xl\">\n <ProfileFieldEditorForm\n field={fields.activeField}\n onChange={fields.updateActiveField}\n providerType={draft.provider?.type}\n />\n </div>\n </section>\n ) : (\n <div className=\"grid h-full place-items-center text-sm text-muted-foreground\">\n {profileFieldEditorEmptyMessage}\n </div>\n )\n ) : null}\n {section === \"parameters\" ? (\n <ProfileParameterDetail\n draft={draft}\n activeIndex={activeParameter}\n onChange={setDraft}\n />\n ) : null}\n {section === \"processors\" ? (\n <div className=\"max-w-5xl\">\n <ProcessorPipeline\n steps={processors}\n catalog={pipelineCatalog}\n profile={draft}\n selectedIndex={activeProcessor}\n showSteps={false}\n onSelectedIndexChange={setActiveProcessor}\n onChange={setProcessors}\n />\n </div>\n ) : null}\n {section === \"raw\" ? (\n <Suspense\n fallback={\n <p className=\"text-sm text-muted-foreground\">\n Loading YAML editor…\n </p>\n }\n >\n <ProfileEditorRaw\n draft={draft}\n onChange={setDraft}\n onValidityChange={setRawValid}\n />\n </Suspense>\n ) : null}\n </div>\n );\n\n const panes = useMemo<WorkspacePaneSpec[]>(() => {\n const rail: WorkspacePaneSpec = {\n id: \"sections\",\n label: \"Profile\",\n icon: <UiListTree />,\n location: \"left\",\n width: 340,\n minWidth: 280,\n maxWidth: 480,\n content: (\n <ProfileEditorRail\n traces={traces}\n value={section}\n status={profileEditorSectionStatus({\n draft,\n availableColumns: fields.available.length,\n sampleStale,\n })}\n collections={{\n columns: (\n <ProfileFieldSidebarList\n state={fields}\n onFieldSelect={(name) => {\n fields.setActiveName(name);\n setSection(\"columns\");\n }}\n onAdd={() => setSection(\"columns\")}\n {...(resetState.visible\n ? {\n reset: {\n disabled: resetState.disabled,\n title: resetState.title,\n onReset: () => setConfirmResetColumns(true),\n },\n }\n : {})}\n />\n ),\n parameters: (\n <ProfileParameterSidebar\n draft={draft}\n activeIndex={activeParameter}\n onActiveIndexChange={(index) => {\n setActiveParameter(index);\n setSection(\"parameters\");\n }}\n onChange={setDraft}\n />\n ),\n processors: (\n <ProcessorPipeline\n steps={processors}\n catalog={pipelineCatalog}\n profile={draft}\n selectedIndex={activeProcessor}\n showEditor={false}\n tree\n onSelectedIndexChange={(index) => {\n setActiveProcessor(index);\n setSection(\"processors\");\n }}\n onChange={setProcessors}\n />\n ),\n }}\n onChange={setSection}\n />\n ),\n };\n\n const result: WorkspacePaneSpec[] = [\n rail,\n {\n id: \"section\",\n label: sectionLabel(section),\n location: \"center\",\n collapsible: false,\n showHeader: false,\n contentClassName: \"p-0\",\n content: sectionContent,\n },\n ];\n if (section === \"columns\" || section === \"spans\" || (section === \"source\" && draft.search)) {\n result.push({\n id: \"preview\",\n label: \"Preview\",\n icon: <UiTable />,\n location: \"bottom\",\n height: 400,\n minHeightFraction: 0.2,\n maxHeightFraction: 0.8,\n slots: {\n headerTrailing: (\n <span className=\"text-[11px] text-muted-foreground\">\n {sampleRows.length\n ? `${sampleRows.length} sampled rows · updates as you edit`\n : \"No sample yet\"}\n </span>\n ),\n },\n content: (\n <ProfileEditorPreview\n profile={draft}\n columns={draft.columns ?? []}\n rows={mappingRows}\n stale={sampleStale}\n onNormalized={acceptNormalized}\n />\n ),\n });\n }\n return result;\n }, [\n activeParameter,\n activeProcessor,\n draft,\n fields,\n resetState,\n sampleRows,\n mappingRows,\n sampleStale,\n section,\n sectionContent,\n pipelineCatalog,\n processors,\n setProcessors,\n traces,\n acceptNormalized,\n ]);\n\n const leave = () => (dirty ? setConfirmDiscard(true) : onClose());\n\n return (\n <JsonPathSampleRowsContext.Provider value={section === \"spans\" ? mappingRows : normalizedRows.length ? normalizedRows : sampleRows}>\n <div className=\"grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] bg-background\">\n <header className=\"flex items-center gap-3 border-b border-border px-4 py-2.5\">\n <nav className=\"flex min-w-0 items-center gap-1.5 text-sm text-muted-foreground\">\n <button\n type=\"button\"\n className=\"hover:text-foreground\"\n onClick={leave}\n >\n Profiles\n </button>\n <span>/</span>\n <button\n type=\"button\"\n className=\"min-w-0 truncate hover:text-foreground\"\n onClick={leave}\n >\n {initialDraft.profile ?? surfaceKey}\n </button>\n <span>/</span>\n <span className=\"font-medium text-foreground\">Edit</span>\n </nav>\n {error ? (\n <span className=\"min-w-0 truncate text-sm text-destructive\" title={error}>{error}</span>\n ) : null}\n <span className=\"ml-auto hidden shrink-0 text-xs text-muted-foreground md:block\">\n {dirty ? \"Unsaved changes\" : \"No changes\"}\n </span>\n <Button type=\"button\" size=\"sm\" variant=\"ghost\" onClick={leave}>\n Discard\n </Button>\n {createAction ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={saveBlocked}\n title={validationError ?? undefined}\n onClick={() => setSavingAs(true)}\n >\n Save as new…\n </Button>\n ) : null}\n <span ref={setRunSlot} className=\"contents\" />\n {section === \"columns\" || section === \"spans\" ? (\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={!draft.provider?.type}\n title={draft.provider?.type ? undefined : \"Choose a provider before running a sample\"}\n loading={sampling}\n loadingLabel=\"Running\"\n onClick={() => void runSample()}\n >\n <Icon icon={UiPlay} className=\"size-4\" />\n Run\n </Button>\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={saveBlocked}\n title={validationError ?? undefined}\n onClick={() => void save()}\n >\n {saving ? \"Saving…\" : \"Save profile\"}\n </Button>\n </header>\n\n <Workspace panes={panes} storageKey=\"profile-editor-v2\" />\n </div>\n\n {confirmDiscard ? (\n <Modal\n open\n onClose={() => setConfirmDiscard(false)}\n title=\"Discard profile changes?\"\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setConfirmDiscard(false)}\n >\n Keep editing\n </Button>\n <Button type=\"button\" variant=\"destructive\" onClick={onClose}>\n Discard changes\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n Your unsaved profile changes will be lost.\n </p>\n </Modal>\n ) : null}\n\n {confirmResetColumns ? (\n <Modal\n open\n onClose={() => setConfirmResetColumns(false)}\n title={traces ? \"Reset to default?\" : \"Reset columns from latest sample?\"}\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setConfirmResetColumns(false)}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n disabled={resetState.disabled}\n onClick={resetColumns}\n >\n {traces ? \"Reset to default\" : \"Reset columns\"}\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n Replace {fields.configuredCount} configured column\n {fields.configuredCount === 1 ? \"\" : \"s\"} with{\" \"}\n {traces ? \"the canonical default columns\" : `${sampledColumns.length} columns from the latest sample`}.\n Custom labels, expressions, formatting, filtering, ordering, and\n manually added columns will be removed. The profile will remain\n unsaved until you save it.\n </p>\n </Modal>\n ) : null}\n\n {savingAs && createAction ? (\n <ProfileSaveAsDialog\n client={client}\n action={createAction}\n draft={draft}\n onCancel={() => setSavingAs(false)}\n onSaved={async (name) => {\n await onSuccess(name);\n setSavingAs(false);\n }}\n />\n ) : null}\n\n {replaceTarget ? (\n <Modal\n open\n onClose={() => setReplaceTarget(\"\")}\n title={`Replace ${replaceTarget}?`}\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setReplaceTarget(\"\")}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n disabled={saving}\n onClick={() => {\n setReplaceTarget(\"\");\n void save(true);\n }}\n >\n Replace profile\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n A profile named {replaceTarget} already exists. Its definition will\n be overwritten, the current profile will be renamed, and dependent\n imports will be updated atomically.\n </p>\n </Modal>\n ) : null}\n </JsonPathSampleRowsContext.Provider>\n );\n}\n\nfunction sectionLabel(section: ProfileEditorSection): string {\n return profileEditorSections.find((entry) => entry.id === section)!.label;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,IAAM,mBAAmB,WACvB,OAAO,w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ACL;;IAGP,UAAA,qBAAC,KAAD;KAAG,WAAU;KAAb,UAAA;MAA6C;MAClC,OAAO;MAAgB;MAC/B,OAAO,oBAAoB,IAAI,KAAK;MAAI;MAAM;MAC9C,SAAS,kCAAkC,GAAG,eAAe,OAAO;MAAiC;KAIrG;;GACE,CAAA,IACL;GAEH,YAAY,eACX,oBAAC,qBAAD;IACU;IACR,QAAQ;IACD;IACP,gBAAgB,YAAY,KAAK;IACjC,SAAS,OAAO,SAAS;KACvB,MAAM,UAAU,IAAI;KACpB,YAAY,KAAK;IACnB;GACD,CAAA,IACC;GAEH,gBACC,oBAAC,OAAD;IACE,MAAA;IACA,eAAe,iBAAiB,EAAE;IAClC,OAAO,WAAW,cAAc;IAChC,MAAK;IACL,QACE,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,oBAAC,QAAD;MACE,MAAK;MACL,SAAQ;MACR,eAAe,iBAAiB,EAAE;MACnC,UAAA;KAEO,CAAA,GACR,oBAAC,QAAD;MACE,MAAK;MACL,SAAQ;MACR,UAAU;MACV,eAAe;OACb,iBAAiB,EAAE;OACnB,KAAU,IAAI;MAChB;MACD,UAAA;KAEO,CAAA,CACL;;IAGP,UAAA,qBAAC,KAAD;KAAG,WAAU;KAAb,UAAA;MAA6C;MAC1B;MAAc;KAG9B;;GACE,CAAA,IACL;EAC8B;;AAExC;AAEA,SAAS,aAAa,SAAuC;CAC3D,OAAO,sBAAsB,MAAM,UAAU,MAAM,OAAO,OAAO,CAAC,CAAE;AACtE"}
|
|
1
|
+
{"version":3,"file":"profileEditor.js","names":["_Fragment"],"sources":["../../../src/profiles/editor/profileEditor.tsx"],"sourcesContent":["import { Button } from \"../../components/button\";\nimport { Workspace } from \"../../layout/Workspace\";\nimport type { WorkspacePaneSpec } from \"../../layout/Workspace\";\nimport { Modal } from \"../../overlay/Modal\";\nimport { useOperationLookupFetcher } from \"../../rpc/operationLookupFetcher\";\nimport type { ResolvedOperation } from \"../../rpc/types\";\nimport type { OperationsApiClient } from \"../../rpc/useOperations\";\nimport { Icon } from \"../../data/Icon\";\nimport { UiListTree, UiPlay, UiTable } from \"../../icons\";\nimport {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport {\n cloneProfileDraft,\n mergeSampledProfileColumns,\n profileColumnResetState,\n profileEditorSectionStatus,\n profileEditorSections,\n profileGeneralOptionKeys,\n profileSampleSignature,\n profileUpdateConflictTarget,\n resetProfileColumns,\n validateProfileEditorDraft,\n type ProfileEditorSection,\n} from \"./profileEditorModel\";\nimport { ProfileEditorPreview } from \"./profileEditorPreview\";\nimport { ProfileEditorRail } from \"./profileEditorRail\";\nimport { ProfileSaveAsDialog } from \"./profileSaveAsDialog\";\nimport {\n ProfileGeneralSection,\n ProfileSchemaSection,\n ProfileQuerySection,\n ProfileSourceCard,\n} from \"./profileEditorSections\";\nimport { ProfileFieldSidebarList } from \"../fields/profileFieldList\";\nimport {\n ProfileFieldEditorForm,\n profileFieldEditorEmptyMessage,\n} from \"../fields/profileFieldEditor\";\nimport { useProfileFieldState } from \"../fields/profileFieldState\";\nimport type { ProfileSample } from \"../wizard/profileWizardQueryStep\";\nimport { useProfileInspection } from \"../wizard/useProfileInspection\";\nimport {\n profileConnectionID,\n type ProfileColumn,\n type ProfileWizardDraft,\n} from \"../wizard/profileWizardModel\";\nimport { resolveProfileUpdatePath } from \"./profileEditorRoutes\";\nimport {\n ProfileParameterDetail,\n ProfileParameterSidebar,\n} from \"./profileParameterEditor\";\nimport { ProcessorPipeline } from \"../processor/processorPipeline\";\nimport {\n processorCatalog,\n type ProcessorSpec,\n} from \"../processor/processorConfig\";\nimport { profileSchema } from \"../profileApi\";\nimport { profileApiPath } from \"../profileApi\";\nimport { sampleRequestProfile, JsonPathSampleRowsContext } from \"../query/jsonPathSample\";\nimport { defaultSpanColumns } from \"./spanColumns\";\nimport { ProfileSpansSection } from \"./profileSpansSection\";\nimport { useQuery } from \"@tanstack/react-query\";\n\nconst ProfileEditorRaw = lazy(() =>\n import(\"./profileEditorRaw\").then((module) => ({\n default: module.ProfileEditorRaw,\n })),\n);\n\n/** The server answers a failed sample with a JSON diagnostics envelope; its `error` is the message, anything else is shown as sent. */\nfunction sampleErrorMessage(body: string): string {\n try {\n const parsed: unknown = JSON.parse(body);\n if (typeof parsed === \"object\" && parsed !== null && \"error\" in parsed && typeof parsed.error === \"string\") return parsed.error;\n } catch {\n // Not JSON: the body is the message.\n }\n return body;\n}\n\n/** The one request the editor makes to sample a profile: used by the traces source sample and by Run. */\nasync function fetchEditorSample(draft: ProfileWizardDraft): Promise<Omit<ProfileSample, \"sourceDraft\">> {\n const profile = sampleRequestProfile(draft);\n if (!profile) throw new Error(\"Cannot sample a profile without a provider\");\n const response = await fetch(profileApiPath(\"profile/sample\"), {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ profile, params: {}, previewProcessors: true }),\n });\n if (!response.ok) throw new Error(sampleErrorMessage(await response.text()));\n return (await response.json()) as Omit<ProfileSample, \"sourceDraft\">;\n}\n\n/**\n * The profile editor as a route rather than a dialog.\n *\n * Six sections, ~130 discoverable fields and a CEL editor per column outgrew a\n * modal: the layout is a clicky-ui Workspace, so the section rail, the column\n * grid and the sampled preview are panes the user can resize, collapse and keep\n * across visits. Collection fields stay in the rail while the selected item is\n * edited in the center, keeping names and icons visible throughout the edit.\n */\nexport function ProfileEditor({\n client,\n action,\n createAction,\n surfaceKey,\n initialValue,\n onClose,\n onSuccess,\n}: {\n client: OperationsApiClient;\n action: ResolvedOperation;\n /** The profiles collection's create operation; when given, the header offers\n * \"Save as new…\", which saves the draft under a new name and leaves the\n * edited profile as it was. */\n createAction?: ResolvedOperation | undefined;\n surfaceKey: string;\n initialValue: Record<string, unknown>;\n onClose: () => void;\n onSuccess: (name: string) => void | Promise<void>;\n}) {\n const lookupFetcher = useOperationLookupFetcher(client);\n const initialDraft = useMemo(\n () => cloneProfileDraft(initialValue),\n [initialValue],\n );\n const initialSerialized = useMemo(\n () => JSON.stringify(initialDraft),\n [initialDraft],\n );\n const [draft, setDraft] = useState<ProfileWizardDraft>(initialDraft);\n const [section, setSection] = useState<ProfileEditorSection>(initialDraft.render === \"traces\" ? \"spans\" : \"general\");\n const [discovered, setDiscovered] = useState<ProfileColumn[]>(\n initialDraft.render === \"traces\" ? defaultSpanColumns() : initialDraft.columns ?? [],\n );\n const [sampledColumns, setSampledColumns] = useState<ProfileColumn[]>([]);\n const [sampleRows, setSampleRows] = useState<Record<string, unknown>[]>([]);\n const [mappingRows, setMappingRows] = useState<Record<string, unknown>[]>([]);\n const [activeField, setActiveField] = useState(\n initialDraft.columns?.[0]?.name ?? \"\",\n );\n const [activeParameter, setActiveParameter] = useState(0);\n const [activeProcessor, setActiveProcessor] = useState(0);\n const [lastSampleSignature, setLastSampleSignature] = useState(() =>\n profileSampleSignature(initialDraft),\n );\n const [rawValid, setRawValid] = useState(true);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState(\"\");\n const [replaceTarget, setReplaceTarget] = useState(\"\");\n const [savingAs, setSavingAs] = useState(false);\n const [confirmDiscard, setConfirmDiscard] = useState(false);\n const [confirmResetColumns, setConfirmResetColumns] = useState(false);\n // The Source section's query workspace portals its Run button here, so Run\n // sits beside Save profile and keeps the workspace's own pending/selection state.\n const [runSlot, setRunSlot] = useState<HTMLElement | null>(null);\n const dirty = JSON.stringify(draft) !== initialSerialized;\n const [normalizedRows, setNormalizedRows] = useState<Record<string, unknown>[]>([]);\n const traces = draft.render === \"traces\";\n const validationError = validateProfileEditorDraft(draft);\n const saveBlocked = saving || Boolean(validationError) || (section === \"raw\" && !rawValid);\n const sampleStale = profileSampleSignature(draft) !== lastSampleSignature;\n // The same inspection the Query workspace reads, so the source field pickers\n // and the workspace share one fetch of the index's mapped fields.\n const sourceInspection = useProfileInspection({\n connectionID: profileConnectionID(draft.provider?.connection ?? \"\"),\n providerOptions: draft.provider?.options ?? {},\n });\n const indexFields =\n sourceInspection.inspection.completion?.kind === \"json-fields\"\n ? sourceInspection.inspection.completion.fields\n : [];\n const resetState = traces ? {visible:true, disabled:false, title:\"Reset to default\"} : profileColumnResetState({\n providerType: draft.provider?.type ?? \"\",\n sampledColumnCount: sampledColumns.length,\n sampleStale,\n });\n\n const fields = useProfileFieldState({\n normalizedOnly: traces,\n discovered,\n configured: draft.columns ?? [],\n activeName: activeField,\n onConfiguredChange: (columns) =>\n setDraft((current) => ({ ...current, columns })),\n onActiveNameChange: setActiveField,\n });\n const processors = Array.isArray(draft.processors)\n ? (draft.processors as ProcessorSpec[])\n : [];\n const pipelineCatalog = useMemo(\n () => processorCatalog(profileSchema().properties?.processors),\n [],\n );\n const setProcessors = useCallback(\n (next: ProcessorSpec[]) =>\n setDraft((current) => ({ ...current, processors: next })),\n [],\n );\n\n // A route can be refreshed or navigated away from; the dialog used to guard\n // unsaved edits with confirmClose, so the route has to guard them too.\n useEffect(() => {\n if (!dirty) return;\n const warn = (event: BeforeUnloadEvent) => event.preventDefault();\n window.addEventListener(\"beforeunload\", warn);\n return () => window.removeEventListener(\"beforeunload\", warn);\n }, [dirty]);\n\n const save = async (replaceExisting = false) => {\n if (validationError) {\n setError(validationError);\n return;\n }\n if (!client.submitForm) {\n setError(\"Profile updates are unavailable\");\n return;\n }\n setSaving(true);\n setError(\"\");\n try {\n const body = {\n ...draft,\n id: surfaceKey,\n ...(replaceExisting ? { replaceExisting: true } : {}),\n };\n const response = await client.submitForm(\n resolveProfileUpdatePath(action.path, surfaceKey),\n action.method,\n body,\n );\n if (!response.success) {\n const message =\n response.error || response.message || \"Profile update failed\";\n const target = profileUpdateConflictTarget(message);\n if (target && !replaceExisting) {\n setReplaceTarget(target);\n return;\n }\n throw new Error(message);\n }\n await onSuccess(draft.profile!.trim());\n } catch (saveError) {\n setError(\n saveError instanceof Error\n ? saveError.message\n : \"Profile update failed\",\n );\n } finally {\n setSaving(false);\n }\n };\n\n const acceptSample = useCallback(({ columns, rows, sourceDraft, mappingInputRows }: ProfileSample) => {\n if (!mappingInputRows) throw new Error(\"Sample response is missing mappingInputRows\");\n setMappingRows(mappingInputRows);\n setSampledColumns(structuredClone(columns));\n if (sourceDraft.render !== \"traces\") setDiscovered(columns);\n setSampleRows(rows);\n setDraft((current) => ({\n ...current,\n columns: current.render === \"traces\" ? current.columns ?? defaultSpanColumns() : mergeSampledProfileColumns(current.columns ?? [], columns),\n }));\n setActiveField((current) => current || columns[0]?.name || \"\");\n setLastSampleSignature(profileSampleSignature(sourceDraft));\n }, []);\n\n const sourceSample = useQuery({\n queryKey:[\"profile-editor-source\", profileSampleSignature(initialDraft)],\n enabled:initialDraft.render === \"traces\", staleTime:Infinity, retry:false, refetchOnWindowFocus:false,\n queryFn:() => fetchEditorSample(initialDraft),\n });\n // Run on Columns and Spans: the same request the traces source sample makes,\n // for the draft as it stands, accepted the same way.\n const [sampling, setSampling] = useState(false);\n const runSample = async () => {\n setSampling(true);\n setError(\"\");\n try {\n acceptSample({ ...(await fetchEditorSample(draft)), sourceDraft: draft });\n } catch (sampleError) {\n setError(sampleError instanceof Error ? sampleError.message : \"Sample failed\");\n } finally {\n setSampling(false);\n }\n };\n useEffect(() => {\n if (sourceSample.data) acceptSample({...sourceSample.data,sourceDraft:initialDraft});\n if (sourceSample.error) setError(sourceSample.error.message);\n }, [sourceSample.data,sourceSample.error,initialDraft,acceptSample]);\n\n const acceptNormalized = useCallback((rows: Record<string, unknown>[], columns: ProfileColumn[]) => {\n setNormalizedRows(rows);\n setDiscovered(columns);\n }, []);\n\n const resetColumns = () => {\n const defaults = traces ? defaultSpanColumns() : sampledColumns;\n const first = defaults[0];\n if (!first) throw new Error(\"cannot reset columns without a sample\");\n setDraft((current) => resetProfileColumns(current, defaults));\n setActiveField(first.name);\n setConfirmResetColumns(false);\n };\n\n const sectionContent = (\n <div className=\"@container h-full overflow-auto p-5\">\n {traces && (section === \"spans\" || section === \"columns\") ? <div className=\"mb-4 flex items-center gap-3\">\n <Button type=\"button\" variant=\"outline\" onClick={() => setConfirmResetColumns(true)}>Reset to default</Button>\n {validationError ? <p role=\"alert\" className=\"text-sm text-destructive\">{validationError}</p> : null}\n </div> : null}\n {section === \"general\" ? (\n <div className=\"space-y-4\">\n <ProfileGeneralSection draft={draft} onChange={setDraft} />\n <ProfileSourceCard\n draft={draft}\n // The provider's documents as read, ahead of any processor, are what\n // a source field name or an unwrap rule refers to.\n indexFields={indexFields}\n sampleRows={mappingRows.length ? mappingRows : sampleRows}\n {...(lookupFetcher ? { lookupFetcher } : {})}\n onChange={setDraft}\n />\n <ProfileSchemaSection\n draft={draft}\n keys={profileGeneralOptionKeys}\n title=\"General options\"\n description=\"Compose profiles with imports and aliases, choose the output fields, and ignore values that should not be retained.\"\n idPrefix=\"profile-general-options\"\n {...(lookupFetcher ? { lookupFetcher } : {})}\n onChange={setDraft}\n />\n </div>\n ) : null}\n {section === \"source\" ? (\n <ProfileQuerySection\n draft={draft}\n discovered={discovered}\n sampleStale={sampleStale}\n runSlot={runSlot}\n onChange={setDraft}\n onSample={acceptSample}\n />\n ) : null}\n {section === \"spans\" && traces ? <>\n <ProfileSpansSection draft={draft} rows={mappingRows} normalizedRows={normalizedRows} onChange={setDraft} />\n <details className=\"mt-4\"><summary>Source sample</summary><pre className=\"overflow-auto text-xs\">{JSON.stringify(mappingRows[0] ?? {}, null, 2)}</pre></details>\n </> : null}\n {section === \"columns\" ? (\n fields.activeField ? (\n <section className=\"rounded-xl border bg-card p-5\">\n <div className=\"max-w-6xl\">\n <ProfileFieldEditorForm\n field={fields.activeField}\n onChange={fields.updateActiveField}\n providerType={draft.provider?.type}\n />\n </div>\n </section>\n ) : (\n <div className=\"grid h-full place-items-center text-sm text-muted-foreground\">\n {profileFieldEditorEmptyMessage}\n </div>\n )\n ) : null}\n {section === \"parameters\" ? (\n <ProfileParameterDetail\n draft={draft}\n activeIndex={activeParameter}\n onChange={setDraft}\n />\n ) : null}\n {section === \"processors\" ? (\n <div className=\"max-w-5xl\">\n <ProcessorPipeline\n steps={processors}\n catalog={pipelineCatalog}\n profile={draft}\n selectedIndex={activeProcessor}\n showSteps={false}\n onSelectedIndexChange={setActiveProcessor}\n onChange={setProcessors}\n />\n </div>\n ) : null}\n {section === \"raw\" ? (\n <Suspense\n fallback={\n <p className=\"text-sm text-muted-foreground\">\n Loading YAML editor…\n </p>\n }\n >\n <ProfileEditorRaw\n draft={draft}\n onChange={setDraft}\n onValidityChange={setRawValid}\n />\n </Suspense>\n ) : null}\n </div>\n );\n\n const panes = useMemo<WorkspacePaneSpec[]>(() => {\n const rail: WorkspacePaneSpec = {\n id: \"sections\",\n label: \"Profile\",\n icon: <UiListTree />,\n location: \"left\",\n width: 340,\n minWidth: 280,\n maxWidth: 480,\n content: (\n <ProfileEditorRail\n traces={traces}\n value={section}\n status={profileEditorSectionStatus({\n draft,\n availableColumns: fields.available.length,\n sampleStale,\n })}\n collections={{\n columns: (\n <ProfileFieldSidebarList\n state={fields}\n onFieldSelect={(name) => {\n fields.setActiveName(name);\n setSection(\"columns\");\n }}\n onAdd={() => setSection(\"columns\")}\n {...(resetState.visible\n ? {\n reset: {\n disabled: resetState.disabled,\n title: resetState.title,\n onReset: () => setConfirmResetColumns(true),\n },\n }\n : {})}\n />\n ),\n parameters: (\n <ProfileParameterSidebar\n draft={draft}\n activeIndex={activeParameter}\n onActiveIndexChange={(index) => {\n setActiveParameter(index);\n setSection(\"parameters\");\n }}\n onChange={setDraft}\n />\n ),\n processors: (\n <ProcessorPipeline\n steps={processors}\n catalog={pipelineCatalog}\n profile={draft}\n selectedIndex={activeProcessor}\n showEditor={false}\n tree\n onSelectedIndexChange={(index) => {\n setActiveProcessor(index);\n setSection(\"processors\");\n }}\n onChange={setProcessors}\n />\n ),\n }}\n onChange={setSection}\n />\n ),\n };\n\n const result: WorkspacePaneSpec[] = [\n rail,\n {\n id: \"section\",\n label: sectionLabel(section),\n location: \"center\",\n collapsible: false,\n showHeader: false,\n contentClassName: \"p-0\",\n content: sectionContent,\n },\n ];\n if (section === \"columns\" || section === \"spans\" || (section === \"source\" && draft.search)) {\n result.push({\n id: \"preview\",\n label: \"Preview\",\n icon: <UiTable />,\n location: \"bottom\",\n height: 400,\n minHeightFraction: 0.2,\n maxHeightFraction: 0.8,\n slots: {\n headerTrailing: (\n <span className=\"text-[11px] text-muted-foreground\">\n {sampleRows.length\n ? `${sampleRows.length} sampled rows · updates as you edit`\n : \"No sample yet\"}\n </span>\n ),\n },\n content: (\n <ProfileEditorPreview\n profile={draft}\n columns={draft.columns ?? []}\n rows={mappingRows}\n stale={sampleStale}\n onNormalized={acceptNormalized}\n />\n ),\n });\n }\n return result;\n }, [\n activeParameter,\n activeProcessor,\n draft,\n fields,\n resetState,\n sampleRows,\n mappingRows,\n sampleStale,\n section,\n sectionContent,\n pipelineCatalog,\n processors,\n setProcessors,\n traces,\n acceptNormalized,\n ]);\n\n const leave = () => (dirty ? setConfirmDiscard(true) : onClose());\n\n return (\n <JsonPathSampleRowsContext.Provider value={section === \"spans\" ? mappingRows : normalizedRows.length ? normalizedRows : sampleRows}>\n <div className=\"grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] bg-background\">\n <header className=\"flex items-center gap-3 border-b border-border px-4 py-2.5\">\n <nav className=\"flex min-w-0 items-center gap-1.5 text-sm text-muted-foreground\">\n <button\n type=\"button\"\n className=\"hover:text-foreground\"\n onClick={leave}\n >\n Profiles\n </button>\n <span>/</span>\n <button\n type=\"button\"\n className=\"min-w-0 truncate hover:text-foreground\"\n onClick={leave}\n >\n {initialDraft.profile ?? surfaceKey}\n </button>\n <span>/</span>\n <span className=\"font-medium text-foreground\">Edit</span>\n </nav>\n {error ? (\n <span className=\"min-w-0 truncate text-sm text-destructive\" title={error}>{error}</span>\n ) : null}\n <span className=\"ml-auto hidden shrink-0 text-xs text-muted-foreground md:block\">\n {dirty ? \"Unsaved changes\" : \"No changes\"}\n </span>\n <Button type=\"button\" size=\"sm\" variant=\"ghost\" onClick={leave}>\n Discard\n </Button>\n {createAction ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={saveBlocked}\n title={validationError ?? undefined}\n onClick={() => setSavingAs(true)}\n >\n Save as new…\n </Button>\n ) : null}\n <span ref={setRunSlot} className=\"contents\" />\n {section === \"columns\" || section === \"spans\" ? (\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={!draft.provider?.type}\n title={draft.provider?.type ? undefined : \"Choose a provider before running a sample\"}\n loading={sampling}\n loadingLabel=\"Running\"\n onClick={() => void runSample()}\n >\n <Icon icon={UiPlay} className=\"size-4\" />\n Run\n </Button>\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={saveBlocked}\n title={validationError ?? undefined}\n onClick={() => void save()}\n >\n {saving ? \"Saving…\" : \"Save profile\"}\n </Button>\n </header>\n\n <Workspace panes={panes} storageKey=\"profile-editor-v2\" />\n </div>\n\n {confirmDiscard ? (\n <Modal\n open\n onClose={() => setConfirmDiscard(false)}\n title=\"Discard profile changes?\"\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setConfirmDiscard(false)}\n >\n Keep editing\n </Button>\n <Button type=\"button\" variant=\"destructive\" onClick={onClose}>\n Discard changes\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n Your unsaved profile changes will be lost.\n </p>\n </Modal>\n ) : null}\n\n {confirmResetColumns ? (\n <Modal\n open\n onClose={() => setConfirmResetColumns(false)}\n title={traces ? \"Reset to default?\" : \"Reset columns from latest sample?\"}\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setConfirmResetColumns(false)}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n disabled={resetState.disabled}\n onClick={resetColumns}\n >\n {traces ? \"Reset to default\" : \"Reset columns\"}\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n Replace {fields.configuredCount} configured column\n {fields.configuredCount === 1 ? \"\" : \"s\"} with{\" \"}\n {traces ? \"the canonical default columns\" : `${sampledColumns.length} columns from the latest sample`}.\n Custom labels, expressions, formatting, filtering, ordering, and\n manually added columns will be removed. The profile will remain\n unsaved until you save it.\n </p>\n </Modal>\n ) : null}\n\n {savingAs && createAction ? (\n <ProfileSaveAsDialog\n client={client}\n action={createAction}\n draft={draft}\n onCancel={() => setSavingAs(false)}\n onSaved={async (name) => {\n await onSuccess(name);\n setSavingAs(false);\n }}\n />\n ) : null}\n\n {replaceTarget ? (\n <Modal\n open\n onClose={() => setReplaceTarget(\"\")}\n title={`Replace ${replaceTarget}?`}\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setReplaceTarget(\"\")}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n disabled={saving}\n onClick={() => {\n setReplaceTarget(\"\");\n void save(true);\n }}\n >\n Replace profile\n </Button>\n </div>\n }\n >\n <p className=\"text-sm text-muted-foreground\">\n A profile named {replaceTarget} already exists. Its definition will\n be overwritten, the current profile will be renamed, and dependent\n imports will be updated atomically.\n </p>\n </Modal>\n ) : null}\n </JsonPathSampleRowsContext.Provider>\n );\n}\n\nfunction sectionLabel(section: ProfileEditorSection): string {\n return profileEditorSections.find((entry) => entry.id === section)!.label;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,IAAM,mBAAmB,WACvB,OAAO,wBAAqB,CAAC,MAAM,YAAY,EAC7C,SAAS,OAAO,iBAClB,EAAE,CACJ;;AAGA,SAAS,mBAAmB,MAAsB;CAChD,IAAI;EACF,MAAM,SAAkB,KAAK,MAAM,IAAI;EACvC,IAAI,OAAO,WAAW,YAAY,WAAW,QAAQ,WAAW,UAAU,OAAO,OAAO,UAAU,UAAU,OAAO,OAAO;CAC5H,QAAQ,CAER;CACA,OAAO;AACT;;AAGA,eAAe,kBA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,EAAE;IAClC,OAAO,WAAW,cAAc;IAChC,MAAK;IACL,QACE,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,oBAAC,QAAD;MACE,MAAK;MACL,SAAQ;MACR,eAAe,iBAAiB,EAAE;MACnC,UAAA;KAEO,CAAA,GACR,oBAAC,QAAD;MACE,MAAK;MACL,SAAQ;MACR,UAAU;MACV,eAAe;OACb,iBAAiB,EAAE;OACnB,KAAU,IAAI;MAChB;MACD,UAAA;KAEO,CAAA,CACL;;IAGP,UAAA,qBAAC,KAAD;KAAG,WAAU;KAAb,UAAA;MAA6C;MAC1B;MAAc;KAG9B;;GACE,CAAA,IACL;EAC8B;;AAExC;AAEA,SAAS,aAAa,SAAuC;CAC3D,OAAO,sBAAsB,MAAM,UAAU,MAAM,OAAO,OAAO,CAAC,CAAE;AACtE"}
|
|
@@ -3,6 +3,7 @@ const require_OtelTraceTable = require("../../data/traces/otel/OtelTraceTable.cj
|
|
|
3
3
|
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
|
+
const require_Callout = require("../../data/Callout.cjs");
|
|
6
7
|
const require_profileApi = require("../profileApi.cjs");
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -76,18 +77,33 @@ function ProfileMappingPreview({ profile, rows, onNormalized, filters }) {
|
|
|
76
77
|
role: "status",
|
|
77
78
|
children: "Updating mapping preview…"
|
|
78
79
|
});
|
|
79
|
-
|
|
80
|
+
const unresolved = result.unresolvedColumns?.length ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
81
|
+
role: "status",
|
|
82
|
+
"aria-label": "Unresolved columns",
|
|
83
|
+
className: "shrink-0",
|
|
84
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Callout.Callout, {
|
|
85
|
+
variant: "warning",
|
|
86
|
+
label: "No sampled values",
|
|
87
|
+
className: "my-0 mb-2",
|
|
88
|
+
children: [
|
|
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
|
+
})
|
|
94
|
+
}) : null;
|
|
95
|
+
if (profile.render !== "traces") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
80
96
|
"aria-busy": pending,
|
|
81
97
|
className: "flex h-full min-h-0 flex-col",
|
|
82
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Clicky.Clicky, {
|
|
98
|
+
children: [unresolved, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Clicky.Clicky, {
|
|
83
99
|
data: result.document.node,
|
|
84
100
|
className: "flex min-h-0 flex-1 flex-col",
|
|
85
101
|
...filterConfig?.filters.length ? { externalFilters: filterConfig.filters } : {},
|
|
86
102
|
...filterConfig?.timeRange ? { timeRange: filterConfig.timeRange } : {}
|
|
87
|
-
})
|
|
103
|
+
})]
|
|
88
104
|
});
|
|
89
105
|
try {
|
|
90
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_OtelTraceTable.OtelTraceTable, {
|
|
106
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [unresolved, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_OtelTraceTable.OtelTraceTable, {
|
|
91
107
|
spans: require_profile_spans.profileSpans(result.rows),
|
|
92
108
|
listing: {
|
|
93
109
|
...require_profile_listing.profileTraceListing(result.rows, result.document.node),
|
|
@@ -101,7 +117,7 @@ function ProfileMappingPreview({ profile, rows, onNormalized, filters }) {
|
|
|
101
117
|
traceHref: (id) => `#trace=${encodeURIComponent(id)}`,
|
|
102
118
|
...trace ? { selectedTraceId: trace } : {},
|
|
103
119
|
...span ? { selectedSpanId: span } : {}
|
|
104
|
-
});
|
|
120
|
+
})] });
|
|
105
121
|
} catch (error) {
|
|
106
122
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
107
123
|
role: "alert",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileMappingPreview.cjs","names":["useRef","useState","useMemo","serverFiltersToFilterBar","profileApiPath","Clicky","OtelTraceTable","profileSpans","profileTraceListing"],"sources":["../../../src/profiles/editor/profileMappingPreview.tsx"],"sourcesContent":["import { useEffect, useMemo, useState, useRef, type Dispatch, type SetStateAction } 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 { 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?: (rows: Record<string, unknown>[], columns: ProfileColumn[]) => 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 }>();\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 };\n if (!next.document?.node)\n throw new Error(\"the mapping response carried no rendered document\");\n if (filtersRef.current && !Array.isArray(next.resultColumns))\n throw new Error(\"the mapping response carried no resultColumns to build filters from\");\n if (!controller.signal.aborted) {\n setResult(next);\n normalizedCallback.current?.(next.normalizedRows, next.availableColumns);\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 if (profile.render !== \"traces\")\n return (\n <div aria-busy={pending} className=\"flex h-full min-h-0 flex-col\">\n <Clicky\n data={result.document.node}\n className=\"flex min-h-0 flex-1 flex-col\"\n {...(filterConfig?.filters.length ? { externalFilters: filterConfig.filters } : {})}\n {...(filterConfig?.timeRange ? { timeRange: filterConfig.timeRange } : {})}\n />\n </div>\n );\n try {\n return (\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 } 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":";;;;;;;;;AA4BA,SAAgB,sBAAsB,EACpC,SACA,MACA,cACA,WAMC;CACD,MAAM,sBAAA,GAAqBA,MAAAA,OAAAA,CAAO,YAAY;CAC9C,mBAAmB,UAAU;CAC7B,MAAM,CAAC,QAAQ,cAAA,GAAaC,MAAAA,SAAAA,CAIzB;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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B,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;CAEL,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","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,aAAa,IAAI,CAAC,CACnE,IACA,KAAA,GACN,CAAC,SAAS,MAAM,CAClB;CAGA,MAAM,OAAO,KAAK,WAAW,KAAK,CAAC;CACnC,MAAM,CAAC,OAAO,aAAA,GAAYF,MAAAA,SAAAA,CAAS,EAAE;CACrC,MAAM,CAAC,SAAS,eAAA,GAAcA,MAAAA,SAAAA,CAAS,KAAK;CAC5C,MAAM,CAAC,OAAO,aAAA,GAAYA,MAAAA,SAAAA,CAAiB;CAC3C,MAAM,CAAC,MAAM,YAAA,GAAWA,MAAAA,SAAAA,CAAiB;CACzC,MAAM,OAAO,KAAK,UAAU;EAC1B,SAAS;GACP,SAAS,QAAQ;GACjB,UAAU,QAAQ;GAClB,OAAO,QAAQ;GACf,QAAQ,QAAQ;GAChB,QAAQ,QAAQ;GAChB,SAAS,QAAQ;GACjB,SAAS,QAAQ;GACjB,QAAQ,QAAQ;GAChB,SAAS,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AA,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 +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/profiles/editor/profileMappingPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,sCAAsC,CAAC;AAO9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,wBAAwB,CAAC;IACpC,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAC7D,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,OAAO,GACR,EAAE;IACD,OAAO,EAAE,kBAAkB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,CACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC/B,OAAO,EAAE,aAAa,EAAE,KACrB,IAAI,CAAC;IACV,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACjC,+BAoKA"}
|