From d277b4e87801c4e3bf271fd2d620875f0db6dd52 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Mon, 27 Apr 2020 15:07:04 -0700 Subject: [PATCH] Fixes bad date --- assets/components/LogEventSource.vue | 13 ++++--------- assets/components/LogViewer.vue | 3 --- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/assets/components/LogEventSource.vue b/assets/components/LogEventSource.vue index 9104aa6a..775de344 100644 --- a/assets/components/LogEventSource.vue +++ b/assets/components/LogEventSource.vue @@ -67,19 +67,14 @@ export default { } }, parseMessage(data) { - if (this.$route.query.debug) { - console.debug(`Parsing [${data}].`); + let i = data.indexOf(" "); + if (i == -1) { + i = data.length; } - - const i = data.indexOf(" "); const key = data.substring(0, i); const date = new Date(key); const message = data.substring(i).trim(); - return { - key, - date, - message, - }; + return { key, date, message }; }, }, watch: { diff --git a/assets/components/LogViewer.vue b/assets/components/LogViewer.vue index d1b885af..9d8efea1 100644 --- a/assets/components/LogViewer.vue +++ b/assets/components/LogViewer.vue @@ -55,9 +55,6 @@ export default { }, filters: { relativeTime(date) { - if (this.$route.query.debug) { - console.debug(`Computing relative date to [${date}].`); - } return formatRelative(date, new Date()); }, },