diff --git a/executor/internal/services/TaskBuilder.go b/executor/internal/services/TaskBuilder.go
index 64deb28..67fbf57 100644
--- a/executor/internal/services/TaskBuilder.go
+++ b/executor/internal/services/TaskBuilder.go
@@ -20,7 +20,7 @@ func BuildTask(er ExecRequest) (input.Task, error) {
case LanguageGo:
image = "golang:1.19"
case LanguageJava:
- image = "maven:3.9.9-amazoncorretto-21"
+ image = "ghcr.io/mathisburger/cc-images-java:latest"
default:
return input.Task{}, errors.New("invalid language")
}
diff --git a/web/app/layout.tsx b/web/app/layout.tsx
index 925ac79..ca1439d 100644
--- a/web/app/layout.tsx
+++ b/web/app/layout.tsx
@@ -58,7 +58,7 @@ export default function RootLayout({
)}
- {children}
+ {children}
diff --git a/web/app/my-groups/page.tsx b/web/app/my-groups/page.tsx
index 7344bf5..9123c5e 100644
--- a/web/app/my-groups/page.tsx
+++ b/web/app/my-groups/page.tsx
@@ -6,16 +6,22 @@ import useApiServiceClient from "@/hooks/useApiServiceClient";
import useClientQuery from "@/hooks/useClientQuery";
import {useState} from "react";
import CreateGroupModal from "@/components/group/CreateGroupModal";
+import useCurrentUser from "@/hooks/useCurrentUser";
+import { isGranted } from "@/service/auth";
+import { UserRoles } from "@/service/types/usernator";
const GroupsPage = () => {
const api = useApiServiceClient();
const [groups] = useClientQuery(() => api.getMyGroups());
const [createModalOpen, setCreateModalOpen] = useState(false);
+ const {user} = useCurrentUser();
return (
My Groups
-
+ {isGranted(user, [UserRoles.Tutor, UserRoles.Admin]) && (
+
+ )}
{createModalOpen && (
setCreateModalOpen(false)} />
diff --git a/web/app/solutions/[id]/page.tsx b/web/app/solutions/[id]/page.tsx
index bc84ebd..3412703 100644
--- a/web/app/solutions/[id]/page.tsx
+++ b/web/app/solutions/[id]/page.tsx
@@ -6,7 +6,7 @@ import { AssignmentLanguage, Solution } from "@/service/types/tasky";
import CentralLoading from "@/components/CentralLoading";
import JobResultDisplay from "@/components/JobResultDisplay";
import useCurrentUser from "@/hooks/useCurrentUser";
-import { useState } from "react";
+import {useEffect, useState} from "react";
import { isGranted } from "@/service/auth";
import { UserRoles } from "@/service/types/usernator";
import ExecutorUIDisplay from "@/components/solution/ExecutorUIDisplay";
@@ -15,6 +15,9 @@ import NavigateBack from "@/components/NavigateBack";
import FileStructureDisplay from "@/components/FileStructureDisplay";
import QuestionAnswersDisplay from "@/components/solution/questions/QuestionAnswersDisplay";
+// Every 30s
+const REFETCH_INTERVAL = 1000 * 30;
+
const SolutionDetailsPage = ({ params }: { params: { id: string } }) => {
const id = parseInt(`${params.id}`, 10);
const api = useApiServiceClient();
@@ -23,6 +26,22 @@ const SolutionDetailsPage = ({ params }: { params: { id: string } }) => {
const [solution, refetch] = useClientQuery(() =>
api.getSolution(id),
);
+
+ useEffect(() => {
+ const fetcher = async () => {
+ if (solution?.job && solution.job.execution.length > 0) {
+ const exec = solution.job.execution[0];
+ if (exec.error === null && exec.result === null && exec.state === "RUNNING") {
+ setTimeout(() => {
+ refetch();
+ fetcher();
+ }, REFETCH_INTERVAL);
+ }
+ }
+ };
+ fetcher();
+ }, [solution]);
+
console.log(solution);
const approve = async () => {
await api.approveSolution(id);