Show pipeline link on Dependency List page - frontend
When #289915 is implemented, backend will respond with pipeline_path
in {project path}/-/dependencies.json
and {project path}-/licenses.json
.
Now we can update frontend code for Dependency List and License Compliance pages to how in the header information about the pipeline and not about the scanning job. Currently, dependency_scanning
can have multiple jobs so link to pipeline will be more useful to users.
Screenshot of the current header
Implementation plan
from
<p class="mb-0">
<gl-sprintf
:message="s__('Dependencies|Based on the %{linkStart}latest successful%{linkEnd} scan')"
>
<template #link="{ content }">
<gl-link v-if="reportInfo.jobPath" ref="jobLink" :href="reportInfo.jobPath">{{
content
}}</gl-link>
<template v-else>{{ content }}</template>
</template>
</gl-sprintf>
<span v-if="generatedAtTimeAgo">
<span aria-hidden="true">•</span>
<span class="text-secondary">{{ generatedAtTimeAgo }}</span>
</span>
</p>
to something like
<p class="mb-0">
<gl-sprintf
:message="s__('Dependencies|Based on the %{linkStart}latest successful%{linkEnd} pipeline')"
>
<template #link="{ content }">
<gl-link v-if="reportInfo.pipelinePath" ref="pipelineLink" :href="reportInfo.pipelinePath">{{
content
}}</gl-link>
<template v-else>{{ content }}</template>
</template>
</gl-sprintf>
<span v-if="generatedAtTimeAgo">
<span aria-hidden="true">•</span>
<span class="text-secondary">{{ generatedAtTimeAgo }}</span>
</span>
</p>
Edited by -