forked from Place1/wg-access-server
-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
T0biii
wants to merge
11
commits into
master
Choose a base branch
from
add-export-import
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This reverts commit ea94556.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: