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
This commit is contained in:
parent
8f0ade64e7
commit
5688c782a0
|
@ -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) => {
|
||||
|
||||
|
|
Loading…
Reference in New Issue