Implement loading and error state in DAST scans view
What does this MR do and why?
This improves the on-demand scans UX by implementing a loading and an error states.
Screenshots or screen recordings
| Loading state | Error state |
|---|---|
![]() |
![]() |
How to set up and validate locally
-
Enable the on-demands scans page.
Feature.enable(:dast_view_scans) -
Visit any project's on-demand scans page such as http://127.0.0.1:3000/groups/flightjs/-/on_demand_scans.
- If you have run at least one on-demand scan in the past, you should see the loading state here. Otherwise, follow the instructions to run an on-demand scan.
-
For the error state to show up, go wild and break the GraphQL query by applying the following patch (copy the code block and run
pbpaste | git apply):diff --git a/ee/app/assets/javascripts/on_demand_scans/graphql/on_demand_scans.query.graphql b/ee/app/assets/javascripts/on_demand_scans/graphql/on_demand_scans.query.graphql index e6a5e1f4fbd..8b62bbbf645 100644 --- a/ee/app/assets/javascripts/on_demand_scans/graphql/on_demand_scans.query.graphql +++ b/ee/app/assets/javascripts/on_demand_scans/graphql/on_demand_scans.query.graphql @@ -13,6 +13,7 @@ query allPipelinesCount($fullPath: ID!, $first: Int, $last: Int, $after: String, ...PageInfo } nodes { + foo id path createdAt
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #341364 (closed)
Edited by Paul Gascou-Vaillancourt

