Allow filtering out with regex in logs table

pull/10616/head
Iris Scholten 2018-07-11 16:18:33 -07:00
parent c36f610c85
commit 924383f586
2 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@ class LogsFilter extends PureComponent<Props, State> {
}
let state = {}
if (['!=', '==', '=~'].includes(operator) && value !== '') {
if (['!=', '==', '=~', '!~'].includes(operator) && value !== '') {
this.props.onChangeFilter(id, operator, value)
} else {
state = {operator: filter.operator, value: filter.value}

View File

@ -98,7 +98,7 @@ const operatorMapping = (operator: string): string => {
}
const valueMapping = (operator: string, value): string => {
if (operator === '=~') {
if (operator === '=~' || operator === '!~') {
return `${new RegExp(value)}`
} else {
return `'${value}'`