debian-mirror-gitlab/app/assets/javascripts/monitoring/components/graph/track_line.vue

37 lines
604 B
Vue
Raw Normal View History

2018-05-09 12:01:36 +05:30
<script>
export default {
name: 'TrackLine',
props: {
track: {
type: Object,
required: true,
},
},
computed: {
stylizedLine() {
if (this.track.lineStyle === 'dashed') return '6, 3';
if (this.track.lineStyle === 'dotted') return '3, 3';
return null;
},
},
};
</script>
<template>
<td>
<svg
2018-10-15 14:42:47 +05:30
width="16"
height="8">
2018-05-09 12:01:36 +05:30
<line
:stroke-dasharray="stylizedLine"
:stroke="track.lineColor"
:x1="0"
2018-10-15 14:42:47 +05:30
:x2="16"
:y1="4"
:y2="4"
2018-11-08 19:23:39 +05:30
stroke-width="4"
2018-05-09 12:01:36 +05:30
/>
</svg>
</td>
</template>