feat: default LQL rules for source#3433
Merged
Merged
Conversation
5edc147 to
c97568d
Compare
e14060e to
484ded4
Compare
ae0da07 to
f1922be
Compare
Ziinc
requested changes
May 6, 2026
Ziinc
requested changes
May 6, 2026
Comment on lines
+1066
to
+1078
| test "allows clearing default search LQL", %{conn: conn, user: user} do | ||
| source = insert(:source, user: user, default_search_lql: "s:m.level") | ||
|
|
||
| conn = | ||
| patch(conn, ~p"/sources/#{source}", %{ | ||
| "source" => %{"default_search_lql" => ""} | ||
| }) | ||
|
|
||
| assert redirected_to(conn, 302) =~ ~p"/sources/#{source}/edit" | ||
| assert Phoenix.Flash.get(conn.assigns.flash, :info) == "Source updated!" | ||
| assert Repo.reload(source).default_search_lql == nil | ||
| end | ||
|
|
Contributor
There was a problem hiding this comment.
nit: this as a source_test.exs test would be better
Contributor
Author
There was a problem hiding this comment.
Done. Had to enable that test case first: #3440
f1922be to
ece8427
Compare
msmithstubbs
commented
May 7, 2026
msmithstubbs
commented
May 7, 2026
ece8427 to
424d00b
Compare
Apply suggestion from @depthfirst-app[bot] Co-authored-by: depthfirst-app[bot] <184448029+depthfirst-app[bot]@users.noreply.github.com>
424d00b to
a78ee1e
Compare
Ziinc
approved these changes
May 8, 2026
Contributor
Ziinc
left a comment
There was a problem hiding this comment.
nice, very elegant alternative method 💯
Comment on lines
+115
to
121
| const searchInput = document.getElementById("source-search-querystring") | ||
| if (searchInput && searchInput.value !== "") { | ||
| searchInput.focus() | ||
| searchInput.setSelectionRange(searchInput.value.length, searchInput.value.length) | ||
| } | ||
|
|
||
| await Source.main({scrollTracker: true}, {avgEventsPerSecond: <%= @source.metrics.avg %>}) |
Contributor
There was a problem hiding this comment.
this seems quite unnecessary, we can let the changeset handle this
Contributor
Author
djwhitt
pushed a commit
that referenced
this pull request
May 18, 2026
* test: fix and remove failing tag * feat: default lql rules for source * only include default_search_lql param on update Apply suggestion from @depthfirst-app[bot] Co-authored-by: depthfirst-app[bot] <184448029+depthfirst-app[bot]@users.noreply.github.com> * style: format depthfirst fix * feat: don't append default search to existing querystring --------- Co-authored-by: depthfirst-app[bot] <184448029+depthfirst-app[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds a default LQL query setting for sources. This LQL query is appended to any new source search.
Questions
Follows on from #3432
Closes O11Y-740
Demo
CleanShot.2026-05-06.at.09.03.58.mp4