Vulnerability status badge > Abstract into a reusable component
The vulnerability details page renders the vulnerability status in its header:
While we have rendered similar status badges in other areas that deal with vulnerabilities, this occurrence seems to be the most robust as it supports different variants based on the status, and also localizes the status name.
To make it easier to benefit from the same logic, we should abstract this logic out into a reusable component. The code currently lives in the ee/app/assets/javascripts/vulnerabilities/components/header.vue
component.
-
Create the vulnerability-status-badge
component. -
Move all the badge's logic out of vulnerability
into this new component. -
Make sure header
renders the newly createdvulnerability-status-badge
component.
Edited by Paul Gascou-Vaillancourt