-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
123 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
backend/app/src/main/java/com/ugent/pidgeon/model/json/DockerTestFeedbackJson.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ugent.pidgeon.model.json; | ||
|
||
|
||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import com.ugent.pidgeon.postgre.models.types.DockerTestType; | ||
|
||
@JsonSerialize(using = DockerTestFeedbackJsonSerializer.class) | ||
public record DockerTestFeedbackJson( | ||
DockerTestType type, | ||
String feedback, | ||
boolean allowed | ||
) { | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
backend/app/src/main/java/com/ugent/pidgeon/model/json/DockerTestFeedbackJsonSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.ugent.pidgeon.model.json; | ||
import com.fasterxml.jackson.core.JsonGenerator; | ||
import com.fasterxml.jackson.databind.JsonSerializer; | ||
import com.fasterxml.jackson.databind.SerializerProvider; | ||
import com.ugent.pidgeon.postgre.models.types.DockerTestType; | ||
import java.io.IOException; | ||
|
||
public class DockerTestFeedbackJsonSerializer extends JsonSerializer<DockerTestFeedbackJson> { | ||
|
||
@Override | ||
public void serialize(DockerTestFeedbackJson value, JsonGenerator gen, SerializerProvider serializers) throws IOException { | ||
gen.writeStartObject(); | ||
gen.writeStringField("type", value.type().toString()); | ||
if (value.type() == DockerTestType.TEMPLATE) { | ||
gen.writeFieldName("feedback"); | ||
gen.writeRawValue(value.feedback().replace("\n", "\\n")); | ||
} else { | ||
gen.writeStringField("feedback", value.feedback()); | ||
} | ||
gen.writeBooleanField("allowed", value.allowed()); | ||
gen.writeEndObject(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
backend/app/src/main/java/com/ugent/pidgeon/postgre/models/types/DockerTestType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.ugent.pidgeon.postgre.models.types; | ||
|
||
public enum DockerTestType { | ||
SIMPLE, | ||
TEMPLATE, | ||
NONE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
backend/app/tmp/dockerTestOutput1714216839420/artifacts/HelloWorld
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
backend/app/tmp/dockerTestOutput1714216889818/artifacts/HelloWorld
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
backend/app/tmp/dockerTestOutput1714216912989/artifacts/HelloWorld
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
backend/app/tmp/dockerTestOutput1714216961554/artifacts/HelloWorld
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
backend/app/tmp/dockerTestOutput1714224774160/input/helloworld.txt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
backend/app/tmp/dockerTestOutput1714224808414/input/helloworld.txt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
backend/app/tmp/dockerTestOutput1714224826998/input/helloworld.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.