diff --git a/app/(customer)/dashboard/(admin)/agents/[agentId]/page.tsx b/app/(customer)/dashboard/(admin)/agents/[agentId]/page.tsx index 155d8adb..39e970fa 100644 --- a/app/(customer)/dashboard/(admin)/agents/[agentId]/page.tsx +++ b/app/(customer)/dashboard/(admin)/agents/[agentId]/page.tsx @@ -38,7 +38,6 @@ export default async function RoutePage(props: PageParams<{ agentId: string }>) // const databaseId = 'db-123'; // - console.log("agent",agent) diff --git a/app/(customer)/dashboard/(organization)/projects/[projectId]/database/[databaseId]/page.tsx b/app/(customer)/dashboard/(organization)/projects/[projectId]/database/[databaseId]/page.tsx index e53aa016..f8834372 100644 --- a/app/(customer)/dashboard/(organization)/projects/[projectId]/database/[databaseId]/page.tsx +++ b/app/(customer)/dashboard/(organization)/projects/[projectId]/database/[databaseId]/page.tsx @@ -86,17 +86,21 @@ export default async function RoutePage(props: PageParams<{ return (
- + {capitalizeFirstLetter(dbItem.name)} - - - - +
+
+ + + +
+
+ +
+
- - -
+ {dbItem.description && ( {dbItem.description} )} diff --git a/app/(customer)/dashboard/(organization)/projects/[projectId]/edit/page.tsx b/app/(customer)/dashboard/(organization)/projects/[projectId]/edit/page.tsx index 0808e643..5cd2bf72 100644 --- a/app/(customer)/dashboard/(organization)/projects/[projectId]/edit/page.tsx +++ b/app/(customer)/dashboard/(organization)/projects/[projectId]/edit/page.tsx @@ -45,7 +45,6 @@ export default async function RoutePage(props: PageParams<{ projectId: string }> ) // .filter((db) => db.project !== null) as DatabaseWith[]; - console.log("ici34",availableDatabases); return ( diff --git a/app/(customer)/dashboard/(organization)/projects/new/page.tsx b/app/(customer)/dashboard/(organization)/projects/new/page.tsx index ea69db09..76817be6 100644 --- a/app/(customer)/dashboard/(organization)/projects/new/page.tsx +++ b/app/(customer)/dashboard/(organization)/projects/new/page.tsx @@ -35,7 +35,6 @@ export default async function RoutePage(props: PageParams<{ }>) { if (!org) notFound(); - console.log("ici",availableDatabases) return ( diff --git a/app/(customer)/dashboard/(organization)/statistics/page.tsx b/app/(customer)/dashboard/(organization)/statistics/page.tsx index 109ee54a..2576ae24 100644 --- a/app/(customer)/dashboard/(organization)/statistics/page.tsx +++ b/app/(customer)/dashboard/(organization)/statistics/page.tsx @@ -45,7 +45,6 @@ export default async function RoutePage(props: PageParams<{}>) { }); - console.log("evolution",backupsEvolution); // const tomorrow = new Date(); // tomorrow.setDate(tomorrow.getDate() + 1); diff --git a/app/(customer)/dashboard/profile/page.tsx b/app/(customer)/dashboard/profile/page.tsx index 2e754796..b7ede42f 100644 --- a/app/(customer)/dashboard/profile/page.tsx +++ b/app/(customer)/dashboard/profile/page.tsx @@ -10,7 +10,6 @@ import {getAccounts, getSessions} from "@/lib/auth/auth"; export default async function RoutePage(props: PageParams<{}>) { const user = await currentUser(); - console.log("my user",user); if (!user) { return notFound(); } diff --git a/app/api/agent/[agentId]/restore/route.ts b/app/api/agent/[agentId]/restore/route.ts index cc9528c6..7e98d57a 100644 --- a/app/api/agent/[agentId]/restore/route.ts +++ b/app/api/agent/[agentId]/restore/route.ts @@ -26,7 +26,6 @@ export async function POST( const body: BodyResultRestore = await request.json(); console.log(body) - console.log(agentId) if (!isUuidv4(body.generatedId)) { diff --git a/app/api/agent/[agentId]/status/helpers.ts b/app/api/agent/[agentId]/status/helpers.ts index f40476b7..604ae9b1 100644 --- a/app/api/agent/[agentId]/status/helpers.ts +++ b/app/api/agent/[agentId]/status/helpers.ts @@ -48,8 +48,6 @@ export async function handleDatabases(body: Body, agent: Agent, lastContact: Dat {status: 500} ); } - console.log(db) - console.log(dbmsEnumSchema.parse(db.dbms)) const [databaseCreated] = await dbClient .insert(drizzleDb.schemas.database) .values({ diff --git a/src/components/wrappers/dashboard/backup/backup-button/backup-button.tsx b/src/components/wrappers/dashboard/backup/backup-button/backup-button.tsx index b2c88cb9..1aa702c9 100644 --- a/src/components/wrappers/dashboard/backup/backup-button/backup-button.tsx +++ b/src/components/wrappers/dashboard/backup/backup-button/backup-button.tsx @@ -1,12 +1,14 @@ "use client"; -import { useRouter } from "next/navigation"; +import {useRouter} from "next/navigation"; -import { useMutation } from "@tanstack/react-query"; -import { toast } from "sonner"; +import {useMutation} from "@tanstack/react-query"; +import {toast} from "sonner"; -import { backupButtonAction } from "@/components/wrappers/dashboard/backup/backup-button/backup-button.action"; -import { ButtonWithLoading } from "@/components/wrappers/common/button/button-with-loading"; +import {backupButtonAction} from "@/components/wrappers/dashboard/backup/backup-button/backup-button.action"; +import {ButtonWithLoading} from "@/components/wrappers/common/button/button-with-loading"; +import {Database, DatabaseZap} from "lucide-react"; +import {useIsMobile} from "@/hooks/use-mobile"; export type BackupButtonProps = { databaseId: string; @@ -15,6 +17,8 @@ export type BackupButtonProps = { export const BackupButton = (props: BackupButtonProps) => { const router = useRouter(); + const isMobile = useIsMobile() + const mutation = useMutation({ mutationFn: async (databaseId: string) => { const backup = await backupButtonAction(databaseId); @@ -32,8 +36,9 @@ export const BackupButton = (props: BackupButtonProps) => { return ( } disabled={props.disable} - text="Backup" + text={isMobile ? "" : "Backup"} isPending={mutation.isPending} size={"default"} onClick={async () => { diff --git a/src/components/wrappers/dashboard/database/database-form/database-form.tsx b/src/components/wrappers/dashboard/database/database-form/database-form.tsx index d9fb4395..fab0c38f 100644 --- a/src/components/wrappers/dashboard/database/database-form/database-form.tsx +++ b/src/components/wrappers/dashboard/database/database-form/database-form.tsx @@ -58,7 +58,6 @@ export const DatabaseForm = (props: DatabaseFormProps) => { form={form} className="flex flex-col gap-4 mt-3" onSubmit={async (values) => { - console.log("sssssss"); await mutation.mutateAsync(values); }} > diff --git a/src/components/wrappers/dashboard/database/retention-policy/retention-policy-sheet.tsx b/src/components/wrappers/dashboard/database/retention-policy/retention-policy-sheet.tsx index 1d050eb7..01bc3258 100644 --- a/src/components/wrappers/dashboard/database/retention-policy/retention-policy-sheet.tsx +++ b/src/components/wrappers/dashboard/database/retention-policy/retention-policy-sheet.tsx @@ -1,6 +1,6 @@ import {Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger} from "@/components/ui/sheet"; import {Button} from "@/components/ui/button"; -import {Database, DatabaseZap} from "lucide-react"; +import {Database, Ruler} from "lucide-react"; import {DatabaseWith as DbSchema, RetentionPolicy} from "@/db/schema/07_database"; import { BackupRetentionSettingsForm @@ -15,7 +15,7 @@ export const RetentionPolicySheet = ({database}: RetentionPolicySheetProps) => { > => { try { const newUserList = parsedInput.data.users; - console.log(parsedInput); const organization = await db.query.organization.findFirst({ where: eq(drizzleDb.schemas.organization.id, parsedInput.organizationId), with: { diff --git a/src/components/wrappers/dashboard/profile/user-form/user-form.tsx b/src/components/wrappers/dashboard/profile/user-form/user-form.tsx index 7cdba330..081f13dc 100644 --- a/src/components/wrappers/dashboard/profile/user-form/user-form.tsx +++ b/src/components/wrappers/dashboard/profile/user-form/user-form.tsx @@ -42,8 +42,6 @@ export const UserForm = (props: UserFormProps) => { const mutation = useMutation({ mutationFn: async (values: UserType) => { - console.log("values", values); - console.log(props.userId); const updateUser = await updateUserAction({ id: props.userId ?? "-", data: values, diff --git a/src/components/wrappers/dashboard/projects/project-form/project-form.tsx b/src/components/wrappers/dashboard/projects/project-form/project-form.tsx index 96c283f8..438f1661 100644 --- a/src/components/wrappers/dashboard/projects/project-form/project-form.tsx +++ b/src/components/wrappers/dashboard/projects/project-form/project-form.tsx @@ -47,7 +47,6 @@ export const ProjectForm = (props: projectFormProps) => { const mutation = useMutation({ mutationFn: async (values: ProjectType) => { - console.log(values); if (!isCreate && !props.projectId) { throw new Error("Project ID is required for updates"); } diff --git a/src/features/dashboard/backup/columns.tsx b/src/features/dashboard/backup/columns.tsx index dae1463d..815d8290 100644 --- a/src/features/dashboard/backup/columns.tsx +++ b/src/features/dashboard/backup/columns.tsx @@ -46,7 +46,7 @@ export function backupColumns(isAlreadyRestore: boolean, settings: Setting, data {row.original.deletedAt != null && ( -

{formatFrenchDate(row.getValue("deletedAt"))}

+

{formatFrenchDate(row.original.deletedAt)}

)} @@ -58,13 +58,6 @@ export function backupColumns(isAlreadyRestore: boolean, settings: Setting, data accessorKey: "id", header: "Reference", }, - // { - // accessorKey: "deletedAt", - // header: "Deleted At", - // cell: ({row}) => { - // return row.original.deletedAt ? formatFrenchDate(row.getValue("deletedAt")) : "-" - // }, - // }, { accessorKey: "createdAt", header: "Created At", diff --git a/src/utils/init.ts b/src/utils/init.ts index 59173a6b..1fe275f7 100644 --- a/src/utils/init.ts +++ b/src/utils/init.ts @@ -65,12 +65,14 @@ async function createDefaultOrganization() { function consoleAscii() { console.log( - "\n" + - " ____ __ __ _____ \n" + - " / __ \\ ____ _____ / /_ ____ _ / /_ ____ _ _____ ___ / ___/ ___ _____ _ __ ___ _____\n" + - " / /_/ // __ \\ / ___// __// __ // __ \\ / __ // ___// _ \\ \\__ \\ / _ \\ / ___/| | / // _ \\ / ___/\n" + - " / ____// /_/ // / / /_ / /_/ // /_/ // /_/ /(__ )/ __/ ___/ // __// / | |/ // __// / \n" + - "/_/ \\____//_/ \\__/ \\__,_//_.___/ \\__,_//____/ \\___/ /____/ \\___//_/ |___/ \\___//_/ \n" + - " \n" - ); + " \n" + + " ____ __ __ \n" + + " / __ \\____ _____/ /_____ _/ /_ ____ _________ \n" + + " / /_/ / __ \\/ ___/ __/ __ / __ \\/ __ / ___/ _ \\ \n" + + " / ____/ /_/ / / / /_/ /_/ / /_/ / /_/ (__ ) __/ \n" + + " /_/ \\____/_/ \\__/\\__,_/_.___/\\__,_/____/\\___/ \n" + + " \n" + + ` Community Edition v${env.NEXT_PUBLIC_PROJECT_VERSION} \n ` + + " \n" + ) }