Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/diffs/components/diff_line.vue')
-rw-r--r--app/assets/javascripts/diffs/components/diff_line.vue14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_line.vue b/app/assets/javascripts/diffs/components/diff_line.vue
index 448272549d3..40e53438bc8 100644
--- a/app/assets/javascripts/diffs/components/diff_line.vue
+++ b/app/assets/javascripts/diffs/components/diff_line.vue
@@ -15,13 +15,22 @@ export default {
parsedCodeQuality() {
return (this.line.left ?? this.line.right)?.codequality;
},
+ parsedSast() {
+ return (this.line.left ?? this.line.right)?.sast;
+ },
codeQualityLineNumber() {
- return this.parsedCodeQuality[0].line;
+ return this.parsedCodeQuality[0]?.line;
+ },
+ sastLineNumber() {
+ return this.parsedSast[0]?.line;
},
},
methods: {
hideCodeQualityFindings() {
- this.$emit('hideCodeQualityFindings', this.codeQualityLineNumber);
+ this.$emit(
+ 'hideCodeQualityFindings',
+ this.codeQualityLineNumber ? this.codeQualityLineNumber : this.sastLineNumber,
+ );
},
},
};
@@ -30,6 +39,7 @@ export default {
<template>
<diff-code-quality
:code-quality="parsedCodeQuality"
+ :sast="parsedSast"
@hideCodeQualityFindings="hideCodeQualityFindings"
/>
</template>