mirror of
https://github.com/Luzifer/mondash.git
synced 2024-11-09 16:10:01 +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-card-text>
|
||||
{{ metric.description }}
|
||||
{{ description }}
|
||||
</b-card-text>
|
||||
|
||||
<graph :metric="metric" v-if="!metric.config.hide_mad"></graph>
|
||||
|
@ -46,6 +46,12 @@ export default {
|
|||
name: 'metric',
|
||||
props: ['metric'],
|
||||
|
||||
computed: {
|
||||
description() {
|
||||
return this.metric.description.replace(new RegExp(/\n/, 'g'), '<br>')
|
||||
},
|
||||
},
|
||||
|
||||
components: { graph, historyBar },
|
||||
|
||||
methods: {
|
||||
|
|
Loading…
Reference in a new issue