Commit 163b2b00 authored by Filipa Lacerda's avatar Filipa Lacerda

Wrap issues more gracefully

parent dbbe6452
...@@ -119,74 +119,77 @@ ...@@ -119,74 +119,77 @@
<template> <template>
<ul class="report-block-list"> <ul class="report-block-list">
<li <li
:class="{ class="report-block-list-issue"
failed: isStatusFailed,
success: isStatusSuccess,
neutral: isStatusNeutral
}"
class="report-block-list-item"
v-for="(issue, index) in issues" v-for="(issue, index) in issues"
:key="index" :key="index"
> >
<icon <div
class="report-block-icon" class="report-block-list-icon append-right-5"
:name="iconName" :class="{
:size="32" failed: isStatusFailed,
/> success: isStatusSuccess,
neutral: isStatusNeutral
}">
<icon
:name="iconName"
:size="32"
/>
</div>
<div class="report-block-list-issue-description">
<div class="report-block-list-issue-description-text append-right-5">
<template v-if="isStatusSuccess && isTypeQuality">{{ fixedLabel }}</template>
<template v-if="shouldRenderPriority(issue)">{{ issue.priority }}:</template>
<template v-if="isStatusSuccess && isTypeQuality">{{ fixedLabel }}</template> <template v-if="isTypeDocker">
<template v-if="shouldRenderPriority(issue)">{{ issue.priority }}:</template> <a
v-if="issue.nameLink"
:href="issue.nameLink"
target="_blank"
rel="noopener noreferrer nofollow"
>{{ issue.name }}</a>
<template v-else>
{{ issue.name }}
</template>
</template>
<template v-else-if="isTypeDast">
<button
type="button"
@click="openDastModal(issue, index)"
data-toggle="modal"
class="btn-link btn-blank btn-open-modal"
:data-target="modalTargetId"
>
{{ issue.name }}
</button>
</template>
<template v-else>
{{ issue.name }}<template v-if="issue.score">:
<strong>{{ formatScore(issue.score) }}</strong></template>
</template>
<template v-if="isTypeDocker"> <template v-if="isTypePerformance && issue.delta != null">
<a ({{ issue.delta >= 0 ? '+' : '' }}{{ formatScore(issue.delta) }})
v-if="issue.nameLink" </template>
:href="issue.nameLink" </div>
target="_blank" <div class="report-block-list-issue-description-link">
rel="noopener noreferrer nofollow" <template v-if="issue.path">
class="prepend-left-5" in
>
{{ issue.name }}
</a>
<template v-else>
{{ issue.name }}
</template>
</template>
<template v-else-if="isTypeDast">
<button
type="button"
@click="openDastModal(issue, index)"
data-toggle="modal"
class="btn-link btn-blank btn-open-modal"
:data-target="modalTargetId"
>
{{ issue.name }}
</button>
</template>
<template v-else>
{{ issue.name }}<template v-if="issue.score">:
<strong>{{ formatScore(issue.score) }}</strong></template>
</template>
<template v-if="isTypePerformance && issue.delta != null"> <a
({{ issue.delta >= 0 ? '+' : '' }}{{ formatScore(issue.delta) }}) v-if="issue.urlPath"
</template> :href="issue.urlPath"
target="_blank"
<template v-if="issue.path"> rel="noopener noreferrer nofollow"
in class="break-link"
>
<a {{ issue.path }}<template v-if="issue.line">:{{ issue.line }}</template>
v-if="issue.urlPath" </a>
:href="issue.urlPath" <template v-else>
target="_blank" {{ issue.path }}<template v-if="issue.line">:{{ issue.line }}</template>
rel="noopener noreferrer nofollow" </template>
class="prepend-left-5" </template>
> </div>
{{ issue.path }}<template v-if="issue.line">:{{ issue.line }}</template> </div>
</a>
<template v-else>
{{ issue.path }}<template v-if="issue.line">:{{ issue.line }}</template>
</template>
</template>
</li> </li>
<modal <modal
......
...@@ -96,7 +96,9 @@ ...@@ -96,7 +96,9 @@
return this.status === 'success'; return this.status === 'success';
}, },
statusIconName() { statusIconName() {
if (this.loadingFailed || this.unresolvedIssues.length) { if (this.loadingFailed ||
this.unresolvedIssues.length ||
this.neutralIssues.length) {
return 'warning'; return 'warning';
} }
return 'success'; return 'success';
......
.pipeline-tab-content {
.space-children,
.space-children > * {
display: flex;
}
.media {
align-items: center;
}
}
.report-block-container { .report-block-container {
border-top: 1px solid $gray-darker; border-top: 1px solid $gray-darker;
padding: $gl-padding-top; padding: $gl-padding-top;
background-color: $gray-light; background-color: $gray-light;
margin: $gl-padding #{-$gl-padding} #{-$gl-padding}; margin: $gl-padding #{-$gl-padding} #{-$gl-padding};
}
.report-block-dast-code { // Clean MR widget CSS
margin-left: 26px; line-height: 20px;
} }
.report-block-list { .report-block-list {
list-style: none; list-style: none;
padding: 0 1px; padding: 0 1px;
margin: 0; margin: 0;
line-height: $code_line_height; }
.btn-open-modal {
padding: 0 5px 4px;
}
.report-block-list-item {
display: flex;
}
.report-block-list-item-modal { .report-block-list-icon {
display: flex; display: flex;
flex-wrap: wrap;
}
.failed .report-block-icon { &.failed {
color: $red-500; color: $red-500;
} }
.success .report-block-icon { &.success {
color: $green-500; color: $green-500;
} }
.neutral .report-block-icon { &.neutral {
color: $theme-gray-700; color: $theme-gray-700;
} }
}
.report-block-icon { .report-block-list-issue {
margin: -5px 4px 0 0; display: flex;
fill: currentColor; align-items: flex-start;
} align-content: flex-start;
} }
.pipeline-tab-content { .report-block-list-issue-description {
.space-children, align-content: space-around;
.space-children > * { align-items: flex-start;
display: flex; flex-wrap: wrap;
display: flex;
align-self: center;
margin: 5px 0px;
.break-link {
word-wrap: break-word;
word-break: break-all;
} }
.media { .btn-open-modal {
align-items: center; text-align: left;
} }
} }
\ No newline at end of file
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