Daniel Erez has posted comments on this change.

Change subject: webadmin: Warning on dependent VMs on delete template
......................................................................


Patch Set 12:

(6 comments)

https://gerrit.ovirt.org/#/c/37514/12/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/TemplateBackupModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/TemplateBackupModel.java:

Line 94:         model.getCommands().add(tempVar2);
Line 95:     }
Line 96: 
Line 97:     private void onRemove() {
Line 98:         cancel();
shouldn't be done here, see comment in line '151'
Line 99:         
AsyncDataProvider.getInstance().getDataCentersByStorageDomain(new 
AsyncQuery(this, new INewAsyncCallback() {
Line 100: 
Line 101:             @Override
Line 102:             public void onSuccess(Object model, Object returnValue) {


Line 141:         ArrayList<String> missingTemplatesFromVms = new ArrayList<>();
Line 142: 
Line 143:         for (Map.Entry<String, List<String>> templateName : 
problematicVmNames.entrySet()) {
Line 144:             List<String> vms = 
problematicVmNames.get(templateName.getKey());
Line 145:             String vmsListString = StringUtils.join(vms, ","); 
//$NON-NLS-1$
s/","/", " (just to keep proper spaces...)
Line 146:             missingTemplatesFromVms.add(ConstantsManager.getInstance()
Line 147:                     .getMessages()
Line 148:                     .templatesWithDependentVMs(templateName.getKey(), 
vmsListString));
Line 149:         }


Line 147:                     .getMessages()
Line 148:                     .templatesWithDependentVMs(templateName.getKey(), 
vmsListString));
Line 149:         }
Line 150: 
Line 151:         ConfirmationModel confirmModel = new ConfirmationModel();
you can call setConfirmWindow(null) to close the previous window here
Line 152:         setConfirmWindow(confirmModel);
Line 153:         confirmModel.setTitle(ConstantsManager.getInstance()
Line 154:                 .getConstants()
Line 155:                 .removeBackedUpTemplatesWithDependentsVMTitle());


Line 195:     }
Line 196: 
Line 197:     private void removeTemplateBackup() {
Line 198:         ArrayList<VdcActionParametersBase> prms = new 
ArrayList<VdcActionParametersBase>();
Line 199:         for (Object a : getSelectedItems()) {
please rename variable
Line 200:             VmTemplate template = (VmTemplate) a;
Line 201:             prms.add(new 
VmTemplateImportExportParameters(template.getId(),
Line 202:                     getEntity().getId(),
Line 203:                     pool.getId()));


Line 443:         else if ("OnRestore".equals(command.getName())) //$NON-NLS-1$
Line 444:         {
Line 445:             onRestore();
Line 446:         }
Line 447:         else if ("CancelConfirmation".equals(command.getName())) 
//$NON-NLS-1$
move '{' to eol
Line 448:         {
Line 449:             cancelConfirmation();
Line 450:         }
Line 451:         else if ("RemoveVmTemplates".equals(command.getName())) 
//$NON-NLS-1$


Line 447:         else if ("CancelConfirmation".equals(command.getName())) 
//$NON-NLS-1$
Line 448:         {
Line 449:             cancelConfirmation();
Line 450:         }
Line 451:         else if ("RemoveVmTemplates".equals(command.getName())) 
//$NON-NLS-1$
same
Line 452:         {
Line 453:             removeTemplateBackup();
Line 454:         }
Line 455:         else {


-- 
To view, visit https://gerrit.ovirt.org/37514
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cba5df5a41973741a855ae0c9efddd56100d2fd
Gerrit-PatchSet: 12
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <froll...@redhat.com>
Gerrit-Reviewer: Ala Hino <ah...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Candace Sheremeta <csher...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Fred Rolland <froll...@redhat.com>
Gerrit-Reviewer: Freddy Rolland <froll...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to