var api_url = 'http://timelaps.local:8000/api/v1/'; function getParams() { } function showKarts() { $.ajax({ type: 'GET', crossDomain: true, url: api_url + 'karts/', dataType: 'json', success: function (data, status) { console.log(data); $('#dataTable_kart_list').DataTable({ data: data, columns: [ { data: "id", render: function (data, type, row, meta) { return ' '; } }, { data: "name" }, { data: "autonomy" } ] }); }, error: function (xhr) { alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText); }, }); } function getKartsMenu() { $.ajax({ type: 'GET', crossDomain: true, url: api_url + 'karts/', dataType: 'json', success: function (data, status) { $.each(data, function (index, value) { $('#link_all').after("" + " \n" + " \n" + " \n" + "\n" + " " + value.name + "" + " "); }); }, error: function (xhr) { alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText); }, }); } function getPilotsByKart() { $.ajax({ type: 'GET', crossDomain: true, url: api_url + 'karts/', dataType: 'json', success: function (data, status) { $.each(data, function (index, value) { $('.container-fluid').append("" + "
\n" + " | Order | \n" + "Short Name | \n" + "First Name | \n" + "Last Name | \n" + "Ref time (Sec) | \n" + "
---|