Skip to content

feat: add Import/Export/delete functionality for device management #875

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

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

T0biii
Copy link
Member

@T0biii T0biii commented Apr 6, 2025

image

Introduces a new ImportExportDelete component that allows users to export device data as a JSON file and import devices from a JSON file and also delete all there devices. The component is integrated into the Navigation menu for all users.

Current Problems:

  • On Delete or Import the UI Only Updates after a "long" time when the autorefresh hits currently i was unable to find a way to autorefresh manuel on import or delete but basically it works

T0biii added 11 commits April 6, 2025 01:37
Introduces a new ImportExport component that allows users to export device data as a JSON file and import devices from a JSON file. The component is integrated into the Navigation menu for admin users.
Refactors the device listing method to use `listDevices` instead of `list`, and updates the import logic to handle `presharedKey` correctly. This improves the functionality of the ImportExport component for device management.
Introduces the ImportExportDelete component, which allows users to export device data as a JSON file, import devices from a JSON file, and delete all devices. This component is integrated into the Navigation menu, enhancing the device management capabilities.
…ortDelete component

Updated the delete all devices functionality to use a confirmation dialog and improved error handling. The confirmation message now specifies that the action cannot be undone, and the deletion process has been streamlined for better user feedback.
Enhanced the ImportExportDelete component by importing the confirmation dialog functionality, preparing for improved user interactions during export and delete operations.
Replaced the device listing method from `listAllDevices` to `listDevices` in the handleDeleteAll function of the ImportExportDelete component, ensuring accurate device retrieval during deletion operations.
Enhanced the GlobalAppState to include a refreshDevices method, allowing components to register a refresh function. Updated the Devices component to set this function on mount, and modified the ImportExportDelete component to trigger refresh after successful import and deletion operations. Integrated the refresh function into the Navigation component for improved device management.
Copy link

mergeable bot commented Apr 6, 2025

Thanks for creating a pull request! A maintainer will review your changes shortly. Please don't be discouraged if it takes a while.

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.

1 participant