summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx
diff options
context:
space:
mode:
authorralph isenmann2021-02-15 13:27:41 +0100
committerralph isenmann2021-02-15 14:37:34 +0100
commit54bfa7702e9bbacc128f0bc5b68153da823a87e3 (patch)
treee78d61586db477a5619544b665553f9ad8486e4a /dozentenmodul/src/main/java/org/openslx
parent[client] Update ImageCreation for Container Images workflow (diff)
downloadtutor-module-54bfa7702e9bbacc128f0bc5b68153da823a87e3.tar.gz
tutor-module-54bfa7702e9bbacc128f0bc5b68153da823a87e3.tar.xz
tutor-module-54bfa7702e9bbacc128f0bc5b68153da823a87e3.zip
[client] Update Language Tags (i18n)
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java1
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java13
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java27
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java16
4 files changed, 27 insertions, 30 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java
index 7c76d870..61fdb049 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java
@@ -17,6 +17,7 @@ public enum I18n {
GUI("gui"),
PAGE("page"),
PAGE_LAYOUT("page_layout"),
+ PANEL("panel"),
THRIFT("thrift"),
WINDOW("window"),
WINDOW_LAYOUT("window_layout"),
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java
index 53b3e199..d4e49fe6 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/panel/ContainerPanel.java
@@ -43,7 +43,9 @@ public class ContainerPanel extends JPanel {
GridManager grdContainerMeta = new GridManager(pnlContainerMeta, 3);
lblContainerRunOpt = new QLabel(
- I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.ContainerRunOptions.text"));
+ I18n.PANEL.getString("ContainerPanel.ContainerStartOptions.label"));
+ lblContainerRunOpt.setToolTipText(
+ I18n.PANEL.getString("ContainerPanel.ContainerStartOptions.tooltip"));
grdContainerMeta.add(lblContainerRunOpt);
txtContainerRun = new JTextField();
grdContainerMeta.add(txtContainerRun, 2).fill(true, false).expand(true, false);
@@ -55,7 +57,8 @@ public class ContainerPanel extends JPanel {
GridManager grdContainer = new GridManager(this, 2, false, new Insets(8, 2, 8, 2));
- lblContainerImageName = new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.ImageName.text"));
+ lblContainerImageName = new QLabel(
+ I18n.PANEL.getString("ContainerPanel.Label.ImageName.text"));
grdContainer.add(lblContainerImageName);
txtContainerImageName = new JTextField();
grdContainer.add(txtContainerImageName, 1).fill(true, false).expand(true, false);
@@ -114,7 +117,7 @@ public class ContainerPanel extends JPanel {
private void initImageDetails() {
- // currently do not allow user to change the Dockerfile in the suite.
+ // currently do not allow user to change the Dockerfile in the suite.
txtContainerRecipe.setEnabled(false);
lblContainerRunOpt.setVisible(false);
txtContainerRun.setVisible(false);
@@ -129,7 +132,9 @@ public class ContainerPanel extends JPanel {
}
public void addToChangeMonitor(DialogChangeMonitor changeMonitor) {
- changeMonitor.add(txtContainerRecipe);
+ changeMonitor.add(txtContainerRecipe)
+ .addConstraint(new DialogChangeMonitor.TextNotEmptyConstraint(
+ "ContainerPanel.Constraint.NoEmptyDockerfile.text"));
changeMonitor.add(txtContainerRun);
changeMonitor.add(bindMountConfigurator);
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java
index 57eed300..bd49a500 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java
@@ -35,7 +35,8 @@ public class ContainerUploadPageLayout extends WizardPage {
JPanel p1 = new JPanel();
p1.setVisible(true);
GridManager g1 = new GridManager(p1, 3, true, new Insets(5, 0, 5, 0));
- QLabel imageFileCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.DockerFile.label"));
+ QLabel imageFileCaption = new QLabel(
+ I18n.PAGE_LAYOUT.getString("ContainerUploadPage.DockerFile.label"));
txtImageFile = new JTextField();
txtImageFile.setEditable(false);
btnBrowseForImage = new JButton(I18n.PAGE_LAYOUT.getString("ImageUpload.Button.browseForImage.text"));
@@ -49,11 +50,11 @@ public class ContainerUploadPageLayout extends WizardPage {
p2.setVisible(false);
GridManager g2 = new GridManager(p2, 2, true, new Insets(5, 0, 5, 0));
QLabel lblGitRepo = new QLabel(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.GitRepository.label"));
- lblGitRepo.setToolTipText(I18n.PAGE_LAYOUT.getString(
- "ContainerUploadPage.GitRepository.toolTipText"));
+ lblGitRepo.setToolTipText(
+ I18n.PAGE_LAYOUT.getString("ContainerUploadPage.GitRepository.toolTipText"));
txtGitRepo = new JTextField();
- txtGitRepo.setToolTipText(I18n.PAGE_LAYOUT.getString(
- "ContainerUploadPage.GitRepository.toolTipText"));
+ txtGitRepo.setToolTipText(
+ I18n.PAGE_LAYOUT.getString("ContainerUploadPage.GitRepository.toolTipText"));
g2.add(lblGitRepo);
g2.add(txtGitRepo).fill(true, false).expand(true, false);
g2.finish(false);
@@ -68,30 +69,24 @@ public class ContainerUploadPageLayout extends WizardPage {
// Start as with Dockerfile as input!
tpInput.setSelectedIndex(0);
- lblImageName = new QLabel(I18n.PAGE_LAYOUT.getString(
- "ContainerUploadPage.ImageName.text"));
+ lblImageName = new QLabel(I18n.PANEL.getString("ContainerPanel.Label.ImageName.text"));
txtImageName = new JTextField();
grid.add(lblImageName);
grid.add(txtImageName, 2, 1).fill(true, false).expand(true, false);
grid.nextRow();
// -- Software license changed - shown only in UploadWizard --
- chkLicenseRestricted = new JCheckBox(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.CheckBox.ContainsLicenseRestricted.text"));
+ chkLicenseRestricted = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("ContainerUploadPage.CheckBox.ContainsLicenseRestricted.text"));
chkLicenseRestricted.setVisible(false);
grid.skip();
grid.add(chkLicenseRestricted, 2, 1).fill(false, false).expand(true, false);
grid.nextRow();
-// lblContainerRun = new QLabel(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ContainerStartOptions.label"));
-// lblContainerRun.setToolTipText(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ContainerStartOptions.tooltip"));
-// txtContainerRun = new JTextField();
-// grid.add(lblContainerRun);
-// grid.add(txtContainerRun, 2, 1).fill(true, false).expand(true, false);
-// grid.nextRow();
-
grid.add(Box.createVerticalGlue(), 3).expand(true, true);
txtInfoText = new JTextArea();
- txtInfoText.setBorder(BorderFactory.createTitledBorder(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.Infobox.label")));
+ txtInfoText.setBorder(BorderFactory.createTitledBorder(
+ I18n.PAGE_LAYOUT.getString("ContainerUploadPage.Infobox.label")));
txtInfoText.setLineWrap(true);
txtInfoText.setWrapStyleWord(true);
txtInfoText.setEditable(false);
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 234e0a0e..ca39f170 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
@@ -40,15 +40,16 @@ public class ContainerUploadPage extends ContainerUploadPageLayout {
private final Logger LOGGER = Logger.getLogger(ContainerUploadPage.class);
- /**
- * Page for uploading an imagefile
- *
- * @param wizard
- */
+
private final UploadWizardState state;
private final ImageDetailsRead existingImage;
private final ContainerDefinition containerDefinition;
+ /**
+ * Page for uploading an Container Image
+ *
+ * @param wizard The wizard dialog in which this page is active.
+ */
public ContainerUploadPage(Wizard wizard, final UploadWizardState state) {
super(wizard);
this.containerDefinition = new ContainerDefinition();
@@ -206,11 +207,6 @@ public class ContainerUploadPage extends ContainerUploadPageLayout {
setWarningMessage(I18n.PAGE.getString("ContainerUploadPage.Warning.NoProperName"));
return false;
}
-
-// if (txtContainerRun.getText() == null || txtContainerRun.getText().isEmpty()) {
-// setWarningMessage(I18n.PAGE.getString("ContainerUploadPage.Warning.NoRunOptions"));
-// return false;
-// }
return true;
}