diff options
| author | Jonathan Bauer | 2015-09-16 15:38:13 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2015-09-16 15:38:13 +0200 |
| commit | 3e57fdf44d225dfe36ae0e23b0bbe7e048f4d706 (patch) | |
| tree | 3abb6ac483d6a5bff41874542a36e86e4c756d10 /dozentenmodul/src/main/java | |
| parent | [client] done TODO: if SSL with masterserver is not available, ask him if he ... (diff) | |
| download | tutor-module-3e57fdf44d225dfe36ae0e23b0bbe7e048f4d706.tar.gz tutor-module-3e57fdf44d225dfe36ae0e23b0bbe7e048f4d706.tar.xz tutor-module-3e57fdf44d225dfe36ae0e23b0bbe7e048f4d706.zip | |
[client] ImageCreationWizard: in performFinish, check if any step fails and stop in that case
Diffstat (limited to 'dozentenmodul/src/main/java')
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java index ebf91974..32ec91ea 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java @@ -62,20 +62,33 @@ public class ImageCreationWizard extends Wizard implements UiFeedback { @Override public void performFinish() { - // TODO check status of each step and stop if something goes wrong // push image base to satellite - ThriftActions.updateImageBase(JOptionPane.getFrameForComponent(this), uploadWizardState.uuid, + boolean pushedBase = ThriftActions.updateImageBase(JOptionPane.getFrameForComponent(this), uploadWizardState.uuid, imageBaseWriteFromState()); - + if (!pushedBase) { + Gui.showMessageBox(this, "Konnte die Metadaten des Images nicht auf dem Satelliten speichern!", MessageType.ERROR, null, null); + return; + } // push permissions to satellite if we have custom permissions + boolean pushedPerms = false; if (uploadWizardState.permissionMap != null) { - ThriftActions.writeImagePermissions(JOptionPane.getFrameForComponent(this), + pushedPerms = ThriftActions.writeImagePermissions(JOptionPane.getFrameForComponent(this), uploadWizardState.uuid, uploadWizardState.permissionMap); + if (!pushedPerms) { + Gui.showMessageBox(this, "Konnte die Berechtigungen nicht auf dem Satelliten speichern!", MessageType.ERROR, null, null); + // TODO delete base image? + return; + } } // push version metadata to satellite - ThriftActions.updateImageVersion(JOptionPane.getFrameForComponent(this), + boolean pushedVersion = ThriftActions.updateImageVersion(JOptionPane.getFrameForComponent(this), uploadWizardState.transferInformation.getToken(), new ImageVersionWrite( uploadWizardState.isRestricted)); + if (!pushedVersion) { + Gui.showMessageBox(this, "Konnte die Metadaten der Version nicht auf dem Satelliten speichern!", MessageType.ERROR, null, null); + // TODO delete base image? + return; + } } /** |
