Alexander Wels has uploaded a new change for review. Change subject: webadmin: description marked invalid in search ......................................................................
webadmin: description marked invalid in search - The valid field description was marked invalid in the search suggestion dropdown due to it containing the invalid word 'desc' (descending) which is no longer valid. Added an exception for description to be a valid suggestion. Change-Id: I83e933ad77177a4532f5bef086312f12f15545b5 Signed-off-by: Alexander Wels <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/autocomplete/SearchSuggestModel.java 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/78/38078/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/autocomplete/SearchSuggestModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/autocomplete/SearchSuggestModel.java index 66584e3..ffde54b 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/autocomplete/SearchSuggestModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/autocomplete/SearchSuggestModel.java @@ -19,6 +19,9 @@ private final String[] itemsToIgnore = { "monitor-desktop", //$NON-NLS-1$ SyntaxChecker.PAGE, SyntaxChecker.SORTBY, SyntaxChecker.SORTDIR_ASC, SyntaxChecker.SORTDIR_DESC}; + //Exceptions that are potentially matched by items to ignore but are valid. + private final List<String> exceptions = Arrays.asList("DESCRIPTION"); //$NON-NLS-1$ + @Override public List getItems() { @@ -179,6 +182,11 @@ private boolean containsWithItemsToIgnore(String pf) { for (String item: itemsToIgnore) { if (pf.toUpperCase().contains(StringConstants.SPACE + item.trim().toUpperCase())) { + for (String exception: exceptions) { + if (pf.toUpperCase().contains(exception)) { + return false; + } + } return true; } } -- To view, visit http://gerrit.ovirt.org/38078 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83e933ad77177a4532f5bef086312f12f15545b5 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
