Daniel Erez has posted comments on this change.

Change subject: webadmin: disk search overridden by default upon tab reveal
......................................................................


Patch Set 2: (3 inline comments)

Nice job! 
There's just a couple of issues left... explanations and suggestions inline.

....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabDiskView.java
Line 218:         String inputSearchString = 
commonModel.getSearchString().trim();
Line 219:         String inputSearchStringPrefix = 
commonModel.getSearchStringPrefix().trim();
Line 220: 
Line 221:         if (!inputSearchString.isEmpty() && 
inputSearchStringPrefix.isEmpty()) {
Line 222:             int indexOfColon = inputSearchString.indexOf(":");
Missing //$NON-NLS-1$ for ":".
You can just extract it to 'colon' constant (next to 'empty' constant..).
Line 223:             inputSearchStringPrefix = inputSearchString.substring(0, 
indexOfColon + 1).trim();
Line 224:             inputSearchString = 
inputSearchString.substring(indexOfColon + 1).trim();
Line 225:         }
Line 226:         if (inputSearchStringPrefix.isEmpty()) {


Line 236:             searchStringPrefix = searchStringPrefixRaw + space;
Line 237:         }
Line 238:         else {
Line 239:             searchStringPrefix = searchStringPrefixRaw + space
Line 240:                     + 
(searchStringPrefixRaw.equals(disksSearchPrefix) ? empty : searchConjunctionAnd)
* 'disksSearchPrefix' look-up should be case-agnostic.
* 'disk:' prefix should be supported as well.

I.e. add something like:
* final String disksSearchPrefixPattern = "^\\s*(disk(s)?(:)+)+\\s*"; 
//$NON-NLS-1$
* RegExp searchDisksSearchPrefix = RegExp.compile(disksSearchPrefixPattern, 
searchRegexFlags);
* perform test using: searchDisksSearchPrefix.test(searchStringPrefixRaw).
Line 241:                     + diskTypeClause;
Line 242:         }
Line 243: 
Line 244:         inputSearchString = searchPatternDiskTypeClause


Line 246:         inputSearchString = searchPatternStartConjunction
Line 247:                 .replace(inputSearchString, empty);
Line 248: 
Line 249:         String searchString;
Line 250:         if (searchStringPrefix.equals(disksSearchPrefix + space) || 
inputSearchString.isEmpty()) {
same here
Line 251:             searchString = inputSearchString;
Line 252:         }
Line 253:         else {
Line 254:             searchString = searchConjunctionAnd + inputSearchString;


--
To view, visit http://gerrit.ovirt.org/10897
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iebf63fc5e6343819062959cd85219b1a965daf95
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to