Skip to content

Add CSV export for search results#1660

Open
lacatoire wants to merge 1 commit intoopendcim:masterfrom
lacatoire:feat/1386-export-search-results
Open

Add CSV export for search results#1660
lacatoire wants to merge 1 commit intoopendcim:masterfrom
lacatoire:feat/1386-export-search-results

Conversation

@lacatoire
Copy link

Summary

Adds CSV export functionality to the search results page. A new Export CSV button appears alongside the existing "Show All" and "Racks Only" buttons. Clicking it downloads all matching search results as a CSV file.

Exported columns: Data Center, Cabinet, Device Label, Device Type, Serial No, Asset Tag, Primary IP, Owner, Status.

Fixes #1386

Adds an Export CSV button to search results that downloads all matching
devices as a CSV file with columns: Data Center, Cabinet, Device Label,
Device Type, Serial No, Asset Tag, Primary IP, Owner, Status.

Fixes opendcim#1386
@wilpig
Copy link
Collaborator

wilpig commented Feb 10, 2026 via email

@lacatoire
Copy link
Author

Good point! The existing Search/Export by Data Center (search_export.php) is great for browsing
devices per data center, but it doesn't support the same search filters as the search page (owner,
tags, IP, serial, asset tag, etc.).

The original request in #1386 came from a use case where the report didn't quite fit — for example,
finding empty racks owned by a specific owner. The idea here is to let users export exactly what
they searched for, as a complement to the existing report.

Happy to discuss if you think there's a better way to approach this!

@wilpig
Copy link
Collaborator

wilpig commented Feb 12, 2026

https://dev.opendcim.org/search_export.php

Using the existing report and your example.
Screenshot 2026-02-12 at 11 17 36 AM

We have a single property filter here that works the exact same as the search function, I think the only thing missing here are the rack objects themselves. This already has an export function for csv, excel and pdf. Personally I think the best approach would be to modify this to add in the racks. If you would like to modify the other search page and we can find a way to link those search results over to this report and pre-populate the search term that would be ideal.

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.

Export search results

2 participants