Skip to content

fix[frontend](alert-view): direct load without ?alertType no longer hangs on Loading - #2979

Merged
osmontero merged 1 commit into
v11from
fix/alert-view-noparams
Oct 24, 2026
Merged

osmontero merged 1 commit into
v11from
fix/alert-view-noparams

Conversation

@osmontero

Copy link
Copy Markdown
Member

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.ngOnInit the queryParams subscription has two branches:

  • with params → changeParamsByDataType(...).then(() => this.setDefaultParams()),
    and setDefaultParams() is what triggers the initial search (this.getAlert('on set default params')).
  • no params (the bug) → sets dataType = EVENT, the fields, and emits
    $filters, but never calls setDefaultParams(). Nothing on that path
    invokes getAlert(), so the table's loading flag is never cleared and the
    page 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

  • Frontend prod build (Node 14.16.1, --max_old_space_size=8192): green.
  • Reproduction confirmed on the lab before the fix (bare URL → stuck
    "Loading…", 0 rows; sidebar navigation with ?alertType=ALERT → loads).
  • To be re-verified on the lab after this lands in v11.3.0.

Fixes #2954

@osmontero
osmontero requested a review from a team October 24, 2026 13:48
@github-actions

Copy link
Copy Markdown

❌ Go dependencies check failed

There are outdated Go dependencies, or modules that could not be inspected.
Run bash .github/scripts/go-deps.sh --update --discover locally and
commit the updated go.mod / go.sum files.

Script output
🔍 Discovered 25 Go projects

📦 Dependencies with updates available:

  📁 ./plugins/gcp:
     - google.golang.org/api: v0.299.0 → v0.308.0

  📁 ./plugins/aws:
     - github.com/aws/aws-sdk-go-v2: v1.47.0 → v1.47.4
     - github.com/aws/aws-sdk-go-v2/config: v1.33.5 → v1.33.10
     - github.com/aws/aws-sdk-go-v2/credentials: v1.20.5 → v1.20.10
     - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs: v1.88.0 → v1.90.2

  📁 ./plugins/alerts:
     - github.com/tidwall/gjson: v1.19.0 → v1.20.0

  📁 ./plugins/events:
     - github.com/tidwall/gjson: v1.19.0 → v1.20.0

  📁 ./plugins/modules-config:
     - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob: v1.8.1 → v1.8.2
     - github.com/aws/aws-sdk-go-v2/config: v1.33.5 → v1.33.10
     - github.com/aws/aws-sdk-go-v2/credentials: v1.20.5 → v1.20.10
     - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs: v1.88.0 → v1.90.2
     - github.com/aws/aws-sdk-go-v2/service/sts: v1.51.0 → v1.51.5
     - github.com/crowdstrike/gofalcon: v0.22.0 → v0.23.0
     - golang.org/x/sync: v0.23.0 → v0.24.0
     - google.golang.org/api: v0.299.0 → v0.308.0

  📁 ./plugins/azure:
     - github.com/Azure/azure-sdk-for-go/sdk/azcore: v1.23.1 → v1.23.3
     - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob: v1.8.1 → v1.8.2

  📁 ./plugins/crowdstrike:
     - github.com/crowdstrike/gofalcon: v0.22.0 → v0.23.0

  📁 ./plugins/geolocation:
     - github.com/tidwall/gjson: v1.19.0 → v1.20.0

  📁 ./installer:
     - github.com/cloudfoundry/gosigar: v1.3.127 → v1.3.128

  📁 ./agent:
     - github.com/netsampler/goflow2: v1.3.7 → v1.3.8
     - golang.org/x/sys: v0.48.0 → v0.49.0

�[0;31m❌ Please update dependencies before merging.�[0m

@github-actions

Copy link
Copy Markdown

✅ AI review — Approved with warnings

Only minor (medium/low) issues were found. They won't block the merge, but consider addressing them.

✅ architecture (silas-1.7-pro) — clean

Summary: Frontend alert view fix only; no architectural coupling, contract, migration, or agent changes.

No findings.

⚠️ bugs (silas-1.7-pro) — non-blocking warnings

Summary: New promise chain lacks error handling, so rejections can be unhandled.

  • low frontend/src/app/data-management/alert-management/alert-view/alert-view.component.ts:194 — this.changeParamsByDataType(...).then(...) has no .catch. If changeParamsByDataType or setDefaultParams reject/throw, the failure becomes an unhandled promise rejection. Add a .catch or wrap in try/catch and log/handle the error.

✅ security (silas-1.7-pro) — clean

Summary: No vulnerabilities or customer-facing information disclosure introduced by the diff.

No findings.

@utmstackprapprover utmstackprapprover Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested — Go dependencies check failed (see above).

@osmontero
osmontero merged commit 5d3f137 into v11 Oct 24, 2026
5 of 7 checks passed
@osmontero
osmontero deleted the fix/alert-view-noparams branch October 24, 2026 13:54
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.

(Threat Management) Opening the alerts page by its URL without parameters (/data/alert/view) stays on "Loading…" forever

1 participant