Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1957)

Unified Diff: appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html

Issue 2765313002: Add proper natural sort to swarming UI (Closed)
Patch Set: Update package.json Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
diff --git a/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html b/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
index bb42009460131333308389171e8adf28e903d26d..084606cf8acb62904f8a09ba65e4644d16bd7645 100644
--- a/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
+++ b/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
@@ -442,7 +442,7 @@
}
// neither column was special, fallback to alphabetical sorting.
}
- return swarming.naturalCompare(a, b);
+ return naturalSort(a, b);
}.bind(this));
return arr;
},
@@ -467,7 +467,7 @@
var aMatch = matchFilter(a, query, false);
var bMatch = matchFilter(b, query, false);
if (aMatch === bMatch) {
- return swarming.naturalCompare(a,b);
+ return naturalSort(a,b);
}
// true == 1 and false == 0. So, put the one that matches first.
return bMatch - aMatch;
@@ -479,7 +479,7 @@
var aMatch = matchPartCaseInsensitive(a, query).idx !== -1;
var bMatch = matchPartCaseInsensitive(b, query).idx !== -1;
if (aMatch === bMatch) {
- return swarming.naturalCompare(a,b);
+ return naturalSort(a,b);
}
// true == 1 and false == 0. So, put the one that matches first.
return bMatch - aMatch;

Powered by Google App Engine
This is Rietveld 408576698