DAST On-Demand Scans - Use existing site profiles for scans - Frontend
- overview: &2912 (closed)
- parent issue: #222755 (closed)
- backend counterpart: #230604 (closed)
Summary
This is the frontend part for creating DAST on-demand scans from existing site profiles.
Designs
Context | Preview |
---|---|
Updated layout | ![]() |
No site profiles | ![]() |
Site profile summary | ![]() |
Implementation Plan
-
Update the form's layout to match the designs: -
The form should consist in 2 cards. -
The top card shows the scanner's settings (scan mode & attached branch). -
The bottom card shows site profiles' settings. Its header includes a link to the profiles library. -
The Manage profiles link is disabled if there are no site profiles yet.
-
-
-
Pass new required props down to the app: -
profilesLibraryPath
: required to show a link to the profiles library. -
newSiteProfileFormPath
: required to show a link to the Site profile form.
-
-
Trigger a GraphQL query for fetching the existing site profiles and store them in the siteProfiles
state property. The query will be implemented in #225816 (closed). -
Replace the Target URL field with a dropdown to let users select existing site profiles. -
When a site profile is selected in the dropdown, show a summary of that profile below the dropdown. -
If siteProfiles
is empty (i.e. the project doesn't contain any site profiles yet), replace the dropdown with a link to the Site profile form. In this case, the submit button can never be enabled. -
Update the GraphQL mutation to send the required arguments (see decisions). -
Specs: -
frontend
-
The link to the profiles library is displayed properly, and it is disabled if siteProfiles
is empty. -
The Site profiles field is populated properly. -
Selected site profile's summary is displayed properly. -
The Site profile section shows a link to the Site profile form when siteProfiles
is empty. -
The GraphQL mutation is built properly.
-
-
backend
-
Include new props in ee/app/helpers/projects/on_demand_scans_helper.rb
specs.
-
-
frontend
Edited by Paul Gascou-Vaillancourt