Skip to content

DAST Site profiles - Form MVC - Create the basic form - Frontend

What does this MR do?

This MR implements a basic form for creating DAST site profiles. In this iteration, the form only accepts a profile name and a target URL. The code here is heavily based on prior work for the On-demand Scans MVC: on_demand_scans_form.vue, which will eventually be cleaned up to use the DAST site profiles created with this new form instead of letting the user input the target URL there.

The user flow is pretty basic for now:

  • Cancelling with the form empty brings back to the DAST profiles library page (which is still under construction).
  • Cancelling with some fields filled in asks the user to confirm their action before bringing back to the DAST profiles library.
  • Successfully submitting the form brings back to the DAST profiles library page.
  • Failure upon submission shows a flash error and lets the user try again.

How to test this?

  • Enable the feature flag:
echo "Feature.enable(:security_on_demand_scans_feature_flag)" | spring rails c
  • Sign-in as the root user.
  • Navigate to a project's New site profile page by manually typing the URL in the address bar: /:group/:project/-/on_demand_scans/profiles/dast_site_profiles/new

Screenshots

Form's state Preview
Default Screen_Shot_2020-07-10_at_5.31.04_PM
Cancelled with some fields filled-in Screen_Shot_2020-07-14_at_10.56.58_AM
Situation Recording
User cancels while the form is still empty Screen_Recording_2020-07-10_at_5.29.36_PM
User cancels after filling-in some fields cancel_w_fields_filled
User successfully submits the form Screen_Recording_2020-07-10_at_5.28.50_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Paul Gascou-Vaillancourt

Merge request reports