dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

feat: add alert when db is detected and allow to split into dedicated db service

Open DJKnaeckebrot opened this issue 1 year ago • 1 comments

This pull request includes several changes to apps/dokploy components and pages to enhance the user interface and functionality, particularly related to dropdown menus and database service alerts. The most important changes include importing new components, modifying existing components to use DropdownMenuItem, and adding alerts for database services.

Component Imports and Updates:

  • apps/dokploy/components/dashboard/compose/delete-compose.tsx: Added import for DropdownMenuItem and modified DeleteCompose to use DropdownMenuItem instead of Button. [1] [2]
  • apps/dokploy/components/dashboard/compose/update-compose.tsx: Added import for DropdownMenuItem and modified UpdateCompose to use DropdownMenuItem instead of Button. [1] [2]

Additional Props and Dynamic Text:

  • apps/dokploy/components/dashboard/project/add-database.tsx: Added dropdownItemName prop to AddDatabase component and used it to dynamically set the text in the dropdown menu item. [1] [2]

Page Enhancements:

  • apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx: Added imports for various UI components and icons, added a check for database services in the compose file, and displayed an alert if a database service is detected. Additionally, integrated AddDatabase into the dropdown menu. (apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsxR11-R28, apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsxL32-R56, apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsxR74, apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsxR89-R92, apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsxR125-R136, apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsxL221-R281)

This should fix https://github.com/orgs/Dokploy/projects/3/views/2?pane=issue&itemId=86318533&issue=Dokploy%7Cdokploy%7C187

image

image

DJKnaeckebrot avatar Dec 23 '24 11:12 DJKnaeckebrot

The "Add Database" reuses the AddDatabase Component used in the AddServices Dropdown

DJKnaeckebrot avatar Dec 23 '24 11:12 DJKnaeckebrot

We can close this since we added docker compose backups!

Siumauricio avatar May 04 '25 23:05 Siumauricio