Skip to content

Commit

Permalink
Sort list of queries in web UI for display (#14428)
Browse files Browse the repository at this point in the history
Co-authored-by: Simran <Simran-B@users.noreply.github.com>
  • Loading branch information
jsteemann and Simran-B committed Jul 1, 2021
1 parent 62422fa commit 5976f89
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
devel
-----

* Fix display of running and slow queries in web UI when there are multiple
coordinators. Previously, the display order of queries was undefined, which
could lead to queries from one coordinator being display on top once and
then the queries from another. That made using this UI harder than necessary.

Now queries are sorted for display, according to their query IDs.

* Updated ArangoDB Starter to 0.15.1-preview-2.

* Fix potential stack overflow when executing large queries. This is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,18 @@
'',
''
]);
} else {
// sort by query id, descending
rowsArray = rowsArray.sort(function(l, r) {
// normalize both inputs to strings (in case they are numbers)
l = String(l[0]).padStart(20, "0");
r = String(r[0]).padStart(20, "0");

if (l === r) {
return 0;
}
return l < r ? 1 : -1;
});
}

self.tableDescription.rows = rowsArray;
Expand Down

0 comments on commit 5976f89

Please sign in to comment.