Commit 9c4588f2 authored by Daniel Tian's avatar Daniel Tian Committed by Savas Vedova

Use GraphQL alias to simplify vulnerability list id property

Changelog: changed
MR:
EE: true
parent 68e27596
...@@ -98,9 +98,8 @@ export default { ...@@ -98,9 +98,8 @@ export default {
update(data) { update(data) {
const vulnerabilities = this.getVulnerabilitiesFromData(data); const vulnerabilities = this.getVulnerabilitiesFromData(data);
this.pageInfo = vulnerabilities.pageInfo; this.pageInfo = vulnerabilities.pageInfo;
// The id property is used for the bulk select feature. Vulnerabilities use 'id' and
// pipeline findings use 'uuid', so we'll normalize it to 'id'. return vulnerabilities.nodes;
return vulnerabilities.nodes.map((v) => ({ ...v, id: v.id || v.uuid }));
}, },
error() { error() {
createFlash({ createFlash({
......
...@@ -29,7 +29,9 @@ query pipelineFindings( ...@@ -29,7 +29,9 @@ query pipelineFindings(
state: $state state: $state
) { ) {
nodes { nodes {
uuid # This query is used by vulnerability_list_graphql.vue, which expects an id property for
# the bulk select feature.
id: uuid
name name
description description
falsePositive @include(if: $vetEnabled) falsePositive @include(if: $vetEnabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment