mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 10:56:34 +00:00
Clear log entries if clear is pressed (#637)
* Clear log entries if clear is pressed * Fix comparisons * Clear entries instead of refresh
This commit is contained in:
parent
415b0b127f
commit
01fab1075e
@ -248,6 +248,21 @@ class HaPanelDevInfo extends Polymer.Element {
|
||||
};
|
||||
}
|
||||
|
||||
ready() {
|
||||
super.ready();
|
||||
this.addEventListener('hass-service-called', ev => this.serviceCalled(ev));
|
||||
}
|
||||
|
||||
serviceCalled(ev) {
|
||||
// Check if this is for us
|
||||
if (ev.detail.success && ev.detail.domain === 'system_log') {
|
||||
// Do the right thing depending on service
|
||||
if (ev.detail.service === 'clear') {
|
||||
this.items = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.$.scrollable.dialogElement = this.$.showlog;
|
||||
|
Loading…
x
Reference in New Issue
Block a user