From 14a098a0378112f97264162f1fedd482c5067ef2 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 16 Aug 2019 23:29:13 +0200 Subject: [PATCH] Add DetailURL and line breaks for descriptions Signed-off-by: Knut Ahlers --- src/metric.vue | 58 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 16 deletions(-) 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,