Merge pull request #1033 from caco3/auto-add-version

Auto add version
This commit is contained in:
jomjol
2022-09-19 20:03:56 +02:00
committed by GitHub
10 changed files with 69 additions and 23 deletions

View File

@@ -29,3 +29,28 @@ function LoadHostname() {
// alert("Loading Hostname failed");
}
}
function LoadVersion() {
_basepath = getbasepath();
var xhttp = new XMLHttpRequest();
xhttp.addEventListener('load', function(event) {
if (xhttp.status >= 200 && xhttp.status < 300) {
version = xhttp.responseText;
document.getElementById("Version").innerHTML = version;
}
else {
console.warn(request.statusText, request.responseText);
}
});
try {
url = _basepath + '/version?type=GitBaseBranch';
xhttp.open("GET", url, true);
xhttp.send();
}
catch (error)
{}
}

View File

@@ -151,8 +151,11 @@ li.dropdown {
<iframe name="maincontent" class="iframe" id="maincontent" src="wasserzaehler_roi.html"></iframe>
<span id="Version" style="font-size: 10px; margin-top: -5px">Loading version...</span>
<script type="text/javascript">
LoadHostname();
LoadVersion();
</script>
</div>

View File

@@ -152,11 +152,15 @@ li.dropdown {
<iframe name="maincontent" class="iframe" id="maincontent" src="edit_config_param.html"></iframe>
<span id="Version" style="font-size: 10px; margin-top: -5px">Loading version...</span>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="gethost.js"></script>
<script type="text/javascript">
LoadHostname();
LoadVersion();
</script>
</div>

View File

@@ -12,7 +12,7 @@ h3 {font-size: 1.2em;}
p {font-size: 1em;}
div {
width: 250px;
width: 350px;
padding: 10px 5px;
border: 1px solid #ccc;
font-family: arial;
@@ -93,22 +93,22 @@ div {
<tr>
<td>
Git-Base-Branch:
Git-Tag:
</td>
<td>
<div>
<object data="/version?type=GitBaseBranch"></object>
<object data="/version?type=GitTag"></object>
</div>
</td>
</tr>
<tr>
<td>
Git-Version:
Git-Revision:
</td>
<td>
<div>
<object data="/version?type=GitVersion"></object>
<object data="/version?type=GitRevision"></object>
</div>
</td>
</tr>

View File

@@ -1 +1,2 @@
16.4.1
# HTML version
# Do not edit, it will get be updated by cmake!