Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Davidislit
Copy link

No description provided.

@@ -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) {
Copy link
Owner

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;
Copy link
Owner

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} />
Copy link
Owner

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
@Davidislit
Copy link
Author

@morsdyce updated by the rejects, if there is anything else please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants