Skip to content

Migrate detection method to listbox

What does this MR do and why?

Migrate detection method to GlCollapsibleListbox

EE: true Changelog: changed

Screenshots or screen recordings

detection-method

How to set up and validate locally

  1. Fork https://gitlab.com/gitlab-examples/security/security-reports/ (or any other project)
  2. Navigate to Secure > Vulnerability Report > **+Submit Vulnerability
  3. Apply the following patch (this feature is simply hidden because the backend is not ready)
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 39052d29287e..62ab15d2c4b6 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -886,13 +886,7 @@ module.exports = {
     client: {
       ...(DEV_SERVER_PUBLIC_ADDR ? { webSocketURL: DEV_SERVER_PUBLIC_ADDR } : {}),
       overlay: {
-        runtimeErrors: (error) => {
-          if (error instanceof DOMException && error.message === 'The user aborted a request.') {
-            return false;
-          }
-
-          return true;
-        },
+        runtimeErrors: false,
       },
     },
   },
diff --git a/ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_details.vue b/ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_details.vue
index e3b1d9de9f33..09c7d1d1fb17 100644
--- a/ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_details.vue
+++ b/ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_details.vue
@@ -152,7 +152,7 @@ export default {
     <gl-form-group
       :label="$options.i18n.detectionMethod.label"
       label-for="form-detection-method"
-      class="gl-mb-6 gl-display-none"
+      class="gl-mb-6"
     >
       <gl-collapsible-listbox
         id="form-detection-method"

Play around with the Detection Method dropdown and try to submit the vulnerability. The value won't be saved because the backend is not yet ready.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #413041 (closed)

Merge request reports

Loading