diff options
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java index 19ce1429..d5202f4b 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java @@ -57,6 +57,8 @@ public class ImageUploadPage extends ImageUploadPageLayout { "vmx"); private final FileNameExtensionFilter vboxFilter = new FileNameExtensionFilter( "VirtualBox Virtual Machine", "vbox"); + private final FileNameExtensionFilter qemuFilter = new FileNameExtensionFilter( + "QEMU Virtual Machine", "xml"); private final FileNameExtensionFilter ovfFilter = new FileNameExtensionFilter( "OVF Virtual Machine Format", "ovf"); @@ -96,7 +98,7 @@ public class ImageUploadPage extends ImageUploadPageLayout { // initialize allSupportedFilter depending on whether multiple hypervisors // are supported or not if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS)) { - allSupportedFilter = new FileNameExtensionFilter("All Supported", "vmx", "ovf", "vbox", "ova"); + allSupportedFilter = new FileNameExtensionFilter("All Supported", "vmx", "ovf", "vbox", "xml", "ova"); } else { allSupportedFilter = new FileNameExtensionFilter("All Supported", "vmx", "ovf", "ova"); } @@ -111,6 +113,7 @@ public class ImageUploadPage extends ImageUploadPageLayout { fc.addChoosableFileFilter(ovaFilter); if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS)) { fc.addChoosableFileFilter(vboxFilter); + fc.addChoosableFileFilter(qemuFilter); } fc.addChoosableFileFilter(allSupportedFilter); fc.setFileFilter(allSupportedFilter); @@ -120,6 +123,8 @@ public class ImageUploadPage extends ImageUploadPageLayout { fc.setFileFilter(vmxFilter); } else if (existingImage.virtId.equals(TConst.VIRT_VIRTUALBOX)) { fc.setFileFilter(vboxFilter); + } else if (existingImage.virtId.equals(TConst.VIRT_QEMU)) { + fc.setFileFilter(qemuFilter); } } |