Daniel Erez has posted comments on this change. Change subject: [wip] frontend: add the import glance image support ......................................................................
Patch Set 2: (9 inline comments) .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/ImportExportImageModel.java Line 50: public List<EntityModel> getEntities() { Line 51: return entities; Line 52: } Line 53: Line 54: public void setEntities(List<EntityModel> entities) { maybe, getImportExportImages? Line 55: if (entities == this.entities) { Line 56: return; Line 57: } Line 58: this.entities = entities; Line 212: } Line 213: Line 214: protected void cancel() { Line 215: stopProgress(); Line 216: ((ListModel) getEntity()).setWindow(null); just invoke the 'cancelCommand' you've got from the listmodel instead. Line 217: } Line 218: Line 219: protected void dataCenter_SelectedItemChanged() { Line 220: updateStorageDomains(((StoragePool) getDataCenter().getSelectedItem()).getId()); .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageIsoListModel.java Line 149: Line 150: model.setTitle(ConstantsManager.getInstance().getConstants().downloadImagesTitle()); Line 151: model.setHashName("download_images"); //$NON-NLS-1$ Line 152: model.setEntity(this); Line 153: model.init((StorageDomain) getEntity(), repoImages); verify that null check isn't needed in any case Line 154: Line 155: UICommand cancelCommand = new UICommand("Cancel", this); //$NON-NLS-1$ Line 156: cancelCommand.setTitle(ConstantsManager.getInstance().getConstants().cancel()); Line 157: cancelCommand.setIsCancel(true); Line 161: } Line 162: Line 163: public void cancel() { Line 164: setWindow(null); Line 165: Frontend.Unsubscribe(); don't think it's needed here (have you subscribed any VdcQueryTypes?) Line 166: } Line 167: Line 168: private void updateActionAvailability() { Line 169: StorageDomain storageDomain = (StorageDomain) getEntity(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/storage/ImportExportImagePopupView.java Line 106: public String getText(Object image) { Line 107: if (image instanceof RepoImage) { Line 108: return ((RepoImage) image).getRepoImageTitle(); Line 109: } Line 110: return "(Unknown)"; //$NON-NLS-1$ localize Line 111: } Line 112: }, constants.fileNameIso()); Line 113: imageList.addEntityModelColumn(new EntityModelTextColumn<Object>() { Line 114: @Override Line 115: public String getText(Object image) { Line 116: if (image instanceof RepoImage) { Line 117: return ((RepoImage) image).getFileType().toString(); Line 118: } Line 119: return "(Unknown)"; //$NON-NLS-1$ same Line 120: } Line 121: }, constants.typeIso()); Line 122: imageList.addEntityModelColumn(new DiskSizeColumn<EntityModel>() { Line 123: @Override Line 152: if ("ImportExportEntities".equals(changedArgs.PropertyName) //$NON-NLS-1$ Line 153: && model.getEntities() != null) { Line 154: imageList.setRowData(model.getEntities()); Line 155: } Line 156: } formatter Line 157: }); Line 158: } Line 159: Line 160: @Override .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/storage/ImportExportImagePopupView.ui.xml Line 15: position: absolute; Line 16: width: 100%; Line 17: } Line 18: </ui:style> Line 19: tws Line 20: <d:SimpleDialogPanel width="540px" height="400px"> Line 21: <d:content> Line 22: <g:FlowPanel> Line 23: <e:ListModelListBoxEditor ui:field="dataCenterEditor" /> Line 27: <g:SimplePanel ui:field="imageListPanel" addStyleNames="{style.imageListPanel}" /> Line 28: </g:FlowPanel> Line 29: </d:content> Line 30: </d:SimpleDialogPanel> Line 31: tws -- To view, visit http://gerrit.ovirt.org/16083 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I084dadfd208255738140f093ffc8ec136f83d7f6 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches