-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Enhancement #500 Export bootstrap-table #526
base: master
Are you sure you want to change the base?
Conversation
Adding dependancies and functionality for table export Signed-off-by: Nicholas Castelli <[email protected]>
Hi @nvcastelli, thanks for the PR!
Could you please add those dependencies to |
Signed-off-by: Nicholas Castelli <[email protected]>
Signed-off-by: Nicholas Castelli <[email protected]>
Hey @nscuro, I was able to add those dependancies, please let me know if there's anything else you need from my end. |
@nvcastelli I just gave this a spin, but it seems like despite usage of The issue seems to be that, in order to fetch all items, the plugin requests the REST endpoint without
Whereas in the paginated view it would do:
For paginated REST endpoints, DT will fall back to If the intention is to truly fetch all components, we'll need a way to deal with DT's default pagination behavior here. |
Hey @nscuro , thank you for looking into it. My understanding is that the export-table functionality sets the pagesize to the amount of items in the list, then pulls from them that way. But if you're saying it only does that up to a maximum 100 that would be a problem. If we want to keep using these plugins we'd have to look into how DT does the pagination like you mentioned. Another option may be to just grab the data that's returned from the request to fill the table and put it into a file. Not sure if there's a good plugin for this, maybe something we'd have to make from scratch. Let me know your thoughts, and thanks again! |
In that case I'd have expected it to set
Maybe there's a hook or callback we can use to manually populate the request parameters?
Yeah, at that point it may be easier to do it in the API server altogether. I personally do not have strong feelings about the bootstrap plugins, but I understand Steve would appreciate us making it work somehow using this plugin. |
hi @stevespringett looks like the recommended plugin isn't working as we'd like. there's some discussion around researching other directions to implement this, would you be open to us researching other plugins or getting the data from the backend instead? |
Description
This changes utilizes the bootstrap-table export plugin to pull table data from tables within the Dependency Track application. In places where it's been enabled on a bootstrap table users will be able to select a dropdown to download table data based on the file type they select.
Addressed Issue
This PR is the first step to fulfilling the following enhancement #500. Pending approval this should resolve enhancement #500
Additional Details
We had brought up this enhancement and Steve suggested using the bootstrap-table export plugin. Currently, this change only adds the ability to download on the component table and only in json and txt formats. I am looking into adding the ability to download as an excel but there are more dependancies needed.
For this change to work some new dependencies need to be included:
I'm happy to add any suggestions.
Checklist