Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: Logs now deselects all categories by default (#1946)

DonWillems1d925e1c447e
diff --git a/ui/component/or-log-viewer/src/index.ts b/ui/component/or-log-viewer/src/index.ts
index 8a578eb89..a61d158f3 100644
--- a/ui/component/or-log-viewer/src/index.ts
+++ b/ui/component/or-log-viewer/src/index.ts
@@ -237,8 +237,6 @@ export class OrLogViewer extends translate(i18next)(LitElement) {
if (!this.categories) {
if (this.config && this.config.initialCategories) {
this.categories = [...this.config.initialCategories];
- } else {
- this.categories = Object.keys((Model as any)["SyslogCategory"]) as Model.SyslogCategory[];
}
}
@@ -288,7 +286,7 @@ export class OrLogViewer extends translate(i18next)(LitElement) {
<div id="log-controls">
${hideCategories ? `` : getContentWithMenuTemplate(
html`<or-mwc-input .type=${InputType.BUTTON} raised ?disabled="${disabled}" .label="${i18next.t("categories")}" icontrailing="chevron-down"></or-mwc-input>`,
- this._getCategoryMenuItems(),
+ this._getCategoryMenuItems(),
this.categories,
(v) => this._onCategoriesChanged(v as Model.SyslogCategory[]),
() => this._onCategoriesClosed(),