Alona Kaplan has uploaded a new change for review. Change subject: webadmin: removing port mirroring and custom props from vnic dialog ......................................................................
webadmin: removing port mirroring and custom props from vnic dialog Port mirroring and custom properties are now part of the profile and not the vnic. Change-Id: I4a597b7a99d5ca155f93d41bfe8148254f18e6cf Signed-off-by: Alona Kaplan <alkap...@redhat.com> --- M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.java M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.ui.xml M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/BaseEditVmInterfaceModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditTemplateInterfaceModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewTemplateInterfaceModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/popup/vm/VmNetworkInterfacePopupWidget.java M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/popup/vm/VmInterfacePopupView.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/vm/VmInterfacePopupView.java 12 files changed, 7 insertions(+), 251 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/75/17175/1 diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.java index 202736a..14070ee 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.java @@ -12,15 +12,10 @@ import org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor; import org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxEditor; import org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor; -import org.ovirt.engine.ui.common.widget.form.key_value.KeyValueWidget; import org.ovirt.engine.ui.common.widget.renderer.EnumRenderer; import org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer; import org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractModelBoundPopupWidget; import org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel; -import org.ovirt.engine.ui.uicompat.Event; -import org.ovirt.engine.ui.uicompat.EventArgs; -import org.ovirt.engine.ui.uicompat.IEventListener; -import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs; import com.google.gwt.core.client.GWT; import com.google.gwt.editor.client.SimpleBeanEditorDriver; @@ -58,8 +53,6 @@ String linkStateRadioContent(); String checkBox(); - - String portMirroringEditor(); } @UiField @@ -79,11 +72,6 @@ @Path("nicType.selectedItem") @WithElementId("nicType") ListModelListBoxEditor<Object> nicTypeEditor; - - @UiField - @Path("portMirroring.entity") - @WithElementId("portMirroring") - protected EntityModelCheckBoxEditor portMirroringEditor; @UiField(provided = true) @Path("enableMac.entity") @@ -140,10 +128,6 @@ @Ignore public Panel expanderContent; - @UiField - @Ignore - public KeyValueWidget customPropertiesSheetEditor; - private final Driver driver = GWT.create(Driver.class); public NetworkInterfacePopupWidget(EventBus eventBus, CommonApplicationConstants constants) { @@ -161,7 +145,6 @@ networkEditor.setLabel(constants.networkNetworkIntefacePopup()); nicTypeEditor.setLabel(constants.typeNetworkIntefacePopup()); enableManualMacCheckbox.setLabel(constants.specipyCustMacNetworkIntefacePopup()); - portMirroringEditor.setLabel(constants.portMirroringNetworkIntefacePopup()); cardStatusEditor.setLabel(constants.cardStatusNetworkInteface()); pluggedEditor.asRadioButton() @@ -214,7 +197,6 @@ driver.edit(iface); hideMacWhenNotEnabled(iface); - initCustomPropertySheet(iface); } private void hideMacWhenNotEnabled(VmInterfaceModel iface) { @@ -223,29 +205,6 @@ MACEditor.setVisible(false); macExample.setVisible(false); } - } - - private void initCustomPropertySheet(final VmInterfaceModel iface) { - iface.getCustomPropertySheet().getKeyValueLines().getItemsChangedEvent().addListener(new IEventListener() { - - @Override - public void eventRaised(Event ev, Object sender, EventArgs args) { - customPropertiesSheetEditor.edit(iface.getCustomPropertySheet()); - } - }); - - iface.getCustomPropertySheet().getPropertyChangedEvent().addListener(new IEventListener() { - @Override - public void eventRaised(Event ev, Object sender, EventArgs args) { - String propName = ((PropertyChangedEventArgs) args).PropertyName; - - // IsChangable - if ("IsChangable".equals(propName)) { //$NON-NLS-1$ - customPropertiesSheetEditor.setEnabled(false); - } - - } - }); } @Override @@ -263,7 +222,5 @@ unlinkedEditor.addContentWidgetStyleName(style.linkStateRadioContent()); enableManualMacCheckbox.addContentWidgetStyleName(style.checkBox()); - - portMirroringEditor.addContentWidgetStyleName(style.portMirroringEditor()); } } diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.ui.xml b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.ui.xml index 2454566..8b5bd66 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.ui.xml +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/networkinterface/NetworkInterfacePopupWidget.ui.xml @@ -67,16 +67,6 @@ width: 230px; } - .portMirroringEditor .gwt-CheckBox { - padding: 0px !important; - border-width: 0px !important; - } - - .portMirroringEditor { - width: 235px; - } - - </ui:style> <g:FlowPanel> @@ -101,9 +91,6 @@ </g:SimplePanel> <d:AdvancedParametersExpander ui:field="expander" addStyleNames="{style.expander}"/> <g:FlowPanel ui:field="expanderContent" addStyleNames="{style.expandedPanel}"> - <g:SimplePanel width="100%"> - <e:EntityModelCheckBoxEditor ui:field="portMirroringEditor" /> - </g:SimplePanel> <g:HorizontalPanel ui:field="cardStatusSelectionPanel" width="100%"> <e:ListModelListBoxEditor ui:field="cardStatusEditor" /> <g:SimplePanel addStyleNames="{style.contentWidget}"> @@ -113,9 +100,6 @@ </g:HorizontalPanel> </g:SimplePanel> </g:HorizontalPanel> - <g:FlowPanel> - <k:KeyValueWidget ui:field="customPropertiesSheetEditor"/> - </g:FlowPanel> </g:FlowPanel> </g:FlowPanel> </ui:UiBinder> diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/BaseEditVmInterfaceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/BaseEditVmInterfaceModel.java index 3974171..3eed441 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/BaseEditVmInterfaceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/BaseEditVmInterfaceModel.java @@ -15,7 +15,6 @@ import org.ovirt.engine.ui.uicommonweb.Cloner; import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider; import org.ovirt.engine.ui.uicommonweb.models.EntityModel; -import org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel; import org.ovirt.engine.ui.uicompat.ConstantsManager; public abstract class BaseEditVmInterfaceModel extends VmInterfaceModel { @@ -59,10 +58,7 @@ initLinked(); - initPortMirroring(); initNetworks(); - - initCustomPropertySheet(); // Plug should be the last one updated, cause it controls the changeability of the other editor getPlugged().setEntity(getNic().isPlugged()); @@ -112,11 +108,6 @@ } @Override - protected void initPortMirroring() { - getPortMirroring().setEntity(getNic().isPortMirroring()); - } - - @Override protected void initLinked() { if (hotUpdateSupported) { getLinked().setEntity(getNic().isLinked()); @@ -129,11 +120,5 @@ @Override protected VdcActionParametersBase createVdcActionParameters(VmNetworkInterface nicToSave) { return new AddVmInterfaceParameters(getVm().getId(), nicToSave); - } - - @Override - protected void setCustomPropertyFromVm() { - getCustomPropertySheet().setEntity(KeyValueModel - .convertProperties(getNic().getCustomProperties())); } } diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditTemplateInterfaceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditTemplateInterfaceModel.java index d30618a..e7ea0d5 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditTemplateInterfaceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditTemplateInterfaceModel.java @@ -46,18 +46,8 @@ } @Override - protected void initPortMirroring() { - getPortMirroring().setIsAvailable(false); - } - - @Override protected void onSaveMAC(VmNetworkInterface nicToSave) { nicToSave.setMacAddress(getNic().getMacAddress()); - } - - @Override - protected void onSavePortMirroring(VmNetworkInterface nicToSave) { - nicToSave.setPortMirroring(getNic().isPortMirroring()); } @Override diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java index 49c1eff..f9a3130 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java @@ -62,7 +62,6 @@ getEnableMac().setIsChangable(!plug); getMAC().setIsChangable((Boolean) getEnableMac().getEntity() && !plug); - updatePortMirroringChangeability(); updateNetworkChangability(); updateLinkChangability(); } @@ -75,39 +74,13 @@ } boolean isPlugged = isPluggedBeforeAndAfterEdit(); - boolean isPortMirroring = (Boolean) getPortMirroring().getEntity(); - if (isVmUp() && hotUpdateSupported && isPlugged) { - if (selectedNetworkExternal()) { - getLinked().setChangeProhibitionReason(ConstantsManager.getInstance() - .getConstants() - .hotLinkStateUpdateNotSupportedExternalNetworks()); - } else if (isPortMirroring) { - getLinked().setChangeProhibitionReason(ConstantsManager.getInstance() - .getConstants() - .hotLinkStateUpdateNotSupportedWithPortMirroring()); - } else { - return; - } - + if (isVmUp() && hotUpdateSupported && isPlugged && selectedNetworkExternal()) { + getLinked().setChangeProhibitionReason(ConstantsManager.getInstance() + .getConstants() + .hotLinkStateUpdateNotSupportedExternalNetworks()); getLinked().setIsChangable(false); initLinked(); - } - } - - @Override - protected void updatePortMirroringChangeability() { - super.updatePortMirroringChangeability(); - if (!getPortMirroring().getIsAvailable() || !getPortMirroring().getIsChangable()) { - return; - } - - if (isVmUp() && isPluggedBeforeAndAfterEdit()) { - getPortMirroring().setChangeProhibitionReason(ConstantsManager.getInstance() - .getConstants() - .hotPortMirroringUpdateNotSupported()); - getPortMirroring().setIsChangable(false); - initPortMirroring(); } } @@ -119,7 +92,6 @@ } boolean isPlugged = isPluggedBeforeAndAfterEdit(); - boolean isPortMirroring = (Boolean) getPortMirroring().getEntity(); if (isVmUp() && isPlugged) { if (!hotUpdateSupported) { @@ -130,10 +102,6 @@ getNetwork().setChangeProhibitionReason(ConstantsManager.getInstance() .getConstants() .hotNetworkUpdateNotSupportedExternalNetworks()); - } else if (isPortMirroring) { - getNetwork().setChangeProhibitionReason(ConstantsManager.getInstance() - .getConstants() - .hotNetworkUpdateNotSupportedWithPortMirroring()); } else { return; } diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewTemplateInterfaceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewTemplateInterfaceModel.java index 2e6f5b3..70fb122 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewTemplateInterfaceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewTemplateInterfaceModel.java @@ -44,18 +44,8 @@ } @Override - protected void initPortMirroring() { - getPortMirroring().setIsAvailable(false); - } - - @Override protected void onSaveMAC(VmNetworkInterface nicToSave) { nicToSave.setMacAddress(null); - } - - @Override - protected void onSavePortMirroring(VmNetworkInterface nicToSave) { - nicToSave.setPortMirroring(false); } @Override diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java index 041c94f..ba90184 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java @@ -63,9 +63,7 @@ initLinked(); - initPortMirroring(); initNetworks(); - initCustomPropertySheet(); initCommands(); } @@ -96,12 +94,6 @@ } @Override - protected void initPortMirroring() { - getPortMirroring().setIsChangable(isPortMirroringSupported()); - getPortMirroring().setEntity(false); - } - - @Override protected void initLinked() { if (hotUpdateSupported) { getLinked().setEntity(true); @@ -114,11 +106,6 @@ @Override protected VdcActionParametersBase createVdcActionParameters(VmNetworkInterface nicToSave) { return new AddVmInterfaceParameters(getVm().getId(), nicToSave); - } - - @Override - protected void setCustomPropertyFromVm() { - // Do nothing } protected VmNetworkInterface getNic() { diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java index 38a5ef3..6ec3c35 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java @@ -2,19 +2,14 @@ import java.util.ArrayList; import java.util.List; -import java.util.Map; import org.ovirt.engine.core.common.action.VdcActionParametersBase; import org.ovirt.engine.core.common.action.VdcActionType; import org.ovirt.engine.core.common.action.VdcReturnValueBase; import org.ovirt.engine.core.common.businessentities.VmBase; -import org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType; import org.ovirt.engine.core.common.businessentities.network.Network; import org.ovirt.engine.core.common.businessentities.network.VmInterfaceType; import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; import org.ovirt.engine.core.common.queries.ConfigurationValues; -import org.ovirt.engine.core.common.queries.GetDeviceCustomPropertiesParameters; -import org.ovirt.engine.core.common.queries.VdcQueryReturnValue; -import org.ovirt.engine.core.common.queries.VdcQueryType; import org.ovirt.engine.core.compat.StringHelper; import org.ovirt.engine.core.compat.Version; import org.ovirt.engine.ui.frontend.AsyncQuery; @@ -25,7 +20,6 @@ import org.ovirt.engine.ui.uicommonweb.models.EntityModel; import org.ovirt.engine.ui.uicommonweb.models.ListModel; import org.ovirt.engine.ui.uicommonweb.models.Model; -import org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel; import org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation; import org.ovirt.engine.ui.uicommonweb.validation.IValidation; import org.ovirt.engine.ui.uicommonweb.validation.MacAddressValidation; @@ -48,7 +42,6 @@ private EntityModel linked_IsSelected; private EntityModel unlinked_IsSelected; private ListModel privateNicType; - private EntityModel privatePortMirroring; private EntityModel privateMAC; private EntityModel enableMac; private EntityModel plugged; @@ -64,9 +57,6 @@ private final EntityModel sourceModel; private final Version clusterCompatibilityVersion; - - - private KeyValueModel customPropertySheet; private NetworkBehavior networkBehavior; @@ -100,7 +90,6 @@ public void setSelectedItem(Object value) { super.setSelectedItem(value); updateLinkChangability(); - updatePortMirroringChangeability(); } }); setNicType(new ListModel()); @@ -114,7 +103,6 @@ } }); getEnableMac().setEntity(false); - setPortMirroring(new EntityModel()); getMAC().getPropertyChangedEvent().addListener(this); setLinked(new EntityModel()); @@ -135,7 +123,6 @@ setUnplugged_IsSelected(new EntityModel()); getUnplugged_IsSelected().getEntityChangedEvent().addListener(this); - setCustomPropertySheet(new KeyValueModel()); } protected abstract void init(); @@ -216,16 +203,6 @@ privateNicType = value; } - public EntityModel getPortMirroring() - { - return privatePortMirroring; - } - - public void setPortMirroring(EntityModel value) - { - privatePortMirroring = value; - } - public EntityModel getMAC() { return privateMAC; @@ -274,14 +251,6 @@ public void setUnplugged_IsSelected(EntityModel value) { unplugged_IsSelected = value; - } - - public KeyValueModel getCustomPropertySheet() { - return customPropertySheet; - } - - public void setCustomPropertySheet(KeyValueModel customPropertySheet) { - this.customPropertySheet = customPropertySheet; } @Override @@ -385,7 +354,7 @@ } return getName().getIsValid() && getNetwork().getIsValid() && getNicType().getIsValid() - && getMAC().getIsValid() && getCustomPropertySheet().validate(); + && getMAC().getIsValid(); } protected abstract VmNetworkInterface createBaseNic(); @@ -409,7 +378,6 @@ Network network = (Network) getNetwork().getSelectedItem(); nic.setNetworkName(network != null ? network.getName() : null); nic.setLinked((Boolean) getLinked().getEntity()); - onSavePortMirroring(nic); if (getNicType().getSelectedItem() == null) { nic.setType(null); @@ -421,9 +389,6 @@ onSaveMAC(nic); nic.setPlugged((Boolean) getPlugged().getEntity()); - - nic.setCustomProperties(KeyValueModel - .convertProperties(getCustomPropertySheet().getEntity())); startProgress(null); @@ -512,8 +477,6 @@ protected abstract void initMAC(); - protected abstract void initPortMirroring(); - protected abstract void initLinked(); protected void onSaveMAC(VmNetworkInterface nicToSave) { @@ -521,18 +484,7 @@ : ((String) (getMAC().getEntity())).toLowerCase()) : getDefaultMacAddress()); } - protected void onSavePortMirroring(VmNetworkInterface nicToSave) { - nicToSave.setPortMirroring((Boolean) getPortMirroring().getEntity()); - } - protected abstract VdcActionParametersBase createVdcActionParameters(VmNetworkInterface nicToSave); - - protected boolean isPortMirroringSupported() { - Version v31 = new Version(3, 1); - boolean isLessThan31 = getClusterCompatibilityVersion().compareTo(v31) < 0; - - return !isLessThan31; - } protected void updateLinkChangability() { boolean isNullNetworkSelected = getNetwork().getSelectedItem() == null; @@ -548,20 +500,6 @@ getLinked().setIsChangable(true); } - protected void updatePortMirroringChangeability() { - if (isPortMirroringSupported() && !selectedNetworkExternal()) { - getPortMirroring().setIsChangable(true); - return; - } - - if (selectedNetworkExternal()) { - getPortMirroring().setChangeProhibitionReason(ConstantsManager.getInstance() - .getConstants() - .portMirroringNotSupportedExternalNetworks()); - } - getPortMirroring().setIsChangable(false); - } - protected void updateNetworkChangability() { getNetwork().setIsChangable(true); } @@ -570,36 +508,6 @@ Network network = (Network) getNetwork().getSelectedItem(); return network != null && network.isExternal(); } - - protected void initCustomPropertySheet() { - GetDeviceCustomPropertiesParameters params = new GetDeviceCustomPropertiesParameters(); - params.setVersion(getClusterCompatibilityVersion()); - params.setDeviceType(VmDeviceGeneralType.INTERFACE); - Frontend.RunQuery(VdcQueryType.GetDeviceCustomProperties, - params, - new AsyncQuery(this, - new INewAsyncCallback() { - @Override - public void onSuccess(Object target, Object returnValue) { - if (returnValue != null) { - Map<String, String> customPropertiesList = - ((Map<String, String>) ((VdcQueryReturnValue) returnValue).getReturnValue()); - - List<String> lines = new ArrayList<String>(); - - for (Map.Entry<String, String> keyValue : customPropertiesList.entrySet()) { - lines.add(keyValue.getKey() + '=' + keyValue.getValue()); - } - getCustomPropertySheet().setKeyValueString(lines); - getCustomPropertySheet().setIsChangable(!lines.isEmpty()); - - setCustomPropertyFromVm(); - } - } - })); - } - - protected abstract void setCustomPropertyFromVm(); public NetworkBehavior getNetworkBehavior() { return networkBehavior; diff --git a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java index bf75f4f..4bf40f9 100644 --- a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java +++ b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java @@ -1855,18 +1855,6 @@ @DefaultStringValue("In order to change 'MAC' please Unplug and then Plug again") String hotMacUpdateNotPossible(); - @DefaultStringValue("Updating 'Network' on a running virtual machine while the NIC is plugged is not supported when 'Port Mirroring' is set on the virtual machine interface") - String hotNetworkUpdateNotSupportedWithPortMirroring(); - - @DefaultStringValue("Updating 'Link State' on a running virtual machine while the NIC is plugged is not supported when 'Port Mirroring' is set on the virtual machine interface") - String hotLinkStateUpdateNotSupportedWithPortMirroring(); - - @DefaultStringValue("Updating 'Port Mirroring' on a running virtual machine while the NIC is plugged is not supported") - String hotPortMirroringUpdateNotSupported(); - - @DefaultStringValue("'Port Mirroring' is not supported for externally-provided networks") - String portMirroringNotSupportedExternalNetworks(); - @DefaultStringValue("Detaching an externally-provided network from a plugged NIC on a running virtual machine is not supported") String hotNetworkUpdateNotSupportedExternalNetworks(); diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/popup/vm/VmNetworkInterfacePopupWidget.java b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/popup/vm/VmNetworkInterfacePopupWidget.java index 19e18f7..a4ad035 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/popup/vm/VmNetworkInterfacePopupWidget.java +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/popup/vm/VmNetworkInterfacePopupWidget.java @@ -15,7 +15,6 @@ @Override public void edit(VmInterfaceModel iface) { super.edit(iface); - portMirroringEditor.setVisible(false); } } diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/popup/vm/VmInterfacePopupView.java b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/popup/vm/VmInterfacePopupView.java index e0b2dd2..72add7a 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/popup/vm/VmInterfacePopupView.java +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/popup/vm/VmInterfacePopupView.java @@ -23,7 +23,7 @@ super(eventBus, resources, new VmNetworkInterfacePopupWidget(eventBus, constants), "510px", //$NON-NLS-1$ - "345px"); //$NON-NLS-1$ + "320px"); //$NON-NLS-1$ ViewIdHandler.idHandler.generateAndSetIds(this); } diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/vm/VmInterfacePopupView.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/vm/VmInterfacePopupView.java index 0f44a3f..a7b3d73 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/vm/VmInterfacePopupView.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/vm/VmInterfacePopupView.java @@ -23,7 +23,7 @@ super(eventBus, resources, new NetworkInterfacePopupWidget(eventBus, constants), "510px", //$NON-NLS-1$ - "370px"); //$NON-NLS-1$ + "320px"); //$NON-NLS-1$ ViewIdHandler.idHandler.generateAndSetIds(this); } -- To view, visit http://gerrit.ovirt.org/17175 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a597b7a99d5ca155f93d41bfe8148254f18e6cf Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches