From b15edbd4fdd69609ab0cef7911ce2669855f9536 Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Fri, 17 Nov 2017 07:07:03 +0100 Subject: [PATCH] Add option to retrieve n amount of last lines from log. (#604) * Add option to retrieve n amount of last lines from log. * Move line logic to backend * Review changes * Review changes * Only print text * Use query params instead of url path to specify lines --- panels/config/zwave/zwave-log.html | 35 ++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/panels/config/zwave/zwave-log.html b/panels/config/zwave/zwave-log.html index 367571b894..01276c2af0 100644 --- a/panels/config/zwave/zwave-log.html +++ b/panels/config/zwave/zwave-log.html @@ -16,16 +16,32 @@ margin: 0 auto; max-width: 600px; } + + .device-picker { + padding-left: 24px; + padding-right: 24px; + padding-bottom: 24px; + } OZW Log -
-
[[ozwLogs]]
-
-
- Refresh -
+
+ + +
+
+ Refresh +
+
+
[[ozwLogs]]
+
@@ -50,12 +66,17 @@ class OzwLog extends Polymer.Element { type: String, value: 'Refresh to pull log' }, + + numLogLines: { + type: Number, + value: 0 + }, }; } refreshLog() { this.ozwLogs = 'Loading ozw log...'; - this.hass.callApi('GET', 'zwave/ozwlog') + this.hass.callApi('GET', 'zwave/ozwlog?lines=' + this.numLogLines) .then((info) => { this.ozwLogs = info; });