Arik Hadas has posted comments on this change. Change subject: frontend: add version column to templates main tab ......................................................................
Patch Set 15: (1 comment) http://gerrit.ovirt.org/#/c/23381/15/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java: Line 296: templateIdToTemplate.put(template.getId(), template); Line 297: } Line 298: Line 299: templateIdToBaseTemplateName = new HashMap<Guid, String>(); Line 300: for (VmTemplate template : items) { > for the sake of something, you can iterate items once :) yeah but then for each template we'll need to go over all the other templates in case the base template appears after the version template in the search results.. for the sake of simplicity, let's run over list of n<=100 twice than to create complicated code :) Line 301: VmTemplate baseTemplate = templateIdToTemplate.get(template.getBaseTemplateId()); Line 302: templateIdToBaseTemplateName.put(template.getId(), Line 303: baseTemplate != null ? baseTemplate.getName() : ""); //$NON-NLS-1$ Line 304: } -- To view, visit http://gerrit.ovirt.org/23381 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae04ceb5e75ba541f49bbae87e499ee91aacf718 Gerrit-PatchSet: 15 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> 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