diff --git a/src/panels/config/logs/dialog-download-logs.ts b/src/panels/config/logs/dialog-download-logs.ts index 72ae401846ca..e4726e0528a6 100644 --- a/src/panels/config/logs/dialog-download-logs.ts +++ b/src/panels/config/logs/dialog-download-logs.ts @@ -115,7 +115,11 @@ class DownloadLogsDialog extends LitElement { const boot = this._dialogParams!.boot; const timeString = new Date().toISOString().replace(/:/g, "-"); - const downloadUrl = this._getDownloadUrl()(provider, this._lineCount, boot); + const downloadUrl = this._getDownloadUrlFunction()( + provider, + this._lineCount, + boot + ); const logFileName = provider !== "core" ? `${provider}_${timeString}.log` @@ -125,7 +129,7 @@ class DownloadLogsDialog extends LitElement { this.closeDialog(); } - private _getDownloadUrl() { + private _getDownloadUrlFunction() { if (this._dialogParams!.boot === 0) { return getHassioLogDownloadLinesUrl; } diff --git a/src/panels/config/logs/error-log-card.ts b/src/panels/config/logs/error-log-card.ts index 6c63f18eca7a..12994fe1e23f 100644 --- a/src/panels/config/logs/error-log-card.ts +++ b/src/panels/config/logs/error-log-card.ts @@ -379,7 +379,7 @@ class ErrorLogCard extends LitElement { isComponentLoaded(this.hass, "hassio") && this.provider ) { - const response = await this._fetchLogs()( + const response = await this._fetchLogsFunction()( this.hass, this.provider, this._logStreamAborter.signal, @@ -469,7 +469,7 @@ class ErrorLogCard extends LitElement { } } - private _fetchLogs = () => { + private _fetchLogsFunction = () => { if (this._boot === 0) { return fetchHassioLogsFollow; } @@ -582,7 +582,8 @@ class ErrorLogCard extends LitElement { .map(Number) .sort((a, b) => b - a); - if (boots.length) { + // only show boots select when there are more than one boot + if (boots.length > 1) { this._boots = boots; } } catch (err: any) {