UIGauge: Add error message when things go pear shaped
We really need to fix the width of these panels though, the width (and hence height) is all wrong
This commit is contained in:
parent
1d537e9334
commit
97cb8b4432
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
import Emel from 'emel';
|
||||
import forkawesome_emel from './forkawesome_emel.mjs';
|
||||
import ApexCharts from 'apexcharts';
|
||||
|
||||
import AbstractUIItem from './AbstractUIItem.mjs';
|
||||
|
@ -98,6 +99,9 @@ class UIGauge extends AbstractUIItem {
|
|||
break;
|
||||
default:
|
||||
console.warn(`Warning: Unknown UIGauge content type '${typeof this.def.content}' for def with name '${this.def.name}'.`);
|
||||
this.el.querySelector(".container-gauge").replaceChildren(
|
||||
this.emel(`div[class="message-error"]>${forkawesome_emel("exclamation-circle")}+{Oops! An error occurred while rendering this chart. Check the developer tools for more information.}`)
|
||||
)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue