diff --git a/src/metric.vue b/src/metric.vue index 934b545..2ed9f29 100644 --- a/src/metric.vue +++ b/src/metric.vue @@ -2,35 +2,56 @@ - {{ metric.title }} + + + - - + + - - {{ description }} - + - + -
+
- Current value: {{ metric.value.toFixed(3) }} + Current value: {{ metric.value.toFixed(3) }} MAD: {{ metric.mad_multiplier.toFixed(3) }} above the median ({{ metric.median.toFixed(3) }}) - Updated {{ moment(metric.last_update).fromNow() }} - (Last OK {{ moment(metric.last_ok).fromNow() }}) + Updated {{ moment(metric.last_update).fromNow() }} + (Last OK {{ moment(metric.last_ok).fromNow() }})
- @@ -43,8 +64,15 @@ import graph from './graph.vue' import historyBar from './history-bar.vue' export default { - name: 'metric', - props: ['metric'], + name: 'Metric', + + components: { graph, historyBar }, + props: { + metric: { + required: true, + type: Object, + }, + }, computed: { description() { @@ -52,8 +80,6 @@ export default { }, }, - components: { graph, historyBar }, - methods: { moment,