Retrieve security dashboard URL used on Project Severity status report from backend - FE implementation
The following discussion from !35031 (merged) should be addressed:
-
@afontaine started a discussion: (+2 comments) Hmm I've never really seen us try to construct a URL to something in Vue. Is there anyway we can get this path from the backend? If not, can we pull it out into a function and save some of it as constants instead?
Extra context
We have to construct the URL in the frontend since GraphQL misses this information. I believe the correct way to handle this should be to provide this information in GraphQL - for that reason I believe this task requires backend work.
The file where we have a manual implementation is: ee/app/assets/javascripts/security_dashboard/components/first_class_vulnerability_severities.vue
and the line is this:
<gl-link target="_blank" :href="`/${project.fullPath}/-/security/dashboard`">{{project.nameWithNamespace}}</gl-link>
We basically need to fetch the endpoint from GraphQL and replace this line with the fetched data instead of manual URL construction.