aboutsummaryrefslogtreecommitdiffstats
path: root/gui/static/js/odr-predistortion.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui/static/js/odr-predistortion.js')
-rw-r--r--gui/static/js/odr-predistortion.js40
1 files changed, 4 insertions, 36 deletions
diff --git a/gui/static/js/odr-predistortion.js b/gui/static/js/odr-predistortion.js
index dce3922..13dac7a 100644
--- a/gui/static/js/odr-predistortion.js
+++ b/gui/static/js/odr-predistortion.js
@@ -20,46 +20,14 @@
$(function(){
$('#capturebutton').click(function() {
- $.ajax({
- type: "POST",
- url: "/api/trigger_capture",
- contentType: 'text/plain',
- dataType: '',
- data: '',
-
- error: function(data) {
- $.gritter.add({
- title: 'Capture trigger',
- text: "ERROR",
- image: '/fonts/warning.png',
- sticky: true,
- });
- },
- success: function(data) {
- $('#capturestatus').val(data);
- },
+ doApiRequestPOST("/api/trigger_capture", {}, function(data) {
+ $('#capturestatus').val(data);
});
});
$('#dpdstatusbutton').click(function() {
- $.ajax({
- type: "GET",
- url: "/api/dpd_status",
- contentType: 'application/json',
- dataType: '',
- data: '',
-
- error: function(data) {
- $.gritter.add({
- title: 'DPD Status Update',
- text: "ERROR",
- image: '/fonts/warning.png',
- sticky: true,
- });
- },
- success: function(data) {
- $('#dpdstatus').val(data);
- },
+ doApiRequestGET("/api/dpd_status", function(data) {
+ $('#dpdstatus').val(data);
});
});
});