fix: log viewer uses a default if the mapped severity doesn't exist

pull/5346/head
Bucky Schwarz 2020-01-08 10:53:58 -08:00 committed by Bucky Schwarz
parent 1806d6c298
commit a1f6162508
3 changed files with 7 additions and 10 deletions

View File

@ -1,5 +1,9 @@
## v1.8.0
### Bug Fixes
1. [#5345](https://github.com/influxdata/chronograf/pull/5345): Log Viewer uses a default if the mapped severity doesn't exist
## v1.7.17 [2020-01-08]
### Bug Fixes

View File

@ -25,14 +25,5 @@ module.exports = {
displayName: 'eslint',
testMatch: ['<rootDir>/test/**/*.test.js'],
},
{
runner: 'jest-runner-tslint',
displayName: 'tslint',
moduleFileExtensions: ['ts', 'tsx'],
testMatch: [
'<rootDir>/test/**/*.test.ts',
'<rootDir>/test/**/*.test.tsx',
],
},
],
}

View File

@ -481,7 +481,9 @@ class LogsTable extends Component<Props, State> {
if (column === 'severity' && isDotNeeded) {
title = value
const colorLevel = severityLevelColors.find(lc => lc.level === value)
const colorLevel =
severityLevelColors.find(lc => lc.level === value) ||
severityLevelColors[0]
formattedValue = (
<>
<div