summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page
diff options
context:
space:
mode:
authorralph isenmann2021-05-11 09:17:52 +0200
committerralph isenmann2021-05-11 09:17:52 +0200
commit568506424ab62dbc42198940451fb73d46407ff1 (patch)
tree6da72faf7b39e85d6284a696a86fcf4abd34a9c6 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page
parent[server] Fix NPE (diff)
downloadtutor-module-568506424ab62dbc42198940451fb73d46407ff1.tar.gz
tutor-module-568506424ab62dbc42198940451fb73d46407ff1.tar.xz
tutor-module-568506424ab62dbc42198940451fb73d46407ff1.zip
[client] Allow user to define container with Repository Image (directly from hub.docker)
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java
index b16a9785..7ff19882 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java
@@ -232,6 +232,12 @@ public class ContainerUploadPage extends ContainerUploadPageLayout {
ContainerBuildContextMethod method = getBuildContextMethod();
switch (method) {
+ case IMAGE_REPO:
+ if (txtImageRepo.getText() == null || txtImageRepo.getText().isEmpty()) {
+ setWarningMessage(I18n.PAGE.getString("ContainerUploadPage.Warning.NoImageRepo"));
+ return false;
+ }
+ break;
case FILE:
if (txtImageFile.getText() == null || txtImageFile.getText().isEmpty()) {
setWarningMessage(I18n.PAGE.getString("ContainerUploadPage.Warning.NoReceipt"));
@@ -270,6 +276,9 @@ public class ContainerUploadPage extends ContainerUploadPageLayout {
case FILE:
containerDefinition.setContainerRecipe(state.descriptionFile);
break;
+ case IMAGE_REPO:
+ containerMeta.setImageRepo(txtImageRepo.getText());
+ state.descriptionFile = getDummyFile();
case GIT_REPOSITORY:
containerMeta.setBuildContextUrl(txtGitRepo.getText());
state.descriptionFile = getDummyFile();