mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-18 19:39:43 +08:00
62 lines
1.1 KiB
JavaScript
62 lines
1.1 KiB
JavaScript
function getConfigRentrun(reson)
|
|
{
|
|
var aa=JSON.parse(reson);
|
|
for (var obj in aa)
|
|
{
|
|
var temmp=document.getElementById(obj);
|
|
temmp.value=aa[obj];
|
|
if (obj=="GPS_North")
|
|
{
|
|
if (aa[obj]=="on")
|
|
{
|
|
temmp.checked=true;
|
|
}else {
|
|
temmp.checked=false;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
function getDevinfoRetrun(retrun)
|
|
{
|
|
var div=document.getElementById('devinfo');
|
|
div.innerHTML=retrun;
|
|
init()
|
|
}
|
|
function getstataRetrun(retrun){
|
|
var div=document.getElementById('statid');
|
|
div.innerHTML=retrun;
|
|
}
|
|
|
|
|
|
var datad;
|
|
function init()
|
|
{
|
|
httpget("/php/GetConfig.php",datad,getConfigRentrun)
|
|
|
|
}
|
|
|
|
function getinit()
|
|
{
|
|
httpget("/php/GetIniFile.php",datad,getDevinfoRetrun)
|
|
httpget("/php/GetSata.php",datad,getstataRetrun)
|
|
}
|
|
|
|
function rebootclicked()
|
|
{
|
|
|
|
httpget("/php/reboot.php",datad,getrebootRentrun)
|
|
var div=document.getElementById('statid');
|
|
div.innerHTML="";
|
|
|
|
}
|
|
function getrebootRentrun(ret)
|
|
{
|
|
alert(ret)
|
|
|
|
setTimeout(() => {
|
|
location.reload()
|
|
}, 100);
|
|
}
|
|
window.onload=getinit;
|