mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2026-01-30 14:20:43 +03:00
test5
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="jszip.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="FileSaver.min.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -36,21 +41,15 @@
|
||||
<hr>
|
||||
<h2>Restore Configuration</h2>
|
||||
<p>Use the <a href="/fileserver/config/" target="_self">File Server</a> to upload individual files.</p>
|
||||
</body>
|
||||
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="jszip.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="FileSaver.min.js?v=$COMMIT_HASH"></script>
|
||||
<script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function startBackup() {
|
||||
document.getElementById("progress").innerHTML = "Creating backup...<br>\n";
|
||||
|
||||
// Get hostname
|
||||
try {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("GET", getDomainname() + "/info?type=Hostname", false);
|
||||
xhttp.open("GET", domainname + "/info?type=Hostname", false);
|
||||
xhttp.send();
|
||||
hostname = xhttp.responseText;
|
||||
}
|
||||
@@ -69,7 +68,7 @@ function startBackup() {
|
||||
setStatus("Fetching File List...");
|
||||
try {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("GET", getDomainname() + "/fileserver/config/", false);
|
||||
xhttp.open("GET", domainname + "/fileserver/config/", false);
|
||||
xhttp.send();
|
||||
|
||||
var parser = new DOMParser();
|
||||
@@ -85,7 +84,7 @@ function startBackup() {
|
||||
|
||||
for (a of list) {
|
||||
url = a.getAttribute("href");
|
||||
urls.push(getDomainname() + url);
|
||||
urls.push(domainname + url);
|
||||
}
|
||||
|
||||
// Pack as zip and download
|
||||
@@ -98,7 +97,6 @@ function startBackup() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function fetchFiles(urls, filesData, index, retry, zipFilename) {
|
||||
url = urls[index];
|
||||
|
||||
@@ -172,7 +170,6 @@ function fetchFiles(urls, filesData, index, retry, zipFilename) {
|
||||
xhr.send(null);
|
||||
}
|
||||
|
||||
|
||||
function generateZipFile(urls, filesData, zipFilename) {
|
||||
setStatus("Creating Zip File...");
|
||||
|
||||
@@ -190,15 +187,8 @@ function generateZipFile(urls, filesData, zipFilename) {
|
||||
setStatus("Backup completed");
|
||||
}
|
||||
|
||||
|
||||
const backup = (urls, zipFilename) => {
|
||||
if(!urls) return;
|
||||
|
||||
/* Testing */
|
||||
/*len = urls.length;
|
||||
for (i = 0; i < len - 3; i++) {
|
||||
urls.pop();
|
||||
}*/
|
||||
if(!urls) { return; }
|
||||
|
||||
console.log(urls);
|
||||
|
||||
@@ -218,5 +208,5 @@ function getFilenameFromUrl(url) {
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
@@ -46,33 +46,36 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2>Data Viewer</h2>
|
||||
<h4>Today's latest data</h4>
|
||||
<div class="box">
|
||||
<div class="row header">
|
||||
<button class="button" onClick="reload();">Refresh</button>
|
||||
<button class="button" onClick="window.open(getDomainname() + '/datafileact');">Show Full File</button>
|
||||
<button class="button" onClick="window.location.href = getDomainname() + '/fileserver/log/data/'">Show Data Files</button>
|
||||
<button class="button" onClick="window.open(domainname + '/datafileact');">Show Full File</button>
|
||||
<button class="button" onClick="window.location.href = domainname + '/fileserver/log/data/'">Show Data Files</button>
|
||||
<button class="button" onClick="window.location.href = 'graph.html?v=$COMMIT_HASH'">Show Graph</button>
|
||||
</div>
|
||||
<div class="row content" id="data"><br><br><br><b>Loading data file, please wait...</b></div>
|
||||
<div class="row footer">
|
||||
<button class="button" onClick="reload();">Refresh</button>
|
||||
<button class="button" onClick="window.open(getDomainname() + '/datafileact');">Show Full File</button>
|
||||
<button class="button" onClick="window.location.href = getDomainname() + '/fileserver/log/data/'">Show Data Files</button>
|
||||
<button class="button" onClick="window.open(domainname + '/datafileact');">Show Full File</button>
|
||||
<button class="button" onClick="window.location.href = domainname + '/fileserver/log/data/'">Show Data Files</button>
|
||||
<button class="button" onClick="window.location.href = 'graph.html?v=$COMMIT_HASH'">Show Graph</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
function reload() {
|
||||
document.getElementById('data').innerHTML += "<br><b>Reloading...<b><br><br>";
|
||||
window.scrollBy(0,document.body.scrollHeight);
|
||||
funcRequest(getDomainname() + '/data');
|
||||
funcRequest(domainname + '/data');
|
||||
}
|
||||
|
||||
async function funcRequest(url){
|
||||
@@ -95,7 +98,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
funcRequest(getDomainname() + '/data');
|
||||
funcRequest(domainname + '/data');
|
||||
|
||||
</script>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
@@ -24,6 +24,12 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="jszip.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="FileSaver.min.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -34,10 +40,6 @@
|
||||
<hr>
|
||||
<p id=progress></p>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="jszip.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="FileSaver.min.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function startExportData() {
|
||||
document.getElementById("progress").innerHTML = "Creating Export Data...<br>\n";
|
||||
@@ -45,7 +47,7 @@ function startExportData() {
|
||||
// Get hostname
|
||||
try {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("GET", getDomainname() + "/info?type=Hostname", false);
|
||||
xhttp.open("GET", domainname + "/info?type=Hostname", false);
|
||||
xhttp.send();
|
||||
hostname = xhttp.responseText;
|
||||
}
|
||||
@@ -64,7 +66,7 @@ function startExportData() {
|
||||
setStatus("Fetching File List...");
|
||||
try {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("GET", getDomainname() + "/fileserver/log/data/", false);
|
||||
xhttp.open("GET", domainname + "/fileserver/log/data/", false);
|
||||
xhttp.send();
|
||||
|
||||
var parser = new DOMParser();
|
||||
@@ -81,7 +83,7 @@ function startExportData() {
|
||||
|
||||
for (a of list) {
|
||||
url = a.getAttribute("href");
|
||||
urls.push(getDomainname() + url);
|
||||
urls.push(domainname + url);
|
||||
}
|
||||
|
||||
// Pack as zip and download
|
||||
@@ -204,4 +206,4 @@ function getFilenameFromUrl(url) {
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -99,6 +99,10 @@
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -181,9 +185,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var canvas = document.getElementById('canvas'),
|
||||
ctx = canvas.getContext('2d'),
|
||||
@@ -193,10 +194,9 @@
|
||||
aktindex = 0,
|
||||
refInfo,
|
||||
enhanceCon = false,
|
||||
domainname = getDomainname(),
|
||||
neueref1,
|
||||
neueref2,
|
||||
cofcat,
|
||||
category,
|
||||
param;
|
||||
|
||||
function doReboot() {
|
||||
@@ -314,7 +314,7 @@
|
||||
xhttp.open("GET", domainname + "/statusflow", false);
|
||||
xhttp.send();
|
||||
}
|
||||
catch (error){}
|
||||
catch (error){ console.log(error); }
|
||||
|
||||
document.getElementById("overlaytext").innerHTML = "Device is busy, waiting until the Digitization Round got completed (this can take several minutes)...<br><br>Current step: " + xhttp.responseText;
|
||||
console.log("Device is busy, waiting 5s then checking again...");
|
||||
@@ -429,14 +429,8 @@
|
||||
EnDisableItem(false, "savemarker", true);
|
||||
EnDisableItem(false, "enhancecontrast", true);
|
||||
|
||||
if (!loadConfig(domainname)) {
|
||||
firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
|
||||
return;
|
||||
}
|
||||
|
||||
ParseConfig();
|
||||
param = getConfigParameters();
|
||||
cofcat = getConfigCategory();
|
||||
category = getConfigCategory();
|
||||
|
||||
canvas.addEventListener('mousedown', mouseDown, false);
|
||||
canvas.addEventListener('mouseup', mouseUp, false);
|
||||
@@ -515,7 +509,7 @@
|
||||
xhttp.open("GET", domainname + "/statusflow", false);
|
||||
xhttp.send();
|
||||
}
|
||||
catch (error){}
|
||||
catch (error){ console.log(error); }
|
||||
|
||||
document.getElementById("overlaytext").innerHTML = "Device is busy, waiting until the Digitization Round got completed (this can take several minutes)...<br><br>Current step: " + xhttp.responseText;
|
||||
console.log("Device is busy, waiting 5s then checking again...");
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -178,10 +183,6 @@ The following settings are only used for easier setup, they are <b>not</b> persi
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var canvas = document.getElementById('canvas'),
|
||||
ctx = canvas.getContext('2d'),
|
||||
@@ -190,17 +191,16 @@ The following settings are only used for easier setup, they are <b>not</b> persi
|
||||
drag = false,
|
||||
aktindex = 0,
|
||||
ROIInfo,
|
||||
cofcat,
|
||||
category,
|
||||
param,
|
||||
_roialt = "ana",
|
||||
enhanceCon = false,
|
||||
lockAspectRatio = true,
|
||||
lockSizes = false,
|
||||
drawFromCenter = true,
|
||||
domainname = getDomainname();
|
||||
drawFromCenter = true;
|
||||
|
||||
function doReboot() {
|
||||
var stringota = getDomainname() + "/reboot";
|
||||
var stringota = domainname + "/reboot";
|
||||
window.location = stringota;
|
||||
window.location.href = stringota;
|
||||
window.location.assign(stringota);
|
||||
@@ -222,7 +222,7 @@ The following settings are only used for easier setup, they are <b>not</b> persi
|
||||
|
||||
sah1(document.getElementById("div1"), !isEnabled);
|
||||
|
||||
cofcat["Analog"]["enabled"] = isEnabled;
|
||||
category["Analog"]["enabled"] = isEnabled;
|
||||
document.getElementById("saveroi").disabled = false;
|
||||
|
||||
if (isEnabled) {
|
||||
@@ -348,8 +348,7 @@ The following settings are only used for easier setup, they are <b>not</b> persi
|
||||
}
|
||||
|
||||
function SaveToConfig() {
|
||||
//_zwcat = getConfigCategory();
|
||||
cofcat["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
|
||||
category["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
|
||||
WriteConfigININew();
|
||||
SaveConfigToServer(domainname);
|
||||
UpdateROIs();
|
||||
@@ -412,16 +411,14 @@ The following settings are only used for easier setup, they are <b>not</b> persi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function UpdateROIs(_sel){
|
||||
document.getElementById("Category_Analog_enabled").checked = true;
|
||||
var sel = document.getElementById("Numbers_value1");
|
||||
var _number = sel.options[sel.selectedIndex].text;
|
||||
|
||||
ROIInfo = getROIInfo("analog", _number);
|
||||
// _catzw = getConfigCategory();
|
||||
|
||||
if (cofcat["Analog"]["enabled"] == false) {
|
||||
if (category["Analog"]["enabled"] == false) {
|
||||
document.getElementById("Category_Analog_enabled").checked = false;
|
||||
EnDisableAnalog();
|
||||
firework.launch('Analog ROI processing is disabled. Activate with checkbox if needed', 'warning', 10000);
|
||||
@@ -558,16 +555,9 @@ The following settings are only used for easier setup, they are <b>not</b> persi
|
||||
|
||||
function init() {
|
||||
openDescription();
|
||||
domainname = getDomainname();
|
||||
|
||||
if (!loadConfig(domainname)) {
|
||||
firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
|
||||
return;
|
||||
}
|
||||
|
||||
ParseConfig();
|
||||
|
||||
param = getConfigParameters();
|
||||
cofcat = getConfigCategory();
|
||||
category = getConfigCategory();
|
||||
|
||||
canvas.addEventListener('mousedown', mouseDown, false);
|
||||
canvas.addEventListener('mouseup', mouseUp, false);
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -53,17 +58,15 @@
|
||||
<hr>
|
||||
<button class="button" onclick="saveTextAsFile()">Save Config</button>
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var canvas = document.getElementById('canvas'),
|
||||
domainname = getDomainname();
|
||||
|
||||
|
||||
param,
|
||||
category;
|
||||
|
||||
function LoadConfigNeu() {
|
||||
domainname = getDomainname();
|
||||
loadConfig(domainname);
|
||||
param = getConfigParameters();
|
||||
category = getConfigCategory();
|
||||
|
||||
document.getElementById("inputTextToSave").value = getConfig();
|
||||
}
|
||||
|
||||
@@ -87,6 +90,5 @@
|
||||
LoadConfigNeu();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -212,6 +212,7 @@
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -929,8 +930,15 @@
|
||||
<td>$TOOLTIP_PostProcessing_PreValueAgeStartup</td>
|
||||
</tr>
|
||||
|
||||
<tr style="margin-top:12px">
|
||||
<td class="indent1" style="padding-top:25px" colspan="3">
|
||||
<b>The following parameters are configurable individually for each number sequence:</b>
|
||||
<select style="font-weight: bold; margin-left:17px" id="Numbers_value1" onchange="numberChanged()"></select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="expert">
|
||||
<td class="indent1">
|
||||
<td class="indent2">
|
||||
<class id="PostProcessing_SkipErrorMessage_text" style="color:black;">Skip Messages on Error</class>
|
||||
</td>
|
||||
<td>
|
||||
@@ -939,14 +947,7 @@
|
||||
<option value="false" selected>disabled (false)</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>$TOOLTIP_PostProcessing_SkipErrorMessage</td>
|
||||
</tr>
|
||||
|
||||
<tr style="margin-top:12px">
|
||||
<td class="indent1" style="padding-top:25px" colspan="3">
|
||||
<b>The following parameters are configurable individually for each number sequence:</b>
|
||||
<select style="font-weight: bold; margin-left:17px" id="Numbers_value1" onchange="numberChanged()"></select>
|
||||
</td>
|
||||
<td>$TOOLTIP_PostProcessing_NUMBER.SkipErrorMessage</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -2173,7 +2174,6 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
var canvas = document.getElementById('canvas'),
|
||||
domainname = getDomainname(),
|
||||
changeCamValue = 0,
|
||||
param,
|
||||
category,
|
||||
@@ -2204,13 +2204,9 @@ function cameraParameterChanged() {
|
||||
}
|
||||
|
||||
function LoadConfigNeu() {
|
||||
if (!loadConfig(domainname)) {
|
||||
firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
|
||||
return;
|
||||
}
|
||||
|
||||
param = getCamConfig();
|
||||
param = getConfigParameters();
|
||||
category = getConfigCategory();
|
||||
|
||||
InitIndivParameter();
|
||||
|
||||
UpdateInput();
|
||||
@@ -2303,6 +2299,7 @@ function UpdateInputIndividual(sel) {
|
||||
ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
|
||||
ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
|
||||
ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
|
||||
ReadParameter(param, "PostProcessing", "SkipErrorMessage", false, NUNBERSAkt);
|
||||
ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
|
||||
ReadParameter(param, "InfluxDB", "Field", true, NUNBERSAkt);
|
||||
ReadParameter(param, "InfluxDBv2", "Field", true, NUNBERSAkt);
|
||||
@@ -2322,6 +2319,7 @@ function UpdateInputIndividual(sel) {
|
||||
WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
|
||||
WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
|
||||
WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
|
||||
WriteParameter(param, category, "PostProcessing", "SkipErrorMessage", false, NUNBERSAkt);
|
||||
WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
|
||||
WriteParameter(param, category, "InfluxDB", "Field", true, NUNBERSAkt);
|
||||
WriteParameter(param, category, "InfluxDBv2", "Field", true, NUNBERSAkt);
|
||||
@@ -2406,7 +2404,6 @@ function UpdateInput() {
|
||||
|
||||
WriteParameter(param, category, "PostProcessing", "PreValueUse", false);
|
||||
WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
|
||||
WriteParameter(param, category, "PostProcessing", "SkipErrorMessage", false);
|
||||
|
||||
WriteParameter(param, category, "MQTT", "Uri", true);
|
||||
WriteParameter(param, category, "MQTT", "MainTopic", true);
|
||||
@@ -2580,7 +2577,6 @@ function ReadParameterAll() {
|
||||
|
||||
ReadParameter(param, "PostProcessing", "PreValueUse", false);
|
||||
ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
|
||||
ReadParameter(param, "PostProcessing", "SkipErrorMessage", false);
|
||||
|
||||
ReadParameter(param, "MQTT", "Uri", true);
|
||||
ReadParameter(param, "MQTT", "MainTopic", true);
|
||||
@@ -2937,7 +2933,7 @@ function camSettingsSet(){
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error){}
|
||||
} catch (error){ console.log(error); }
|
||||
|
||||
if (xhttp.responseText == "CamSettingsSet") {
|
||||
document.getElementById("overlay").style.display = "none";
|
||||
@@ -2953,7 +2949,7 @@ function camSettingsSet(){
|
||||
_xhttp.open("GET", domainname + "/statusflow", false);
|
||||
_xhttp.send();
|
||||
}
|
||||
catch (error){}
|
||||
catch (error){ console.log(error); }
|
||||
|
||||
document.getElementById("overlaytext").innerHTML = "Device is busy, please wait.<br><br>Current step: " + _xhttp.responseText;
|
||||
console.log("Device is busy, waiting 2s then checking again...");
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -195,10 +199,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var canvas = document.getElementById('canvas'),
|
||||
imageObj = new Image(),
|
||||
@@ -206,18 +206,17 @@
|
||||
drag = false,
|
||||
aktindex = 0,
|
||||
ROIInfo,
|
||||
cofcat,
|
||||
category,
|
||||
param,
|
||||
_roialt = "dig",
|
||||
enhanceCon = false,
|
||||
lockAspectRatio = true,
|
||||
lockSizes = false,
|
||||
lockSpaceEquidistant = true,
|
||||
space = 3,
|
||||
domainname = getDomainname();
|
||||
space = 3;
|
||||
|
||||
function doReboot() {
|
||||
var stringota = getDomainname() + "/reboot";
|
||||
var stringota = domainname + "/reboot";
|
||||
window.location = stringota;
|
||||
window.location.href = stringota;
|
||||
window.location.assign(stringota);
|
||||
@@ -239,7 +238,7 @@
|
||||
|
||||
sah1(document.getElementById("div1"), !isEnabled);
|
||||
|
||||
cofcat["Digits"]["enabled"] = isEnabled;
|
||||
category["Digits"]["enabled"] = isEnabled;
|
||||
document.getElementById("saveroi").disabled = false;
|
||||
|
||||
if (isEnabled) {
|
||||
@@ -371,7 +370,7 @@
|
||||
|
||||
function SaveToConfig() {
|
||||
// _zwcat = getConfigCategory();
|
||||
cofcat["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
|
||||
category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
|
||||
WriteConfigININew();
|
||||
SaveConfigToServer(domainname);
|
||||
UpdateROIs();
|
||||
@@ -423,7 +422,7 @@
|
||||
ROIInfo = getROIInfo("digit", _number);
|
||||
// _catzw = getConfigCategory();
|
||||
|
||||
if (cofcat["Digits"]["enabled"] == false) {
|
||||
if (category["Digits"]["enabled"] == false) {
|
||||
document.getElementById("Category_Digits_enabled").checked = false;
|
||||
EnDisableDigits();
|
||||
firework.launch('Digit ROI processing is disabled. Activate with checkbox if needed', 'warning', 10000);
|
||||
@@ -569,16 +568,9 @@
|
||||
|
||||
function init() {
|
||||
openDescription();
|
||||
domainname = getDomainname();
|
||||
|
||||
if (!loadConfig(domainname)) {
|
||||
firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
|
||||
return;
|
||||
}
|
||||
|
||||
ParseConfig();
|
||||
param = getConfigParameters();
|
||||
cofcat = getConfigCategory();
|
||||
|
||||
param = getConfigParameters();
|
||||
category = getConfigCategory();
|
||||
|
||||
canvas.addEventListener('mousedown', mouseDown, false);
|
||||
canvas.addEventListener('mouseup', mouseUp, false);
|
||||
|
||||
@@ -118,6 +118,10 @@
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -390,12 +394,8 @@
|
||||
<b>Reference Image:</b><br>
|
||||
<canvas id="canvas"></canvas>
|
||||
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var canvas = document.getElementById('canvas'),
|
||||
domainname = getDomainname(),
|
||||
context = canvas.getContext('2d'),
|
||||
imageObj = new Image(),
|
||||
isActReference = false,
|
||||
@@ -584,7 +584,7 @@
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error){}
|
||||
} catch (error){ console.log(error); }
|
||||
|
||||
if (xhttp.responseText != "DeviceIsBusy") {
|
||||
var _url = domainname + "/img_tmp/raw.jpg" + "?session=" + Math.floor((Math.random() * 1000000) + 1);
|
||||
@@ -605,7 +605,7 @@
|
||||
_xhttp.open("GET", domainname + "/statusflow", false);
|
||||
_xhttp.send();
|
||||
}
|
||||
catch (error){}
|
||||
catch (error){ console.log(error); }
|
||||
|
||||
document.getElementById("overlaytext").innerHTML = "Device is busy, please wait.<br><br>Current step: " + _xhttp.responseText;
|
||||
console.log("Device is busy, waiting 5s then checking again...");
|
||||
@@ -724,7 +724,7 @@
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error){}
|
||||
} catch (error){ console.log(error); }
|
||||
|
||||
if (xhttp.responseText == "CamSettingsSet") {
|
||||
document.getElementById("overlay").style.display = "none";
|
||||
@@ -740,7 +740,7 @@
|
||||
_xhttp.open("GET", domainname + "/statusflow", false);
|
||||
_xhttp.send();
|
||||
}
|
||||
catch (error){}
|
||||
catch (error){ console.log(error); }
|
||||
|
||||
document.getElementById("overlaytext").innerHTML = "Device is busy, plase waiting...<br><br>Current step: " + _xhttp.responseText;
|
||||
console.log("Device is busy, waiting 2s then checking again...");
|
||||
@@ -871,12 +871,7 @@
|
||||
function init() {
|
||||
openDescription();
|
||||
|
||||
if (!loadConfig(domainname)) {
|
||||
firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
|
||||
return;
|
||||
}
|
||||
|
||||
param = getCamConfig();
|
||||
param = getConfigParameters();
|
||||
category = getConfigCategory();
|
||||
|
||||
canvas.addEventListener('mousemove', mouseMove, false);
|
||||
|
||||
@@ -3,13 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>Data Graph</title>
|
||||
|
||||
<script type="text/javascript" src='plotly-basic-2.18.2.min.js?v=$COMMIT_HASH'></script>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<style>
|
||||
h1 {font-size: 2em;}
|
||||
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
|
||||
@@ -37,15 +31,26 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript" src='plotly-basic-2.18.2.min.js?v=$COMMIT_HASH'></script>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function run() {
|
||||
datefile = document.getElementById("datafiles").value;
|
||||
numbername = document.getElementById("numbers").value;
|
||||
showRrelativeValues = document.getElementById("showRrelativeValues").checked;
|
||||
var datefile = document.getElementById("datafiles").value;
|
||||
var numbername = document.getElementById("numbers").value;
|
||||
var showRrelativeValues = document.getElementById("showRrelativeValues").checked;
|
||||
//alert("Auslesen: " + datefile + " " + numbername);
|
||||
|
||||
_domainname = getDomainname();
|
||||
fetch(_domainname + '/fileserver/log/data/' + datefile)
|
||||
fetch(domainname + '/fileserver/log/data/' + datefile)
|
||||
.then(response => {
|
||||
// handle the response
|
||||
if (response.status == 404) {
|
||||
@@ -119,7 +124,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Copy time to all traces
|
||||
tracePreValue.x = traceValue.x;
|
||||
traceChangeRate.x = traceValue.x;
|
||||
@@ -181,9 +185,6 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -198,10 +199,10 @@
|
||||
<button class="button" onClick="window.location.href = 'data.html?v=$COMMIT_HASH'">Show Data Viewer</button>
|
||||
<button class="button" onClick="window.location.href = getDomainname() + '/fileserver/log/data/'">Show Data Files</button>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
function WriteModelFiles()
|
||||
{
|
||||
list_data = getDATAList();
|
||||
var list_data = getDATAList();
|
||||
|
||||
var _indexDig = document.getElementById("datafiles");
|
||||
while (_indexDig.length)
|
||||
@@ -220,7 +221,7 @@
|
||||
|
||||
function WriteNumbers()
|
||||
{
|
||||
list_data = getNUMBERSList();
|
||||
var list_data = getNUMBERSList();
|
||||
|
||||
var _indexDig = document.getElementById("numbers");
|
||||
while (_indexDig.length)
|
||||
@@ -251,4 +252,4 @@
|
||||
Refresh();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -252,11 +252,8 @@
|
||||
}
|
||||
|
||||
function HA_send_discovery_visibility() {
|
||||
loadConfig(domainname);
|
||||
ParseConfig();
|
||||
|
||||
category = getConfigCategory();
|
||||
param = getConfigParameters();
|
||||
category = getConfigCategory();
|
||||
|
||||
if (category["MQTT"]["enabled"] && param["MQTT"]["HomeassistantDiscovery"].value1 == "true") {
|
||||
document.getElementById("ManualControl").style.display="";
|
||||
|
||||
@@ -29,6 +29,7 @@ table {
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -107,7 +108,6 @@ table {
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table>
|
||||
<colgroup>
|
||||
<col span="1" style="width: 35%;">
|
||||
@@ -240,18 +240,13 @@ table {
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h3>Copyright</h3>
|
||||
Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edge-device" target=_blank>Jomjol</a> and others.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function loadLastRestart()
|
||||
{
|
||||
url = getDomainname() + '/starttime';
|
||||
var url = domainname + '/starttime';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -271,7 +266,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadUptime()
|
||||
{
|
||||
url = getDomainname() + '/uptime';
|
||||
var url = domainname + '/uptime';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -284,7 +279,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadFWVersion()
|
||||
{
|
||||
url = getDomainname() + '/info?type=FirmwareVersion';
|
||||
var url = domainname + '/info?type=FirmwareVersion';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -297,7 +292,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadFWBuildTime()
|
||||
{
|
||||
url = getDomainname() + '/info?type=BuildTime';
|
||||
var url = domainname + '/info?type=BuildTime';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -316,7 +311,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadHTMLVersion()
|
||||
{
|
||||
url = getDomainname() + '/info?type=HTMLVersion';
|
||||
var url = domainname + '/info?type=HTMLVersion';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -329,7 +324,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadHostname()
|
||||
{
|
||||
url = getDomainname() + '/info?type=Hostname';
|
||||
var url = domainname + '/info?type=Hostname';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -342,7 +337,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadIPAddress()
|
||||
{
|
||||
url = getDomainname() + '/info?type=IP';
|
||||
var url = domainname + '/info?type=IP';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -355,7 +350,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadWLANSSID()
|
||||
{
|
||||
url = getDomainname() + '/info?type=SSID';
|
||||
var url = domainname + '/info?type=SSID';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -368,7 +363,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadSDCardManufacturer()
|
||||
{
|
||||
url = getDomainname() + '/info?type=SDCardManufacturer';
|
||||
var url = domainname + '/info?type=SDCardManufacturer';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -381,7 +376,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadSDCardName()
|
||||
{
|
||||
url = getDomainname() + '/info?type=SDCardName';
|
||||
var url = domainname + '/info?type=SDCardName';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -394,7 +389,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadSDCardCapacity()
|
||||
{
|
||||
url = getDomainname() + '/info?type=SDCardCapacity';
|
||||
var url = domainname + '/info?type=SDCardCapacity';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -407,7 +402,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadSDCardSectorSize()
|
||||
{
|
||||
url = getDomainname() + '/info?type=SDCardSectorSize';
|
||||
var url = domainname + '/info?type=SDCardSectorSize';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -420,7 +415,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadSDCardPartitionSize()
|
||||
{
|
||||
url = getDomainname() + '/info?type=SDCardPartitionSize';
|
||||
var url = domainname + '/info?type=SDCardPartitionSize';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -433,7 +428,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadSDCardFreePartitionSpace()
|
||||
{
|
||||
url = getDomainname() + '/info?type=SDCardFreePartitionSpace';
|
||||
var url = domainname + '/info?type=SDCardFreePartitionSpace';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -446,7 +441,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadSDCardPartitionAllocationSize()
|
||||
{
|
||||
url = getDomainname() + '/info?type=SDCardPartitionAllocationSize';
|
||||
var url = domainname + '/info?type=SDCardPartitionAllocationSize';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -459,7 +454,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadMemoryInfo()
|
||||
{
|
||||
url = getDomainname() + '/heap';
|
||||
var url = domainname + '/heap';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -479,7 +474,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadChipCores()
|
||||
{
|
||||
url = getDomainname() + '/info?type=ChipCores';
|
||||
var url = domainname + '/info?type=ChipCores';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -492,7 +487,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadChipRevision()
|
||||
{
|
||||
url = getDomainname() + '/info?type=ChipRevision';
|
||||
var url = domainname + '/info?type=ChipRevision';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -505,7 +500,7 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
function loadChipFeatures()
|
||||
{
|
||||
url = getDomainname() + '/info?type=ChipFeatures';
|
||||
var url = domainname + '/info?type=ChipFeatures';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -541,3 +536,5 @@ Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edg
|
||||
|
||||
init();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -40,33 +40,34 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="box">
|
||||
<div class="row header">
|
||||
<button class="button" onClick="reload();">Reload</button>
|
||||
<button class="button" onClick="window.open(getDomainname() + '/logfileact');">Show Full Log</button>
|
||||
<button class="button" onClick="window.location.href = getDomainname() + '/fileserver/log/message/'">Show Older Log Files</button>
|
||||
<button class="button" onClick="window.open(domainname + '/logfileact');">Show Full Log</button>
|
||||
<button class="button" onClick="window.location.href = domainname + '/fileserver/log/message/'">Show Older Log Files</button>
|
||||
</div>
|
||||
<div class="row content" id="log"><br><br><br><b>Loading logfile, please wait...</b></div>
|
||||
<div class="row footer">
|
||||
<button class="button" onClick="reload();">Reload</button>
|
||||
<button class="button" onClick="window.open(getDomainname() + '/logfileact');">Show Full Log</button>
|
||||
<button class="button" onClick="window.location.href = getDomainname() + '/fileserver/log/message/'">Show Older Log Files</button>
|
||||
<button class="button" onClick="window.open(domainname + '/logfileact');">Show Full Log</button>
|
||||
<button class="button" onClick="window.location.href = domainname + '/fileserver/log/message/'">Show Older Log Files</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
function reload() {
|
||||
// document.getElementById('log').innerHTML += "<br><b>Reloading...<b><br><br>";
|
||||
document.getElementById('log').innerHTML += "<b>Reloading...</b>";
|
||||
window.scrollBy(0,document.body.scrollHeight);
|
||||
funcRequest(getDomainname() + '/log');
|
||||
funcRequest(domainname + '/log');
|
||||
}
|
||||
|
||||
|
||||
function processLogLine(line, index, arr) {
|
||||
/* Make sure the whitespaces in the uptime field get persevered */
|
||||
uptimePart = line.slice(0, line.indexOf("]")).replace(/ /g, " ");
|
||||
@@ -113,7 +114,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
funcRequest(getDomainname() + '/log');
|
||||
funcRequest(domainname + '/log');
|
||||
|
||||
</script>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
@@ -29,6 +29,7 @@
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -56,12 +57,8 @@
|
||||
<h3><span id="status">Status: Idle</span></h3>
|
||||
<p id="loaded_n_total"></p>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<script language="JavaScript">
|
||||
var domainname = getDomainname();
|
||||
|
||||
<script type="text/javascript">
|
||||
var action_runtime = 0;
|
||||
|
||||
/* Max size of an individual file. Make sure this
|
||||
@@ -128,7 +125,6 @@
|
||||
document.getElementById("start_OTA_button").disabled = false;
|
||||
}
|
||||
|
||||
|
||||
function start_OTA() {
|
||||
document.getElementById("start_OTA_button").disabled = true;
|
||||
|
||||
@@ -140,14 +136,12 @@
|
||||
prepareOnServer();
|
||||
}
|
||||
|
||||
|
||||
function doRebootAfterUpdate() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("GET", domainname + "/reboot", true);
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
|
||||
function prepareOnServer() {
|
||||
document.getElementById("status").innerText = "Status: Preparing device...";
|
||||
|
||||
@@ -175,7 +169,6 @@
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
|
||||
function validateMd5(md5_on_device, callback) {
|
||||
const reader = new FileReader();
|
||||
|
||||
@@ -197,7 +190,6 @@
|
||||
reader.readAsArrayBuffer(fileInput[0]);
|
||||
}
|
||||
|
||||
|
||||
function extract() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
/* first delete the old firmware */
|
||||
@@ -254,12 +246,10 @@
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
|
||||
function _(el) {
|
||||
return document.getElementById(el);
|
||||
}
|
||||
|
||||
|
||||
function upload() {
|
||||
document.getElementById("status").innerText = "Status: Uploading...";
|
||||
|
||||
@@ -278,7 +268,6 @@
|
||||
ajax.send(file);
|
||||
}
|
||||
|
||||
|
||||
function progressHandler(event) {
|
||||
_("loaded_n_total").innerHTML = "Uploaded " + (event.loaded / 1024 / 1024).toFixed(2) +
|
||||
" MB of " + (event.total / 1024/ 1024).toFixed(2) + " MB";
|
||||
@@ -295,7 +284,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function completeHandler(event) {
|
||||
console.log("Upload completed");
|
||||
console.log("Response: " + event.target.responseText);
|
||||
@@ -323,14 +311,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function errorHandler(event) {
|
||||
_("status").innerHTML = "Status: Upload Failed";
|
||||
firework.launch('Upload failed!', 'danger', 30000);
|
||||
document.getElementById("file_selector").disabled = false;
|
||||
}
|
||||
|
||||
|
||||
function abortHandler(event) {
|
||||
_("status").innerHTML = "Status: Upload Aborted";
|
||||
firework.launch('Upload aborted!', 'danger', 30000);
|
||||
@@ -338,4 +324,4 @@
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -65,10 +65,14 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial">
|
||||
|
||||
<table class="tg">
|
||||
<tr>
|
||||
<th class="th">Value</th>
|
||||
@@ -130,11 +134,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function addZero(i) {
|
||||
if (i < 10) {
|
||||
@@ -167,7 +166,7 @@
|
||||
var h = addZero(d.getHours());
|
||||
var m = addZero(d.getMinutes());
|
||||
var s = addZero(d.getSeconds());
|
||||
document.getElementById("img").src = getDomainname() + '/img_tmp/alg_roi.jpg?timestamp=' + timestamp;
|
||||
document.getElementById("img").src = domainname + '/img_tmp/alg_roi.jpg?timestamp=' + timestamp;
|
||||
$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
|
||||
}
|
||||
|
||||
@@ -326,23 +325,7 @@
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
/*
|
||||
function setImageMaxWidth() {
|
||||
loadConfig(domainname);
|
||||
ParseConfig();
|
||||
param = getConfigParameters();
|
||||
|
||||
if(param["TakeImage"]["CamFrameSize"].value == "QVGA") {
|
||||
document.getElementById("img").style.maxWidth = "320px";
|
||||
}
|
||||
else {
|
||||
document.getElementById("img").style.maxWidth = "640px";
|
||||
}
|
||||
}
|
||||
*/
|
||||
function init(){
|
||||
domainname = getDomainname();
|
||||
// setImageMaxWidth(); // CamFrameSize was replaced by zoom - CamFrameSize is no longer needed/used for zoom
|
||||
Refresh();
|
||||
}
|
||||
|
||||
@@ -350,4 +333,4 @@
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -59,6 +59,14 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -129,20 +137,10 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var domainname = getDomainname();
|
||||
var NUMBERS;
|
||||
var NUMBERS,
|
||||
param,
|
||||
category;
|
||||
|
||||
function setprevalue() {
|
||||
var inputVal = document.getElementById("myInput").value;
|
||||
@@ -158,8 +156,7 @@ function setprevalue() {
|
||||
document.getElementById("result").innerHTML=response;
|
||||
firework.launch('New \"previous value\" set', 'success', 5000);
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
catch (error) {
|
||||
firework.launch('Failed to get data from device!', 'danger', 30000);
|
||||
}
|
||||
}
|
||||
@@ -177,8 +174,7 @@ function loadPrevalue(_domainname) {
|
||||
response = xhttp.responseText;
|
||||
document.getElementById("prevalue").innerHTML=response;
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
catch (error) {
|
||||
firework.launch('Failed to get data from device!', 'danger', 30000);
|
||||
}
|
||||
|
||||
@@ -203,13 +199,11 @@ function loadPrevalue(_domainname) {
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
catch (error) {
|
||||
firework.launch('Failed to get data from device!', 'danger', 30000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function numberChanged(){
|
||||
loadPrevalue(domainname);
|
||||
}
|
||||
@@ -240,14 +234,15 @@ function UpdateNUMBERS(_sel){
|
||||
loadPrevalue(domainname);
|
||||
}
|
||||
|
||||
|
||||
function init(){
|
||||
domainname = getDomainname();
|
||||
loadConfig(domainname);
|
||||
ParseConfig();
|
||||
param = getConfigParameters();
|
||||
category = getConfigCategory();
|
||||
|
||||
UpdateNUMBERS();
|
||||
loadPrevalue(domainname);
|
||||
}
|
||||
|
||||
init();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -109,7 +109,7 @@ function FileCopyOnServer(_source, _target, _domainname = "") {
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error) {}
|
||||
} catch (error) { console.log(error); }
|
||||
}
|
||||
|
||||
function FileDeleteOnServer(_filename, _domainname = "") {
|
||||
@@ -128,7 +128,7 @@ function FileDeleteOnServer(_filename, _domainname = "") {
|
||||
var url = _domainname + "/delete" + _filename;
|
||||
xhttp.open("POST", url, false);
|
||||
xhttp.send();
|
||||
} catch (error) {}
|
||||
} catch (error) { console.log(error); }
|
||||
|
||||
return okay;
|
||||
}
|
||||
@@ -155,11 +155,63 @@ function FileSendContent(_content, _filename, _domainname = "") {
|
||||
upload_path = _domainname + "/upload" + _filename;
|
||||
xhttp.open("POST", upload_path, false);
|
||||
xhttp.send(_content);
|
||||
} catch (error) {}
|
||||
} catch (error) { console.log(error); }
|
||||
|
||||
return okay;
|
||||
}
|
||||
|
||||
function CopyReferenceToImgTmp(_domainname) {
|
||||
for (index = 0; index < 2; ++index) {
|
||||
_filenamevon = REFERENCES[index]["name"];
|
||||
_filenamenach = _filenamevon.replace("/config/", "/img_tmp/");
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
|
||||
_filenamevon = _filenamevon.replace(".jpg", "_org.jpg");
|
||||
_filenamenach = _filenamenach.replace(".jpg", "_org.jpg");
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
}
|
||||
}
|
||||
|
||||
function UpdateConfigReferences(_domainname){
|
||||
for (var index = 0; index < 2; ++index) {
|
||||
_filenamenach = REFERENCES[index]["name"];
|
||||
_filenamevon = _filenamenach.replace("/config/", "/img_tmp/");
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
|
||||
_filenamenach = _filenamenach.replace(".jpg", "_org.jpg");
|
||||
_filenamevon = _filenamevon.replace(".jpg", "_org.jpg");
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
}
|
||||
}
|
||||
|
||||
function UpdateConfigReference(_anzneueref, _domainname){
|
||||
var index = 0;
|
||||
|
||||
if (_anzneueref == 1) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
else if (_anzneueref == 2) {
|
||||
index = 1;
|
||||
}
|
||||
|
||||
_filenamenach = REFERENCES[index]["name"];
|
||||
_filenamevon = _filenamenach.replace("/config/", "/img_tmp/");
|
||||
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
|
||||
_filenamenach = _filenamenach.replace(".jpg", "_org.jpg");
|
||||
_filenamevon = _filenamevon.replace(".jpg", "_org.jpg");
|
||||
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
}
|
||||
|
||||
function MakeTempRefImage(_filename, _enhance, _domainname){
|
||||
var filename = _filename["name"].replace("/config/", "/img_tmp/");
|
||||
|
||||
@@ -174,7 +226,7 @@ function MakeTempRefImage(_filename, _enhance, _domainname){
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error){}
|
||||
} catch (error){ console.log(error); }
|
||||
|
||||
if (xhttp.responseText == "CutImage Done") {
|
||||
if (_enhance == true) {
|
||||
@@ -230,7 +282,7 @@ function decryptConfigPwOnSD(_domainname = getDomainname()) {
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error) {}
|
||||
} catch (error) { console.log(error); }
|
||||
|
||||
if (xhttp.responseText == "decrypted") {
|
||||
return true;
|
||||
@@ -247,7 +299,7 @@ function decryptWifiPwOnSD(_domainname = getDomainname()) {
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error) {}
|
||||
} catch (error) { console.log(error); }
|
||||
|
||||
if (xhttp.responseText == "decrypted") {
|
||||
return true;
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
var config_gesamt = "";
|
||||
var config_split = [];
|
||||
var config_gesamt_temp = "";
|
||||
|
||||
var config_split = "";
|
||||
var config_split_temp = "";
|
||||
|
||||
var param = [];
|
||||
var category;
|
||||
var ref = new Array(2);
|
||||
var param_temp = [];
|
||||
|
||||
var namenumberslist = "";
|
||||
var datalist = "";
|
||||
var tflitelist = "";
|
||||
|
||||
var category = [];
|
||||
var category_temp = [];
|
||||
|
||||
var NUMBERS = new Array(0);
|
||||
var NUMBERS_temp = new Array(0);
|
||||
|
||||
var REFERENCES = new Array(0);
|
||||
var REFERENCES_temp = new Array(0);
|
||||
|
||||
var domainname_for_testing = "";
|
||||
|
||||
@@ -31,6 +45,10 @@ function getConfig() {
|
||||
return config_gesamt;
|
||||
}
|
||||
|
||||
function getConfigCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
function loadConfig(_domainname) {
|
||||
config_gesamt = "";
|
||||
|
||||
@@ -48,22 +66,7 @@ function loadConfig(_domainname) {
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error) {}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function loadConfig1(_domainname) {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
try {
|
||||
url = _domainname + '/fileserver/config/config.ini';
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
config_gesamt = xhttp.responseText;
|
||||
} catch (error) {}
|
||||
|
||||
return true;
|
||||
} catch (error) { console.log(error); }
|
||||
}
|
||||
|
||||
function SaveConfigToServer(_domainname){
|
||||
@@ -86,7 +89,7 @@ function SaveConfigToServer(_domainname){
|
||||
|
||||
function getNUMBERSList() {
|
||||
_domainname = getDomainname();
|
||||
var namenumberslist = "";
|
||||
namenumberslist = "";
|
||||
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
@@ -103,7 +106,7 @@ function getNUMBERSList() {
|
||||
url = _domainname + '/editflow?task=namenumbers';
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error) {}
|
||||
} catch (error) { console.log(error); }
|
||||
|
||||
namenumberslist = namenumberslist.split("\t");
|
||||
|
||||
@@ -129,7 +132,7 @@ function getDATAList() {
|
||||
url = _domainname + '/editflow?task=data';
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error) {}
|
||||
} catch (error) { console.log(error); }
|
||||
|
||||
datalist = datalist.split("\t");
|
||||
datalist.pop();
|
||||
@@ -139,7 +142,8 @@ function getDATAList() {
|
||||
}
|
||||
|
||||
function getTFLITEList() {
|
||||
_domainname = getDomainname();
|
||||
_domainname = getDomainname();
|
||||
|
||||
tflitelist = "";
|
||||
|
||||
var xhttp = new XMLHttpRequest();
|
||||
@@ -157,7 +161,7 @@ function getTFLITEList() {
|
||||
url = _domainname + '/editflow?task=tflite';
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
} catch (error) {}
|
||||
} catch (error) { console.log(error); }
|
||||
|
||||
tflitelist = tflitelist.split("\t");
|
||||
tflitelist.sort();
|
||||
@@ -231,7 +235,7 @@ function ParseConfig() {
|
||||
category[catname]["enabled"] = false;
|
||||
category[catname]["found"] = false;
|
||||
param[catname] = new Object();
|
||||
ParamAddValue(param, catname, "Model");
|
||||
ParamAddValue(param, catname, "Model", 1, false, "/config/dig-cont_0712_s3_q.tflite");
|
||||
ParamAddValue(param, catname, "CNNGoodThreshold", 1, false, "0.5");
|
||||
ParamAddValue(param, catname, "ROIImagesLocation", 1, false, "/log/digit");
|
||||
ParamAddValue(param, catname, "ROIImagesRetention", 1, false, "3");
|
||||
@@ -241,7 +245,7 @@ function ParseConfig() {
|
||||
category[catname]["enabled"] = false;
|
||||
category[catname]["found"] = false;
|
||||
param[catname] = new Object();
|
||||
ParamAddValue(param, catname, "Model");
|
||||
ParamAddValue(param, catname, "Model", 1, false, "/config/ana-cont_1300_s2.tflite");
|
||||
ParamAddValue(param, catname, "ROIImagesLocation", 1, false, "/log/analog");
|
||||
ParamAddValue(param, catname, "ROIImagesRetention", 1, false, "3");
|
||||
|
||||
@@ -253,7 +257,7 @@ function ParseConfig() {
|
||||
// ParamAddValue(param, catname, "PreValueUse", 1, true, "true");
|
||||
ParamAddValue(param, catname, "PreValueUse", 1, false, "true");
|
||||
ParamAddValue(param, catname, "PreValueAgeStartup", 1, false, "720");
|
||||
ParamAddValue(param, catname, "SkipErrorMessage", 1, false, "false");
|
||||
ParamAddValue(param, catname, "SkipErrorMessage", 1, true, "false");
|
||||
ParamAddValue(param, catname, "AllowNegativeRates", 1, true, "false");
|
||||
ParamAddValue(param, catname, "DecimalShift", 1, true, "0");
|
||||
ParamAddValue(param, catname, "AnalogToDigitTransitionStart", 1, true, "9.2");
|
||||
@@ -378,12 +382,12 @@ function ParseConfig() {
|
||||
|
||||
while (aktline < config_split.length){
|
||||
for (var cat in category) {
|
||||
zw = cat.toUpperCase();
|
||||
zw1 = "[" + zw + "]";
|
||||
zw2 = ";[" + zw + "]";
|
||||
var cat_temp = cat.toUpperCase();
|
||||
var cat_aktive = "[" + cat_temp + "]";
|
||||
var cat_inaktive = ";[" + cat_temp + "]";
|
||||
|
||||
if ((config_split[aktline].trim().toUpperCase() == zw1) || (config_split[aktline].trim().toUpperCase() == zw2)) {
|
||||
if (config_split[aktline].trim().toUpperCase() == zw1) {
|
||||
if ((config_split[aktline].trim().toUpperCase() == cat_aktive) || (config_split[aktline].trim().toUpperCase() == cat_inaktive)) {
|
||||
if (config_split[aktline].trim().toUpperCase() == cat_aktive) {
|
||||
category[cat]["enabled"] = true;
|
||||
}
|
||||
|
||||
@@ -396,43 +400,6 @@ function ParseConfig() {
|
||||
|
||||
aktline++;
|
||||
}
|
||||
|
||||
// Make the downward compatiblity with DataLogging
|
||||
if (category["DataLogging"]["found"] == false) {
|
||||
category["DataLogging"]["found"] = true;
|
||||
category["DataLogging"]["enabled"] = true;
|
||||
|
||||
param["DataLogging"]["DataLogActive"]["found"] = true;
|
||||
param["DataLogging"]["DataLogActive"]["enabled"] = true;
|
||||
param["DataLogging"]["DataLogActive"]["value1"] = "true";
|
||||
|
||||
param["DataLogging"]["DataFilesRetention"]["found"] = true;
|
||||
param["DataLogging"]["DataFilesRetention"]["enabled"] = true;
|
||||
param["DataLogging"]["DataFilesRetention"]["value1"] = "3";
|
||||
}
|
||||
|
||||
if (category["DataLogging"]["enabled"] == false) {
|
||||
category["DataLogging"]["enabled"] = true
|
||||
}
|
||||
|
||||
if (param["DataLogging"]["DataLogActive"]["enabled"] == false && param["DataLogging"]["DataLogActive"]["value1"] == "") {
|
||||
param["DataLogging"]["DataLogActive"]["found"] = true;
|
||||
param["DataLogging"]["DataLogActive"]["enabled"] = true;
|
||||
param["DataLogging"]["DataLogActive"]["value1"] = "true";
|
||||
}
|
||||
|
||||
if (param["DataLogging"]["DataFilesRetention"]["enabled"] == false && param["DataLogging"]["DataFilesRetention"]["value1"] == "") {
|
||||
param["DataLogging"]["DataFilesRetention"]["found"] = true;
|
||||
param["DataLogging"]["DataFilesRetention"]["enabled"] = true;
|
||||
param["DataLogging"]["DataFilesRetention"]["value1"] = "3";
|
||||
}
|
||||
|
||||
// Downward compatibility: Create RSSIThreshold if not available
|
||||
if (param["System"]["RSSIThreshold"]["found"] == false) {
|
||||
param["System"]["RSSIThreshold"]["found"] = true;
|
||||
param["System"]["RSSIThreshold"]["enabled"] = false;
|
||||
param["System"]["RSSIThreshold"]["value1"] = "0";
|
||||
}
|
||||
}
|
||||
|
||||
function ParamAddValue(param, _cat, _param, _anzParam = 1, _isNUMBER = false, _defaultValue = "", _checkRegExList = null) {
|
||||
@@ -444,6 +411,19 @@ function ParamAddValue(param, _cat, _param, _anzParam = 1, _isNUMBER = false, _d
|
||||
param[_cat][_param]["defaultValue"] = _defaultValue;
|
||||
param[_cat][_param]["Numbers"] = _isNUMBER;
|
||||
param[_cat][_param].checkRegExList = _checkRegExList;
|
||||
|
||||
if (_isNUMBER) {
|
||||
for (var _num in NUMBERS) {
|
||||
for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
|
||||
NUMBERS[_num][_cat][_param]["value"+j] = _defaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var j = 1; j <= param[_cat][_param]["anzParam"]; ++j) {
|
||||
param[_cat][_param]["value"+j] = _defaultValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function ParseConfigParamAll(_aktline, _catname) {
|
||||
@@ -503,25 +483,28 @@ function ParamExtractValueAll(_param, _linesplit, _catname, _aktline, _iscom) {
|
||||
|
||||
if (_AktPara.toUpperCase() == paramname.toUpperCase()) {
|
||||
while (_linesplit.length <= _param[_catname][paramname]["anzParam"]) {
|
||||
_linesplit.push("");
|
||||
// line contains no value, so the default value is loaded
|
||||
_linesplit.push(_param[_catname][paramname]["defaultValue"]);
|
||||
}
|
||||
|
||||
_param[_catname][paramname]["found"] = true;
|
||||
_param[_catname][paramname]["enabled"] = !_iscom;
|
||||
_param[_catname][paramname]["line"] = _aktline;
|
||||
|
||||
if (_param[_catname][paramname]["Numbers"] == true) { // möglicher Multiusage
|
||||
abc = getNUMBERS(_linesplit[0]);
|
||||
abc[_catname][paramname] = new Object;
|
||||
abc[_catname][paramname]["found"] = true;
|
||||
abc[_catname][paramname]["enabled"] = !_iscom;
|
||||
if (_param[_catname][paramname]["Numbers"] == true) {
|
||||
// möglicher Multiusage
|
||||
var _numbers = getNUMBERS(_linesplit[0]);
|
||||
_numbers[_catname][paramname] = new Object;
|
||||
_numbers[_catname][paramname]["found"] = true;
|
||||
_numbers[_catname][paramname]["enabled"] = !_iscom;
|
||||
|
||||
for (var j = 1; j <= _param[_catname][paramname]["anzParam"]; ++j) {
|
||||
abc[_catname][paramname]["value"+j] = _linesplit[j];
|
||||
_numbers[_catname][paramname]["value"+j] = _linesplit[j];
|
||||
}
|
||||
|
||||
if (abc["name"] == "default") {
|
||||
for (_num in NUMBERS) { // wert mit Default belegen
|
||||
if (_numbers["name"] == "default") {
|
||||
for (var _num in NUMBERS) {
|
||||
// Assign value to default
|
||||
if (NUMBERS[_num][_catname][paramname]["found"] == false) {
|
||||
NUMBERS[_num][_catname][paramname]["found"] = true;
|
||||
NUMBERS[_num][_catname][paramname]["enabled"] = !_iscom;
|
||||
@@ -534,11 +517,7 @@ function ParamExtractValueAll(_param, _linesplit, _catname, _aktline, _iscom) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
_param[_catname][paramname]["found"] = true;
|
||||
_param[_catname][paramname]["enabled"] = !_iscom;
|
||||
_param[_catname][paramname]["line"] = _aktline;
|
||||
|
||||
else {
|
||||
for (var j = 1; j <= _param[_catname][paramname]["anzParam"]; ++j) {
|
||||
_param[_catname][paramname]["value"+j] = _linesplit[j];
|
||||
}
|
||||
@@ -547,184 +526,9 @@ function ParamExtractValueAll(_param, _linesplit, _catname, _aktline, _iscom) {
|
||||
}
|
||||
}
|
||||
|
||||
function getCamConfig() {
|
||||
ParseConfig();
|
||||
|
||||
param["System"]["Tooltip"]["enabled"] = true;
|
||||
param["Alignment"]["InitialRotate"]["enabled"] = true;
|
||||
|
||||
param["TakeImage"]["WaitBeforeTakingPicture"]["enabled"] = true;
|
||||
param["TakeImage"]["CamGainceiling"]["enabled"] = true; // Image gain (GAINCEILING_x2, x4, x8, x16, x32, x64 or x128)
|
||||
param["TakeImage"]["CamQuality"]["enabled"] = true; // 0 - 63
|
||||
param["TakeImage"]["CamBrightness"]["enabled"] = true; // (-2 to 2) - set brightness
|
||||
param["TakeImage"]["CamContrast"]["enabled"] = true; //-2 - 2
|
||||
param["TakeImage"]["CamSaturation"]["enabled"] = true; //-2 - 2
|
||||
param["TakeImage"]["CamSharpness"]["enabled"] = true; //-2 - 2
|
||||
param["TakeImage"]["CamAutoSharpness"]["enabled"] = true; //(1 or 0)
|
||||
param["TakeImage"]["CamSpecialEffect"]["enabled"] = true; // 0 - 6
|
||||
param["TakeImage"]["CamWbMode"]["enabled"] = true; // 0 to 4 - if awb_gain enabled (0 - Auto, 1 - Sunny, 2 - Cloudy, 3 - Office, 4 - Home)
|
||||
param["TakeImage"]["CamAwb"]["enabled"] = true; // white balance enable (0 or 1)
|
||||
param["TakeImage"]["CamAwbGain"]["enabled"] = true; // Auto White Balance enable (0 or 1)
|
||||
param["TakeImage"]["CamAec"]["enabled"] = true; // auto exposure off (1 or 0)
|
||||
param["TakeImage"]["CamAec2"]["enabled"] = true; // automatic exposure sensor (0 or 1)
|
||||
param["TakeImage"]["CamAeLevel"]["enabled"] = true; // auto exposure levels (-2 to 2)
|
||||
param["TakeImage"]["CamAecValue"]["enabled"] = true; // set exposure manually (0-1200)
|
||||
param["TakeImage"]["CamAgc"]["enabled"] = true; // auto gain off (1 or 0)
|
||||
param["TakeImage"]["CamAgcGain"]["enabled"] = true; // set gain manually (0 - 30)
|
||||
param["TakeImage"]["CamBpc"]["enabled"] = true; // black pixel correction
|
||||
param["TakeImage"]["CamWpc"]["enabled"] = true; // white pixel correction
|
||||
param["TakeImage"]["CamRawGma"]["enabled"] = true; // (1 or 0)
|
||||
param["TakeImage"]["CamLenc"]["enabled"] = true; // lens correction (1 or 0)
|
||||
param["TakeImage"]["CamHmirror"]["enabled"] = true; // (0 or 1) flip horizontally
|
||||
param["TakeImage"]["CamVflip"]["enabled"] = true; // Invert image (0 or 1)
|
||||
param["TakeImage"]["CamDcw"]["enabled"] = true; // downsize enable (1 or 0)
|
||||
param["TakeImage"]["CamDenoise"]["enabled"] = true; // The OV2640 does not support it, OV3660 and OV5640 (0 to 8)
|
||||
param["TakeImage"]["CamZoom"]["enabled"] = true;
|
||||
param["TakeImage"]["CamZoomOffsetX"]["enabled"] = true;
|
||||
param["TakeImage"]["CamZoomOffsetY"]["enabled"] = true;
|
||||
param["TakeImage"]["CamZoomSize"]["enabled"] = true;
|
||||
param["TakeImage"]["LEDIntensity"]["enabled"] = true;
|
||||
|
||||
if (!param["System"]["Tooltip"]["found"]) {
|
||||
param["System"]["Tooltip"]["found"] = true;
|
||||
param["System"]["Tooltip"].value1 = 'true';
|
||||
}
|
||||
|
||||
if (!param["Alignment"]["InitialRotate"]["found"]) {
|
||||
param["Alignment"]["InitialRotate"]["found"] = true;
|
||||
param["Alignment"]["InitialRotate"].value1 = 'false';
|
||||
}
|
||||
|
||||
if (!param["TakeImage"]["WaitBeforeTakingPicture"]["found"]) {
|
||||
param["TakeImage"]["WaitBeforeTakingPicture"]["found"] = true;
|
||||
param["TakeImage"]["WaitBeforeTakingPicture"].value1 = '5';
|
||||
}
|
||||
if (!param["TakeImage"]["CamGainceiling"]["found"]) {
|
||||
param["TakeImage"]["CamGainceiling"]["found"] = true;
|
||||
// param["TakeImage"]["CamGainceiling"].value1 = '2';
|
||||
param["TakeImage"]["CamGainceiling"].value1 = 'x8';
|
||||
}
|
||||
if (!param["TakeImage"]["CamQuality"]["found"]) {
|
||||
param["TakeImage"]["CamQuality"]["found"] = true;
|
||||
param["TakeImage"]["CamQuality"].value1 = '10';
|
||||
}
|
||||
if (!param["TakeImage"]["CamBrightness"]["found"]) {
|
||||
param["TakeImage"]["CamBrightness"]["found"] = true;
|
||||
param["TakeImage"]["CamBrightness"].value1 = '0';
|
||||
}
|
||||
if (!param["TakeImage"]["CamContrast"]["found"]) {
|
||||
param["TakeImage"]["CamContrast"]["found"] = true;
|
||||
param["TakeImage"]["CamContrast"].value1 = '0';
|
||||
}
|
||||
if (!param["TakeImage"]["CamSaturation"]["found"]) {
|
||||
param["TakeImage"]["CamSaturation"]["found"] = true;
|
||||
param["TakeImage"]["CamSaturation"].value1 = '0';
|
||||
}
|
||||
if (!param["TakeImage"]["CamSharpness"]["found"]) {
|
||||
param["TakeImage"]["CamSharpness"]["found"] = true;
|
||||
param["TakeImage"]["CamSharpness"].value1 = '0';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAutoSharpness"]["found"]) {
|
||||
param["TakeImage"]["CamAutoSharpness"]["found"] = true;
|
||||
param["TakeImage"]["CamAutoSharpness"].value1 = 'false';
|
||||
}
|
||||
if (!param["TakeImage"]["CamSpecialEffect"]["found"]) {
|
||||
param["TakeImage"]["CamSpecialEffect"]["found"] = true;
|
||||
param["TakeImage"]["CamSpecialEffect"].value1 = 'no_effect';
|
||||
}
|
||||
if (!param["TakeImage"]["CamWbMode"]["found"]) {
|
||||
param["TakeImage"]["CamWbMode"]["found"] = true;
|
||||
param["TakeImage"]["CamWbMode"].value1 = 'auto';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAwb"]["found"]) {
|
||||
param["TakeImage"]["CamAwb"]["found"] = true;
|
||||
param["TakeImage"]["CamAwb"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAwbGain"]["found"]) {
|
||||
param["TakeImage"]["CamAwbGain"]["found"] = true;
|
||||
param["TakeImage"]["CamAwbGain"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAec"]["found"]) {
|
||||
param["TakeImage"]["CamAec"]["found"] = true;
|
||||
param["TakeImage"]["CamAec"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAec2"]["found"]) {
|
||||
param["TakeImage"]["CamAec2"]["found"] = true;
|
||||
param["TakeImage"]["CamAec2"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAeLevel"]["found"]) {
|
||||
param["TakeImage"]["CamAeLevel"]["found"] = true;
|
||||
param["TakeImage"]["CamAeLevel"].value1 = '2';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAecValue"]["found"]) {
|
||||
param["TakeImage"]["CamAecValue"]["found"] = true;
|
||||
param["TakeImage"]["CamAecValue"].value1 = '600';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAgc"]["found"]) {
|
||||
param["TakeImage"]["CamAgc"]["found"] = true;
|
||||
param["TakeImage"]["CamAgc"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamAgcGain"]["found"]) {
|
||||
param["TakeImage"]["CamAgcGain"]["found"] = true;
|
||||
param["TakeImage"]["CamAgcGain"].value1 = '8';
|
||||
}
|
||||
if (!param["TakeImage"]["CamBpc"]["found"]) {
|
||||
param["TakeImage"]["CamBpc"]["found"] = true;
|
||||
param["TakeImage"]["CamBpc"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamWpc"]["found"]) {
|
||||
param["TakeImage"]["CamWpc"]["found"] = true;
|
||||
param["TakeImage"]["CamWpc"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamRawGma"]["found"]) {
|
||||
param["TakeImage"]["CamRawGma"]["found"] = true;
|
||||
param["TakeImage"]["CamRawGma"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamLenc"]["found"]) {
|
||||
param["TakeImage"]["CamLenc"]["found"] = true;
|
||||
param["TakeImage"]["CamLenc"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamHmirror"]["found"]) {
|
||||
param["TakeImage"]["CamHmirror"]["found"] = true;
|
||||
param["TakeImage"]["CamHmirror"].value1 = 'false';
|
||||
}
|
||||
if (!param["TakeImage"]["CamVflip"]["found"]) {
|
||||
param["TakeImage"]["CamVflip"]["found"] = true;
|
||||
param["TakeImage"]["CamVflip"].value1 = 'false';
|
||||
}
|
||||
if (!param["TakeImage"]["CamDcw"]["found"]) {
|
||||
param["TakeImage"]["CamDcw"]["found"] = true;
|
||||
param["TakeImage"]["CamDcw"].value1 = 'true';
|
||||
}
|
||||
if (!param["TakeImage"]["CamDenoise"]["found"]) {
|
||||
param["TakeImage"]["CamDenoise"]["found"] = true;
|
||||
param["TakeImage"]["CamDenoise"].value1 = '0';
|
||||
}
|
||||
if (!param["TakeImage"]["CamZoom"]["found"]) {
|
||||
param["TakeImage"]["CamZoom"]["found"] = true;
|
||||
param["TakeImage"]["CamZoom"].value1 = 'false';
|
||||
}
|
||||
if (!param["TakeImage"]["CamZoomOffsetX"]["found"]) {
|
||||
param["TakeImage"]["CamZoomOffsetX"]["found"] = true;
|
||||
param["TakeImage"]["CamZoomOffsetX"].value1 = '0';
|
||||
}
|
||||
if (!param["TakeImage"]["CamZoomOffsetY"]["found"]) {
|
||||
param["TakeImage"]["CamZoomOffsetY"]["found"] = true;
|
||||
param["TakeImage"]["CamZoomOffsetY"].value1 = '0';
|
||||
}
|
||||
if (!param["TakeImage"]["CamZoomSize"]["found"]) {
|
||||
param["TakeImage"]["CamZoomSize"]["found"] = true;
|
||||
param["TakeImage"]["CamZoomSize"].value1 = '0';
|
||||
}
|
||||
if (!param["TakeImage"]["LEDIntensity"]["found"]) {
|
||||
param["TakeImage"]["LEDIntensity"]["found"] = true;
|
||||
param["TakeImage"]["LEDIntensity"].value1 = '50';
|
||||
}
|
||||
|
||||
return param;
|
||||
}
|
||||
|
||||
function getConfigParameters() {
|
||||
loadConfig(getDomainname());
|
||||
ParseConfig(getDomainname());
|
||||
return param;
|
||||
}
|
||||
|
||||
@@ -739,48 +543,54 @@ function WriteConfigININew() {
|
||||
config_split = new Array(0);
|
||||
|
||||
for (var cat in param) {
|
||||
text = "[" + cat + "]";
|
||||
var text_cat = "[" + cat + "]";
|
||||
|
||||
if (!category[cat]["enabled"]) {
|
||||
text = ";" + text;
|
||||
text_cat = ";" + text_cat;
|
||||
}
|
||||
|
||||
config_split.push(text);
|
||||
config_split.push(text_cat);
|
||||
|
||||
for (var name in param[cat]) {
|
||||
if (param[cat][name]["Numbers"]) {
|
||||
for (_num in NUMBERS) {
|
||||
text = NUMBERS[_num]["name"] + "." + name;
|
||||
var text_numbers = NUMBERS[_num]["name"] + "." + name;
|
||||
|
||||
var text = text + " ="
|
||||
text_numbers = text_numbers + " ="
|
||||
|
||||
for (var j = 1; j <= param[cat][name]["anzParam"]; ++j) {
|
||||
if (!(typeof NUMBERS[_num][cat][name]["value"+j] == 'undefined')) {
|
||||
text = text + " " + NUMBERS[_num][cat][name]["value"+j];
|
||||
text_numbers = text_numbers + " " + NUMBERS[_num][cat][name]["value"+j];
|
||||
}
|
||||
else {
|
||||
text_numbers = text_numbers + " " + NUMBERS[_num][cat][name]["defaultValue"];
|
||||
}
|
||||
}
|
||||
|
||||
if (!NUMBERS[_num][cat][name]["enabled"]) {
|
||||
text = ";" + text;
|
||||
if ((!category[cat]["enabled"]) || (!NUMBERS[_num][cat][name]["enabled"])) {
|
||||
text_numbers = ";" + text_numbers;
|
||||
}
|
||||
|
||||
config_split.push(text);
|
||||
config_split.push(text_numbers);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var text = name + " ="
|
||||
var text_name = name + " ="
|
||||
|
||||
for (var j = 1; j <= param[cat][name]["anzParam"]; ++j) {
|
||||
if (!(typeof param[cat][name]["value"+j] == 'undefined')) {
|
||||
text = text + " " + param[cat][name]["value"+j];
|
||||
text_name = text_name + " " + param[cat][name]["value"+j];
|
||||
}
|
||||
else {
|
||||
text_name = text_name + " " + param[cat][name]["defaultValue"];
|
||||
}
|
||||
}
|
||||
|
||||
if (!param[cat][name]["enabled"]) {
|
||||
text = ";" + text;
|
||||
if ((!category[cat]["enabled"]) || (!param[cat][name]["enabled"])) {
|
||||
text_name = ";" + text_name;
|
||||
}
|
||||
|
||||
config_split.push(text);
|
||||
config_split.push(text_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -788,13 +598,13 @@ function WriteConfigININew() {
|
||||
for (var _roi in NUMBERS) {
|
||||
if (NUMBERS[_roi]["digit"].length > 0) {
|
||||
for (var _roiddet in NUMBERS[_roi]["digit"]) {
|
||||
text = NUMBERS[_roi]["name"] + "." + NUMBERS[_roi]["digit"][_roiddet]["name"];
|
||||
text = text + " " + NUMBERS[_roi]["digit"][_roiddet]["x"];
|
||||
text = text + " " + NUMBERS[_roi]["digit"][_roiddet]["y"];
|
||||
text = text + " " + NUMBERS[_roi]["digit"][_roiddet]["dx"];
|
||||
text = text + " " + NUMBERS[_roi]["digit"][_roiddet]["dy"];
|
||||
text = text + " " + NUMBERS[_roi]["digit"][_roiddet]["CCW"];
|
||||
config_split.push(text);
|
||||
var text_digital = NUMBERS[_roi]["name"] + "." + NUMBERS[_roi]["digit"][_roiddet]["name"];
|
||||
text_digital = text_digital + " " + NUMBERS[_roi]["digit"][_roiddet]["x"];
|
||||
text_digital = text_digital + " " + NUMBERS[_roi]["digit"][_roiddet]["y"];
|
||||
text_digital = text_digital + " " + NUMBERS[_roi]["digit"][_roiddet]["dx"];
|
||||
text_digital = text_digital + " " + NUMBERS[_roi]["digit"][_roiddet]["dy"];
|
||||
text_digital = text_digital + " " + NUMBERS[_roi]["digit"][_roiddet]["CCW"];
|
||||
config_split.push(text_digital);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -804,13 +614,13 @@ function WriteConfigININew() {
|
||||
for (var _roi in NUMBERS) {
|
||||
if (NUMBERS[_roi]["analog"].length > 0) {
|
||||
for (var _roiddet in NUMBERS[_roi]["analog"]) {
|
||||
text = NUMBERS[_roi]["name"] + "." + NUMBERS[_roi]["analog"][_roiddet]["name"];
|
||||
text = text + " " + NUMBERS[_roi]["analog"][_roiddet]["x"];
|
||||
text = text + " " + NUMBERS[_roi]["analog"][_roiddet]["y"];
|
||||
text = text + " " + NUMBERS[_roi]["analog"][_roiddet]["dx"];
|
||||
text = text + " " + NUMBERS[_roi]["analog"][_roiddet]["dy"];
|
||||
text = text + " " + NUMBERS[_roi]["analog"][_roiddet]["CCW"];
|
||||
config_split.push(text);
|
||||
var text_analog = NUMBERS[_roi]["name"] + "." + NUMBERS[_roi]["analog"][_roiddet]["name"];
|
||||
text_analog = text_analog + " " + NUMBERS[_roi]["analog"][_roiddet]["x"];
|
||||
text_analog = text_analog + " " + NUMBERS[_roi]["analog"][_roiddet]["y"];
|
||||
text_analog = text_analog + " " + NUMBERS[_roi]["analog"][_roiddet]["dx"];
|
||||
text_analog = text_analog + " " + NUMBERS[_roi]["analog"][_roiddet]["dy"];
|
||||
text_analog = text_analog + " " + NUMBERS[_roi]["analog"][_roiddet]["CCW"];
|
||||
config_split.push(text_analog);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -818,10 +628,10 @@ function WriteConfigININew() {
|
||||
|
||||
if (cat == "Alignment") {
|
||||
for (var _roi in REFERENCES) {
|
||||
text = REFERENCES[_roi]["name"];
|
||||
text = text + " " + REFERENCES[_roi]["x"];
|
||||
text = text + " " + REFERENCES[_roi]["y"];
|
||||
config_split.push(text);
|
||||
var text_alignment = REFERENCES[_roi]["name"];
|
||||
text_alignment = text_alignment + " " + REFERENCES[_roi]["x"];
|
||||
text_alignment = text_alignment + " " + REFERENCES[_roi]["y"];
|
||||
config_split.push(text_alignment);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,33 +648,6 @@ function isCommented(input) {
|
||||
}
|
||||
|
||||
return [isComment, input];
|
||||
}
|
||||
|
||||
function SaveConfigToServer(_domainname){
|
||||
// leere Zeilen am Ende löschen
|
||||
var zw = config_split.length - 1;
|
||||
|
||||
while (config_split[zw] == "") {
|
||||
config_split.pop();
|
||||
}
|
||||
|
||||
var config_gesamt = "";
|
||||
|
||||
for (var i = 0; i < config_split.length; ++i)
|
||||
{
|
||||
config_gesamt = config_gesamt + config_split[i] + "\n";
|
||||
}
|
||||
|
||||
FileDeleteOnServer("/config/config.ini", _domainname);
|
||||
FileSendContent(config_gesamt, "/config/config.ini", _domainname);
|
||||
}
|
||||
|
||||
function getConfig() {
|
||||
return config_gesamt;
|
||||
}
|
||||
|
||||
function getConfigCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
function ExtractROIs(_aktline, _type){
|
||||
@@ -903,8 +686,9 @@ function getNUMBERS(_name, _type, _create = true) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!_create) { // nicht gefunden und soll auch nicht erzeugt werden, ggf. geht eine NULL zurück
|
||||
return _ret;
|
||||
if (!_create) {
|
||||
// nicht gefunden und soll auch nicht erzeugt werden, ggf. geht eine NULL zurück
|
||||
return _ret;
|
||||
}
|
||||
|
||||
if (_ret == -1) {
|
||||
@@ -931,7 +715,8 @@ function getNUMBERS(_name, _type, _create = true) {
|
||||
NUMBERS.push(_ret);
|
||||
}
|
||||
|
||||
if (typeof _type == 'undefined') { // muss schon existieren !!! - also erst nach Digits / Analog aufrufen
|
||||
if (typeof _type == 'undefined') {
|
||||
// muss schon existieren !!! - also erst nach Digits / Analog aufrufen
|
||||
return _ret;
|
||||
}
|
||||
|
||||
@@ -942,66 +727,6 @@ function getNUMBERS(_name, _type, _create = true) {
|
||||
return neuroi;
|
||||
}
|
||||
|
||||
function CopyReferenceToImgTmp(_domainname) {
|
||||
for (index = 0; index < 2; ++index) {
|
||||
_filenamevon = REFERENCES[index]["name"];
|
||||
_filenamenach = _filenamevon.replace("/config/", "/img_tmp/");
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
|
||||
_filenamevon = _filenamevon.replace(".jpg", "_org.jpg");
|
||||
_filenamenach = _filenamenach.replace(".jpg", "_org.jpg");
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
}
|
||||
}
|
||||
|
||||
function GetReferencesInfo(){
|
||||
return REFERENCES;
|
||||
}
|
||||
|
||||
function UpdateConfigReferences(_domainname){
|
||||
for (var index = 0; index < 2; ++index) {
|
||||
_filenamenach = REFERENCES[index]["name"];
|
||||
_filenamevon = _filenamenach.replace("/config/", "/img_tmp/");
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
|
||||
_filenamenach = _filenamenach.replace(".jpg", "_org.jpg");
|
||||
_filenamevon = _filenamevon.replace(".jpg", "_org.jpg");
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
}
|
||||
}
|
||||
|
||||
function UpdateConfigReference(_anzneueref, _domainname){
|
||||
var index = 0;
|
||||
|
||||
if (_anzneueref == 1) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
else if (_anzneueref == 2) {
|
||||
index = 1;
|
||||
}
|
||||
|
||||
_filenamenach = REFERENCES[index]["name"];
|
||||
_filenamevon = _filenamenach.replace("/config/", "/img_tmp/");
|
||||
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
|
||||
_filenamenach = _filenamenach.replace(".jpg", "_org.jpg");
|
||||
_filenamevon = _filenamevon.replace(".jpg", "_org.jpg");
|
||||
|
||||
FileDeleteOnServer(_filenamenach, _domainname);
|
||||
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
|
||||
}
|
||||
|
||||
function getNUMBERInfo(){
|
||||
return NUMBERS;
|
||||
}
|
||||
|
||||
function RenameNUMBER(_alt, _neu){
|
||||
if ((_neu.indexOf(".") >= 0) || (_neu.indexOf(",") >= 0) || (_neu.indexOf(" ") >= 0) || (_neu.indexOf("\"") >= 0)) {
|
||||
return "Number sequence name must not contain , . \" or a space";
|
||||
@@ -1096,6 +821,34 @@ function CreateNUMBER(_numbernew){
|
||||
return "";
|
||||
}
|
||||
|
||||
function DeleteNUMBER(_delte) {
|
||||
if (NUMBERS.length == 1) {
|
||||
return "The last number cannot be deleted"
|
||||
}
|
||||
|
||||
index = -1;
|
||||
|
||||
for (i = 0; i < NUMBERS.length; ++i) {
|
||||
if (NUMBERS[i]["name"] == _delte) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (index > -1) {
|
||||
NUMBERS.splice(index, 1);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function GetReferencesInfo(){
|
||||
return REFERENCES;
|
||||
}
|
||||
|
||||
function getNUMBERInfo(){
|
||||
return NUMBERS;
|
||||
}
|
||||
|
||||
function getROIInfo(_typeROI, _number){
|
||||
index = -1;
|
||||
|
||||
@@ -1151,26 +904,6 @@ function RenameROI(_number, _type, _alt, _neu){
|
||||
return "";
|
||||
}
|
||||
|
||||
function DeleteNUMBER(_delte) {
|
||||
if (NUMBERS.length == 1) {
|
||||
return "The last number cannot be deleted"
|
||||
}
|
||||
|
||||
index = -1;
|
||||
|
||||
for (i = 0; i < NUMBERS.length; ++i) {
|
||||
if (NUMBERS[i]["name"] == _delte) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (index > -1) {
|
||||
NUMBERS.splice(index, 1);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function CreateROI(_number, _type, _pos, _roinew, _x, _y, _dx, _dy, _CCW){
|
||||
_indexnumber = -1;
|
||||
|
||||
@@ -1208,4 +941,4 @@ function CreateROI(_number, _type, _pos, _roinew, _x, _y, _dx, _dy, _CCW){
|
||||
NUMBERS[_indexnumber][_type].splice(_pos+1, 0, _ret);
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ p {font-size: 1em;}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial; padding: 0px 10px;">
|
||||
@@ -32,9 +33,9 @@ p {font-size: 1em;}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
function doReboot() {
|
||||
var stringota = getDomainname() + "/reboot";
|
||||
var stringota = domainname + "/reboot";
|
||||
window.location = stringota;
|
||||
window.location.href = stringota;
|
||||
window.location.assign(stringota);
|
||||
|
||||
@@ -57,15 +57,19 @@ body, html {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function resizeIframe(obj) {
|
||||
obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 20 + 'px';
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body style="font-family: arial">
|
||||
|
||||
<table style="border: none">
|
||||
<tr>
|
||||
<td style="padding-right: 10px;"><img src="favicon.ico?v=$COMMIT_HASH"></td>
|
||||
@@ -96,7 +100,6 @@ body, html {
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="h_iframe_explain" id="h_iframe_explain">
|
||||
<iframe name="explaincontent" id ="explaincontent" src="" allowfullscreen></iframe>
|
||||
</div>
|
||||
@@ -106,8 +109,6 @@ body, html {
|
||||
<iframe name="stream" id ="stream" src="" display="none" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript">
|
||||
var aktstep = 0;
|
||||
var setupCompleted = false;
|
||||
@@ -189,7 +190,7 @@ body, html {
|
||||
setupCompleted = false;
|
||||
|
||||
setTimeout(function() {
|
||||
document.getElementById('stream').src = getDomainname() + '/stream?flashlight=true'; // needs to be the last statement because it's kind of blocking
|
||||
document.getElementById('stream').src = domainname + '/stream?flashlight=true'; // needs to be the last statement because it's kind of blocking
|
||||
document.getElementById('stream').style.display = "";
|
||||
}, 500);
|
||||
break;
|
||||
@@ -308,7 +309,7 @@ body, html {
|
||||
}
|
||||
|
||||
function loadRSSI() {
|
||||
url = getDomainname() + '/rssi';
|
||||
url = domainname + '/rssi';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -339,6 +340,5 @@ body, html {
|
||||
LoadStep();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user