mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2026-01-31 14:51:02 +03:00
Merge pull request #827 from haverland/rolling
Rolling: Add hostname to title of configuration
This commit is contained in:
@@ -73,7 +73,7 @@ li.dropdown {
|
|||||||
|
|
||||||
<body style="font-family: arial">
|
<body style="font-family: arial">
|
||||||
|
|
||||||
<h1>Configure Watermeter</h1>
|
<h1 id="id_title">Configure Watermeter</h1>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li aria-current="page"><a href="index.html">Main Page</a>
|
<li aria-current="page"><a href="index.html">Main Page</a>
|
||||||
@@ -97,5 +97,41 @@ li.dropdown {
|
|||||||
<div class="h_iframe">
|
<div class="h_iframe">
|
||||||
<iframe width="1020px" height="650px" name="maincontent" id ="maincontent" src="edit_config_param.html" title="fileserver"></iframe>
|
<iframe width="1020px" height="650px" name="maincontent" id ="maincontent" src="edit_config_param.html" title="fileserver"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript" src="./gethost.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var basepath = "http://192.168.178.22";
|
||||||
|
|
||||||
|
|
||||||
|
function LoadHostname() {
|
||||||
|
_basepath = getbasepath();
|
||||||
|
|
||||||
|
var xhttp = new XMLHttpRequest();
|
||||||
|
xhttp.addEventListener('load', function(event) {
|
||||||
|
if (xhttp.status >= 200 && xhttp.status < 300) {
|
||||||
|
hostname = xhttp.responseText;
|
||||||
|
document.title = "Configure - " + hostname;
|
||||||
|
document.getElementById("id_title").innerHTML = "Configure - " + hostname;
|
||||||
|
} else {
|
||||||
|
console.warn(request.statusText, request.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// var xhttp = new XMLHttpRequest();
|
||||||
|
try {
|
||||||
|
url = _basepath + '/version?type=Hostname';
|
||||||
|
xhttp.open("GET", url, true);
|
||||||
|
xhttp.send();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (error)
|
||||||
|
{
|
||||||
|
// alert("Loading Hostname failed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LoadHostname();
|
||||||
|
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user