This commit is contained in:
Frank Ahn 2017-03-18 09:51:05 +09:00
parent 253fa95018
commit 125ae2d8f9
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, {}),
} }