Files
AI-on-the-edge-device/sd-card/html/edit_config.html
michaeljoos72 0d1b58542b Update HTML / Autorefresh
- Update HTML-Content (SD-Card)
- Implementation of Auto-Refresh (Picture & Values)  on Overview-Page (300s)
- Implementation of "jquery-3.5.1.min.js"
2020-09-19 19:07:26 +02:00

68 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Edit Config</title>
<meta charset="utf-8">
<style>
h1 {font-size: 2em;}
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
h3 {font-size: 1.2em;}
p {font-size: 1em;}
.button {
padding: 5px 20px;
width: 211px;
font-size: 16px;
}
textarea {
font-size: 14px;
}
</style>
</head>
<body style="font-family: arial; padding: 0px 10px;">
<table>
<tr><td><h2>Config.ini:</h2></td></tr>
<tr>
<td colspan="3">
<textarea id="inputTextToSave" cols="117" rows="38"></textarea>
</td>
</tr>
<tr>
<td><button class="button" onclick="saveTextAsFile()">Update Config.ini</button></td>
</tr>
</table>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfig.js"></script>
<script type="text/javascript">
var canvas = document.getElementById('canvas'),
basepath = "http://192.168.178.26";
function LoadConfigNeu() {
basepath = getbasepath();
loadConfig(basepath);
document.getElementById("inputTextToSave").value = getConfig();
}
function saveTextAsFile()
{
if (confirm("Are you sure you want to update \"config.ini\"?")) {
FileDeleteOnServer("/config/config.ini", basepath);
var textToSave = document.getElementById("inputTextToSave").value;
FileSendContent(textToSave, "/config/config.ini", basepath);
}
}
LoadConfigNeu();
</script>
</body>
</html>