mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: standardize code formatting and improve component structure across dashboard components
- Updated component props formatting for consistency. - Refactored API query hooks and mutation calls for better readability. - Enhanced tooltip descriptions for clarity in user actions. - Maintained functionality for deploying, reloading, starting, and stopping applications, composes, and Postgres instances.
This commit is contained in:
@@ -33,7 +33,7 @@ export const ShowGeneralApplication = ({ applicationId }: Props) => {
|
||||
{
|
||||
applicationId,
|
||||
},
|
||||
{ enabled: !!applicationId }
|
||||
{ enabled: !!applicationId },
|
||||
);
|
||||
const { mutateAsync: update } = api.application.update.useMutation();
|
||||
const { mutateAsync: start, isLoading: isStarting } =
|
||||
@@ -68,7 +68,7 @@ export const ShowGeneralApplication = ({ applicationId }: Props) => {
|
||||
toast.success("Application deployed successfully");
|
||||
refetch();
|
||||
router.push(
|
||||
`/dashboard/project/${data?.projectId}/services/application/${applicationId}?tab=deployments`
|
||||
`/dashboard/project/${data?.projectId}/services/application/${applicationId}?tab=deployments`,
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -127,10 +127,7 @@ export const ShowGeneralApplication = ({ applicationId }: Props) => {
|
||||
</TooltipTrigger>
|
||||
<TooltipPrimitive.Portal>
|
||||
<TooltipContent sideOffset={5} className="z-[60]">
|
||||
<p>
|
||||
Reload the application when you change configuration or
|
||||
environment variables
|
||||
</p>
|
||||
<p>Reload the application without rebuilding it</p>
|
||||
</TooltipContent>
|
||||
</TooltipPrimitive.Portal>
|
||||
</Tooltip>
|
||||
|
||||
@@ -23,7 +23,7 @@ export const ComposeActions = ({ composeId }: Props) => {
|
||||
{
|
||||
composeId,
|
||||
},
|
||||
{ enabled: !!composeId }
|
||||
{ enabled: !!composeId },
|
||||
);
|
||||
const { mutateAsync: update } = api.compose.update.useMutation();
|
||||
const { mutateAsync: deploy } = api.compose.deploy.useMutation();
|
||||
@@ -47,7 +47,7 @@ export const ComposeActions = ({ composeId }: Props) => {
|
||||
toast.success("Compose deployed successfully");
|
||||
refetch();
|
||||
router.push(
|
||||
`/dashboard/project/${data?.project.projectId}/services/compose/${composeId}?tab=deployments`
|
||||
`/dashboard/project/${data?.project.projectId}/services/compose/${composeId}?tab=deployments`,
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -103,10 +103,7 @@ export const ComposeActions = ({ composeId }: Props) => {
|
||||
</TooltipTrigger>
|
||||
<TooltipPrimitive.Portal>
|
||||
<TooltipContent sideOffset={5} className="z-[60]">
|
||||
<p>
|
||||
Reload the compose when you change configuration or
|
||||
environment variables
|
||||
</p>
|
||||
<p>Reload the compose without rebuilding it</p>
|
||||
</TooltipContent>
|
||||
</TooltipPrimitive.Portal>
|
||||
</Tooltip>
|
||||
|
||||
@@ -25,7 +25,7 @@ export const ShowGeneralPostgres = ({ postgresId }: Props) => {
|
||||
{
|
||||
postgresId: postgresId,
|
||||
},
|
||||
{ enabled: !!postgresId }
|
||||
{ enabled: !!postgresId },
|
||||
);
|
||||
|
||||
const { mutateAsync: reload, isLoading: isReloading } =
|
||||
@@ -61,7 +61,7 @@ export const ShowGeneralPostgres = ({ postgresId }: Props) => {
|
||||
console.error("Deployment logs error:", error);
|
||||
setIsDeploying(false);
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -132,10 +132,7 @@ export const ShowGeneralPostgres = ({ postgresId }: Props) => {
|
||||
</TooltipTrigger>
|
||||
<TooltipPrimitive.Portal>
|
||||
<TooltipContent sideOffset={5} className="z-[60]">
|
||||
<p>
|
||||
Reload the PostgreSQL when you change configuration or
|
||||
environment variables
|
||||
</p>
|
||||
<p>Reload the PostgreSQL without rebuilding it</p>
|
||||
</TooltipContent>
|
||||
</TooltipPrimitive.Portal>
|
||||
</Tooltip>
|
||||
|
||||
Reference in New Issue
Block a user