Skip to content

Fix redundant requests to /api/v1/component when loading project page - #726

Merged
nscuro merged 1 commit into
DependencyTrack:masterfrom
nscuro:fix-redundant-requests-on-pageload
Feb 3, 2024
Merged

nscuro merged 1 commit into
DependencyTrack:masterfrom
nscuro:fix-redundant-requests-on-pageload

Conversation

@nscuro

@nscuro nscuro commented Feb 3, 2024 •

Copy link
Copy Markdown
Member

Description

Fixes redundant requests to /api/v1/component when loading project page.

Addressed Issue

Fixes #696

Additional Details

onlyOutdated and onlyDirect were initialized with non-boolean values. Both variables have a watch on them, triggering a refresh of the components table upon change. Both variables are used as model for c-switch components, causing their value to transition to false immediately, triggering the watches and consequently table refreshes.

This behavior could cause requests to be abandoned before their content was fully consumed, resulting in EofExceptions in the API server.

Abandoned requests are also visible in the Network tab of the browser:

image

Checklist

`onlyOutdated` and `onlyDirect` were initialized with non-boolean values. Both variables have a watch on them, triggering a refresh of the components table upon change. Both variables are used as model for `c-switch` components, causing their value to transition to `false` immediately, triggering the watches and consequently table refreshes.

This behavior could cause requests to be abandoned before their content was fully consumed, resulting in `EofException`s in the API server.

Signed-off-by: nscuro <[email protected]>
@nscuro nscuro added the defect Something isn't working label Feb 3, 2024
@nscuro nscuro added this to the 4.11 milestone Feb 3, 2024
@nscuro
nscuro merged commit 883b651 into DependencyTrack:master Feb 3, 2024
@nscuro
nscuro deleted the fix-redundant-requests-on-pageload branch February 3, 2024 19:02
heyiamwahab236 pushed a commit to tecan/frontend_custom that referenced this pull request Jun 17, 2026
…ests-on-pageload

Fix redundant requests to `/api/v1/component` when loading project page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicated form field id in the UI forces network connection abort by the browser, leading to http status 499

1 participant