fix: Unparseable config when using the low-performance profile (#1570)

* The `low-performance` profile itself had parse errors: fix them!
* Do not silently swallow override parse errors, they are always a user issue
* Minor error message rendering improvements to show multiple pieces of context
This commit is contained in:
Dermot Duffy
2024-09-22 15:08:37 -07:00
committed by GitHub
parent a4417e8a3d
commit 766f3422a9
20 changed files with 137 additions and 88 deletions
+10 -3
View File
@@ -30,6 +30,11 @@ export class FrigateCardMessage extends LitElement {
const classes = {
dotdotdot: !!this.dotdotdot,
};
const renderContext = (contextItem: unknown): TemplateResult => {
return html`<pre>${yaml.dump(contextItem)}</pre>`;
};
return html` <div class="wrapper">
<div class="message padded">
<div class="icon">
@@ -43,9 +48,11 @@ export class FrigateCardMessage extends LitElement {
: ''}`
: ''}
</span>
${this.context && typeof this.context === 'object'
? html`<pre>${yaml.dump(this.context)}</pre>`
: ''}
${this.context && Array.isArray(this.context)
? this.context.map((contextItem) => renderContext(contextItem))
: typeof this.context === 'object'
? renderContext(this.context)
: ''}
</div>
</div>
</div>`;