From 74f34d7e50afada386254063441f4f451987f2fe Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Sun, 22 Mar 2020 23:55:01 +0100 Subject: [PATCH] sort tools alphabetically (case insensitive) --- src/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app.js b/src/app.js index e855f49..8c04031 100644 --- a/src/app.js +++ b/src/app.js @@ -173,6 +173,13 @@ function join_all_json(result, divid, metric_x, metric_y,metrics_names, better){ full_json.push(jo); }); + full_json.sort(function(a,b){ + let x = a.toolname.toLowerCase(); + let y = b.toolname.toLowerCase(); + if (x < y) { return -1;} + if (x > y){ return 1;} + return 0; + }); MAIN_DATA[divid] = full_json; MAIN_METRICS[divid] = metrics_names;