1
0
Fork 0
mirror of https://github.com/Luzifer/mondash.git synced 2024-12-22 20:11:18 +00:00

Fix: Properly display newlines in metric description

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-08-16 22:25:45 +02:00
parent 45cce5eb67
commit 324b724f03
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -13,7 +13,7 @@
</b-row> </b-row>
<b-card-text> <b-card-text>
{{ metric.description }} {{ description }}
</b-card-text> </b-card-text>
<graph :metric="metric" v-if="!metric.config.hide_mad"></graph> <graph :metric="metric" v-if="!metric.config.hide_mad"></graph>
@ -46,6 +46,12 @@ export default {
name: 'metric', name: 'metric',
props: ['metric'], props: ['metric'],
computed: {
description() {
return this.metric.description.replace(new RegExp(/\n/, 'g'), '<br>')
},
},
components: { graph, historyBar }, components: { graph, historyBar },
methods: { methods: {