Commit 2d1468ed authored by Maxime Chaillet's avatar Maxime Chaillet

clean the code

parent 2b253dcb
......@@ -84,7 +84,7 @@ class LogbookContainer extends React.Component {
initialValue={this.state.pageEvents.length}
intervalInMilliSeconds={2000}
isEnabled={true}
periodicCallback={(onSuccess, onFailure) => this.getEventsByInvestigationIdCopy(investigationId, user.sessionId, GUI_CONFIG().EVENTS_PER_DOWNLOAD, 0, selectionFilter, GUI_CONFIG().DEFAULT_SORTING_FILTER, onFailure, onSuccess)}>
periodicCallback={(onSuccess, onFailure) => getEventsByInvestigationIdRequest(user.sessionId, investigationId, GUI_CONFIG().EVENTS_PER_DOWNLOAD, 0, selectionFilter.find, GUI_CONFIG().DEFAULT_SORTING_FILTER, onSuccess, onFailure )}>
<EventListMenu
availableTags={this.props.availableTags}
......@@ -294,34 +294,6 @@ class LogbookContainer extends React.Component {
};
}
getEventsByInvestigationIdCopy = (investigationId, sessionId, limit, offset, selectionFilter, sortingFilter, onError, onSuccess) => {
if (investigationId && sessionId) {
axios({
method: 'post',
url: getEventsByInvestigationId(sessionId, investigationId),
data: {
find: selectionFilter.find,
sort: sortingFilter,
limit: limit,
skip: offset
}
})
.then(data => {
return onSuccess(data.data)
})
.catch((error) => {
console.log('[ERROR] An error occured while retrieving the event list.');
return onError(error);
});
} else {
onError('[ERROR] Missing query parameters in the request handled by getEventsByInvestigationId()');
}
//return onSuccess(5);
}
/**
* Request total number of events associated to the given investigationId
* @param {string} investigationId the investigation id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment