feat(deploy): redeploy dialog with keep-data or fresh-deploy option
Add a confirmation modal when clicking Redeploy that lets the user choose:
- Keep Data: containers are recreated without wiping the instance directory.
NetBird database, peer configs, and encryption keys are preserved.
- Fresh Deploy: full undeploy (removes all data) then redeploy from scratch.
Backend changes:
- POST /customers/{id}/deploy accepts keep_data query param (default false)
- When keep_data=true, undeploy_customer is skipped entirely
- deploy_customer now reuses existing npm_proxy_id/stream_id when the
deployment record is still present (avoids duplicate NPM proxy entries)
- DNS record creation is skipped on keep_data redeploy (already exists)
Frontend changes:
- customerAction('deploy') opens the redeploy modal instead of calling API
- showRedeployModal(id) shows the two-option confirmation card dialog
- confirmRedeploy(keepData) calls the API with the correct parameter
- i18n keys added in en.json and de.json
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,17 @@
|
||||
"saveAndDeploy": "Save & Deploy",
|
||||
"saveChanges": "Save Changes"
|
||||
},
|
||||
"redeployModal": {
|
||||
"title": "Redeploy Customer",
|
||||
"intro": "How should",
|
||||
"intro2": "be redeployed?",
|
||||
"keepTitle": "Keep Data",
|
||||
"keepDesc": "Containers are stopped and restarted. The NetBird database, peer configurations, and encryption keys are preserved. Use this after a config change or image update.",
|
||||
"keepNote": "Peers stay connected after restart.",
|
||||
"freshTitle": "Fresh Deploy",
|
||||
"freshDesc": "All existing data is deleted — containers, volumes, config files, and the NetBird database. A completely new instance is created. All peers must re-enroll.",
|
||||
"freshNote": "All peer data is lost. Cannot be undone."
|
||||
},
|
||||
"deleteModal": {
|
||||
"title": "Confirm Deletion",
|
||||
"confirmText": "Are you sure you want to delete customer",
|
||||
|
||||
Reference in New Issue
Block a user