Moti Asayag has uploaded a new change for review. Change subject: webadmin: Add 'applyToHosts' to edit network dialog ......................................................................
webadmin: Add 'applyToHosts' to edit network dialog A checkbox is being added to the 'Edit Network' dialog to support the appliance of a network change to a multiple hosts. Change-Id: I67df90883d8ea8f9d47d2609a837658fce6a72c5 Signed-off-by: Moti Asayag <masa...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/EditNetworkModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.ui.xml 5 files changed, 32 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/96/22096/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/EditNetworkModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/EditNetworkModel.java index 4bbddba..fe43a5b 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/EditNetworkModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/EditNetworkModel.java @@ -38,6 +38,7 @@ getExport().setIsChangable(false); getExternalProviders().setIsChangable(false); getNetworkLabel().setIsChangable(false); + getApplyToHosts().setIsAvailable(true); } @Override @@ -80,8 +81,10 @@ @Override public void executeSave() { + AddNetworkStoragePoolParameters parameters = new AddNetworkStoragePoolParameters(getSelectedDc().getId(), getNetwork()); + parameters.setConfigureHosts(getApplyToHosts().getEntity()); Frontend.RunAction(VdcActionType.UpdateNetwork, - new AddNetworkStoragePoolParameters(getSelectedDc().getId(), getNetwork()), + parameters, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result1) { diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java index 8fe5822..faa468a 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java @@ -54,6 +54,7 @@ private EntityModel privateHasMtu; private EntityModel privateMtu; private EntityModel privateIsVmNetwork; + private EntityModel<Boolean> applyToHosts; private boolean isSupportBridgesReportByVDSM = false; private boolean mtuOverrideSupported = false; private ListModel privateDataCenters; @@ -126,7 +127,8 @@ setIsVmNetwork(isVmNetwork); EntityModel publicUse = new EntityModel(); publicUse.setEntity(true); - + setApplyToHosts(new EntityModel<Boolean>(false)); + getApplyToHosts().setIsAvailable(false); setProfiles(new ListModel()); // Update changeability according to initial values @@ -323,6 +325,14 @@ profiles = value; } + public EntityModel<Boolean> getApplyToHosts() { + return applyToHosts; + } + + public void setApplyToHosts(EntityModel<Boolean> applyToHosts) { + this.applyToHosts = applyToHosts; + } + public Network getNetwork() { return network; } diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java index 0049472..2bdeaa0 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java @@ -212,6 +212,9 @@ @DefaultStringValue("Override MTU") String overrideMtuLabel(); + @DefaultStringValue("Apply network changes to all hosts") + String applyToHostsLabel(); + @DefaultStringValue("Name") String nameClusterHeader(); diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.java index 1d92701..b489e9c 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.java @@ -116,6 +116,10 @@ public EntityModelTextBoxOnlyEditor mtuEditor; @UiField(provided = true) + @Path(value = "applyToHosts.entity") + public final EntityModelCheckBoxEditor applyToHostsEditor; + + @UiField(provided = true) @Ignore public final EntityModelCellTable<ListModel> clustersTable; @@ -184,6 +188,7 @@ isVmNetworkEditor = new EntityModelCheckBoxEditor(Align.RIGHT); vlanTagging = new EntityModelCheckBoxEditor(Align.RIGHT); hasMtuEditor = new EntityModelCheckBoxEditor(Align.RIGHT); + applyToHostsEditor = new EntityModelCheckBoxEditor(Align.RIGHT); this.clustersTable = new EntityModelCellTable<ListModel>(SelectionMode.NONE, true); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); initEntityModelCellTable(constants, templates); @@ -208,6 +213,7 @@ isVmNetworkEditor.setLabel(constants.vmNetworkLabel()); vlanTagging.setLabel(constants.enableVlanTagLabel()); hasMtuEditor.setLabel(constants.overrideMtuLabel()); + applyToHostsEditor.setLabel(constants.applyToHostsLabel()); profilesLabel.setText(constants.profilesLabel()); } @@ -221,6 +227,8 @@ vlanTagging.asCheckBox().addStyleName(style.checkBox()); hasMtuEditor.addContentWidgetStyleName(style.checkBox()); hasMtuEditor.asCheckBox().addStyleName(style.checkBox()); + applyToHostsEditor.addContentWidgetStyleName(style.checkBox()); + applyToHostsEditor.asCheckBox().addStyleName(style.checkBox()); } @Override diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.ui.xml b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.ui.xml index c62dfd1..b19dbbb 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.ui.xml +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.ui.xml @@ -55,6 +55,11 @@ padding: 5px; } + .applyToHosts { + position: absolute; + bottom: 1px; + } + </ui:style> <d:SimpleDialogPanel ui:field="mainPanel" width="780px" height="550px"> @@ -89,6 +94,7 @@ <e:EntityModelTextBoxOnlyEditor ui:field="mtuEditor" /> </g:HorizontalPanel> </g:FlowPanel> + <e:EntityModelCheckBoxEditor ui:field="applyToHostsEditor" addStyleNames="{style.applyToHosts}" /> </g:FlowPanel> </t:content> </t:DialogTab> -- To view, visit http://gerrit.ovirt.org/22096 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67df90883d8ea8f9d47d2609a837658fce6a72c5 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches