-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added remove button to clear request logs #289
base: master
Are you sure you want to change the base?
Conversation
@@ -58,6 +63,13 @@ class RequestLog extends React.Component { | |||
return API.capturedRequests | |||
.filter((request) => includes(request.url, RequestLogState.query)) | |||
.filter(filterLogByType) | |||
.filter((request) => { | |||
if(this.state.requestTimestamp != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can simplify this to if(!this.state.requestTimestamp)
if(this.state.requestTimestamp != null) { | ||
return request.startTime > this.state.requestTimestamp; | ||
} else { | ||
return request; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the return type for filter is either true/false so if you want to keep the request you need to return true
render() { | ||
return ( | ||
<Frame controls={ this.controls() }> | ||
<HeaderRow> | ||
<HeaderCell width={ this.getCellWidth('time') } cell="time"> | ||
<DeleteButton> | ||
<Icon src="remove" onClick={this.clearLogs} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing import for this component
…into clean-button-for-logs # Conflicts: # lib/ui/components/RequestLogs/RequestLog.js
@morsdyce updated by the rejects, if there is anything else please let me know. |
No description provided.