diff --git a/.gitignore b/.gitignore index ab3e096..4a86338 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ .vscode nbactions.xml target/ +__pycache__ +venv diff --git a/Backend/mocked-services/src/main/resources/static/html/mock.html b/Backend/mocked-services/src/main/resources/static/html/mock.html index 79f52b4..f597720 100644 --- a/Backend/mocked-services/src/main/resources/static/html/mock.html +++ b/Backend/mocked-services/src/main/resources/static/html/mock.html @@ -8,6 +8,7 @@ +
diff --git a/Backend/mocked-services/src/main/resources/static/js/dyn_host.js b/Backend/mocked-services/src/main/resources/static/js/dyn_host.js new file mode 100644 index 0000000..b13a6e1 --- /dev/null +++ b/Backend/mocked-services/src/main/resources/static/js/dyn_host.js @@ -0,0 +1,11 @@ +$(document).ready( function() { + console.log("Here") + let links = document.getElementsByTagName("link") + for (let i = 0; i < links.length; i++) { + let oldStr = links[i].href.split("/") + let endpoint = oldStr.slice(3).join("/") + links[i].href = window.location.protocol + "//" + window.location.hostname + ":8086/" + endpoint + } + +}); + diff --git a/Frontend/assets/scripts/tools/jquery-3.6.0.slim.min.js b/Frontend/assets/scripts/common/jquery-3.6.0.slim.min.js similarity index 100% rename from Frontend/assets/scripts/tools/jquery-3.6.0.slim.min.js rename to Frontend/assets/scripts/common/jquery-3.6.0.slim.min.js diff --git a/Frontend/assets/scripts/dyn_host.js b/Frontend/assets/scripts/dyn_host.js new file mode 100644 index 0000000..0a1110f --- /dev/null +++ b/Frontend/assets/scripts/dyn_host.js @@ -0,0 +1,8 @@ +$(document).ready( function() { + document.getElementsByName("iframe")[0].src = + window.location.protocol + "//" + window.location.hostname + ":8097"; + document.getElementById("rest-mock").href = + window.location.protocol + "//" + window.location.hostname + ":8097"; + console.log("DONE") +}); + \ No newline at end of file diff --git a/Frontend/assets/scripts/tools/scripts.js b/Frontend/assets/scripts/tools/scripts.js index f0ced97..23818b3 100644 --- a/Frontend/assets/scripts/tools/scripts.js +++ b/Frontend/assets/scripts/tools/scripts.js @@ -106,7 +106,7 @@ function performRequest(text, checkXML, checkTransform){ async function restRequest(text) { const escapeChar = "specialEscapeChar"; // const addr = "http://localhost:8081/" + text; - const addr = "http://tools.zipper.release11.com" + text; + const addr = window.location.protocol + "//" + window.location.hostname + ":8081/" + text; var xmlData = document.getElementById("xmlArea").value.trim(); var transformData = document.getElementById("transformArea").value.trim(); diff --git a/Frontend/index.html b/Frontend/index.html index 0bb9ddf..a5647f6 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -4,8 +4,12 @@ + + + - + + @@ -16,16 +20,20 @@
- +
+ +