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>
@@ -107,7 +110,17 @@ select {
basepath = "http://192.168.178.26"; basepath = "http://192.168.178.26";
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>
@@ -147,8 +150,17 @@ th, td {
enhanceCon = false; enhanceCon = false;
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

@@ -119,6 +119,9 @@ th, td {
<table> <table>
<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>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
</tr> </tr>
</table> </table>
@@ -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>
@@ -85,6 +86,9 @@ table {
</tr> </tr>
<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>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved Reference</button></td>
</tr> </tr>
</table> </table>
@@ -102,6 +106,16 @@ table {
basepath = "http://192.168.178.26"; basepath = "http://192.168.178.26";
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();