Arik Hadas has uploaded a new change for review. Change subject: ui: cleanup ......................................................................
ui: cleanup Change-Id: I85eb98dd8c9b4cf0beb51b6f23c8ae7788e5142c Signed-off-by: Arik Hadas <aha...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java 1 file changed, 21 insertions(+), 27 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/94/29494/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java index 0f9dbdb..5ef50b2 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java @@ -79,8 +79,8 @@ model.getStorage().setSelectedItem(Linq.firstOrDefault(storageDomains)); boolean noActiveStorage = true; - for (StorageDomain a : storageDomains) { - if (a.getStatus() == StorageDomainStatus.Active) { + for (StorageDomain storageDomain : storageDomains) { + if (storageDomain.getStatus() == StorageDomainStatus.Active) { noActiveStorage = false; break; } @@ -92,11 +92,10 @@ model.setMessage(entityResideOnSeveralDCsMakeSureTheExportedVMResideOnSameDcMsg()); - UICommand tempVar = new UICommand("Cancel", this); //$NON-NLS-1$ - tempVar.setTitle(ConstantsManager.getInstance().getConstants().close()); - tempVar.setIsDefault(true); - tempVar.setIsCancel(true); - model.getCommands().add(tempVar); + model.getCommands().add(new UICommand("Cancel", this) //$NON-NLS-1$ + .setTitle(ConstantsManager.getInstance().getConstants().close()) + .setIsDefault(true) + .setIsCancel(true)); model.stopProgress(); } else if (storageDomains.isEmpty()) { @@ -105,39 +104,34 @@ model.setMessage(thereIsNoExportDomainBackupEntityAttachExportDomainToVmsDcMsg()); - UICommand tempVar2 = new UICommand("Cancel", this); //$NON-NLS-1$ - tempVar2.setTitle(ConstantsManager.getInstance().getConstants().close()); - tempVar2.setIsDefault(true); - tempVar2.setIsCancel(true); - model.getCommands().add(tempVar2); + model.getCommands().add(new UICommand("Cancel", this) //$NON-NLS-1$ + .setTitle(ConstantsManager.getInstance().getConstants().close()) + .setIsDefault(true) + .setIsCancel(true)); model.stopProgress(); } else if (noActiveStorage) { model.getCollapseSnapshots().setIsChangable(false); model.getForceOverride().setIsChangable(false); - model.setMessage(ConstantsManager.getInstance() - .getConstants() + model.setMessage(ConstantsManager.getInstance().getConstants() .theRelevantExportDomainIsNotActivePleaseActivateItMsg()); - UICommand tempVar3 = new UICommand("Cancel", this); //$NON-NLS-1$ - tempVar3.setTitle(ConstantsManager.getInstance().getConstants().close()); - tempVar3.setIsDefault(true); - tempVar3.setIsCancel(true); - model.getCommands().add(tempVar3); + model.getCommands().add(new UICommand("Cancel", this) //$NON-NLS-1$ + .setTitle(ConstantsManager.getInstance().getConstants().close()) + .setIsDefault(true) + .setIsCancel(true)); model.stopProgress(); } else { showWarningOnExistingEntities(model, getEntityExportDomain()); - UICommand tempVar4 = new UICommand("OnExport", this); //$NON-NLS-1$ - tempVar4.setTitle(ConstantsManager.getInstance().getConstants().ok()); - tempVar4.setIsDefault(true); - model.getCommands().add(tempVar4); - UICommand tempVar5 = new UICommand("Cancel", this); //$NON-NLS-1$ - tempVar5.setTitle(ConstantsManager.getInstance().getConstants().cancel()); - tempVar5.setIsCancel(true); - model.getCommands().add(tempVar5); + model.getCommands().add(new UICommand("OnExport", this) //$NON-NLS-1$ + .setTitle(ConstantsManager.getInstance().getConstants().ok()) + .setIsDefault(true)); + model.getCommands().add(new UICommand("Cancel", this) //$NON-NLS-1$ + .setTitle(ConstantsManager.getInstance().getConstants().cancel()) + .setIsCancel(true)); } } -- To view, visit http://gerrit.ovirt.org/29494 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85eb98dd8c9b4cf0beb51b6f23c8ae7788e5142c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches