summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-05 22:25:53 +0200
committerSimon Rettberg2015-09-05 22:25:53 +0200
commit3832620f8a56ec82009843e014d37b5544a24e5d (patch)
tree4c7fac7f05deceafbea4ed65c05c491f0d20dec6 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java
parent[client] Fully async proxy detection (no more GUI freezes) (diff)
downloadtutor-module-3832620f8a56ec82009843e014d37b5544a24e5d.tar.gz
tutor-module-3832620f8a56ec82009843e014d37b5544a24e5d.tar.xz
tutor-module-3832620f8a56ec82009843e014d37b5544a24e5d.zip
[client] Change wording of upload wizard, refine cancel check
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java21
1 files changed, 12 insertions, 9 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 10bdab30..00890ad2 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
@@ -64,8 +64,8 @@ public class ImageCreationWizard extends Wizard implements UiFeedback {
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, imageBaseWriteFromState());
+ ThriftActions.updateImageBase(JOptionPane.getFrameForComponent(this), uploadWizardState.uuid,
+ imageBaseWriteFromState());
// push permissions to satellite if we have custom permissions
if (uploadWizardState.permissionMap != null) {
@@ -74,14 +74,15 @@ public class ImageCreationWizard extends Wizard implements UiFeedback {
}
// push version metadata to satellite
ThriftActions.updateImageVersion(JOptionPane.getFrameForComponent(this),
- uploadWizardState.transferInformation.getToken(),
- new ImageVersionWrite(uploadWizardState.isRestricted));
+ uploadWizardState.transferInformation.getToken(), new ImageVersionWrite(
+ uploadWizardState.isRestricted));
}
/**
* Checks the validity of the state
*
- * @return true if we have all the needed information in the state, false otherwise
+ * @return true if we have all the needed information in the state, false
+ * otherwise
*/
private boolean isStateValid() {
// debug purposes
@@ -144,11 +145,14 @@ public class ImageCreationWizard extends Wizard implements UiFeedback {
// build imageBaseWrite
return new ImageBaseWrite(uploadWizardState.name, uploadWizardState.description,
uploadWizardState.selectedOs.getOsId(), uploadWizardState.meta.getVirtualizer().getVirtId(),
- uploadWizardState.isTemplate, uploadWizardState.defaultPermissions, uploadWizardState.shareMode);
+ uploadWizardState.isTemplate, uploadWizardState.defaultPermissions,
+ uploadWizardState.shareMode);
}
@Override
protected boolean onCancelRequest() {
+ if (uploadWizardState.uuid == null)
+ return true;
boolean confirmed = Gui.showMessageBox(this, "Möchten Sie den Vorgang wirklich abbrechen?",
MessageType.QUESTION_YESNO, null, null);
if (confirmed) {
@@ -156,9 +160,8 @@ public class ImageCreationWizard extends Wizard implements UiFeedback {
@Override
public void fire() {
try {
- if (uploadWizardState.uuid != null)
- ThriftManager.getSatClient().deleteImageBase(Session.getSatelliteToken(),
- uploadWizardState.uuid);
+ ThriftManager.getSatClient().deleteImageBase(Session.getSatelliteToken(),
+ uploadWizardState.uuid);
} catch (TException e) {
LOGGER.debug("Error canceling upload on sat: ", e);
}