2020-09-10 18:08:54 +00:00
|
|
|
<script>
|
2020-09-24 12:09:37 +00:00
|
|
|
import { GlLink, GlTooltipDirective } from '@gitlab/ui';
|
2020-09-10 18:08:54 +00:00
|
|
|
import { formatDate } from '~/lib/utils/datetime_utility';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
GlLink,
|
2020-09-23 06:09:45 +00:00
|
|
|
},
|
|
|
|
directives: {
|
|
|
|
GlTooltip: GlTooltipDirective,
|
2020-09-10 18:08:54 +00:00
|
|
|
},
|
2020-09-15 12:09:30 +00:00
|
|
|
props: {
|
2020-09-10 18:08:54 +00:00
|
|
|
alert: {
|
2020-09-15 12:09:30 +00:00
|
|
|
type: Object,
|
|
|
|
required: true,
|
2020-09-10 18:08:54 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
startTime() {
|
2020-09-15 12:09:30 +00:00
|
|
|
return formatDate(this.alert.startedAt, 'yyyy-mm-dd Z');
|
2020-09-10 18:08:54 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div
|
2020-09-24 12:09:37 +00:00
|
|
|
class="gl-border-solid gl-border-1 gl-border-gray-100 gl-p-5 gl-mb-3 gl-rounded-base gl-display-flex gl-justify-content-space-between gl-xs-flex-direction-column"
|
2020-09-10 18:08:54 +00:00
|
|
|
>
|
2020-09-23 06:09:45 +00:00
|
|
|
<div class="gl-pr-3">
|
2020-09-10 18:08:54 +00:00
|
|
|
<span class="gl-font-weight-bold">{{ s__('HighlightBar|Original alert:') }}</span>
|
2020-09-23 06:09:45 +00:00
|
|
|
<gl-link v-gl-tooltip :title="alert.title" :href="alert.detailsUrl">
|
2020-09-24 12:09:37 +00:00
|
|
|
#{{ alert.iid }}
|
2020-09-23 06:09:45 +00:00
|
|
|
</gl-link>
|
2020-09-10 18:08:54 +00:00
|
|
|
</div>
|
|
|
|
|
2020-09-23 06:09:45 +00:00
|
|
|
<div class="gl-pr-3">
|
2020-09-10 18:08:54 +00:00
|
|
|
<span class="gl-font-weight-bold">{{ s__('HighlightBar|Alert start time:') }}</span>
|
|
|
|
{{ startTime }}
|
|
|
|
</div>
|
|
|
|
|
2020-09-23 06:09:45 +00:00
|
|
|
<div>
|
2020-09-10 18:08:54 +00:00
|
|
|
<span class="gl-font-weight-bold">{{ s__('HighlightBar|Alert events:') }}</span>
|
|
|
|
<span>{{ alert.eventCount }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|