DAST Scanner Profiles implementation - Form MVC - Boilerplate
- Main issue: #222767 (closed)
Summary
This issue covers the basic groundwork for preparing the implementation of the DAST Scanner profile form.
Implementation plan
Production code
-
Create the DastScannerProfilesController#new
action inee/app/controllers/projects/dast_scanner_profiles_controller.rb
. -
Create the corresponding new
route inee/config/routes/project.rb
.-
The route should be protected with the same policy as /:namespace/:project/-/on_demand_scans
.
-
-
Create a basic HAML view in ee/app/views/projects/dast_scanner_profiles/new.html.haml
.-
Make sure the breadcrumbs are properly set in the new view.
-
-
Update the sidebar so that the On-demand scans item remains active when on the New scanner profile page. Affected files: ee/app/views/layouts/nav/sidebar/_project_security_link.html.haml
ee/app/helpers/ee/projects_helper.rb
-
Create a new Vue app that will eventually be responsible for rendering the New Scanner Profile form. -
Create DastScannerProfileForm
inee/app/assets/javascripts/dast_scanner_profiles/components/dast_scanner_profile_form.vue
. -
Create ee/app/assets/javascripts/dast_scanner_profiles/dast_scanner_profiles_bundle.js
that renders the Vue component in thenew
HAML view. -
Create ee/app/assets/javascripts/pages/projects/dast_scanner_profiles/new/index.js
to bootstrap the app on the required page.
-
Specs
-
ee/spec/frontend/dast_scanner_profiles_form/components/dast_scanner_profiles_form_spec.js
-
App renders properly.
-
-
ee/spec/requests/projects/dast_scanner_profiles_controller_spec.rb
-
Assert that the controller properly responds to GET requests. This should be similar to what we have in ee/spec/requests/projects/dast_site_profiles_controller_spec.rb
.
-
-
ee/spec/views/projects/dast_scanner_profiles/new.html.haml_spec.rb
-
Assert that the view renders properly.
-
Related resources
- Prior work: !36020 (merged)
Edited by Paul Gascou-Vaillancourt