Skip to content

feat(logs): allow viewing and editing LogPipeline processors#2577

Open
suvvvv wants to merge 1 commit into
OneUptime:masterfrom
suvvvv:fix/logpipeline-processor-edit
Open

feat(logs): allow viewing and editing LogPipeline processors#2577
suvvvv wants to merge 1 commit into
OneUptime:masterfrom
suvvvv:fix/logpipeline-processor-edit

Conversation

@suvvvv

@suvvvv suvvvv commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What

On the LogPipeline detail page, the Processors table only allowed deleteisEditable was hardcoded false. There was no way to view or change an existing processor's configuration short of deleting and recreating it.

isEditable was off for a real reason: a processor's configuration is polymorphic per type (SeverityRemapper / AttributeRemapper / CategoryProcessor), so the generic ModelForm edit can't render it. Creation already uses a custom ProcessorForm for that reason.

This adds view + edit by reusing that same custom form in edit mode:

ProcessorForm

  • New optional initialProcessor prop. When provided, the form opens pre-filled from the processor's saved configuration (the inverse of buildConfiguration), and on save calls ModelAPI.updateById instead of create, preserving sortOrder.
  • A small parseConfiguration helper accepts the config as either an object or a JSON-string literal (both shapes occur in storage).
  • Modal title and submit label switch between "Add Processor" / "Create Processor" and "Edit Processor" / "Save Changes".

PipelineView

  • Fetches configuration / isEnabled / sortOrder via selectMoreFields so the row item is complete.
  • Adds an Edit action button per row that opens the form for that processor; the "Add Processor" button clears any edit state first.

Opening a processor for edit also covers the "view configuration" ask from the issue, since the form shows the full current config.

Why

Resolves the "cannot view or edit processor config" problem in #2516 — users no longer have to delete and recreate a processor to change it.

Testing

  • npx tsc --noEmit — clean for both changed files.
  • eslint + Prettier — clean.

Note: this is a UI change and I don't currently have the full local stack running, so it has not yet been verified in a browser. The logic is type-checked and lint-clean; happy to record a quick screen capture once I have the dashboard up, or if a maintainer can sanity-check the edit flow.

Refs #2516

The processors table on the pipeline detail page only allowed delete —
isEditable was hardcoded false because a processor's configuration is
polymorphic per type, so the generic ModelForm edit could not handle it.
There was no way to view or change a processor's config short of deleting
and recreating it.

This adds an Edit action to each processor row that reuses the existing
custom ProcessorForm in edit mode:

- ProcessorForm accepts an optional initialProcessor. When provided it
  pre-fills the form from the processor's saved configuration (the inverse
  of buildConfiguration) and updates via ModelAPI.updateById instead of
  creating, preserving sortOrder. The modal title and submit label reflect
  edit vs create.
- PipelineView fetches configuration/isEnabled/sortOrder via
  selectMoreFields and wires an Edit action button that opens the form for
  the selected processor. The Add Processor button clears any edit state.

Opening a processor for edit also satisfies the "view configuration" need
from the issue, since the form shows the full current config.

Refs OneUptime#2516

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@simlarsen

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants