8000 Sort list of queries in web UI for display (#14428) · RtiWeb/arangodb@5976f89 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5976f89

Browse files
jsteemannSimran-B
andauthored
Sort list of queries in web UI for display (arangodb#14428)
Co-authored-by: Simran <Simran-B@users.noreply.github.com>
1 parent 62422fa commit 5976f89

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
devel
22
-----
33

4+
* Fix display of running and slow queries in web UI when there are multiple
5+
coordinators. Previously, the display order of queries was undefined, which
6+
could lead to queries from one coordinator being display on top once and
7+
then the queries from another. That made using this UI harder than necessary.
8+
9+
Now queries are sorted for display, according to their query IDs.
10+
411
* Updated ArangoDB Starter to 0.15.1-preview-2.
512

613
* Fix potential stack overflow when executing large queries. This is

js/apps/system/_admin/aardvark/APP/frontend/js/views/queryManagementView.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,18 @@
233233
'',
234234
''
235235
]);
236+
} else {
237+
// sort by query id, descending
238+
rowsArray = rowsArray.sort(function(l, r) {
239+
// normalize both inputs to strings (in case they are numbers)
240+
l = String(l[0]).padStart(20, "0");
241+
r = String(r[0]).padStart(20, "0");
242+
243+
if (l === r) {
244+
return 0;
245+
}
246+
return l < r ? 1 : -1;
247+
});
236248
}
237249

238250
self.tableDescription.rows = rowsArray;

0 commit comments

Comments
 (0)
0