summaryrefslogtreecommitdiff
path: root/web/src/actions
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2020-11-19 10:19:01 +1100
committerIan Wienand <iwienand@redhat.com>2020-11-19 10:19:01 +1100
commit5688c782a0e393dee33920b2262414f8528dc094 (patch)
tree113fbcd5fecb9321eb31c5acf5fd3ffcdd86bbb6 /web/src/actions
parent8f0ade64e7072be0bc36deb852aa9e74ca45d211 (diff)
downloadzuul-5688c782a0e393dee33920b2262414f8528dc094.tar.gz
web: remove optional match on systemd regex
Having an optional match on the STATUSFMT means that the SYSTEMD_LOGMATCH regex might match, but the m[7] value, which is looked up in the severityMap, might not exist. Javascript's behaviour when looking up a value that doesn't exist is to set it to "undefined", hence sev can get that value here. This has come to light because Ibcbc2bd9497f1d8b75acd9e4979a289173d014b2 has (unintentaionlly) modified the log viewer page to check if it should display the line with (line.severity >= severity) So while "null" as a severity displays, "undefined" does not. Change-Id: I66f96f6991ed0f8af1bb4c43d73fbd5163f9be42
Diffstat (limited to 'web/src/actions')
-rw-r--r--web/src/actions/logfile.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/src/actions/logfile.js b/web/src/actions/logfile.js
index f16b75f39..24f986ba3 100644
--- a/web/src/actions/logfile.js
+++ b/web/src/actions/logfile.js
@@ -38,7 +38,7 @@ const severityMap = {
}
const OSLO_LOGMATCH = new RegExp(`^(${DATEFMT})(( \\d+)? (${STATUSFMT}).*)`)
-const SYSTEMD_LOGMATCH = new RegExp(`^(${SYSLOGDATE})( (\\S+) \\S+\\[\\d+\\]\\: (${STATUSFMT})?.*)`)
+const SYSTEMD_LOGMATCH = new RegExp(`^(${SYSLOGDATE})( (\\S+) \\S+\\[\\d+\\]\\: (${STATUSFMT}).*)`)
const receiveLogfile = (buildId, file, data) => {