added reboot buttons to config pages

This commit is contained in:
George Ruinelli
2022-08-30 22:07:25 +02:00
parent 5dc7b90a1c
commit 592b93ce2b
4 changed files with 55 additions and 4 deletions

View File

@@ -86,7 +86,10 @@ select {
<table> <table>
<tr> <tr>
<td colspan="2"><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini"></td> <td><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini"></td>
</tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
</tr> </tr>
</table> </table>
@@ -108,6 +111,16 @@ select {
basepath = "", basepath = "",
param; param;
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
window.location.replace(stringota);
}
}
function ChangeSelection(){ function ChangeSelection(){
aktindex = parseInt(document.getElementById("index").value); aktindex = parseInt(document.getElementById("index").value);
UpdateReference(); UpdateReference();

View File

@@ -129,6 +129,9 @@ th, td {
<tr> <tr>
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=7></td> <td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=7></td>
</tr> </tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
</tr>
</table> </table>
@@ -148,6 +151,15 @@ th, td {
lockAR = true; lockAR = true;
basepath = "http://192.168.178.26"; basepath = "http://192.168.178.26";
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
window.location.replace(stringota);
}
}
function EnDisableAnalog() { function EnDisableAnalog() {
isEnabled = document.getElementById("Category_Analog_enabled").checked; isEnabled = document.getElementById("Category_Analog_enabled").checked;

View File

@@ -120,6 +120,9 @@ th, td {
<tr> <tr>
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=7></td> <td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=7></td>
</tr> </tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
</tr>
</table> </table>
<script type="text/javascript" src="./gethost.js"></script> <script type="text/javascript" src="./gethost.js"></script>
@@ -140,6 +143,15 @@ th, td {
lockAR = true; lockAR = true;
basepath = "http://192.168.178.26"; basepath = "http://192.168.178.26";
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
window.location.replace(stringota);
}
}
function EnDisableDigits() { function EnDisableDigits() {
isEnabled = document.getElementById("Category_Digits_enabled").checked; isEnabled = document.getElementById("Category_Digits_enabled").checked;

View File

@@ -35,6 +35,7 @@ table {
<body style="font-family: arial; padding: 0px 10px;"> <body style="font-family: arial; padding: 0px 10px;">
<h2>Create Reference out of Raw Image</h2> <h2>Create Reference out of Raw Image</h2>
<p><b>Note: After saving a new Reference Image, make sure to update the Alignment Marks and the ROI's and reboot once!</b></p>
<table> <table>
<tr> <tr>
@@ -86,6 +87,9 @@ table {
<tr> <tr>
<td><input class="button" type="button" id="updatereferenceimage" value="Update Reference Image" onclick="SaveReference()"></td> <td><input class="button" type="button" id="updatereferenceimage" value="Update Reference Image" onclick="SaveReference()"></td>
</tr> </tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved Reference</button></td>
</tr>
</table> </table>
@@ -103,6 +107,16 @@ table {
isActReference = false; isActReference = false;
param; param;
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
window.location.replace(stringota);
}
}
function doTake(){ function doTake(){
var xhttp = new XMLHttpRequest(); var xhttp = new XMLHttpRequest();
if (param["MakeImage"]["Brightness"].found && param["MakeImage"]["Brightness"].enabled) if (param["MakeImage"]["Brightness"].found && param["MakeImage"]["Brightness"].enabled)