Commit 5f9d0084 authored by Filipa Lacerda's avatar Filipa Lacerda

Adjust aligment for the icons

parent eaca44e2
...@@ -785,10 +785,6 @@ ...@@ -785,10 +785,6 @@
} }
.mr-widget-code-quality { .mr-widget-code-quality {
.ci-status-icon-warning svg {
fill: $theme-gray-600;
}
.code-quality-container { .code-quality-container {
border-top: 1px solid $gray-darker; border-top: 1px solid $gray-darker;
padding: $gl-padding-top; padding: $gl-padding-top;
...@@ -805,10 +801,14 @@ ...@@ -805,10 +801,14 @@
.mr-widget-code-quality-list { .mr-widget-code-quality-list {
list-style: none; list-style: none;
padding: 0 12px; padding: 0 9px;
margin: 0; margin: 0;
line-height: $code_line_height; line-height: $code_line_height;
.mr-widget-code-quality-list-item {
display: flex;
}
.failed .mr-widget-code-quality-icon { .failed .mr-widget-code-quality-icon {
color: $red-500; color: $red-500;
} }
...@@ -822,13 +822,8 @@ ...@@ -822,13 +822,8 @@
} }
.mr-widget-code-quality-icon { .mr-widget-code-quality-icon {
margin-right: 12px; margin: 3px 12px 0 0;
fill: currentColor; fill: currentColor;
svg {
width: 10px;
height: 10px;
}
} }
} }
} }
......
<script> <script>
/* eslint-disable vue/require-default-prop */ import { __ } from '~/locale';
import statusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue'; import statusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue';
import loadingIcon from '~/vue_shared/components/loading_icon.vue'; import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import issuesBlock from './mr_widget_report_issues.vue'; import issuesBlock from './mr_widget_report_issues.vue';
......
...@@ -45,6 +45,15 @@ ...@@ -45,6 +45,15 @@
fixedLabel() { fixedLabel() {
return s__('ciReport|Fixed:'); return s__('ciReport|Fixed:');
}, },
iconName() {
if (this.isStatusFailed) {
return 'status_failed_borderless';
} else if (this.isStatusSuccess) {
return 'status_success_borderless';
}
return 'status_created_borderless';
},
isStatusFailed() { isStatusFailed() {
return this.status === 'failed'; return this.status === 'failed';
}, },
...@@ -109,18 +118,13 @@ ...@@ -109,18 +118,13 @@
success: isStatusSuccess, success: isStatusSuccess,
neutral: isStatusNeutral neutral: isStatusNeutral
}" }"
class="mr-widget-code-quality-list-item"
v-for="(issue, index) in issues" v-for="(issue, index) in issues"
:key="index" :key="index"
> >
<icon <icon
class="mr-widget-code-quality-icon" class="mr-widget-code-quality-icon"
v-if="isStatusSuccess" :name="iconName"
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="isStatusSuccess && isTypeQuality">{{ fixedLabel }}</template>
......
...@@ -41,7 +41,6 @@ export default { ...@@ -41,7 +41,6 @@ export default {
return this.mr.sast; return this.mr.sast;
}, },
shouldRenderDockerReport() { shouldRenderDockerReport() {
return true;
return this.mr.sastContainer; return this.mr.sastContainer;
}, },
shouldRenderDastReport() { shouldRenderDastReport() {
...@@ -312,31 +311,9 @@ export default { ...@@ -312,31 +311,9 @@ 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