diff options
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java index 117ca324..c81af1a6 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java @@ -42,6 +42,7 @@ import org.openslx.dozmod.thrift.ThriftError; import org.openslx.dozmod.thrift.cache.ImagePublishedCache; import org.openslx.dozmod.thrift.cache.OrganizationCache; import org.openslx.dozmod.thrift.cache.UserCache; +import org.openslx.sat.thrift.version.Feature; import org.openslx.thrifthelper.TConst; import org.openslx.thrifthelper.ThriftManager; import org.openslx.util.QuickTimer; @@ -253,14 +254,16 @@ public class ImagePublishedWindow extends ImagePublishedWindowLayout implements final List<ImageSummaryRead> imagePublishedList = ImagePublishedCache.get(forceRefresh); if (imagePublishedList == null) return; - // TODO 04.2018: Safety check to hide the non-vmware images from the list + // 04.2018: Safety check to hide the non-vmware images from the list // in case they somehow manage to get published. Remove this when we // support publishing images from other hypervisors. - for (Iterator<ImageSummaryRead> iter = imagePublishedList.listIterator(); iter - .hasNext();) { - ImageSummaryRead current = iter.next(); - if (current != null && !current.virtId.equals(TConst.VIRT_VMWARE)) { - iter.remove(); + if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS)) { + for (Iterator<ImageSummaryRead> iter = imagePublishedList.listIterator(); iter + .hasNext();) { + ImageSummaryRead current = iter.next(); + if (current != null && !current.virtId.equals(TConst.VIRT_VMWARE)) { + iter.remove(); + } } } Gui.asyncExec(new Runnable() { |