diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/client.iml b/.idea/client.iml new file mode 100644 index 0000000..5e764c4 --- /dev/null +++ b/.idea/client.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..a9cda84 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..0742ebc --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index c88faae..dce73a7 100644 --- a/index.html +++ b/index.html @@ -175,20 +175,20 @@ var isConnected = false; var apiIsAlive = false; // TODO: change to valid url - var apiServer = "localhost" + var apiServer = "http://localhost:8080" function hello_api() { $.ajax({ type: "POST", url: `${apiServer}/hello`, data: "", - dataType: "json", contentType: "application/json", - success: function(data){ + success: function(status){ + console.log(status) ok_msg_conn("API-Server is running. Connection established"); apiIsAlive = true; }, - error: function(er){ + error: function(er,status){ err_msg_conn(`API-Server unreachable. Error: ${JSON.stringify(er)}`); } }); @@ -201,7 +201,7 @@ "ip_address": ip, "port": port }), - dataType: "json", + // dataType: "json", contentType: "application/json", success: function(data){ ok_msg_conn(`Successfully connected to PLD ${ip}:${port}`); @@ -228,7 +228,7 @@ }, "data" : data, }), - dataType: "json", + // dataType: "json", contentType: "application/json", success: function(data){ ok_msg_conn(`Successfully sent data to ${address}`); @@ -273,7 +273,7 @@ } const address = document.getElementById('address').value; const data = document.getElementById('data').value; - const wrd = () => document.querySelector('input[type=radio]:checked')?.value === "rd"; + const wrd = () => document.querySelector('input[type=radio]:checked')?.value === "wr"; const inc = document.querySelector('#inc').checked; if (isConnected) {