Skip to content

Add regexp mode to system logs search - #1272

Open
stephdl wants to merge 9 commits into
mainfrom
sdl-8032
Open

Add regexp mode to system logs search#1272
stephdl wants to merge 9 commits into
mainfrom
sdl-8032

Conversation

@stephdl

@stephdl stephdl commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Adds a "Regular expression" toggle to the System Logs search bar. When enabled, the filter is applied with the LogQL |~ operator instead of the substring |=.

Backslashes are now escaped along with quotes for both operators, so a filter carrying either no longer produces an unparsable query and a misleading "No log found".

Invalid patterns are rejected client-side, and again server-side with Go regexp (RE2, the engine Loki runs). logcli failures now reach the UI as an error notification: until now a broken query was indistinguishable from an empty result.

Also from the Figma mockup:

  • a feedback line showing the number of retrieved lines and the interval they cover
  • collapse-filters and layout controls moved out of the kebab menu into the page toolbar
  • filter field widths aligned

Refs NethServer/dev#8032
Design: NethServer/dev#7974

Testing

  • toggle off, filter redis: results unchanged
  • toggle on, filter redis|traefik and ^2026-05
  • toggle on, filter [unclosed: error notification, no empty state
  • toggle off, filter containing a backslash: results instead of a silent empty
  • each of the above in both Dump and Follow mode
  • entity selection and date-range filtering still narrow the results
  • CLI: api-server-logs logs -s 'err(or)?' -r -m dump -l 50

Add `instance` and `regexp` input fields and the `error` output field
for the logs query endpoint.
Add a regexp toggle for log search with dedicated placeholder and
helper text, display backend query errors in an inline notification,
and show a results summary line with line count and time interval.
Rework the start/end date-time layout into a responsive flex group
and remove the now-unused collapse/expand filters toggle.
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.

1 participant