removed web resources folder from version control
This commit is contained in:
parent
05e2a1f1ba
commit
693d094eb5
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/build/
|
||||
/WEBGUI
|
||||
|
|
|
|||
|
|
@ -1,204 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="res/styles.css">
|
||||
<link rel="stylesheet" href="res/iconsfont.css">
|
||||
<script src="res/main.js"></script>
|
||||
<script src="res/res.js"></script>
|
||||
<title>~name~</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
PageSurround();
|
||||
</script>
|
||||
<!--========== CONTENTS ==========-->
|
||||
<main>
|
||||
<section>
|
||||
<div class="ml">
|
||||
<div class="mlp ~hide_eth~">
|
||||
<div class="mlpc">
|
||||
<form name="eth" method="post">
|
||||
<div class="mlhdr">ETHERNET</div>
|
||||
<table class='cntr'>
|
||||
<tr>
|
||||
<script>PrintSwitch('ETHERNET enabled','ethen','~ethen~','configIPBoxes()');
|
||||
PrintSwitch('DHCP enabled','edhcp','~ecbdh~','configIPBoxes()');
|
||||
PrintIPInput('IP address:','eipa','~eip~');
|
||||
PrintIPInput('Subnet mask:','emas','~emsk~');
|
||||
PrintIPInput('Gateway address:','egte','~egate~');
|
||||
PrintIPInput('DNS1:','edns1','~edns~');
|
||||
PrintIPInput('DNS2:','edns2','~bkedns~');
|
||||
PrintIPInput('DNS3:','edns3','~fledns~');
|
||||
PrintMACInput('MAC:','emac','~emacadr~');
|
||||
</script>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<script>PrintSaveFail('~status_fail~');
|
||||
PrintSaveBtn('eth');</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mlp ~hide_lora~">
|
||||
<div class="mlpc">
|
||||
<div class="mlhdr">LORAWAN</div>
|
||||
<form name="gprs" method="post">
|
||||
<table class='cntr'>
|
||||
<table>
|
||||
<script>
|
||||
PrintSwitch('LoRaWAN enabled','lren','~lren~',null);
|
||||
PrintHexInput('Device ID:','lrdvid','~lrdvid~',16,16);
|
||||
PrintHexInput('Application ID:','lrapid','~lrapid~',16,16);
|
||||
</script>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">Application key:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><input type="text" size="40" name='lrapkey' value="~lrapkey~"
|
||||
title="64 symbols A-H,a-h,0-9" pattern="^[0-9a-hA-H]{32}$" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<script>PrintSaveFail('~status_fail~');
|
||||
PrintSaveBtn('lora'); PrintApplyBtn('lora');</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mlp ~hide_wifi~">
|
||||
<div class="mlpc">
|
||||
<form name="wifi" method="post">
|
||||
<div class="mlhdr">WiFi</div>
|
||||
<table class='cntr'>
|
||||
<script>
|
||||
PrintSwitch('WiFi enable','wifien','~wfen~',null);
|
||||
</script>
|
||||
<tr>
|
||||
<td class='rl'><button type="button" class='btn' name='upd' onclick="StartScan()">Scan
|
||||
WiFi</button></td>
|
||||
<td><progress id="pbar" class="scanbar" value="0" max="100"></progress></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p id="nets"></p>
|
||||
<table class='cntr'>
|
||||
<tr><td class='rl'>WiFi mode:</td>
|
||||
<td><select name="wfmode">
|
||||
<option value="sta"~wfmode(1)~>Station (STA)</option>
|
||||
<option value="ap"~wfmode(2)~>Access point (AP)</option>
|
||||
<option value="apsta"~wfmode(3)~>Mixed(AP+STA)</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<script>
|
||||
PrintInt('Max power, dBm','wifipwr','~wifipwr~',2,21);
|
||||
PrintTextInput('WiFi network name(AP):','wfiap','~ssidap~',3,31);
|
||||
PrintTextInput('WiFi network key(AP):','wfpap','~wkeyap~',8,31);
|
||||
PrintIPInput('IP address(AP):','ipaap','~ipap~');
|
||||
PrintTextInput('WiFi network name(CLN):','wfi','~ssid~',3,31);
|
||||
PrintTextInput('WiFi network key(CLN):','wfp','~wkey~',8,31);
|
||||
PrintSwitch('DHCP enabled','dhcp','~cbdh~','configIPBoxes()');
|
||||
PrintIPInput('IP address(CLN):','ipa','~ip~');
|
||||
PrintIPInput('Subnet mask(CLN):','mas','~msk~');
|
||||
PrintIPInput('Gateway address(CLN):','gte','~gate~');
|
||||
PrintIPInput('DNS1:','dns','~dns~');
|
||||
PrintIPInput('DNS2:','dns2','~dns2~');
|
||||
PrintIPInput('DNS3:','dns3','~dns3~');
|
||||
PrintMACInput('MAC(CLN):','mac','~macadr~');
|
||||
PrintMACInput('MAC(AP):','mac2','~apmacadr~');
|
||||
</script>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<script>PrintSaveFail('~status_fail~');
|
||||
PrintSaveBtn('wifi'); </script>
|
||||
<button type="button" class ='btn' name='startwifi' onclick="StartWiFi()">Start WiFi AP</button>
|
||||
<button type="button" class ='btn' name='stopwifi' onclick="StopWiFi()">Stop WiFi AP</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mlp ~hide_gprs~">
|
||||
<div class="mlpc">
|
||||
<div class="mlhdr">GPRS</div>
|
||||
<form name="gprs" method="post">
|
||||
<table class='cntr'>
|
||||
<script>
|
||||
PrintSwitch('GSM enable','gsmen','~gsmen~',null);
|
||||
PrintLabel('Module type:','~gsmmod~');
|
||||
PrintLabel('Provider name:','~gsmopr~');
|
||||
PrintLabel('IMEI:','~gimei~');
|
||||
PrintLabel('IMSI:','~gimsi~');
|
||||
PrintLabel('IP address:','~gsmip~');
|
||||
PrintLabel('Subnet mask:','~gsmmsk~');
|
||||
PrintLabel('Gateway address:','~gsmgate~');
|
||||
PrintLabel('DNS1:','~gsmdns~');
|
||||
PrintLabel('DNS2:','~bkgsmdns~');
|
||||
PrintLabel('DNS3:','~flgsmdns~');
|
||||
PrintSep();
|
||||
</script>
|
||||
</table>
|
||||
<script>PrintSaveFail('~status_fail~');PrintSaveBtn('gprs'); PrintApplyBtn('gprs');</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script>
|
||||
var array;
|
||||
function Connect(n)
|
||||
{
|
||||
let key = prompt("Enter key for \""+array[n].ssid+"\" network:");
|
||||
if(key != null){
|
||||
var payload = "wfi="+array[n].ssid+"&wfp="+key+"&wifisave=prs";
|
||||
PostData(payload, 'adapters.html',false ,false, false);
|
||||
var str = document.location.toString();
|
||||
var ref = str.substring(0,str.lastIndexOf('/adapters.html'))+"/reboot.html";
|
||||
window.location=ref;}
|
||||
}
|
||||
function PrintNetworks(data)
|
||||
{
|
||||
document.getElementById("nets").innerHTML = data;
|
||||
array = JSON.parse(data);
|
||||
var i=0;
|
||||
var out = "<table class='cntr'><tr><td>SSID</td><td>RSSI</td><td>CH</td></tr>";
|
||||
for (i=0; i<array.length; ++i)
|
||||
{
|
||||
if(array[i].ssid != "")
|
||||
{
|
||||
var trimssid = ((array[i].ssid).length > 16)?((array[i].ssid).substring(0,13)+"..."):(array[i].ssid);
|
||||
out += "<tr><td>"+trimssid+"</td><td style=\"color:#0099ff;\">"+array[i].rssi+"dBm</td><td>"+array[i].ch+"</td>";
|
||||
out += "<td><button type=\"button\" class ='btn' onclick=\"Connect("+i+")\">Connect</button></tr>";
|
||||
}
|
||||
}
|
||||
out +="</table>";
|
||||
document.getElementById("nets").innerHTML = out;
|
||||
}
|
||||
async function StartScan(){
|
||||
PostData('wifisc=prs', 'adapters.html',false ,false, false);
|
||||
console.log('start wifi scan');
|
||||
b = document.getElementById("pbar");
|
||||
b.value = 0;
|
||||
b.style.visibility = "visible";
|
||||
for (i = 0; i<=100; ++i){
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
b.value = i;
|
||||
}
|
||||
b.style.visibility = "hidden";
|
||||
console.log('stop wifi scan');
|
||||
GetDataFile("/api/wifiscan.json", function(data){PrintNetworks(data);});
|
||||
}
|
||||
function StartWiFi(){PostData('wifistart=prs', 'adapters.html',false ,false, false);}
|
||||
function StopWiFi(){PostData('wifistop=prs', 'adapters.html',false ,false, false);}
|
||||
showMenu('header-toggle','navbar');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"Udac":"~urms~",
|
||||
"Idac":"~irms~",
|
||||
"Pint":"~pwr~",
|
||||
"Iclb1":"~iclb1~",
|
||||
"Iclb2":"~iclb2~"
|
||||
"ATT":"~att~",
|
||||
"Nsumm":"~nsum~",
|
||||
"Ni":["~n(0)~","~n(1)~","~n(2)~","~n(3)~","~n(4)~","~n(5)~","~n(6)~","~n(7)~","~n(8)~","~n(9)~","~n(10)~","~n(11)~","~n(12)~","~n(13)~","~n(14)~","~n(15)~"],
|
||||
"rfpwr":"~rfp~"
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"files":"~pagesnum~",
|
||||
"pkt":"~pktok~",
|
||||
"pkt_lost":"~pktloss~",
|
||||
"http_tmt":"~httptmt~",
|
||||
"mqtt_tmt":"~mqttrcn~",
|
||||
"wifi_rbt":"~esptmt~",
|
||||
"rx_ovr":"~rxoverload~",
|
||||
"mqttping_err":"~mpger~",
|
||||
"mqttpub_err":"~mpber~"
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
{"counter":{"ctime":"~time~","pp1":"~pp1~","pp2":"~pp2~","tt1":"~tt1~","tt2":"~tt2~"},
|
||||
"memvect":{"v5m":"~v5m~","v1h":"~v1h~","v1d":"~v1d~"}}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{"mem":[
|
||||
"~m(0)~",
|
||||
"~m(1)~",
|
||||
"~m(2)~",
|
||||
"~m(3)~",
|
||||
"~m(4)~",
|
||||
"~m(5)~",
|
||||
"~m(6)~",
|
||||
"~m(7)~"]}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"lgn":"~login~","psn":"~pass~","apn":"~apn~","cln":"~cln~","wfiap":"~ssidap~","wfpap":"~wkeyap~","ipaap":"~ipap~","wfi":"~ssid~","wfp":"~wkey~","dhcp":"~cbdh~","ipa":"~ip~","mas":"~msk~","gte":"~gate~","mac":"~macadr~"}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"cld":"~ipcld~","prt":"~mport~","idd":"~idcld~","top":"~topic~","clps":"~clpass~","tsr":"~tmsrv~"}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"nam":"~dname~","led":"~led~","fver":"~fver~","fdat":"~builddate~","ser":"~serial~"}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{"time":"~time~",
|
||||
"uptime":"~uptime~",
|
||||
"wlev":"~wlev~",
|
||||
"vlsys":"~vlsys~",
|
||||
"vlin":"~vlin~",
|
||||
"vlbat":"~vlbat~",
|
||||
"ethstat":"~ethstat~",
|
||||
"wfstat":"~wfstat~",
|
||||
"gsmstat":"~gsmstat~",
|
||||
"lrstat":"~lrstat~",
|
||||
"mqtt1st":"~mqtt1st~",
|
||||
"mqtt2st":"~mqtt2st~",
|
||||
"defadp":"~defadp~",
|
||||
"freeram":"~freeram~",
|
||||
"minram":"~minram~",
|
||||
"fver":"~fver~",
|
||||
"fverav":"~fverav~",
|
||||
"updstat":"~updstat~"
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{"time":"~time~",
|
||||
"uptime":"~uptime~",
|
||||
"wlev":"~wlev~",
|
||||
"vlsys":"~vlsys~",
|
||||
"vlin":"~vlin~",
|
||||
"vlbat":"~vlbat~",
|
||||
"dname":"~dname~",
|
||||
"zred":"~zrd~",
|
||||
"zyel":"~zyl~",
|
||||
"zgrn":"~zgr~",
|
||||
"sred":"~srd~",
|
||||
"syel":"~syl~",
|
||||
"sgrn":"~sgr~"}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"tmr":["~t(1)~","~t(2)~","~t(3)~","~t(4)~","~t(5)~","~t(6)~","~t(7)~","~t(8)~","~t(9)~","~t(10)~","~t(11)~","~t(12)~","~t(13)~","~t(14)~","~t(15)~","~t(16)~"]}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
[
|
||||
{
|
||||
"id": 0,
|
||||
"name": "John"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Jane"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Jack"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Jill"
|
||||
}
|
||||
]
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
[
|
||||
~wifisc(0)~,
|
||||
~wifisc(1)~,
|
||||
~wifisc(2)~,
|
||||
~wifisc(3)~,
|
||||
~wifisc(4)~,
|
||||
~wifisc(5)~,
|
||||
~wifisc(6)~,
|
||||
~wifisc(7)~,
|
||||
~wifisc(8)~,
|
||||
~wifisc(9)~,
|
||||
~wifisc(10)~,
|
||||
~wifisc(11)~,
|
||||
~wifisc(12)~,
|
||||
~wifisc(13)~,
|
||||
~wifisc(14)~,
|
||||
~wifisc(15)~,
|
||||
~wifisc(16)~,
|
||||
~wifisc(17)~,
|
||||
~wifisc(18)~,
|
||||
~wifisc(19)~
|
||||
]
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="res/styles.css">
|
||||
<link rel="stylesheet" href="res/iconsfont.css">
|
||||
<script src="res/main.js"></script>
|
||||
<script src="res/res.js"></script>
|
||||
<script src="res/cron.js"></script>
|
||||
<script src="res/crondata.js"></script>
|
||||
<title>~name~</title>
|
||||
<script type="text/javascript">
|
||||
function showcronerr(err) {if(err != "") alert(err);}
|
||||
function dbgtmr(){PostData("tmrdbg=1", "application.html", false, false, false);}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script>PageSurround();</script>
|
||||
<!--========== CONTENTS ==========-->
|
||||
<main>
|
||||
<section>
|
||||
<div class="ml">
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<form name="tmr" method="post">
|
||||
<div class="mlhdr">TIMERS</div>
|
||||
<div class="container">
|
||||
<div id="timer"></div>
|
||||
</div>
|
||||
<button type="button" class ='btn' id='bt2' onclick="addtm()">Add timer</button>
|
||||
<button type="button" class ='btn' id='bt2' onclick="dbgtmr()">Last scheduled exec</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script>
|
||||
loadcrondata(timarr, cron_objs, cron_acts);
|
||||
drawtimers();
|
||||
showMenu('header-toggle','navbar');
|
||||
showcronerr("~cronerr~");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
adapters.html
|
||||
api
|
||||
api/dbg.json
|
||||
api/dbg2.json
|
||||
api/gendata.json
|
||||
api/mem.json
|
||||
api/set1.json
|
||||
api/set2.json
|
||||
api/set3.json
|
||||
api/stat.json
|
||||
api/status.json
|
||||
api/tmr.json
|
||||
api/users.json
|
||||
api/wifiscan.json
|
||||
application.html
|
||||
favicon.ico
|
||||
index.html
|
||||
info.html
|
||||
reboot.html
|
||||
res
|
||||
res/appstyles.css
|
||||
res/ca_cert.pem
|
||||
res/cron.js
|
||||
res/crondata.js
|
||||
res/dynamic.css
|
||||
res/iconsfont.css
|
||||
res/iconsfont.woff2
|
||||
res/logo.png
|
||||
res/main.js
|
||||
res/res.js
|
||||
res/sha256.js
|
||||
res/styles.css
|
||||
res/vue.global.prod.js
|
||||
services.html
|
||||
system.html
|
||||
BIN
HTML/favicon.ico
BIN
HTML/favicon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
113
HTML/index.html
113
HTML/index.html
|
|
@ -1,113 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="res/styles.css">
|
||||
<link rel="stylesheet" href="res/iconsfont.css">
|
||||
<script src="res/main.js"></script>
|
||||
<script src="res/res.js"></script>
|
||||
<script src="res/vue.global.prod.js"></script>
|
||||
<title>~name~</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>PageSurround();</script>
|
||||
|
||||
<!--========== CONTENTS ==========-->
|
||||
<main>
|
||||
<section>
|
||||
<div class="ml">
|
||||
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<div class="mlhdr"></div>
|
||||
<div class='cntr' style='text-align:center;margin-top:20px'>
|
||||
<span id="name" ><div class='hdr1'>This device brand name</div></span><br/><br/>
|
||||
<div id="app">
|
||||
<informer></informer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
<script>
|
||||
showMenu('header-toggle','navbar');
|
||||
|
||||
function uptimeconvert(t)
|
||||
{
|
||||
d = Number(t);
|
||||
dd = Math.floor(d/86400);
|
||||
h = Math.floor(d%86400/3600);
|
||||
m = Math.floor(d%3600/60);
|
||||
s = Math.floor(d%3600%60);
|
||||
return (' '+dd+'d '+(h<10?"0":"")+h+":"+(m<10?"0":"")+m+":"+(s<10?"0":"")+s);
|
||||
}
|
||||
|
||||
const app = Vue.createApp({});
|
||||
app.component('informer', {
|
||||
data(){
|
||||
return {
|
||||
status: true,
|
||||
status_json: {},
|
||||
interval: null}
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const res = await fetch("./api/status.json");
|
||||
this.status_json = await res.json();
|
||||
},
|
||||
|
||||
TimeToISO(t) {
|
||||
d = Number(t);
|
||||
dd = Math.floor(d/86400);
|
||||
h = Math.floor(d%86400/3600);
|
||||
m = Math.floor(d%3600/60);
|
||||
s = Math.floor(d%3600%60);
|
||||
return (' '+dd+'d '+(h<10?"0":"")+h+":"+(m<10?"0":"")+m+":"+(s<10?"0":"")+s);
|
||||
|
||||
},
|
||||
ToHms(d) {}
|
||||
|
||||
},
|
||||
computed:{
|
||||
uptime: function(){
|
||||
d = Number(this.status_json.uptime);
|
||||
dd = Math.floor(d/86400);
|
||||
h = Math.floor(d%86400/3600);
|
||||
m = Math.floor(d%3600/60);
|
||||
s = Math.floor(d%3600%60);
|
||||
return (' '+dd+'d '+(h<10?"0":"")+h+":"+(m<10?"0":"")+m+":"+(s<10?"0":"")+s);
|
||||
},
|
||||
|
||||
|
||||
isotime: function(){
|
||||
theDate = new Date(this.status_json.time * 1000);
|
||||
return (theDate.toString()).slice(0,34);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
mounted() {
|
||||
this.getData()
|
||||
},
|
||||
created(){
|
||||
this.interval = setInterval(() => this.getData(),1000)
|
||||
},
|
||||
destroyed(){
|
||||
clearInterval(this.interval)
|
||||
},
|
||||
template:`{{isotime}}<br/>
|
||||
Uptime:{{uptime}}<br/>
|
||||
<br/>
|
||||
Signal WiFi:<span style="color:#0099ff;font-weight:bold">{{status_json.wlev}}</span><br/>
|
||||
<br/><br/><br/><br/>`
|
||||
});
|
||||
app.mount('#app');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="res/styles.css">
|
||||
<link rel="stylesheet" href="res/iconsfont.css">
|
||||
<script src="res/main.js"></script>
|
||||
<script src="res/res.js"></script>
|
||||
<title>~name~</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
PageSurround();
|
||||
</script>
|
||||
<!--========== CONTENTS ==========-->
|
||||
<main>
|
||||
<section>
|
||||
<div class="ml">
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<div class="mlhdr">Info</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<div class="mlhdr">Help</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<div class="mlhdr">About</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script>
|
||||
showMenu('header-toggle', 'navbar');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset='utf-8' />
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no" />
|
||||
<title>WiFi Controller ~dname~</title>
|
||||
<style type="text/css">
|
||||
.txt {font: 14px consolas,monospace;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table align='center'><tr align='center'><td class='txt'>Saving settings and rebooting device...
|
||||
<h3>Completed  <span id='tmr'>?</span> %</h3></td></tr></table>
|
||||
</body>
|
||||
<script language="javascript">
|
||||
function goback(){
|
||||
var str = document.location.toString();
|
||||
var ref = str.substring(0,str.lastIndexOf('/reboot.html'))+"/index.html";
|
||||
window.location=ref;
|
||||
}
|
||||
function PostData(data,page,conf,alrt,reld) {
|
||||
if(conf){if (!confirm(conf)) return;}
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST',page, true);
|
||||
xhr.send(data);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState != 4) return;
|
||||
if (xhr.status != 200) {alert(xhr.status+': '+xhr.statusText);}
|
||||
else {if(reld)location.reload();
|
||||
if(alrt) alert(alrt);
|
||||
}}}
|
||||
var cn = 0;
|
||||
document.getElementById('tmr').innerHTML = cn;
|
||||
function cntr()
|
||||
{
|
||||
if (cn < 100) {cn++;document.getElementById('tmr').innerHTML = cn;}
|
||||
if (cn == 100) {clearInterval(rpt);goback();}
|
||||
}
|
||||
PostData("rbt=prs","reboot.html",false, false, false);
|
||||
var rpt = setInterval(cntr,130);
|
||||
</script>
|
||||
</html>
|
||||
|
|
@ -1,265 +0,0 @@
|
|||
:root {
|
||||
/*========== Colors ==========*/
|
||||
--bgr-color: ~bgrclr~;
|
||||
--panel-bgr-color: ~pnlclr~;
|
||||
--menu-bgr-color: ~mnuclr~;
|
||||
--accent-color: ~actclr~;
|
||||
--text-color: ~fntclr~;
|
||||
--border-color: ~brdclr~;
|
||||
|
||||
--light-grey: #b0b0b0;
|
||||
--white: #f0f0f0;
|
||||
|
||||
/*========== Font and typography ==========*/
|
||||
--body-font: 'Consolas','Roboto', monospace;
|
||||
--large-font-size: 1.2rem;
|
||||
--normal-font-size: 0.9rem;
|
||||
--small-font-size: .9rem;
|
||||
--smaller-font-size: .8rem;
|
||||
|
||||
/*========== Font weight ==========*/
|
||||
--font-medium: 500;
|
||||
--font-semi-bold: 600;
|
||||
}
|
||||
|
||||
.rl{text-align:right;}
|
||||
|
||||
input, select, .btn, .lab, textarea {
|
||||
font:.85rem consolas,monospace;
|
||||
padding: 5px;
|
||||
background-color:var(--panel-bgr-color);
|
||||
color:var(--text-color);
|
||||
border:1px solid var(--border-color);
|
||||
border-radius: 5px;
|
||||
height:2.0rem;
|
||||
margin: 15px 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
select {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
background-color: var(--panel-bgr-color);
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.btn{min-width:100px; color:var(--text-color);}
|
||||
.btn:active{background-color: var(--accent-color); border:none;}
|
||||
.btn:hover {border:1px solid var(--border-color);}
|
||||
|
||||
.lab {border: none;}
|
||||
|
||||
textarea {
|
||||
height: 4.0rem;
|
||||
margin:auto;
|
||||
vertical-align: top;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.stg td{width:auto;padding:1px;margin:0}
|
||||
.stg input {height:25px}
|
||||
input[type="radio"] { margin-top: -1px; vertical-align: middle;}
|
||||
.stg table{margin: 5px auto}
|
||||
.dot {height: 30px;
|
||||
width: 30px;
|
||||
background-color: var(--light-grey);
|
||||
border-radius: 40%;
|
||||
display: inline-block;
|
||||
margin: 7px 20px}
|
||||
|
||||
.cntr {
|
||||
margin:auto;
|
||||
font: .85rem consolas, monospace;}
|
||||
|
||||
.pwrbox{width:80%; height:auto; padding:5px; margin:10px auto; box-sizing:border-box;}
|
||||
.pwrbox td {font: .9rem consolas, monospace; width:30%; padding:0;margin:0;}
|
||||
|
||||
.container{
|
||||
display: flex;
|
||||
flex-wrap:wrap;}
|
||||
|
||||
div label input {margin-right: 100px;}
|
||||
|
||||
.cat{
|
||||
margin: 4px;
|
||||
background-color: var(--first-color);
|
||||
border-radius: 5px;
|
||||
border: 1px solid var(--border-color);
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
.cat label {float: left; line-height: 2.6em; width: 2.6em; height: 2.6em;}
|
||||
.cat label span {text-align: center; padding: 0px 0px; display: block;}
|
||||
.cat label input { position: absolute; display: none;color: var(--text-color) !important;}
|
||||
.cat label input + span{color: var(--text-color);}
|
||||
|
||||
.cat input:checked + span {
|
||||
color: var(--text-color);
|
||||
/*text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);*/
|
||||
}
|
||||
input:checked + span{background-color: var(--accent-color);}
|
||||
|
||||
.channel{ width:100%;
|
||||
display: flex;
|
||||
flex-wrap:no-wrap;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.chnam{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.rngval {
|
||||
-webkit-appearance: none;
|
||||
margin: auto 10px;
|
||||
width: 70%;
|
||||
height: 5px;
|
||||
border: none;
|
||||
background: var(--accent-color);
|
||||
outline: none;
|
||||
opacity: 0.7;
|
||||
-webkit-transition: .2s;
|
||||
transition: opacity .2s;
|
||||
}
|
||||
|
||||
.rngval::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.rngval::-moz-range-thumb {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.inpval{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 42px;
|
||||
height: 24px;
|
||||
margin: 10px 20px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--light-grey);
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: var(--white);
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: var(--accent-color);
|
||||
}
|
||||
|
||||
input:focus + .slider {
|
||||
box-shadow: 0 0 1px var(--accent-color);
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
-webkit-transform: translateX(18px);
|
||||
-ms-transform: translateX(18px);
|
||||
transform: translateX(18px);
|
||||
}
|
||||
|
||||
/* Rounded sliders */
|
||||
.slider.round {
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.slider.round:before {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/*Timer styles*/
|
||||
.timer
|
||||
{
|
||||
width:100%;
|
||||
margin: 10px 0 0 0;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.timerrec {
|
||||
width:100%;
|
||||
display: flex;
|
||||
flex-wrap:wrap;
|
||||
}
|
||||
|
||||
.tmbtn{
|
||||
float:right;
|
||||
|
||||
}
|
||||
.tmlab{
|
||||
float:left;
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.nowrap
|
||||
{
|
||||
display: flex;
|
||||
flex-wrap:no-wrap;
|
||||
align-items: center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.crselect
|
||||
{
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
height:auto;
|
||||
min-height:30px;
|
||||
width:120px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.selhed
|
||||
{
|
||||
margin: 15px 5px 2px 5px;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIFYDCCBEigAwIBAgIQQAF3ITfU6UK47naqPGQKtzANBgkqhkiG9w0BAQsFADA/
|
||||
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
|
||||
DkRTVCBSb290IENBIFgzMB4XDTIxMDEyMDE5MTQwM1oXDTI0MDkzMDE4MTQwM1ow
|
||||
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
|
||||
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwggIiMA0GCSqGSIb3DQEB
|
||||
AQUAA4ICDwAwggIKAoICAQCt6CRz9BQ385ueK1coHIe+3LffOJCMbjzmV6B493XC
|
||||
ov71am72AE8o295ohmxEk7axY/0UEmu/H9LqMZshftEzPLpI9d1537O4/xLxIZpL
|
||||
wYqGcWlKZmZsj348cL+tKSIG8+TA5oCu4kuPt5l+lAOf00eXfJlII1PoOK5PCm+D
|
||||
LtFJV4yAdLbaL9A4jXsDcCEbdfIwPPqPrt3aY6vrFk/CjhFLfs8L6P+1dy70sntK
|
||||
4EwSJQxwjQMpoOFTJOwT2e4ZvxCzSow/iaNhUd6shweU9GNx7C7ib1uYgeGJXDR5
|
||||
bHbvO5BieebbpJovJsXQEOEO3tkQjhb7t/eo98flAgeYjzYIlefiN5YNNnWe+w5y
|
||||
sR2bvAP5SQXYgd0FtCrWQemsAXaVCg/Y39W9Eh81LygXbNKYwagJZHduRze6zqxZ
|
||||
Xmidf3LWicUGQSk+WT7dJvUkyRGnWqNMQB9GoZm1pzpRboY7nn1ypxIFeFntPlF4
|
||||
FQsDj43QLwWyPntKHEtzBRL8xurgUBN8Q5N0s8p0544fAQjQMNRbcTa0B7rBMDBc
|
||||
SLeCO5imfWCKoqMpgsy6vYMEG6KDA0Gh1gXxG8K28Kh8hjtGqEgqiNx2mna/H2ql
|
||||
PRmP6zjzZN7IKw0KKP/32+IVQtQi0Cdd4Xn+GOdwiK1O5tmLOsbdJ1Fu/7xk9TND
|
||||
TwIDAQABo4IBRjCCAUIwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw
|
||||
SwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5pZGVudHJ1
|
||||
c3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTEp7Gkeyxx
|
||||
+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEEAYLfEwEB
|
||||
ATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2VuY3J5cHQu
|
||||
b3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0LmNvbS9E
|
||||
U1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFHm0WeZ7tuXkAXOACIjIGlj26Ztu
|
||||
MA0GCSqGSIb3DQEBCwUAA4IBAQAKcwBslm7/DlLQrt2M51oGrS+o44+/yQoDFVDC
|
||||
5WxCu2+b9LRPwkSICHXM6webFGJueN7sJ7o5XPWioW5WlHAQU7G75K/QosMrAdSW
|
||||
9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuG
|
||||
WCLKTVXkcGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9O
|
||||
he8Y4IWS6wY7bCkjCWDcRQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFC
|
||||
Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
|
||||
-----END CERTIFICATE-----
|
||||
281
HTML/res/cron.js
281
HTML/res/cron.js
|
|
@ -1,281 +0,0 @@
|
|||
var tarr;
|
||||
var cron_objs;
|
||||
var cron_acts;
|
||||
function loadcrondata(arr1, arr2, arr3)
|
||||
{
|
||||
tarr = arr1;
|
||||
cron_objs = arr2;
|
||||
cron_acts = arr3;
|
||||
}
|
||||
|
||||
function PostData(data,page,conf,alrt,reld) {
|
||||
if(conf){if (!confirm(conf)) return;}
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST',page, true);
|
||||
xhr.timeout = 5000;
|
||||
xhr.send(data);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState != 4) return;
|
||||
if (Number(xhr.status) >= 400) {alert(xhr.status+': '+xhr.statusText);}
|
||||
else {if(reld)location.reload();
|
||||
if(alrt) alert(alrt);
|
||||
}}}
|
||||
|
||||
function savetm(n) {
|
||||
var payload = "tmrec={\"num\":"+n+",";
|
||||
payload += "\"enab\":"+((document.getElementById("encb"+n).checked)?1:0)+",";
|
||||
payload += "\"prev\":"+((document.getElementById("prev"+n).checked)?1:0)+",";
|
||||
payload += "\"name\":\""+document.getElementById("tname"+n).value+"\",";
|
||||
payload += "\"obj\":"+document.getElementById("object"+n).value+",";
|
||||
payload += "\"act\":"+document.getElementById("action"+n).value+",";
|
||||
payload += "\"cron\":\""+document.getElementById("cron"+n).value+"\"";
|
||||
payload += "}";
|
||||
console.log(payload);
|
||||
PostData(payload, "application.html", false, false, true);
|
||||
}
|
||||
function deltm(n) {
|
||||
if(confirm("Confirm delete timer "+n+"?") == true){
|
||||
PostData("deltimer="+n, "application.html", false, false, true);}}
|
||||
function addtm() {
|
||||
PostData("addtimer=any", "application.html", false, false, true);}
|
||||
function extractSelectArr(select){
|
||||
var result = [];
|
||||
var options = select && select.options;
|
||||
var opt;
|
||||
for (var i=0, iLen=options.length; i<iLen; i++) {
|
||||
opt = options[i];
|
||||
if (opt.selected) {
|
||||
if(isNaN(opt.value))
|
||||
{
|
||||
return opt.value;
|
||||
}
|
||||
result.push(opt.value);
|
||||
}}
|
||||
|
||||
var grouped = "";
|
||||
var intbeg;
|
||||
var inside = false;
|
||||
for ( i=0; i <result.length;i++)
|
||||
{
|
||||
if(parseInt(result[i+1]) == (parseInt(result[i]) + 1))
|
||||
{
|
||||
if(!inside)
|
||||
intbeg = result[i];
|
||||
inside = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(inside)
|
||||
{
|
||||
inside=false;
|
||||
if((parseInt(result[i]) - parseInt(intbeg)) > 1 )
|
||||
grouped+=intbeg+"-"+result[i];
|
||||
else
|
||||
grouped+=intbeg+","+result[i];
|
||||
}
|
||||
else
|
||||
grouped+=result[i];
|
||||
}
|
||||
if(i < result.length -1 && !inside)
|
||||
grouped+=",";
|
||||
}
|
||||
return grouped;
|
||||
}
|
||||
function handleSelect(tnum, type){
|
||||
var cinp = document.getElementById("cron" + tnum);
|
||||
var c = (cinp.value).split(" ");
|
||||
if(c.length != 6)
|
||||
{
|
||||
alert("Cron string was edited and not valid");
|
||||
return;
|
||||
}
|
||||
switch(type)
|
||||
{
|
||||
case 1:
|
||||
var s = extractSelectArr(document.getElementById("seconds"));
|
||||
if (s != null) c[0] = s;
|
||||
break;
|
||||
case 2:
|
||||
var m = extractSelectArr(document.getElementById("minutes"));
|
||||
if (m != null) c[1] = m;
|
||||
break;
|
||||
case 3:
|
||||
var h = extractSelectArr(document.getElementById("hours"));
|
||||
if (h != null) c[2] = h;
|
||||
break;
|
||||
case 4:
|
||||
var d = extractSelectArr(document.getElementById("days"));
|
||||
if (d != null) c[3] = d;
|
||||
break;
|
||||
case 5:
|
||||
var mm = extractSelectArr(document.getElementById("months"));
|
||||
if (mm != null) c[4] = mm;
|
||||
break;
|
||||
case 6:
|
||||
var w = extractSelectArr(document.getElementById("weekdays"));
|
||||
if (w != null) c[5] = w;
|
||||
break;
|
||||
}
|
||||
cinp.value = c[0] + " " + c[1] + " " + c[2] + " " + c[3] + " " + c[4] + " " + c[5];
|
||||
}
|
||||
|
||||
function setcron(n) {
|
||||
var target = document.getElementById("cronext" + n);
|
||||
var content = "";
|
||||
content +=("<div><div><label class=\"selhed\" for=\"seconds\">Seconds:</label></div>");
|
||||
content += ("<div><select multiple size=\"7\" class=\"crselect\" name=\"selectSeconds" + n + "[]\" id=\"seconds\" onchange=\"handleSelect("+n+", 1)\">");
|
||||
content += ("<option value=\"*\">Every Sec</option>");
|
||||
content += ("<option value=\"*/2\">Even Sec</option>");
|
||||
content += ("<option value=\"1-59/2\">Odd Sec</option>");
|
||||
content += ("<option value=\"*/5\">Every 5 Sec</option>");
|
||||
content += ("<option value=\"*/15\">Every 15 Sec</option>");
|
||||
content += ("<option value=\"*/30\">Every 30 Sec</option>");
|
||||
for (s = 0; s < 60; s++) { content += ("<option value=\"" + s + "\">" + s + "</option>"); }
|
||||
content += ("</select></div></div>");
|
||||
|
||||
content +=("<div><div><label class=\"selhed\" for=\"seconds\">Minutes:</label></div>");
|
||||
content += ("<div><select multiple size=\"7\" class=\"crselect\" name=\"selectMinutes" + n + "[]\" id=\"minutes\" onchange=\"handleSelect("+n+", 2)\">");
|
||||
content += ("<option value=\"*\">Every Min</option>");
|
||||
content += ("<option value=\"*/2\">Even Min</option>");
|
||||
content += ("<option value=\"1-59/2\">Odd Min</option>");
|
||||
content += ("<option value=\"*/5\">Every 5 Min</option>");
|
||||
content += ("<option value=\"*/15\">Every 15 Min</option>");
|
||||
content += ("<option value=\"*/30\">Every 30 Min</option>");
|
||||
for (s = 0; s < 60; s++) { content += ("<option value=\"" + s + "\">" + s + "</option>"); }
|
||||
content += ("</select></div></div>");
|
||||
|
||||
content +=("<div><div><label class=\"selhed\" for=\"hours\">Hours:</label></div>");
|
||||
content += ("<div><select multiple size=\"7\" class=\"crselect\" name=\"selectHours" + n + "[]\" id=\"hours\" onchange=\"handleSelect("+n+", 3)\">");
|
||||
content += ("<option value=\"*\">Every Hour</option>");
|
||||
content += ("<option value=\"*/2\">Even Hours</option>");
|
||||
content += ("<option value=\"1-23/2\">Odd Hours</option>");
|
||||
content += ("<option value=\"*/6\">Every 6 Hours</option>");
|
||||
content += ("<option value=\"*/12\">Every 12 Hours</option>");
|
||||
for (s = 0; s < 24; s++) { content += ("<option value=\"" + s + "\">" + s + "</option>"); }
|
||||
content += ("</select></div></div>");
|
||||
|
||||
content +=("<div><div><label class=\"selhed\" for=\"days\">Days:</label></div>");
|
||||
content += ("<div><select multiple size=\"7\" class=\"crselect\" name=\"selectDays" + n + "[]\" id=\"days\" onchange=\"handleSelect("+n+", 4)\">");
|
||||
content += ("<option value=\"*\">Every Day</option>");
|
||||
content += ("<option value=\"*/2\">Even Days</option>");
|
||||
content += ("<option value=\"1-31/2\">Odd Days</option>");
|
||||
content += ("<option value=\"*/5\">Every 5 Days</option>");
|
||||
content += ("<option value=\"*/10\">Every 10 Days</option>");
|
||||
content += ("<option value=\"*/15\">Every 15 Days</option>");
|
||||
for (s = 0; s < 32; s++) { content += ("<option value=\"" + s + "\">" + s + "</option>"); }
|
||||
content += ("</select></div></div>");
|
||||
|
||||
content +=("<div><div><label class=\"selhed\" for=\"months\">Months:</label></div>");
|
||||
content += ("<div><select multiple size=\"7\" class=\"crselect\" name=\"selectMonths" + n + "[]\" id=\"months\" onchange=\"handleSelect("+n+", 5)\">");
|
||||
content += ("<option value=\"*\">Every Month</option>");
|
||||
content += ("<option value=\"*/2\">Even Month</option>");
|
||||
content += ("<option value=\"1-11/2\">Odd Month</option>");
|
||||
content += ("<option value=\"*/4\">Every 4 Month</option>");
|
||||
content += ("<option value=\"*/6\">Every half Year</option>");
|
||||
content += ("<option value=\"1\">Jan</option>");
|
||||
content += ("<option value=\"2\">Feb</option>");
|
||||
content += ("<option value=\"3\">Mar</option>");
|
||||
content += ("<option value=\"4\">Apr</option>");
|
||||
content += ("<option value=\"5\">May</option>");
|
||||
content += ("<option value=\"6\">Jun</option>");
|
||||
content += ("<option value=\"7\">Jul</option>");
|
||||
content += ("<option value=\"8\">Aug</option>");
|
||||
content += ("<option value=\"9\">Sep</option>");
|
||||
content += ("<option value=\"10\">Oct</option>");
|
||||
content += ("<option value=\"11\">Nov</option>");
|
||||
content += ("<option value=\"12\">Dec</option>");
|
||||
content += ("</select></div></div>");
|
||||
|
||||
content +=("<div><div><label class=\"selhed\" for=\"weekdays\">Weekdays:</label></div>");
|
||||
content += ("<div><select multiple size=\"7\" class=\"crselect\" name=\"selectWeekday" + n + "[]\" id=\"weekdays\" onchange=\"handleSelect("+n+", 6)\">");
|
||||
content += ("<option value=\"*\">Every Weekday</option>");
|
||||
content += ("<option value=\"1-5\">Monday-Friday</option>");
|
||||
content += ("<option value=\"0,6\">Weekend Days</option>");
|
||||
content += ("<option value=\"0\">Sun</option>");
|
||||
content += ("<option value=\"1\">Mon</option>");
|
||||
content += ("<option value=\"2\">Tue</option>");
|
||||
content += ("<option value=\"3\">Wed</option>");
|
||||
content += ("<option value=\"4\">Thu</option>");
|
||||
content += ("<option value=\"5\">Fri</option>");
|
||||
content += ("<option value=\"6\">Sat</option>");
|
||||
content += ("</select></div></div>");
|
||||
var mainbut = document.getElementById("setcronbut"+n);
|
||||
mainbut.innerHTML = "Close editor";
|
||||
mainbut.onclick = function (){ var target = document.getElementById("cronext"+n);
|
||||
target.innerHTML = ""; mainbut.innerHTML = "Open editor"; mainbut.onclick = function(){setcron(n)};}
|
||||
target.innerHTML = content;
|
||||
}
|
||||
function actupdate(i){
|
||||
var content = "";
|
||||
newobj = document.getElementById("object" + i).value;
|
||||
for (k = 0; k < cron_acts.length; k++) {
|
||||
var selected = (tarr[i - 1].act == k) ? "selected" : "";
|
||||
if(cron_objs[newobj].acts.includes(k))
|
||||
content += ("<option value=\"" + (k) + "\" " + selected + ">" + cron_acts[k] + "</option>");}
|
||||
document.getElementById("action" + i).innerHTML = content;
|
||||
}
|
||||
|
||||
function drawtimers() {
|
||||
var num = tarr.length;
|
||||
var target = document.getElementById("timer");
|
||||
var content = "";
|
||||
for (i = 1; i <= num; i++) {
|
||||
if(tarr[i-1].del == 1) continue;
|
||||
content += ("<div class=\"timer\">");
|
||||
content += ("<label class=\"tmlab\">Timer " + i + "</label>");
|
||||
content += ("<div class=\"timerrec\">");
|
||||
|
||||
content += ("<div class=\"nowrap\">");
|
||||
content +=("<label for=\"encb"+i+"\">Enabled: </label>");
|
||||
var enb = (tarr[i - 1].enab == 1) ? "checked" : "";
|
||||
content += ("<label class=\"switch\"><input type=\"checkbox\" id=\"encb"+i+"\" value=\"1\" "+enb+"><span class=\"slider round\"></span></label></div>");
|
||||
|
||||
content += ("<div class=\"nowrap\">");
|
||||
content +=("<label for=\"encb"+i+"\">Last scheduled: </label>");
|
||||
enb = (tarr[i - 1].prev == 1) ? "checked" : "";
|
||||
content += ("<label class=\"switch\"><input type=\"checkbox\" id=\"prev"+i+"\" value=\"1\" "+enb+"><span class=\"slider round\"></span></label></div>");
|
||||
|
||||
|
||||
content += ("<div class=\"nowrap\">");
|
||||
content +=("<label for=\"tname"+i+"\">Timer name:</label>");
|
||||
content += ("<input type=\"text\" id=\"tname" + i + "\" value=\"" + tarr[i - 1].name + "\"></input></div>");
|
||||
|
||||
content += ("<div class=\"nowrap\">");
|
||||
content +=("<div><label for=\"object"+i+"\">Object:</label>");
|
||||
content += ("<select class=\"\" id=\"object"+i+"\" onchange=\"actupdate("+i+")\">");
|
||||
for (k = 0; k < cron_objs.length; k++) {
|
||||
var selected = (tarr[i - 1].obj == k) ? "selected" : "";
|
||||
var nam = cron_objs[k].name;
|
||||
if(nam.length > 0)
|
||||
content += ("<option value=\"" + (k) + "\" " + selected + ">" + nam + "</option>");}
|
||||
content += ("</select></div></div>");
|
||||
|
||||
content += ("<div class=\"nowrap\">");
|
||||
content +=("<div><label for=\"action"+i+"\">Action:</label>");
|
||||
content += ("<select class=\"\" id=\"action"+i+"\">");
|
||||
for (k = 0; k < cron_acts.length; k++) {
|
||||
var selected = (tarr[i - 1].act == k) ? "selected" : "";
|
||||
if(cron_objs[tarr[i - 1].obj].acts.includes(k))
|
||||
content += ("<option value=\"" + (k) + "\" " + selected + ">" + cron_acts[k] + "</option>");}
|
||||
content += ("</select></div></div>");
|
||||
|
||||
|
||||
|
||||
|
||||
content += ("<div class=\"nowrap\">");
|
||||
content +=("<label for=\"cron"+i+"\">Cron:</label>");
|
||||
content += ("<input type=\"text\" id=\"cron" + i + "\" value=\"" + tarr[i - 1].cron + "\"></input></div>");
|
||||
content += ("<div><button class=\"tmbtn btn\" type=\"button\" id=\"setcronbut"+i+"\" onclick=\"setcron(" + i + ")\">Open editor</button></div>")
|
||||
content += ("</div>");
|
||||
|
||||
/*Extended editor content*/
|
||||
content += ("<div class=\"container\" id=\"cronext" + i + "\"></div>");
|
||||
|
||||
content += ("<button class=\"btn\" type=\"button\" onclick=\"savetm(" + i + ")\">Save</button>");
|
||||
content += ("<button class=\"btn\" type=\"button\" onclick=\"deltm(" + i + ")\">Delete</button>");
|
||||
content += ("</div>");
|
||||
}
|
||||
target.innerHTML = content;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
timarr = [
|
||||
~crontmr(0)~,
|
||||
~crontmr(1)~,
|
||||
~crontmr(2)~,
|
||||
~crontmr(3)~,
|
||||
~crontmr(4)~,
|
||||
~crontmr(5)~,
|
||||
~crontmr(6)~,
|
||||
~crontmr(7)~,
|
||||
~crontmr(8)~,
|
||||
~crontmr(9)~,
|
||||
~crontmr(10)~,
|
||||
~crontmr(11)~,
|
||||
~crontmr(12)~,
|
||||
~crontmr(13)~,
|
||||
~crontmr(14)~,
|
||||
~crontmr(15)~
|
||||
];
|
||||
|
||||
cron_objs= [
|
||||
~cronobjs(0)~,
|
||||
~cronobjs(1)~,
|
||||
~cronobjs(2)~,
|
||||
~cronobjs(3)~,
|
||||
~cronobjs(4)~,
|
||||
~cronobjs(5)~,
|
||||
~cronobjs(6)~,
|
||||
~cronobjs(7)~,
|
||||
~cronobjs(8)~,
|
||||
~cronobjs(9)~,
|
||||
~cronobjs(10)~,
|
||||
~cronobjs(11)~,
|
||||
~cronobjs(12)~,
|
||||
~cronobjs(13)~,
|
||||
~cronobjs(14)~,
|
||||
~cronobjs(15)~
|
||||
];
|
||||
|
||||
cron_acts = [
|
||||
~cronacts(0)~,
|
||||
~cronacts(1)~,
|
||||
~cronacts(2)~,
|
||||
~cronacts(3)~,
|
||||
~cronacts(4)~,
|
||||
~cronacts(5)~,
|
||||
~cronacts(6)~
|
||||
];
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
/*========== Colors ==========*/
|
||||
:root {
|
||||
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
@font-face {
|
||||
font-family: 'iconsfont';
|
||||
src: url('iconsfont.woff2') format('woff2');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||
/*
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'iconsfont';
|
||||
src: url('../font/iconsfont.svg?14637405#iconsfont') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "iconsfont";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: never;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
|
||||
.icon-mail:before { content: '\e800'; } /* '' */
|
||||
.icon-picture:before { content: '\e801'; } /* '' */
|
||||
.icon-info-circled:before { content: '\e802'; } /* '' */
|
||||
.icon-user:before { content: '\e805'; } /* '' */
|
||||
.icon-wrench:before { content: '\e806'; } /* '' */
|
||||
.icon-cog-alt:before { content: '\e807'; } /* '' */
|
||||
.icon-chart-bar:before { content: '\e808'; } /* '' */
|
||||
.icon-down-open:before { content: '\e809'; } /* '' */
|
||||
.icon-home:before { content: '\e80a'; } /* '' */
|
||||
.icon-menu:before { content: '\f0c9'; } /* '' */
|
||||
.icon-sliders:before { content: '\f1de'; } /* '' */
|
||||
.icon-wifi:before { content: '\f1eb'; } /* '' */
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
161
HTML/res/main.js
161
HTML/res/main.js
|
|
@ -1,161 +0,0 @@
|
|||
function PostData(data,page,conf,alrt,reld) {
|
||||
if(conf){if (!confirm(conf)) return;}
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST',page, true);
|
||||
xhr.timeout = 5000;
|
||||
xhr.send(data);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState != 4) return;
|
||||
if (Number(xhr.status) >= 400) {alert(xhr.status+': '+xhr.statusText);}
|
||||
else {if(reld)location.reload();
|
||||
if(alrt) alert(alrt);
|
||||
}}}
|
||||
|
||||
function PostJSONData(data,page,conf,alrt,reld) {
|
||||
if(conf){if (!confirm(conf)) return;}
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST',page, true);
|
||||
xhr.setRequestHeader('Content-type', 'application/json');
|
||||
xhr.timeout = 5000;
|
||||
xhr.send(data);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState != 4) return;
|
||||
if (Number(xhr.status) >= 200) {alert(xhr.status+': '+xhr.statusText+'\n'+xhr.responseText);}
|
||||
else {if(reld)location.reload();
|
||||
if(alrt) alert(alrt);
|
||||
}}}
|
||||
|
||||
function GetDataFile(file, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.overrideMimeType("application/json");
|
||||
xhr.open("GET", file, true);
|
||||
xhr.onreadystatechange = function() {if (xhr.readyState === 4 && xhr.status == "200") {callback(xhr.responseText);}}
|
||||
xhr.timeout = 5000;
|
||||
xhr.send(null);
|
||||
}
|
||||
|
||||
function configIPBoxes() {
|
||||
e = document.forms.conf;
|
||||
var ap = document.getElementsByName('netm');
|
||||
st = e.dhcp.checked;
|
||||
function apmode(m){
|
||||
e.wfiap.disabled = m;
|
||||
e.wfpap.disabled = m;
|
||||
e.ipaap.disabled = m;
|
||||
}
|
||||
function clnmode(m){
|
||||
e.wfi.disabled = m;
|
||||
e.wfp.disabled = m;
|
||||
e.ipa.disabled = m;
|
||||
e.mas.disabled = m;
|
||||
e.gte.disabled = m;
|
||||
}
|
||||
if(ap[0].checked){
|
||||
apmode(true);
|
||||
clnmode(false);
|
||||
e.ipa.disabled = st;
|
||||
e.mas.disabled = st;
|
||||
e.gte.disabled = st;
|
||||
}
|
||||
if(ap[1].checked){
|
||||
apmode(false);
|
||||
clnmode(true);
|
||||
}
|
||||
}
|
||||
|
||||
function configIPBoxes2() {
|
||||
e = document.forms.conf;
|
||||
st2 = e.tsen.checked;
|
||||
e.tsr.disabled = !st2;
|
||||
st3 = e.clen.checked;
|
||||
e.cld.disabled = !st3;
|
||||
e.idd.disabled = !st3;
|
||||
e.top.disabled = !st3;
|
||||
e.prt.disabled = !st3;
|
||||
e.clnm.disabled = !st3;
|
||||
e.clps.disabled = !st3;
|
||||
e.ssen.disabled = !st3;
|
||||
}
|
||||
|
||||
function configIPBoxesOCPP() {
|
||||
e = document.forms.conf;
|
||||
}
|
||||
|
||||
function UnixToStr(t, base, sec)
|
||||
{
|
||||
if(t.lenth < 10) t = '000000000';
|
||||
var d;
|
||||
if (base == 16) d = new Date(parseInt(t,16)*1000);
|
||||
else d = new Date(parseInt(t,10)*1000);
|
||||
var dd = d.getDate(); if (dd < 10) dd = '0' + dd;
|
||||
var mm = d.getMonth() + 1; if (mm < 10) mm = '0' + mm;
|
||||
var yy = d.getFullYear() % 100; if (yy < 10) yy = '0' + yy;
|
||||
var h = d.getHours(); if (h < 10) h = '0' + h;
|
||||
var m = d.getMinutes(); if (m < 10) m = '0' + m;
|
||||
var s = d.getSeconds(); if (s < 10) s = '0' + s;
|
||||
d=yy+'/'+mm+'/'+dd+' '+h+':'+m;
|
||||
if(sec==1) d+=':'+s;
|
||||
return d;
|
||||
}
|
||||
|
||||
function FloatToString(f)
|
||||
{
|
||||
var buffer = new ArrayBuffer(4);
|
||||
var bytes = new Uint8Array(buffer);
|
||||
var doubles = new Float32Array(buffer);
|
||||
bytes[3] = '0x'+f.substr(6,2);
|
||||
bytes[2] = '0x'+f.substr(4,2);
|
||||
bytes[1] = '0x'+f.substr(2,2);
|
||||
bytes[0] = '0x'+f.substr(0,2);
|
||||
return doubles[0];
|
||||
}
|
||||
|
||||
function sendtime() {
|
||||
var ut = Date.parse(new Date( Date.parse(document.getElementById('curdt').value)))/1000;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', 'index23.html', true);
|
||||
var body = 'timenow=' + ut;
|
||||
xhr.send(body);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState != 4) return;
|
||||
if (xhr.status != 200) {
|
||||
alert(xhr.status + ': ' + xhr.statusText);
|
||||
} else {
|
||||
alert('Time changed');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Pst(Rqv,Pag,Conf){
|
||||
if (confirm(Conf)) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST',Pag, true);
|
||||
xhr.send(Rqv);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState != 4) return;
|
||||
if (xhr.status != 200) {
|
||||
alert(xhr.status + ': ' + xhr.statusText);
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*==================== SHOW NAVBAR ====================*/
|
||||
const showMenu = (headerToggle, navbarId) =>{
|
||||
const toggleBtn = document.getElementById(headerToggle),
|
||||
nav = document.getElementById(navbarId)
|
||||
// Validate that variables exist
|
||||
if(headerToggle && navbarId){
|
||||
toggleBtn.addEventListener('click', ()=>{
|
||||
// We add the show-menu class to the div tag with the nav__menu class
|
||||
nav.classList.toggle('show-menu')
|
||||
// change icon
|
||||
toggleBtn.classList.toggle('bx-x')
|
||||
})
|
||||
}
|
||||
}
|
||||
102
HTML/res/res.js
102
HTML/res/res.js
|
|
@ -1,102 +0,0 @@
|
|||
var hedmen = `
|
||||
<header class="header">
|
||||
<div class="header__container">
|
||||
<img src="res/logo.png" alt="LOGO" class="header__img"/>
|
||||
<a href="index.html" class="header__logo">~name~ ~serial~</a>
|
||||
<div class="header__toggle">
|
||||
<i class='icon-menu' id="header-toggle"></i>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="nav" id="navbar">
|
||||
<nav class="nav__container">
|
||||
<div>
|
||||
<a href="index.html" class="nav__link nav__logo">
|
||||
<i class='icon-home nav__icon' ></i>
|
||||
<span class="nav__logo-name">Home</span>
|
||||
</a>
|
||||
<div class="nav__list">
|
||||
<div class="nav__items">
|
||||
<h3 class="nav__subtitle">APPLICATION</h3>
|
||||
|
||||
<div class="nav__dropdown">
|
||||
<a href="#" class="nav__link">
|
||||
<i class='icon-chart-bar nav__icon'></i>
|
||||
<span class="nav__name">UTILITIES</span>
|
||||
<i class='icon-down-open nav__icon nav__dropdown-icon'></i>
|
||||
</a>
|
||||
|
||||
<div class="nav__dropdown-collapse">
|
||||
<div class="nav__dropdown-content">
|
||||
<a href="application.html" class="nav__dropdown-item">Utilities</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nav__dropdown">
|
||||
<a href="#" class="nav__link">
|
||||
<i class='icon-wrench nav__icon'></i>
|
||||
<span class="nav__name">SETTINGS</span>
|
||||
<i class='icon-down-open nav__icon nav__dropdown-icon'></i>
|
||||
</a>
|
||||
|
||||
<div class="nav__dropdown-collapse">
|
||||
<div class="nav__dropdown-content">
|
||||
<a href="vendsettings.html" class="nav__dropdown-item">Controller settings</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nav__items">
|
||||
<h3 class="nav__subtitle">SYSTEM</h3>
|
||||
|
||||
<div class="nav__dropdown">
|
||||
<a href="#" class="nav__link">
|
||||
<i class='icon-cog-alt nav__icon' ></i>
|
||||
<span class="nav__name">SETTINGS</span>
|
||||
<i class='icon-down-open nav__icon nav__dropdown-icon'></i>
|
||||
</a>
|
||||
|
||||
<div class="nav__dropdown-collapse">
|
||||
<div class="nav__dropdown-content">
|
||||
<a href="adapters.html" class="nav__dropdown-item">Network</a>
|
||||
<a href="services.html" class="nav__dropdown-item">Services</a>
|
||||
<a href="system.html" class="nav__dropdown-item">System</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<a href="info.html" class="nav__link nav__logo">
|
||||
<i class='icon-info-circled nav__icon' ></i>
|
||||
<span class="nav__logo-name">About</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
`;
|
||||
|
||||
function PageSurround()
|
||||
{document.write(hedmen);}
|
||||
|
||||
function PrintIPInput(title,name,value){document.write("<tr><td class='rl'>"+title+"</td><td><input type='text' required size='20' name='"+name+"' value='"+value+"' title='IP адрес xxx.xxx.xxx.xxx' pattern='^\\d{1,3}\.\\d{1,3}\.\\d{1,3}\.\\d{1,3}$' /></td></tr>");}
|
||||
function PrintMACInput(title,name,value){document.write("<tr><td class='rl'>"+title+"</td><td><input type='text' required size='20' name='"+name+"' value='"+value+"' title='MAC адрес xx-xx-xx-xx-xx-xx' pattern='^([0-9a-fA-F]{2}([-]|$)){6}$|([0-9a-fA-F]{4}([.]|$)){3}$' /></td></tr>");}
|
||||
function PrintTextInput(title,name,value,min,max){document.write("<tr><td class='rl'>"+title+"</td><td><input type='text' required size='20' name='"+name+"' value="+value+" title='"+min+"-"+max+" chars' pattern='^*{"+min+","+max+"}$' /></td></tr>");}
|
||||
function PrintTextInputID(title,id,value,min,max){document.write("<tr><td class='rl'>"+title+"</td><td><input type='text' required size='20' id='"+id+"' value="+value+" title='"+min+"-"+max+" chars' pattern='^*{"+min+","+max+"}$' /></td></tr>");}
|
||||
function PrintHexInput(title,name,value,min,max){document.write("<tr><td class='rl'>"+title+"</td><td><input type='text' required size='20' name='"+name+"' value="+value+" title='"+min+"-"+max+" chars A-Fa-f0-9' pattern='^[0-9a-fA-F]{"+min+","+max+"}$' /></td></tr>");}
|
||||
function PrintTextInputNoReg(title,name,value,min,max){document.write("<tr><td class='rl'>"+title+"</td><td><input type='text' required size='20' name='"+name+"' value="+value+" title='"+min+"-"+max+" chars'/></td></tr>");}
|
||||
function PrintLabel(title,value){document.write("<tr><td class='rl lab'>"+title+"</td><td align='left' class='lab'>"+value+"</td></tr>");}
|
||||
function PrintSpanLabel(title,idx){document.write("<tr><td class='rl'>"+title+"</td><td align='left'><span id='"+idx+"'>?</span></td></tr>");}
|
||||
function PrintCheckBox(title,name,checked,action){document.write("<tr><td class='rl'>"+title+"</td><td><input type='checkbox' name='"+name+"' value='1' onclick="+action+" "+checked+" /></td></tr>");}
|
||||
function PrintSwitch(title,name,checked,action){document.write("<tr><td class='rl'>"+title+"</td><td><label class='switch'><input type='checkbox' name='"+name+"' value='1' onclick="+action+" "+checked+" ><span class='slider round'></span></label></td></tr>");}
|
||||
function PrintInt(title,name,value,min,max){document.write("<tr><td class='rl'>"+title+"</td><td><input type='number' required min='"+min+"' max='"+max+"' name='"+name+"' value ='"+value+"'/></td></tr>");}
|
||||
function PrintIntId(title,id,value,min,max){document.write("<tr><td class='rl'>"+title+"</td><td><input type='number' required min='"+min+"' max='"+max+"' id='"+id+"' value ='"+value+"'/></td></tr>");}
|
||||
function PrintSep(){document.write("<tr><td height='20px'></td></tr>");}
|
||||
function PrintSaveBtn(form){document.write("<button type='submit' class='btn' name='save' value='"+form+"'>Save reboot</button>");}
|
||||
function PrintApplyBtn(form){document.write("<button type='submit' class='btn' name='apply' value='"+form+"'>Apply</button>");}
|
||||
function PrintSaveFail(isfail){document.write("<div class='resfail' style='text-align:center;display:"+isfail+"' color='#F00'><font color='red'><h4>Wrong data format!</h4></font><br/></div>");}
|
||||
Binary file not shown.
|
|
@ -1,358 +0,0 @@
|
|||
/*========== VARIABLES CSS ==========*/
|
||||
@import "./appstyles.css";
|
||||
:root {
|
||||
--header-height: 50px;
|
||||
--nav-width: 200px;
|
||||
/*========== z index ==========*/
|
||||
--z-fixed: 100;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
:root {
|
||||
--normal-font-size: 1.0rem;
|
||||
--small-font-size: .9rem;
|
||||
--smaller-font-size: .8rem;
|
||||
}
|
||||
}
|
||||
|
||||
/*========== BASE ==========*/
|
||||
*, ::before, ::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: var(--header-height) 0 0 0;
|
||||
padding: 0 0 0;
|
||||
font-family: var(--body-font);
|
||||
font-size: var(--normal-font-size);
|
||||
background-color: var(--bgr-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*========== HEADER ==========*/
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: var(--accent-color);
|
||||
|
||||
padding: 0 1rem;
|
||||
z-index: var(--z-fixed);
|
||||
}
|
||||
|
||||
.header__container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: var(--header-height);
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.header__img {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border-radius: 5%;
|
||||
}
|
||||
|
||||
.header__logo {
|
||||
color: var(--menu-bgr-color);
|
||||
font-weight: var(--font-semi-bold);
|
||||
|
||||
/*color: var(--text-color);
|
||||
font-weight: var(--font-medium);
|
||||
*/
|
||||
font-size: var(--large-font-size);
|
||||
|
||||
margin-left: 50px;
|
||||
/*display: none;*/
|
||||
}
|
||||
|
||||
.header__icon,
|
||||
.header__toggle {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.header__toggle {
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*========== NAV ==========*/
|
||||
.nav {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
height: 100vh;
|
||||
padding: 1rem 1rem 0;
|
||||
background-color: var(--menu-bgr-color);
|
||||
box-shadow: 1px 0 0 rgba(22, 8, 43, 0.1);
|
||||
z-index: var(--z-fixed);
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
.nav__container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 3rem;
|
||||
overflow: auto;
|
||||
scrollbar-width: none; /* For mozilla */
|
||||
}
|
||||
|
||||
/* For Google Chrome and others */
|
||||
.nav__container::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav__logo {
|
||||
font-weight: var(--font-semi-bold);
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
.nav__list,
|
||||
.nav__items {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.nav__list {
|
||||
row-gap: 2.5rem;
|
||||
}
|
||||
|
||||
.nav__items {
|
||||
row-gap: 1.5rem;
|
||||
}
|
||||
|
||||
.nav__subtitle {
|
||||
font-size: var(--normal-font-size);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .1rem;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.nav__link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.nav__link:hover {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.nav__icon {
|
||||
font-size: 1.2rem;
|
||||
margin-right: .5rem;
|
||||
}
|
||||
|
||||
.nav__name {
|
||||
font-size: var(--small-font-size);
|
||||
font-weight: var(--font-medium);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.nav__logout {
|
||||
margin-top: 5rem;
|
||||
}
|
||||
|
||||
/* Dropdown */
|
||||
.nav__dropdown {
|
||||
overflow: hidden;
|
||||
max-height: 21px;
|
||||
transition: .4s ease-in-out;
|
||||
}
|
||||
|
||||
.nav__dropdown-collapse {
|
||||
background-color: var(--menu-bgr-color);
|
||||
border-radius: .5rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.nav__dropdown-content {
|
||||
display: grid;
|
||||
row-gap: .5rem;
|
||||
padding: .75rem 2.5rem .75rem 2.5rem;
|
||||
}
|
||||
|
||||
.nav__dropdown-item {
|
||||
font-size: var(--small-font-size);
|
||||
font-weight: var(--font-medium);
|
||||
color: var(--text-color);
|
||||
margin: 3px 3px;
|
||||
}
|
||||
|
||||
.nav__dropdown-item:hover {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.nav__dropdown-icon {
|
||||
margin-left: auto;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
/* Show dropdown collapse */
|
||||
.nav__dropdown:hover {
|
||||
max-height: 100rem;
|
||||
}
|
||||
|
||||
/* Rotate icon arrow */
|
||||
.nav__dropdown:hover .nav__dropdown-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/*===== Show menu =====*/
|
||||
.show-menu {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/*===== Active link =====*/
|
||||
.active {
|
||||
color: var(--text-color-active);
|
||||
}
|
||||
|
||||
/* ========== MEDIA QUERIES ==========*/
|
||||
/* For small devices reduce search*/
|
||||
@media screen and (max-width: 320px) {
|
||||
.header__search {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
body {
|
||||
padding: 0 0 0 var(--nav-width);
|
||||
}
|
||||
.header {
|
||||
padding: 0 3rem 0 var(--nav-width);
|
||||
}
|
||||
.header__container {
|
||||
height: var(--header-height);
|
||||
}
|
||||
.header__search {
|
||||
width: 300px;
|
||||
padding: .55rem .75rem;
|
||||
}
|
||||
.header__toggle {
|
||||
display: none;
|
||||
}
|
||||
.header__logo {
|
||||
display: block;
|
||||
}
|
||||
.header__img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
order: 1;
|
||||
}
|
||||
.nav {
|
||||
left: 0;
|
||||
padding: 1.2rem 1.2rem 0;
|
||||
width: 4.0rem; /* Reduced navbar */
|
||||
}
|
||||
.nav__items {
|
||||
row-gap: 2.0rem;
|
||||
}
|
||||
.nav__icon {
|
||||
font-size: 1.0rem;
|
||||
}
|
||||
|
||||
/* Element opacity */
|
||||
.nav__logo-name,
|
||||
.nav__name,
|
||||
.nav__subtitle,
|
||||
.nav__dropdown-icon {
|
||||
opacity: 0;
|
||||
transition: .3s;
|
||||
}
|
||||
|
||||
|
||||
/* Navbar expanded */
|
||||
.nav {
|
||||
width: var(--nav-width);
|
||||
|
||||
}
|
||||
|
||||
/* Visible elements */
|
||||
.nav__logo-name {
|
||||
opacity: 1;
|
||||
}
|
||||
.nav__subtitle {
|
||||
opacity: 1;
|
||||
}
|
||||
.nav .nav__name {
|
||||
opacity: 1;
|
||||
}
|
||||
.nav .nav__dropdown-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.mlhdr {
|
||||
font:16px consolas,monospace;
|
||||
font-weight:bold;
|
||||
color: var(--accent-color);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.mlp {
|
||||
break-inside: avoid;
|
||||
}
|
||||
.mlpc {
|
||||
margin: 0 0 10px 10px;
|
||||
padding: 10px;
|
||||
background-color:var(--panel-bgr-color);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.ml {
|
||||
column-count: 1;
|
||||
column-gap: 0;
|
||||
padding: 10px 10px 0 0;
|
||||
}
|
||||
@media (min-width: 900px) {
|
||||
.ml {
|
||||
column-count: 2;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1400px) {
|
||||
.ml {
|
||||
column-count: 3;
|
||||
}
|
||||
}
|
||||
|
||||
.hide{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.scanbar {
|
||||
visibility: hidden;
|
||||
height: 20px;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.clerr {
|
||||
color:#b00000;
|
||||
font-weight:bold;
|
||||
}
|
||||
.clwarn {
|
||||
color:#b0b000;
|
||||
font-weight:bold;
|
||||
}
|
||||
.clok {
|
||||
color:#00b000;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
|
@ -1,101 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="res/styles.css">
|
||||
<link rel="stylesheet" href="res/iconsfont.css">
|
||||
<script src="res/main.js"></script>
|
||||
<script src="res/res.js"></script>
|
||||
<title>~name~</title>
|
||||
<script>
|
||||
function sendtest(n)
|
||||
{PostData("mqtttest"+n+"=prs", "services.html", false , false, false);}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script>PageSurround();</script>
|
||||
<!--========== CONTENTS ==========-->
|
||||
<main>
|
||||
<section>
|
||||
<div class="ml">
|
||||
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<form name="conf1" method="post">
|
||||
<div class="mlhdr">SNTP</div>
|
||||
|
||||
<table class='cntr'>
|
||||
<script>PrintSwitch('SNTP client enable','sntpen','~sntpen~',null);
|
||||
PrintTextInput('SNTP server 1:','tsr','~tmsrv~',3,31);
|
||||
PrintTextInput('SNTP server 2:','tsr2','~tmsrv2~',3,31);
|
||||
PrintTextInput('SNTP server 3:','tsr3','~tmsrv3~',3,31);
|
||||
</script>
|
||||
</table>
|
||||
<table class='cntr'>
|
||||
<tr><td width=90% align='center'>
|
||||
Set time manually:<br/>
|
||||
<input type='datetime-local' id="curdt">
|
||||
<button id='sendt' type='button' class ='btn sbtn'>Send time</button><br/><br/><br/>
|
||||
</td></tr>
|
||||
</table>
|
||||
<script>PrintSaveFail('~status_fail~');
|
||||
PrintSaveBtn('sntp'); PrintApplyBtn('sntp')</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mlp ~hide_mqtt1~">
|
||||
<div class="mlpc">
|
||||
<form name="conf2" method="post">
|
||||
<div class="mlhdr">MQTT1</div>
|
||||
<table class='cntr'>
|
||||
<script>PrintSwitch('Enable MQTT 1','mqen1','~mqen1~',null);
|
||||
PrintTextInput('MQTT broker URL','mqurl1','~mqurl1~',3,31);
|
||||
PrintInt('MQTT broker port','mqport1','~mqport1~',1000,65534);
|
||||
PrintTextInput('Global system name','mqsys1','~mqsys1~',3,31);
|
||||
PrintTextInput('Group name','mqgrp1','~mqgrp1~',3,31);
|
||||
PrintTextInput('Device ID prefix','mqid1','~mqid1~',3,31);
|
||||
PrintTextInput('Login','mqname1','~mqname1~',3,31);
|
||||
PrintTextInput('Password','mqpass1','~mqpass1~',3,31);
|
||||
</script></table>
|
||||
<script>PrintSaveFail('~status_fail~');
|
||||
PrintSaveBtn('mqtt1'); PrintApplyBtn('mqtt1')</script>
|
||||
<button type="button" class ='btn' id='testbt1' onclick="sendtest(1)">Send MQTT test</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mlp ~hide_mqtt2~">
|
||||
<div class="mlpc">
|
||||
<form name="conf3" method="post">
|
||||
<div class="mlhdr">MQTT2</div>
|
||||
<table class='cntr'>
|
||||
<script>
|
||||
PrintSwitch('Enable MQTT 2','mqen2','~mqen2~',null);
|
||||
PrintTextInput('MQTT broker URL','mqurl2','~mqurl2~',3,31);
|
||||
PrintInt('MQTT broker port','mqport2','~mqport2~',1000,65534);
|
||||
PrintTextInput('Global system name','mqsys2','~mqsys2~',3,31);
|
||||
PrintTextInput('Group name','mqgrp2','~mqgrp2~',3,31);
|
||||
PrintTextInput('Device ID prefix','mqid2','~mqid2~',3,31);
|
||||
PrintTextInput('Login','mqname2','~mqname2~',3,31);
|
||||
PrintTextInput('Password','mqpass2','~mqpass2~',3,31);
|
||||
</script>
|
||||
</table>
|
||||
<script>PrintSaveFail('~status_fail~');
|
||||
PrintSaveBtn('mqtt2'); PrintApplyBtn('mqtt2')</script>
|
||||
<button type="button" class ='btn' id='testbt2' onclick="sendtest(2)">Send MQTT test</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script>
|
||||
showMenu('header-toggle','navbar');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
162
HTML/system.html
162
HTML/system.html
|
|
@ -1,162 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="res/styles.css">
|
||||
<link rel="stylesheet" href="res/iconsfont.css">
|
||||
<script src="res/main.js"></script>
|
||||
<script src="res/res.js"></script>
|
||||
<title>~name~</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>PageSurround();</script>
|
||||
<!--========== CONTENTS ==========-->
|
||||
<main>
|
||||
<section>
|
||||
<div class="ml">
|
||||
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<form name="syst" method="post">
|
||||
<div class="mlhdr">SYSTEM</div>
|
||||
<table class='cntr'><script>PrintTextInputNoReg('Имя устройства:','nam','~dname~', 3, 31 );
|
||||
PrintTextInput('User name:','lgn','~login~', 3, 31 );
|
||||
PrintTextInput('User password:','psn','~pass~', 5, 31 );
|
||||
PrintSep();
|
||||
PrintLabel('Device model:','~name~');
|
||||
PrintLabel('Hardware rev:','~hrev~');
|
||||
PrintLabel('Firmware version:','~fver~');
|
||||
PrintLabel('IDF version:','~idfver~');
|
||||
PrintLabel('Built date:','~builddate~');
|
||||
PrintLabel('Serial number:','~serial10~');</script></table>
|
||||
<script>PrintSaveFail('~status_fail~');</script>
|
||||
<button type="submit" class ='btn' name='rst' value='prs'>Reboot</button>
|
||||
<script>PrintSaveBtn('syst'); PrintApplyBtn('syst');</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<form name="syst" method="post">
|
||||
<div class="mlhdr">FIRMWARE UPDATE</div>
|
||||
<table class='cntr'><script>
|
||||
PrintSwitch('Reset config on OTA update','otarst','~otarst~',null);
|
||||
PrintSwitch('Enable OTA auto update','ota','~ota~',null);
|
||||
PrintInt('Auto update check period','otaint','~otaint~',1,65534);
|
||||
</script></table>
|
||||
<table class='cntr'><tr><td align="center">Update firmware URL:</td></tr></table>
|
||||
<table class='cntr'><tr><td><textarea type="text" raws="5" name='otaurl' title="128 символов" ">~otaurl~</textarea></td></tr>
|
||||
|
||||
</table><table class='cntr'>
|
||||
<tr><td class='rl lab'>Current firmware version:</td><td><span id='fvr'>?</span></td></tr>
|
||||
<tr><td class='rl lab'>Available firmware version:</td><td><span id='afvr'>?</span></td></tr>
|
||||
<tr><td class='rl lab'>Current status:</td><td><span id='upst'>?</span></td></tr>
|
||||
</table>
|
||||
<button type="button" class ='btn' name='upd' onclick="fwupd()">Update manual</button>
|
||||
<script>PrintSaveBtn('syst'); PrintApplyBtn('syst');</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<form name="stat" method="post">
|
||||
<div class="mlhdr">STAT</div>
|
||||
<div class='cntr' style='text-align:center;margin-top:20px'>
|
||||
<span id='localtime'>?</span><br/>
|
||||
Uptime:<span id='uptime'>?</span><br/><br/>
|
||||
Signal WiFi:<span id='wlev' style="color:#0099ff;font-weight:bold">?</span><br/>
|
||||
<br/>
|
||||
</div>
|
||||
<table class='cntr'>
|
||||
<tr><td class='rl lab'>Ethernet:</td><td><span id='eth'>?</span></td></tr>
|
||||
<tr><td class='rl lab'>WiFi:</td><td><span id='wfi'>?</span></td></tr>
|
||||
<tr><td class='rl lab'>GPRS:</td><td><span id='gpr'>?</span></td></tr>
|
||||
<tr><td height='20px'></td></tr>
|
||||
<tr><td class='rl lab'>Current net adapter:</td><td><span id='adp'>?</span></td></tr>
|
||||
<tr><td height='20px'></td></tr>
|
||||
<tr><td class='rl lab'>MQTT connection 1:</td><td><span id='mq1'>?</span></td></tr>
|
||||
<tr><td class='rl lab'>MQTT connection 2:</td><td><span id='mq2'>?</span></td></tr>
|
||||
<tr><td height='20px'></td></tr>
|
||||
<tr><td class='rl lab'>Free RAM:</td><td><span id='mem'>?</span></td></tr>
|
||||
<tr><td class='rl lab'>Minimal free RAM :</td><td><span id='mmem'>?</span></td></tr>
|
||||
</table>
|
||||
<button type="button" class ='btn' name='rtos' onclick="getrtos()">RTOS stat</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mlp">
|
||||
<div class="mlpc">
|
||||
<form name="apear" method="post">
|
||||
<div class="mlhdr">APPEARANCE</div>
|
||||
<table class='cntr'>
|
||||
<tr><td class='rl'>Color scheme:</td>
|
||||
<td><select name="colscheme">
|
||||
<option value="1" ~colchm(1)~>Scheme 1 (Light)</option>
|
||||
<option value="2 "~colchm(2)~>Scheme 2 (Dark)</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
<script>PrintSaveBtn('syst'); PrintApplyBtn('syst');</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script>
|
||||
function cmd(n) {
|
||||
PostData("cmd="+n, "system.html",false ,false, false);
|
||||
}
|
||||
function fwupd() {
|
||||
PostData("upd=prs", "system.html",false ,false, false);
|
||||
}
|
||||
function getrtos(){
|
||||
PostJSONData("rtos=prs", "system.html",false ,false, false);
|
||||
}
|
||||
showMenu('header-toggle','navbar');
|
||||
</script>
|
||||
</body>
|
||||
<script>
|
||||
function secondsToHms(d) {
|
||||
d = Number(d);
|
||||
var dd = Math.floor(d/86400);
|
||||
var h = Math.floor(d%86400/3600);
|
||||
var m = Math.floor(d%3600/60);
|
||||
var s = Math.floor(d%3600%60);
|
||||
return (' '+dd+'d '+(h<10?"0":"")+h+":"+(m<10?"0":"")+m+":"+(s<10?"0":"")+s); }
|
||||
function updateStatus(data) {
|
||||
var dat = JSON.parse(data);
|
||||
try
|
||||
{
|
||||
theDate = new Date(dat.time * 1000);
|
||||
sec = dat.uptime;
|
||||
document.getElementById('localtime').innerHTML=(theDate.toString()).slice(0,34);
|
||||
document.getElementById('uptime').innerHTML= secondsToHms(sec);
|
||||
document.getElementById('wlev').innerHTML= dat.wlev;
|
||||
document.getElementById('eth').innerHTML= dat.ethstat;
|
||||
document.getElementById('wfi').innerHTML= dat.wfstat;
|
||||
document.getElementById('gpr').innerHTML= dat.gsmstat;
|
||||
document.getElementById('adp').innerHTML= dat.defadp;
|
||||
document.getElementById('mq1').innerHTML= dat.mqtt1st;
|
||||
document.getElementById('mq2').innerHTML= dat.mqtt2st;
|
||||
document.getElementById('mem').innerHTML= dat.freeram;
|
||||
document.getElementById('mmem').innerHTML= dat.minram;
|
||||
|
||||
document.getElementById('fvr').innerHTML= dat.fver;
|
||||
document.getElementById('afvr').innerHTML= dat.fverav;
|
||||
document.getElementById('upst').innerHTML= dat.updstat;
|
||||
|
||||
}
|
||||
catch(e){return;}
|
||||
}
|
||||
function ReadAndUpdate() {
|
||||
GetDataFile("/api/stat.json", function(data){updateStatus(data);});
|
||||
}
|
||||
ReadAndUpdate();
|
||||
setInterval("ReadAndUpdate()",1000);
|
||||
</script>
|
||||
</html>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{"time":"~time~",
|
||||
"uptime":"~uptime~",
|
||||
"wlev":"~wlev~",
|
||||
"vlsys":"~vlsys~",
|
||||
"vlin":"~vlin~",
|
||||
"vlbat":"~vlbat~",
|
||||
"ethstat":"~ethstat~",
|
||||
"wfstat":"~wfstat~",
|
||||
"gsmstat":"~gsmstat~",
|
||||
"lrstat":"~lrstat~",
|
||||
"mqtt1st":"~mqtt1st~",
|
||||
"mqtt2st":"~mqtt2st~",
|
||||
"defadp":"~defadp~",
|
||||
"freeram":"~freeram~",
|
||||
"minram":"~minram~",
|
||||
"fver":"~fver~",
|
||||
"fverav":"~fverav~",
|
||||
"updstat":"~updstat~"
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{ "wifipwr": "-59dBm", "ssidap": "MY_AP" }
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{_ as t,Z as o,$ as s,aa as a,a9 as e,a2 as n,a8 as r}from"./index.9eb1fee9.js";const c=o({name:"ErrorNotFound"}),l={class:"fullscreen bg-blue text-white text-center q-pa-md flex flex-center"},d=e("div",{style:{"font-size":"30vh"}}," 404 ",-1),i=e("div",{class:"text-h2",style:{opacity:".4"}}," Oops. Nothing here... ",-1);function _(p,f,u,h,x,m){return s(),a("div",l,[e("div",null,[d,i,n(r,{class:"q-mt-xl",color:"white","text-color":"blue",unelevated:"",to:"/",label:"Go Home","no-caps":""})])])}var N=t(c,[["render",_]]);export{N as default};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{Q as a}from"./QPage.abe5dab2.js";import{_ as t,Z as s,$ as n,a0 as o,a1 as r,a9 as e}from"./index.9eb1fee9.js";const c=s({name:"IndexPage1"}),p=e("h1",null,[e("p",null,"First page")],-1);function _(f,l,d,i,x,m){return n(),o(a,{class:"flex flex-center"},{default:r(()=>[p]),_:1})}var g=t(c,[["render",_]]);export{g as default};
|
||||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
.my-card[data-v-270f00e0]{width:320px}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{j as _,ag as g,_ as D,Z as V,r as h,$ as s,aa as n,ad as v,ab as b,a2 as t,a1 as i,ah as m,a9 as d,ai as r,a0 as L,a8 as k,ac as q,aj as w,ak as C,al as I}from"./index.9eb1fee9.js";import{api as y}from"./axios.6428d162.js";function B(){return _(g)}const P=[{id:0,key:"wifipwr",val:"0dBm",lab:"WiFi power"},{id:1,key:"ssidap",val:"MY_AP",lab:"AP name"},{id:2,key:"key",val:"val",lab:"Label"},{id:3,key:"key",val:"val",lab:"Label"},{id:4,key:"key",val:"val",lab:"Label"},{id:5,key:"key",val:"val",lab:"Label"},{id:6,key:"key",val:"val",lab:"Label"},{id:7,key:"key",val:"val",lab:"Label"},{id:8,key:"key",val:"val",lab:"Label"},{id:9,key:"key",val:"val",lab:"Label"}],S=V({name:"IndexPage3",setup(){const a=h(P),l=B();function u(){y.get("/status.json").then(o=>{a.value[0].key=o.data.wifipwr,a.value[1].key=o.data.ssidap}).catch(()=>{l.notify({color:"negative",position:"top",message:"Loading failed",icon:"report_problem"})})}function p(){y.post("/status.json",JSON.stringify(a.value)).then(o=>{}).catch(()=>{l.notify({color:"negative",position:"top",message:"Loading failed",icon:"report_problem"})})}return{Data:a,loadData:u,saveData:p}}}),$=a=>(C("data-v-270f00e0"),a=a(),I(),a),j={class:"q-pa-md row items-start q-gutter-md"},Q=$(()=>d("div",{class:"text-h6"},"WiFi",-1)),U={class:"q-pa-md"},F={class:"q-gutter-md"},N={class:"q-pa-md q-gutter-sm"};function A(a,l,u,p,o,W){return s(),n("div",j,[(s(),n(v,null,b(1,c=>t(w,q({flat:"",bordered:"",class:"my-card"},c,{key:c}),{default:i(()=>[t(m,null,{default:i(()=>[Q]),_:1}),t(m,{class:"q-pt-none"},{default:i(()=>[d("div",U,[d("div",F,[t(r,{modelValue:a.Data[0].val,"onUpdate:modelValue":l[0]||(l[0]=e=>a.Data[0].val=e),label:a.Data[0].lab},null,8,["modelValue","label"]),t(r,{modelValue:a.Data[1].val,"onUpdate:modelValue":l[1]||(l[1]=e=>a.Data[1].val=e),label:a.Data[1].lab},null,8,["modelValue","label"]),(s(!0),n(v,null,b(a.Data,e=>(s(),L(r,{modelValue:e.val,"onUpdate:modelValue":f=>e.val=f,label:e.lab,key:e.id},null,8,["modelValue","onUpdate:modelValue","label"]))),128))])])]),_:1}),d("div",N,[t(k,{color:"primary",icon:"file_download",label:"Get data",onClick:a.loadData},null,8,["onClick"]),t(k,{color:"primary",icon:"file_upload",label:"Send data",onClick:a.saveData},null,8,["onClick"])])]),_:2},1040)),64))])}var J=D(S,[["render",A],["__scopeId","data-v-270f00e0"]]);export{J as default};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
import{c as g,j as r,k as t,m as h,N as p,a as s,h as d,d as y,g as f}from"./index.9eb1fee9.js";var C=g({name:"QPage",props:{padding:Boolean,styleFn:Function},setup(a,{slots:i}){const{proxy:{$q:o}}=f(),e=r(h,t);if(e===t)return console.error("QPage needs to be a deep child of QLayout"),t;if(r(p,t)===t)return console.error("QPage needs to be child of QPageContainer"),t;const c=s(()=>{const n=(e.header.space===!0?e.header.size:0)+(e.footer.space===!0?e.footer.size:0);if(typeof a.styleFn=="function"){const l=e.isContainer.value===!0?e.containerHeight.value:o.screen.height;return a.styleFn(n,l)}return{minHeight:e.isContainer.value===!0?e.containerHeight.value-n+"px":o.screen.height===0?n!==0?`calc(100vh - ${n}px)`:"100vh":o.screen.height-n+"px"}}),u=s(()=>`q-page${a.padding===!0?" q-layout-padding":""}`);return()=>d("main",{class:u.value,style:c.value},y(i.default))}});export{C as Q};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,25 +0,0 @@
|
|||
api
|
||||
api/stat.json
|
||||
api/status.json
|
||||
assets
|
||||
assets/ErrorNotFound.562fe7bf.js
|
||||
assets/IndexPage1.f9bec0e4.js
|
||||
assets/IndexPage2.d880ef6c.js
|
||||
assets/IndexPage3.28c02226.css
|
||||
assets/IndexPage3.4a23b1c3.js
|
||||
assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff
|
||||
assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff
|
||||
assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff
|
||||
assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff
|
||||
assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff
|
||||
assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff
|
||||
assets/MainLayout.5a99c433.js
|
||||
assets/QPage.abe5dab2.js
|
||||
assets/axios.6428d162.js
|
||||
assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff
|
||||
assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2
|
||||
assets/index.9eb1fee9.js
|
||||
assets/index.e110aa66.css
|
||||
favicon.ico
|
||||
icons
|
||||
index.html
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>ESP32 web interface</title><meta charset=utf-8><meta name=description content="Web interface for ESP32 devices"><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/ico href="/favicon.ico"> <script type="module" crossorigin src="/assets/index.9eb1fee9.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index.e110aa66.css">
|
||||
</head><body><div id=q-app></div></body></html>
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 8feca7d4701c1cb4a4440dbf85a3dc3ec6a2e16e
|
||||
Subproject commit e689f4a2e197a3167ef70e098f8ee26e83164ad0
|
||||
Loading…
Reference in New Issue
Block a user