aboutsummaryrefslogtreecommitdiffstats
path: root/gui/static/js/odr-rcvalues.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui/static/js/odr-rcvalues.js')
-rw-r--r--gui/static/js/odr-rcvalues.js31
1 files changed, 8 insertions, 23 deletions
diff --git a/gui/static/js/odr-rcvalues.js b/gui/static/js/odr-rcvalues.js
index 6d53e8d..f40279d 100644
--- a/gui/static/js/odr-rcvalues.js
+++ b/gui/static/js/odr-rcvalues.js
@@ -21,30 +21,15 @@
function requestStatus(callback) {
$('#rctable > tbody').empty();
- $.ajax({
- type: "GET",
- url: "/api/rc_parameters",
- contentType: 'application/json',
- dataType: 'json',
-
- error: function(data) {
- $.gritter.add({
- title: 'RC info',
- text: "ERROR: ",
- image: '/fonts/warning.png',
- sticky: true,
- });
- },
- success: function(data) {
- $.each( data, function( key1, controllable ) {
- $.each( controllable, function( key2, param ) {
- $('#rctable > tbody:last').append(
- '<tr><td>'+key1+'.'+key2+'</td>'+
- '<td>'+param['value']+'</td>'+
- '<td>'+param['help']+'</td></tr>');
- });
+ doApiRequestGET("/api/rc_parameters", function(data) {
+ $.each( data, function( key1, controllable ) {
+ $.each( controllable, function( key2, param ) {
+ $('#rctable > tbody:last').append(
+ '<tr><td>'+key1+'.'+key2+'</td>'+
+ '<td>'+param['value']+'</td>'+
+ '<td>'+param['help']+'</td></tr>');
});
- }
+ });
});
}