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

track_info.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: 3464067834f72a21812d3a5b2cbab215e945e1ab (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
<script>
import { formatRelevantDigits } from '~/lib/utils/number_utils';

export default {
  name: 'TrackInfo',
  props: {
    track: {
      type: Object,
      required: true,
    },
  },
  computed: {
    summaryMetrics() {
      return `Avg: ${formatRelevantDigits(this.track.average)} · Max: ${formatRelevantDigits(
        this.track.max,
      )}`;
    },
  },
};
</script>
<template>
  <span>
    <slot>
      <strong> {{ track.metricTag }} </strong>
    </slot>
    {{ summaryMetrics }}
  </span>
</template>