Vojtech Szocs has posted comments on this change. Change subject: webadmin: remove sortby/page from searchstring ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/33787/1/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/CommonModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/CommonModel.java: Line 1243: Line 1244: public void setSearchString(String value) Line 1245: { Line 1246: if (value == null || (!value.toUpperCase().contains(SPACE + SyntaxChecker.SORTBY) Line 1247: && !value.toUpperCase().contains(SPACE + SyntaxChecker.PAGE))) { Maybe worth extracting SORTBY / PAGE substring check into separate method, for example: private boolean containsTokens(String search, SyntaxChecker... tokens) Line 1248: setSearchString(value, true); Line 1249: } Line 1250: } Line 1251: http://gerrit.ovirt.org/#/c/33787/1/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/autocomplete/SearchSuggestModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/autocomplete/SearchSuggestModel.java: Line 14: import org.ovirt.engine.ui.uicompat.ObservableCollection; Line 15: Line 16: public class SearchSuggestModel extends SearchableListModel { Line 17: Line 18: private static final String SPACE = " "; //$NON-NLS-1$ Could we have a single definition of such constants? :-) Perhaps some org.ovirt.engine.ui.uicommonweb.StringConstants class? Line 19: Line 20: private final String[] itemsToIgnore = { "monitor-desktop", //$NON-NLS-1$ Line 21: SyntaxChecker.PAGE, SyntaxChecker.SORTBY}; Line 22: -- To view, visit http://gerrit.ovirt.org/33787 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b905d91e4b0a147df9c0e75c956e819ba42d0e6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@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