Implemented dynamic host finding
This commit is contained in:
8
Frontend/assets/scripts/dyn_host.js
Normal file
8
Frontend/assets/scripts/dyn_host.js
Normal file
@@ -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")
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="assets/css/frame.css">
|
||||
<script src="assets/scripts/common/jquery-3.6.0.slim.min.js"></script>
|
||||
<script src="assets/scripts/dyn_host.js"></script>
|
||||
|
||||
<!-- <link rel="stylesheet" href="common.css"> -->
|
||||
<link rel="shortcut icon" href="assets/images/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="assets/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -16,16 +20,20 @@
|
||||
<div id="content">
|
||||
<div id="toolList">
|
||||
<ul id="toolList">
|
||||
<li id="toolListRow"><a href="http://tools.zipper.release11.com:8097/" target="iframe">REST Mock</a></li>
|
||||
<li id="toolListRow" class="dynamic"><a id="rest-mock" href="http://tools.zipper.release11.com:8097/" target="iframe">REST Mock</a></li>
|
||||
<li id="toolListRow"><a href="./tools/xpath.html" target="iframe">XPath</a></li>
|
||||
<li id="toolListRow"><a href="./tools/xslt.html" target="iframe">XSLT</a></li>
|
||||
<li id="toolListRow"><a href="./tools/xsd.html" target="iframe">XSD</a></li>
|
||||
</ul>
|
||||
<div id="copyright">Copyright © 2023<br><a href="http://release11.com/">Release11 Sp. z. o. o.</a></div>
|
||||
</div>
|
||||
<iframe id="frame" name="iframe" src="http://localhost:8097/" frameborder="0"></iframe>
|
||||
<iframe id="frame" name="iframe" src="http://tools.zipper.release11.com:8097/" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user