mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-12 20:06:33 +00:00
Better show custom ui versions (#1269)
This commit is contained in:
parent
0ae676d9ba
commit
7a2aff712b
@ -292,6 +292,14 @@ class HaPanelDevInfo extends PolymerElement {
|
|||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
this.$.scrollable.dialogElement = this.$.showlog;
|
this.$.scrollable.dialogElement = this.$.showlog;
|
||||||
this._fetchData();
|
this._fetchData();
|
||||||
|
if (!window.CUSTOM_UI_LIST) {
|
||||||
|
// Give custom UI an opportunity to load.
|
||||||
|
setTimeout(() => {
|
||||||
|
this.customUiList = window.CUSTOM_UI_LIST || [];
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
this.customUiList = window.CUSTOM_UI_LIST;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshErrorLog(ev) {
|
refreshErrorLog(ev) {
|
||||||
@ -299,9 +307,9 @@ class HaPanelDevInfo extends PolymerElement {
|
|||||||
|
|
||||||
this.errorLog = 'Loading error log…';
|
this.errorLog = 'Loading error log…';
|
||||||
|
|
||||||
this.hass.callApi('GET', 'error_log').then(function (log) {
|
this.hass.callApi('GET', 'error_log').then((log) => {
|
||||||
this.errorLog = log || 'No errors have been reported.';
|
this.errorLog = log || 'No errors have been reported.';
|
||||||
}.bind(this));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fullTimeStamp(date) {
|
fullTimeStamp(date) {
|
||||||
@ -325,10 +333,10 @@ class HaPanelDevInfo extends PolymerElement {
|
|||||||
_fetchData() {
|
_fetchData() {
|
||||||
this.updating = true;
|
this.updating = true;
|
||||||
this.hass.callApi('get', 'error/all')
|
this.hass.callApi('get', 'error/all')
|
||||||
.then(function (items) {
|
.then((items) => {
|
||||||
this.items = items;
|
this.items = items;
|
||||||
this.updating = false;
|
this.updating = false;
|
||||||
}.bind(this));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user