Merge pull request #2182 from syahn/fix-#2134

Fix #2134
This commit is contained in:
Maximilian Hils 2017-03-19 14:47:50 +01:00 committed by GitHub
commit 92e3358915
3 changed files with 8 additions and 3 deletions

View File

@ -55,7 +55,7 @@ class EventLog extends Component {
<div onMouseDown={this.onDragStart}> <div onMouseDown={this.onDragStart}>
Eventlog Eventlog
<div className="pull-right"> <div className="pull-right">
{['debug', 'info', 'web'].map(type => ( {['debug', 'info', 'web', 'warn', 'error'].map(type => (
<ToggleButton key={type} text={type} checked={filters[type]} onToggle={() => toggleFilter(type)}/> <ToggleButton key={type} text={type} checked={filters[type]} onToggle={() => toggleFilter(type)}/>
))} ))}
<i onClick={close} className="fa fa-close"></i> <i onClick={close} className="fa fa-close"></i>

View File

@ -83,7 +83,12 @@ class EventLogList extends Component {
} }
function LogIcon({ event }) { function LogIcon({ event }) {
const icon = { web: 'html5', debug: 'bug' }[event.level] || 'info' const icon = {
web: 'html5',
debug: 'bug',
warn: 'exclamation-triangle',
error: 'ban'
}[event.level] || 'info'
return <i className={`fa fa-fw fa-${icon}`}></i> return <i className={`fa fa-fw fa-${icon}`}></i>
} }

View File

@ -8,7 +8,7 @@ export const TOGGLE_FILTER = 'EVENTS_TOGGLE_FILTER'
const defaultState = { const defaultState = {
visible: false, visible: false,
filters: { debug: false, info: true, web: true }, filters: { debug: false, info: true, web: true, warn: true, error: true },
...reduceStore(undefined, {}), ...reduceStore(undefined, {}),
} }