Skip to content

Conversation

spiderxm
Copy link
Collaborator

Adding feature for user to export data as json
Screenshot 2021-06-15 at 4 51 41 PM

@spiderxm
Copy link
Collaborator Author

@Ali-Razmjoo @dhirensr Please review

@Ali-Razmjoo Ali-Razmjoo self-requested a review June 17, 2021 14:58
@spiderxm spiderxm changed the title adding json export Bulk export Jun 22, 2021
@spiderxm spiderxm requested a review from dhirensr June 22, 2021 10:36
@spiderxm
Copy link
Collaborator Author

@dhirensr Will fix that.

@dhirensr
Copy link
Collaborator

@spiderxm : when I'm filtering data, i get less results in json, whereas csv and excel have consistent results. is it also for you?

@spiderxm
Copy link
Collaborator Author

@spiderxm : when I'm filtering data, i get less results in json, whereas csv and excel have consistent results. is it also for you?

I didn't face issue like that. Data is consistent.

@spiderxm
Copy link
Collaborator Author

With ElasticSearch we can only request 10,000 records at max.
So if count is greater than that. We would get only 10,000 records

Copy link
Collaborator

@dhirensr dhirensr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I'm filtering data, i get less results in json, whereas csv and excel have consistent results.
@Ali-Razmjoo : you can test that and then approve please

@Ali-Razmjoo
Copy link
Collaborator

It is a great feature, but it exports the data with false positives from the table. Can you export data from API calls directly instead of from the table?

Thanks.

* @param {*} fileType : File Type ( Json, Excel, Csv)
*/
function downloadLogData(api_endpoint, column_list, api_params, fileType) {
$.ajax({
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data is fetched directly from the api rather than the table.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ali-Razmjoo. The buttons are added inside the table. But on choosing on one. Data is fetched from api based on user filter and then converted to appropriate format and downloaded.

@Ali-Razmjoo
Copy link
Collaborator

great job, thanks.

@Ali-Razmjoo Ali-Razmjoo changed the base branch from development to elasticsearch July 27, 2021 15:38
@Ali-Razmjoo
Copy link
Collaborator

I've changed the PR to elasticsearch branch... some tests needed new codes that exist theere.

@Ali-Razmjoo Ali-Razmjoo merged commit dd702fc into OWASP:elasticsearch Jul 27, 2021
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.

3 participants