mirror of
https://github.com/Luzifer/mondash.git
synced 2024-11-10 00:20:02 +00:00
Fix: Properly display newlines in metric description
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
45cce5eb67
commit
324b724f03
1 changed files with 7 additions and 1 deletions
|
@ -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: {
|
||||||
|
|
Loading…
Reference in a new issue