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

issues

parent 1a2baf98
<script>
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';
const modalDefaultData = {
......@@ -15,6 +15,7 @@
name: 'MrWidgetReportIssues',
components: {
modal,
icon,
},
props: {
issues: {
......@@ -41,12 +42,6 @@
return modalDefaultData;
},
computed: {
icon() {
return this.isStatusSuccess ? spriteIcon('plus') : this.cutIcon;
},
cutIcon() {
return spriteIcon('cut');
},
fixedLabel() {
return s__('ciReport|Fixed:');
},
......@@ -117,12 +112,16 @@
v-for="(issue, index) in issues"
:key="index"
>
<span
<icon
class="mr-widget-code-quality-icon"
v-html="icon"
>
</span>
v-if="isStatusSuccess"
name="status_success_borderless"
/>
<icon
v-else
class="mr-widget-code-quality-icon"
name="status_failed_borderless"
/>
<template v-if="isStatusSuccess && isTypeQuality">{{ fixedLabel }}</template>
<template v-if="shouldRenderPriority(issue)">{{ issue.priority }}:</template>
......
......@@ -41,6 +41,7 @@ export default {
return this.mr.sast;
},
shouldRenderDockerReport() {
return true;
return this.mr.sastContainer;
},
shouldRenderDastReport() {
......@@ -311,9 +312,31 @@ export default {
if (this.shouldRenderSecurityReport) {
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) {
this.fetchDockerReport();
//this.fetchDockerReport();
}
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