Skip to content

fix: Add 'Delete only from DB' option for duplicate detected scripts#303

Merged
michelroegl-brunner merged 1 commit intomainfrom
fix/289
Nov 10, 2025
Merged

fix: Add 'Delete only from DB' option for duplicate detected scripts#303
michelroegl-brunner merged 1 commit intomainfrom
fix/289

Conversation

@michelroegl-brunner
Copy link
Copy Markdown
Member

Problem

Users can have duplicate detected script entries (same container_id and server_id) in the database. Currently, for SSH scripts with container_id, the only option is "Destroy" which destroys the actual container. Users need a way to delete just the database record to clean up duplicates without destroying the host/container.

Solution

Add a "Delete only from DB" option in the Actions dropdown menu for detected scripts (SSH scripts with container_id) that:

  • Only deletes the database record
  • Does NOT destroy the container
  • Uses a clear confirmation modal to distinguish it from "Destroy"

Changes

  • Added "Delete only from DB" menu item in Actions dropdown for SSH scripts with container_id
  • Placed option after "Destroy" with separator to distinguish from destructive action
  • Updated handleDeleteScript to use confirmation modal for SSH scripts
  • Modal clearly states it only deletes database record, container remains intact
  • Allows users to clean up duplicate script entries without destroying containers

Testing

  • Verify Delete only removes the database record
  • Verify Destroy still works as before (destroys container + deletes record)
  • Verify duplicate scripts can be cleaned up without affecting containers
  • Verify deleted scripts can be re-detected via auto-detect feature

- Add 'Delete only from DB' option in Actions dropdown for SSH scripts with container_id
- Place option after 'Destroy' with separator to distinguish from destructive action
- Update handleDeleteScript to use confirmation modal for SSH scripts
- Modal clearly states it only deletes database record, container remains intact
- Allows users to clean up duplicate script entries without destroying containers
- Fixes issue where duplicates could only be removed by destroying the host
@michelroegl-brunner michelroegl-brunner requested a review from a team as a code owner November 10, 2025 14:35
@michelroegl-brunner michelroegl-brunner linked an issue Nov 10, 2025 that may be closed by this pull request
@michelroegl-brunner michelroegl-brunner merged commit 09868ba into main Nov 10, 2025
4 checks passed
@michelroegl-brunner michelroegl-brunner deleted the fix/289 branch November 13, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup duplicated detected scripts

1 participant