From 594cb2691debaa7562fd7d76d3b224701ec087ea Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 3 Dec 2018 16:39:31 +0100 Subject: GUI: a few fixes, sort rc entries --- gui/static/js/odr-rcvalues.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'gui/static/js') diff --git a/gui/static/js/odr-rcvalues.js b/gui/static/js/odr-rcvalues.js index 81d895c..f49674c 100644 --- a/gui/static/js/odr-rcvalues.js +++ b/gui/static/js/odr-rcvalues.js @@ -30,9 +30,19 @@ function requestStatus() { $('#rctable > tbody').empty(); doApiRequestGET("/api/rc_parameters", function(data) { - $.each( data, function( key1, controllable ) { - $.each( controllable, function( key2, param ) { - var key = key1 + "_" + key2; + console.log(data); + let keys = Object.keys(data); + keys.sort(); + + var key1; + for (key1 in keys) { + let keys2 = Object.keys(data[keys[key1]]); + keys2.sort(); + + var key2; + for (key2 in keys2) { + var param = data[keys[key1]][keys2[key2]]; + var key = keys[key1] + "_" + keys2[key2]; var valueentry = '' + '