Repository navigation
fix[frontend](alert-view): direct load without ?alertType no longer hangs on Loading - #2979
Merged
Merged
Conversation
…angs on Loading (#2954)
❌ Go dependencies check failedThere are outdated Go dependencies, or modules that could not be inspected. Script output |
✅ AI review — Approved with warningsOnly minor (medium/low) issues were found. They won't block the merge, but consider addressing them. ✅
|
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.
fixfrontend: direct load of /data/alert/view without ?alertType no longer hangs on "Loading…" (#2954)
Problem
Opening the Alerts page by its bare URL (
/data/alert/view, no query params)stays on "Loading…" forever — the table never loads. Every in-app path that
reaches the page (sidebar, charts, "load more alerts", detail → back) always
navigates with
?alertType=..., so only the bare URL / bookmark hits this.Reproduced live on the v11.3.0 lab.
Root cause
In
AlertViewComponent.ngOnInitthequeryParamssubscription has two branches:changeParamsByDataType(...).then(() => this.setDefaultParams()),and
setDefaultParams()is what triggers the initial search (this.getAlert('on set default params')).dataType = EVENT, the fields, and emits$filters, but never callssetDefaultParams(). Nothing on that pathinvokes
getAlert(), so the table'sloadingflag is never cleared and thepage is stuck.
Fix
The no-params branch now runs the same initial-load chain as the param branch:
this.changeParamsByDataType(this.dataType).then(() => this.setDefaultParams()).The documented intent of that branch ("set default to EVENT" + "emit default
array filter") is preserved; it just also performs the first search it was
missing. 4 added lines, no behavior change for the param-bearing paths.
Verification
--max_old_space_size=8192): green."Loading…", 0 rows; sidebar navigation with
?alertType=ALERT→ loads).Fixes #2954