Welcome to mirror list, hosted at ThFree Co, Russian Federation.

track_line.vue « graph « components « monitoring « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d2ed1ba113ede240fd6f75654fc1ec6a216ce501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<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 width="16" height="8">
      <line
        :stroke-dasharray="stylizedLine"
        :stroke="track.lineColor"
        :x1="0"
        :x2="16"
        :y1="4"
        :y2="4"
        stroke-width="4"
      />
    </svg>
  </td>
</template>