Commit 405b6954 authored by Filipa Lacerda's avatar Filipa Lacerda

issues

parent 1a2baf98
<script> <script>
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { spriteIcon } from '~/lib/utils/common_utils'; import icon from '~/vue_shared/components/icon.vue';
import modal from './mr_widget_dast_modal.vue'; import modal from './mr_widget_dast_modal.vue';
const modalDefaultData = { const modalDefaultData = {
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
name: 'MrWidgetReportIssues', name: 'MrWidgetReportIssues',
components: { components: {
modal, modal,
icon,
}, },
props: { props: {
issues: { issues: {
...@@ -41,12 +42,6 @@ ...@@ -41,12 +42,6 @@
return modalDefaultData; return modalDefaultData;
}, },
computed: { computed: {
icon() {
return this.isStatusSuccess ? spriteIcon('plus') : this.cutIcon;
},
cutIcon() {
return spriteIcon('cut');
},
fixedLabel() { fixedLabel() {
return s__('ciReport|Fixed:'); return s__('ciReport|Fixed:');
}, },
...@@ -117,12 +112,16 @@ ...@@ -117,12 +112,16 @@
v-for="(issue, index) in issues" v-for="(issue, index) in issues"
:key="index" :key="index"
> >
<icon
<span class="mr-widget-code-quality-icon"
v-if="isStatusSuccess"
name="status_success_borderless"
/>
<icon
v-else
class="mr-widget-code-quality-icon" class="mr-widget-code-quality-icon"
v-html="icon" name="status_failed_borderless"
> />
</span>
<template v-if="isStatusSuccess && isTypeQuality">{{ fixedLabel }}</template> <template v-if="isStatusSuccess && isTypeQuality">{{ fixedLabel }}</template>
<template v-if="shouldRenderPriority(issue)">{{ issue.priority }}:</template> <template v-if="shouldRenderPriority(issue)">{{ issue.priority }}:</template>
......
...@@ -41,6 +41,7 @@ export default { ...@@ -41,6 +41,7 @@ export default {
return this.mr.sast; return this.mr.sast;
}, },
shouldRenderDockerReport() { shouldRenderDockerReport() {
return true;
return this.mr.sastContainer; return this.mr.sastContainer;
}, },
shouldRenderDastReport() { shouldRenderDastReport() {
...@@ -311,9 +312,31 @@ export default { ...@@ -311,9 +312,31 @@ export default {
if (this.shouldRenderSecurityReport) { if (this.shouldRenderSecurityReport) {
this.fetchSecurity(); this.fetchSecurity();
} }
this.mr.setDockerReport({
unapproved: [
'CVE-2017-12944',
'CVE-2017-16232'
],
vulnerabilities: [
{
vulnerability: 'CVE-2017-12944',
namespace: 'debian:8',
severity: 'Medium'
},
{
vulnerability: 'CVE-2017-16232',
namespace: 'debian:8',
severity: 'Negligible'
},
{
vulnerability: 'CVE-2014-8130',
namespace: 'debian:8',
severity: 'Negligible'
}
]
});
if (this.shouldRenderDockerReport) { if (this.shouldRenderDockerReport) {
this.fetchDockerReport(); //this.fetchDockerReport();
} }
if (this.shouldRenderDastReport) { if (this.shouldRenderDastReport) {
......
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