Maor Lipchuk has uploaded a new change for review. Change subject: webadmin: Add a warning when removing a Data Center. ......................................................................
webadmin: Add a warning when removing a Data Center. Add a warning indicating that the entities reside on the Storage Domain(s) attached to the removed Data Center, will become unregistered. Bug-Url: https://bugzilla.redhat.com/1138133 Bug-Url: https://bugzilla.redhat.com/1138119 Signed-off-by: Maor Lipchuk <mlipc...@redhat.com> Change-Id: I41ae4ea39e033696d7e2f37dcea9e7574a7447ab --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/43/35743/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java index 6095333..1043b76 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java @@ -355,6 +355,7 @@ return; } + boolean shouldAddressWarnning = false; ConfirmationModel model = new ConfirmationModel(); setWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().removeDataCenterTitle()); @@ -376,6 +377,9 @@ tempVar2.setTitle(ConstantsManager.getInstance().getConstants().cancel()); tempVar2.setIsCancel(true); model.getCommands().add(tempVar2); + if (shouldAddressWarnning) { + model.setNote(ConstantsManager.getInstance().getConstants().removeDataCenterWarnningNote()); + } } public void forceRemove() @@ -392,6 +396,11 @@ for (StoragePool a : Linq.<StoragePool> cast(getSelectedItems())) { list.add(a.getName()); + + // If one of the Data Centers contain Storage Domain, show the warnning. + if (a.getStatus() != StoragePoolStatus.Uninitialized) { + shouldAddressWarnning = true; + } } model.setItems(list); 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 b705936..1ef1a91 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 @@ -2410,5 +2410,8 @@ @DefaultStringValue("The detach operation will move the entities residing on the storage domain(s) to an unregistered state. For further information please consult documentation.") String detachWarnningNote(); + + @DefaultStringValue("Remove the Data Center(s) will move the entities residing on the storage domain(s) to an unregistered state. For further information please consult documentation.") + String removeDataCenterWarnningNote(); } -- To view, visit http://gerrit.ovirt.org/35743 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41ae4ea39e033696d7e2f37dcea9e7574a7447ab Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches