8000 Sort list of queries in web UI for display by jsteemann · Pull Request #14428 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Sort list of queries in web UI for display #14428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update js/apps/system/_admin/aardvark/APP/frontend/js/views/queryMana…
…gementView.js

Co-authored-by: Simran <Simran-B@users.noreply.github.com>
  • Loading branch information
jsteemann and Simran-B authored Jun 30, 2021
commit d7c7a2bce299600b97d3b89fa2ea78870050ea27
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,8 @@
// sort by query id, descending
rowsArray = rowsArray.sort(function(l, r) {
// normalize both inputs to strings (in case they are numbers)
l = l[0];
if (typeof l !== "string") {
l = String(l);
}
r = r[0];
if (typeof r !== "string") {
r = String(r);
}

// pad strings to the same length, by prepending '0' chars
l = Array(20 - l.length).join("0") + l;
r = Array(20 - r.length).join("0") + r;
l = String(l[0]).padStart(20, "0");
r = String(r[0]).padStart(20, "0");

if (l === r) {
return 0;
Expand Down
0