From 2b20558536b3dcf82015ff9bc177949048555383 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Tue, 20 Aug 2024 19:28:25 +0200 Subject: [PATCH] version 1.02 --- WeThermic/WeThermic.h | 4 ++-- WeThermic/data.src/index.html | 5 +++++ WeThermic/data.src/scripts.js | 29 +++++++++++++++++++++++++- WeThermic/data.src/style_principal.css | 5 ++++- WeThermic/data/index.html | 2 +- WeThermic/data/scripts.js | 4 ++-- WeThermic/data/style_principal.css | 2 +- 7 files changed, 43 insertions(+), 8 deletions(-) diff --git a/WeThermic/WeThermic.h b/WeThermic/WeThermic.h index b49756c..1e89459 100644 --- a/WeThermic/WeThermic.h +++ b/WeThermic/WeThermic.h @@ -62,8 +62,8 @@ #define COPYRIGHT "G.Brière 2024-2024" #define APP_NAME "WeThermic" #define APP_VERSION_MAJOR "1" - #define APP_VERSION_MINOR "01" - #define APP_VERSION_DATE "20240811" + #define APP_VERSION_MINOR "02" + #define APP_VERSION_DATE "20240820" #define APP_VERSION_STRING "v" APP_VERSION_MAJOR "." APP_VERSION_MINOR "." APP_VERSION_DATE #define APP_NAME_VERSION APP_NAME " - " APP_VERSION_STRING "\0" diff --git a/WeThermic/data.src/index.html b/WeThermic/data.src/index.html index 138a29d..a2df4ee 100644 --- a/WeThermic/data.src/index.html +++ b/WeThermic/data.src/index.html @@ -138,6 +138,11 @@

Settings :

+ + Y scale position: + + + diff --git a/WeThermic/data.src/scripts.js b/WeThermic/data.src/scripts.js index e09b6ca..d1c9892 100644 --- a/WeThermic/data.src/scripts.js +++ b/WeThermic/data.src/scripts.js @@ -36,6 +36,9 @@ var graph1 = "Pressure"; var graph2 = "Temperature"; graphOrderChanged = false; +// Position échelles Y +var scalesPositions = 'left'; + // Durée de calcul des moyennes var largeurMoyVent = 180; // Moyenne sur 1 minute 30s var largeurMoyPres = 180; // Moyenne sur 1 minute 30s @@ -174,6 +177,17 @@ async function index_onload() { document.getElementById("lMoyTemp").value = largeurMoyTemp / 60; inputLargeurTemp(); + // Position des l'échelles Y + var scalesPref = localStorage.getItem("scalesPositions"); + if (scalesPref !== null) { + scalesPositions = scalesPref; + } + if (scalesPositions == 'left') { + document.getElementById("scalesPL").checked = true; + } else if (scalesPositions == 'right') { + document.getElementById("scalesPR").checked = true; + } + var chronoPref = localStorage.getItem("chronoMaxTime"); if (chronoPref !== null) { chronoMaxTime = Number(chronoPref); @@ -292,6 +306,8 @@ async function index_onload() { y: { type: 'linear', beginAtZero: true, + display: true, + position: scalesPositions, suggestedMax: 3, ticks: { color: couleurVent @@ -378,6 +394,7 @@ async function index_onload() { type: 'linear', beginAtZero: false, display: true, + position: scalesPositions, ticks: { color: couleurPression }, @@ -463,7 +480,7 @@ async function index_onload() { type: 'linear', beginAtZero: false, display: true, - position:'left', + position: scalesPositions, ticks: { color: couleurTempCtn }, @@ -1944,6 +1961,16 @@ function changeGraphOrder(radio) { graphOrderChanged = true; } +function changeScalesPos(radio) { + scalesPositions = radio.value; + // Repositionne les échelles + Window.graphVent.options.scales['y'].position = scalesPositions; + Window.graphPres.options.scales['y'].position = scalesPositions; + Window.graphTemp.options.scales['y'].position = scalesPositions; + + localStorage.setItem("scalesPositions", scalesPositions); +} + function setRadValue(radName, valeur) { for (rad of document.getElementsByName(radName)) { if (rad.value == valeur) { diff --git a/WeThermic/data.src/style_principal.css b/WeThermic/data.src/style_principal.css index 4297980..c2d1a26 100644 --- a/WeThermic/data.src/style_principal.css +++ b/WeThermic/data.src/style_principal.css @@ -367,6 +367,9 @@ border-top: 1px solid white; #tblGraphOrder { width: 80%; margin: auto; + border-collapse: collapse; +} +.borderSup { + border-top: 1px solid; } - diff --git a/WeThermic/data/index.html b/WeThermic/data/index.html index 96c79b6..4b76705 100644 --- a/WeThermic/data/index.html +++ b/WeThermic/data/index.html @@ -8,7 +8,7 @@  
Instand wind
Instand pressure
Instand temperature
Average wind
Average pressure
Average temperature
Graph order -
Upper graph:
Middle graph:
Bottom graph:
Graph time length / refresh +
Upper graph:
Middle graph:
Bottom graph:
Y scale position:
Graph time length / refresh   diff --git a/WeThermic/data/scripts.js b/WeThermic/data/scripts.js index 62e07c0..6182752 100644 --- a/WeThermic/data/scripts.js +++ b/WeThermic/data/scripts.js @@ -1,4 +1,4 @@ -const cssClair="style_theme_clair.css",cssSombre="style_theme_sombre.css";var cssFile=cssClair,largeurMoyVent,largeurMoyPres,largeurMoyTemp,interval,soundOn,netDevURL,couleurGrid,couleurVent,couleurFillVent,couleurMoyVent,couleurPression,couleurFillPression,couleurMoyPres,couleurTempCtn,couleurFillCtn,couleurMoyCtn,histVentData,histVentMoy,vent,histPression,histPresMoy,pression,histTempCtn,histTCtnMoy,tempctn,tblVentsIdx,largeurVentFull,ventTotal,ventMoyen,tblPresIdx,largeurPresFull,presTotal,presMoyen,largDouxPres,tblPresDouxIdx,tblPresFull,presDouxTotal,tblTempIdx,largeurTempFull,ctnTotal,ctnMoyen,isFullScreen,apConfigChange,attenteOK,chronoVisible,chronoRunning,chronoMaxTime,chronoDebut,chronoSepar,flagBeep,historiqueEnCours,refreshTimeoutID,theme,newColor,colorEnCours,noteNum,audioCtx,linkClair=null,linkSombre=null,graph0="Wind",graph1="Pressure",graph2="Temperature";graphOrderChanged=!1,largeurMoyVent=180,largeurMoyPres=180,largeurMoyTemp=180,interval=500,soundOn=!0,netDevURL="http://192.168.1.107",couleurGrid="rgb(192, 192, 192)",couleurVent="rgb(0, 0, 255)",couleurFillVent="rgba(0, 0, 255, 0.2)",couleurMoyVent="rgb(0, 0, 127)",couleurPression="rgb(0, 255, 0)",couleurFillPression="rgba(0, 255, 0, 0.2)",couleurMoyPres="rgb(0, 127, 0)",couleurTempCtn="rgb(255, 0, 0)",couleurFillCtn="rgba(255, 0, 0, 0.2)",couleurMoyCtn="rgb(127, 0, 0)",histVentData=new Array,histVentMoy=new Array,vent=0,histPression=new Array,histPresMoy=new Array,pression=0,histTempCtn=new Array,histTCtnMoy=new Array,tempctn=0,tblVents=new Array(largeurMoyVent),tblVentsIdx=0,largeurVentFull=!1,ventTotal=0,ventMoyen=0,tblPres=new Array(largeurMoyPres),tblPresIdx=0,largeurPresFull=!1,presTotal=0,presMoyen=0,largDouxPres=8,tblPresDoux=new Array(largDouxPres),tblPresDouxIdx=0,tblPresFull=!1,presDouxTotal=0,tblTempIdx=0,largeurTempFull=!1,tblCtn=new Array(largeurMoyTemp),ctnTotal=0,ctnMoyen=0,isFullScreen=!1,apConfigChange=!1,attenteOK=!1,chronoVisible=!1,chronoRunning=!1,chronoMaxTime=420,chronoDebut=0,chronoSepar=":",flagBeep=!1,historiqueEnCours=!1,refreshTimeoutID=0,theme="clair",newColor="rgb(0, 0, 0)",colorEnCours="";const notes=[261.625,293.664,329.627,349.228,391.995,440,493.883,523.251];noteNum=0,audioCtx=new(window.AudioContext||window.webkitAudioContext||window.audioContext);function index_resize(){height=window.innerHeight,width=window.innerWidth,document.getElementById("lapage").style.height=height+"px",document.getElementById("lapage").style.width=width+"px"}async function index_onload(){var e,t,n,s,o,a,r,c,l,d,u,i=document.getElementById("attente0");if(i.classList.remove("noshow"),n=localStorage.getItem("cssFile"),n!==null&&(cssFile=n),cssFile=="style_theme_sombre.css"?(document.getElementById("sombre").checked=!0,theme="sombre"):(document.getElementById("clair").checked=!0,theme="clair"),loadTheme(),getThemeColor(theme),e=localStorage.getItem("largeurMoyVent"),e!==null&&(largeurMoyVent=Number(e)),e=localStorage.getItem("largeurMoyPres"),e!==null&&(largeurMoyPres=Number(e)),e=localStorage.getItem("largeurMoyTemp"),e!==null&&(largeurMoyTemp=Number(e)),document.getElementById("lMoyVent").value=largeurMoyVent/60,inputLargeurVent(),document.getElementById("lMoyPres").value=largeurMoyPres/60,inputLargeurPres(),document.getElementById("lMoyTemp").value=largeurMoyTemp/60,inputLargeurTemp(),s=localStorage.getItem("chronoMaxTime"),s!==null&&(chronoMaxTime=Number(s)),document.getElementById("countDownTime").value=chronoMaxTime,afficheChronoMaxTime(),o=localStorage.getItem("sound"),o!==null){soundOn=o==="true";const e=document.getElementById("boutonSon");soundOn?e.src="images/sound-on.svg":e.src="images/sound-off.svg"}for(index_resize(),window.scrollTo({top:0,left:0,behavior:"smooth"}),XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/getversion":"/getversion"),attenteOK=!1,XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/history":"/history");!attenteOK;)await sleep(100);attenteOK=!1,yScaleWidth=60,a={datasets:[{cubicInterpolationMode:"default",data:histVentData,fill:{target:"origin",above:couleurFillVent,below:couleurFillVent},borderColor:couleurVent,borderWidth:2,order:2,tension:.4},{cubicInterpolationMode:"default",data:histVentMoy,fill:!1,borderColor:couleurMoyVent,borderWidth:2,order:1,tension:.4}]},r={plugins:{legend:{display:!1}},elements:{point:{radius:0}},scales:{x:{type:"realtime",realtime:{duration:interval*600,refresh:interval,delay:250,frameRate:20,onRefresh:e=>{e.data.datasets[0].data.push({x:Date.now(),y:vent}),e.data.datasets[1].data.push({x:Date.now(),y:ventMoyen})}},ticks:{display:!1},grid:{color:couleurGrid}},y:{type:"linear",beginAtZero:!0,suggestedMax:3,ticks:{color:couleurVent},grid:{color:couleurGrid},afterFit(e){e.width=yScaleWidth}}},responsive:!0,maintainAspectRatio:!1},c={datasets:[{cubicInterpolationMode:"default",data:histPression,fill:{target:"origin",above:couleurFillPression,below:couleurFillPression},borderColor:couleurPression,borderWidth:2,order:5,tension:.4,yAxisID:"y"},{cubicInterpolationMode:"default",data:histPresMoy,fill:!1,borderColor:couleurMoyPres,borderWidth:3,order:4,tension:.4,yAxisID:"y"}]},l={plugins:{legend:{display:!1}},elements:{point:{radius:0}},scales:{x:{type:"realtime",realtime:{duration:interval*600,refresh:interval,delay:250,frameRate:20,onRefresh:e=>{e.data.datasets[0].data.push({x:Date.now(),y:pression}),e.data.datasets[1].data.push({x:Date.now(),y:presMoyen})}},ticks:{display:!1},grid:{color:couleurGrid}},y:{type:"linear",beginAtZero:!1,display:!0,ticks:{color:couleurPression},grid:{color:couleurGrid},afterFit(e){e.width=yScaleWidth}}},responsive:!0,maintainAspectRatio:!1},d={datasets:[{cubicInterpolationMode:"default",data:histTempCtn,fill:{target:"origin",above:couleurFillCtn,below:couleurFillCtn},borderColor:couleurTempCtn,borderWidth:2,order:1,tension:.4,yAxisID:"y"},{cubicInterpolationMode:"default",data:histTCtnMoy,fill:!1,borderColor:couleurMoyCtn,borderWidth:3,order:2,tension:.4,yAxisID:"y"}]},u={plugins:{legend:{display:!1}},elements:{point:{radius:0}},scales:{x:{type:"realtime",realtime:{duration:interval*600,refresh:interval,delay:250,frameRate:50,onRefresh:e=>{e.data.datasets[0].data.push({x:Date.now(),y:tempctn}),e.data.datasets[1].data.push({x:Date.now(),y:ctnMoyen})}},ticks:{display:!0},grid:{color:couleurGrid}},y:{type:"linear",beginAtZero:!1,display:!0,position:"left",ticks:{color:couleurTempCtn},grid:{color:couleurGrid},afterFit(e){e.width=yScaleWidth}}},responsive:!0,maintainAspectRatio:!1},t=localStorage.getItem("graph0"),t!==null&&(graph0=t),setRadValue("gOrder0",graph0),t=localStorage.getItem("graph1"),t!==null&&(graph1=t),setRadValue("gOrder1",graph1),t=localStorage.getItem("graph2"),t!==null&&(graph2=t),setRadValue("gOrder2",graph2),setGraphicsContainers(),Window.graphVent=new Chart(document.getElementById("graphVent"),{type:"line",data:a,options:r}),Window.graphPres=new Chart(document.getElementById("graphPres"),{type:"line",data:c,options:l}),Window.graphTemp=new Chart(document.getElementById("graphTemp"),{type:"line",data:d,options:u}),appliqueTheme(),location.protocol=="file:"?refreshTimeoutID=setTimeout(function(){XMLHttpRequest_get(netDevURL+"/getvalues")},interval):refreshTimeoutID=setTimeout(function(){XMLHttpRequest_get("/getvalues")},interval),i.classList.add("noshow"),getAPconfig()}function XMLHttpRequest_get(e){var t,n,s=document.getElementById("heure");s!=null&&(n=new Date(Date.now()),s.textContent=n.getHours()+":"+n.getMinutes()+":"+n.getSeconds()+"."+n.getMilliseconds()),t=new XMLHttpRequest,t.onreadystatechange=function(){t.readyState==4&&(t.status==200||t.status==0?XMLHttpResult(e,t.responseXML,t.responseText):alert("XMLHttpRequest_get("+e+") : Error "+t.status))},t.open("GET",e,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send()}function XMLHttpResult(e,t){if(t!=null)if(e=="/getversion"||e==netDevURL+"/getversion"){var s,o,i,a,r,c,l,d,u,h,m,f=t.getElementsByTagName("string")[0].childNodes[0].nodeValue,p=document.getElementById("version");p.textContent=f,l=t.getElementsByTagName("screen")[0].childNodes[0].nodeValue,l=="NO"&&(c=document.getElementById("boutoWakeup"),c.classList.add("noshow"))}else e=="/history"||e==netDevURL+"/history"?graphHistoryintegration(t):e=="/getvalues"||e==netDevURL+"/getvalues"?historiqueEnCours===!1&&(newVent=Number(t.getElementsByTagName("v")[0].childNodes[0].nodeValue),vent<3?rafaleMax=3:rafaleMax=vent,Math.abs(newVent-vent)I = '+Number.parseFloat(vent).toFixed(1).padStart(4," ")+"m/s
",r.innerHTML+='A = '+Number.parseFloat(ventMoyen).toFixed(1)+" m/s",o=Number(t.getElementsByTagName("c")[0].childNodes[0].nodeValue),Math.abs(o-tempctn)<3&&(tempctn=o),calculMoyenneTemperature(),s=document.getElementById("valeurTemp"),s.innerHTML="",s.innerHTML+='I = '+Number.parseFloat(tempctn).toFixed(1)+"°C
",s.innerHTML+='A = '+Number.parseFloat(ctnMoyen).toFixed(1)+"°C",pression=calculPressionDouce(Number(t.getElementsByTagName("p")[0].childNodes[0].nodeValue)),calculMoyennePres(),a=document.getElementById("valeurPress"),a.innerHTML='I = '+Number.parseFloat(pression).toFixed(2)+"hPa
",a.innerHTML+='A = '+Number.parseFloat(presMoyen).toFixed(2)+"hPa"):e=="/getnetworks"||e==netDevURL+"/getnetworks"?(setNetworkList(t),attenteOK=!0):e=="/wificonnect"?(result=t.getElementsByTagName("result")[0].childNodes[0].nodeValue,alert(result=="OK"?"Connexion OK.":`Connexion error: +const cssClair="style_theme_clair.css",cssSombre="style_theme_sombre.css";var cssFile=cssClair,scalesPositions,largeurMoyVent,largeurMoyPres,largeurMoyTemp,interval,soundOn,netDevURL,couleurGrid,couleurVent,couleurFillVent,couleurMoyVent,couleurPression,couleurFillPression,couleurMoyPres,couleurTempCtn,couleurFillCtn,couleurMoyCtn,histVentData,histVentMoy,vent,histPression,histPresMoy,pression,histTempCtn,histTCtnMoy,tempctn,tblVentsIdx,largeurVentFull,ventTotal,ventMoyen,tblPresIdx,largeurPresFull,presTotal,presMoyen,largDouxPres,tblPresDouxIdx,tblPresFull,presDouxTotal,tblTempIdx,largeurTempFull,ctnTotal,ctnMoyen,isFullScreen,apConfigChange,attenteOK,chronoVisible,chronoRunning,chronoMaxTime,chronoDebut,chronoSepar,flagBeep,historiqueEnCours,refreshTimeoutID,theme,newColor,colorEnCours,noteNum,audioCtx,linkClair=null,linkSombre=null,graph0="Wind",graph1="Pressure",graph2="Temperature";graphOrderChanged=!1,scalesPositions="left",largeurMoyVent=180,largeurMoyPres=180,largeurMoyTemp=180,interval=500,soundOn=!0,netDevURL="http://192.168.1.107",couleurGrid="rgb(192, 192, 192)",couleurVent="rgb(0, 0, 255)",couleurFillVent="rgba(0, 0, 255, 0.2)",couleurMoyVent="rgb(0, 0, 127)",couleurPression="rgb(0, 255, 0)",couleurFillPression="rgba(0, 255, 0, 0.2)",couleurMoyPres="rgb(0, 127, 0)",couleurTempCtn="rgb(255, 0, 0)",couleurFillCtn="rgba(255, 0, 0, 0.2)",couleurMoyCtn="rgb(127, 0, 0)",histVentData=new Array,histVentMoy=new Array,vent=0,histPression=new Array,histPresMoy=new Array,pression=0,histTempCtn=new Array,histTCtnMoy=new Array,tempctn=0,tblVents=new Array(largeurMoyVent),tblVentsIdx=0,largeurVentFull=!1,ventTotal=0,ventMoyen=0,tblPres=new Array(largeurMoyPres),tblPresIdx=0,largeurPresFull=!1,presTotal=0,presMoyen=0,largDouxPres=8,tblPresDoux=new Array(largDouxPres),tblPresDouxIdx=0,tblPresFull=!1,presDouxTotal=0,tblTempIdx=0,largeurTempFull=!1,tblCtn=new Array(largeurMoyTemp),ctnTotal=0,ctnMoyen=0,isFullScreen=!1,apConfigChange=!1,attenteOK=!1,chronoVisible=!1,chronoRunning=!1,chronoMaxTime=420,chronoDebut=0,chronoSepar=":",flagBeep=!1,historiqueEnCours=!1,refreshTimeoutID=0,theme="clair",newColor="rgb(0, 0, 0)",colorEnCours="";const notes=[261.625,293.664,329.627,349.228,391.995,440,493.883,523.251];noteNum=0,audioCtx=new(window.AudioContext||window.webkitAudioContext||window.audioContext);function index_resize(){height=window.innerHeight,width=window.innerWidth,document.getElementById("lapage").style.height=height+"px",document.getElementById("lapage").style.width=width+"px"}async function index_onload(){var e,t,n,s,o,i,a,r,c,l,d,u,h=document.getElementById("attente0");if(h.classList.remove("noshow"),n=localStorage.getItem("cssFile"),n!==null&&(cssFile=n),cssFile=="style_theme_sombre.css"?(document.getElementById("sombre").checked=!0,theme="sombre"):(document.getElementById("clair").checked=!0,theme="clair"),loadTheme(),getThemeColor(theme),t=localStorage.getItem("largeurMoyVent"),t!==null&&(largeurMoyVent=Number(t)),t=localStorage.getItem("largeurMoyPres"),t!==null&&(largeurMoyPres=Number(t)),t=localStorage.getItem("largeurMoyTemp"),t!==null&&(largeurMoyTemp=Number(t)),document.getElementById("lMoyVent").value=largeurMoyVent/60,inputLargeurVent(),document.getElementById("lMoyPres").value=largeurMoyPres/60,inputLargeurPres(),document.getElementById("lMoyTemp").value=largeurMoyTemp/60,inputLargeurTemp(),s=localStorage.getItem("scalesPositions"),s!==null&&(scalesPositions=s),scalesPositions=="left"?document.getElementById("scalesPL").checked=!0:scalesPositions=="right"&&(document.getElementById("scalesPR").checked=!0),o=localStorage.getItem("chronoMaxTime"),o!==null&&(chronoMaxTime=Number(o)),document.getElementById("countDownTime").value=chronoMaxTime,afficheChronoMaxTime(),i=localStorage.getItem("sound"),i!==null){soundOn=i==="true";const e=document.getElementById("boutonSon");soundOn?e.src="images/sound-on.svg":e.src="images/sound-off.svg"}for(index_resize(),window.scrollTo({top:0,left:0,behavior:"smooth"}),XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/getversion":"/getversion"),attenteOK=!1,XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/history":"/history");!attenteOK;)await sleep(100);attenteOK=!1,yScaleWidth=60,a={datasets:[{cubicInterpolationMode:"default",data:histVentData,fill:{target:"origin",above:couleurFillVent,below:couleurFillVent},borderColor:couleurVent,borderWidth:2,order:2,tension:.4},{cubicInterpolationMode:"default",data:histVentMoy,fill:!1,borderColor:couleurMoyVent,borderWidth:2,order:1,tension:.4}]},r={plugins:{legend:{display:!1}},elements:{point:{radius:0}},scales:{x:{type:"realtime",realtime:{duration:interval*600,refresh:interval,delay:250,frameRate:20,onRefresh:e=>{e.data.datasets[0].data.push({x:Date.now(),y:vent}),e.data.datasets[1].data.push({x:Date.now(),y:ventMoyen})}},ticks:{display:!1},grid:{color:couleurGrid}},y:{type:"linear",beginAtZero:!0,display:!0,position:scalesPositions,suggestedMax:3,ticks:{color:couleurVent},grid:{color:couleurGrid},afterFit(e){e.width=yScaleWidth}}},responsive:!0,maintainAspectRatio:!1},c={datasets:[{cubicInterpolationMode:"default",data:histPression,fill:{target:"origin",above:couleurFillPression,below:couleurFillPression},borderColor:couleurPression,borderWidth:2,order:5,tension:.4,yAxisID:"y"},{cubicInterpolationMode:"default",data:histPresMoy,fill:!1,borderColor:couleurMoyPres,borderWidth:3,order:4,tension:.4,yAxisID:"y"}]},l={plugins:{legend:{display:!1}},elements:{point:{radius:0}},scales:{x:{type:"realtime",realtime:{duration:interval*600,refresh:interval,delay:250,frameRate:20,onRefresh:e=>{e.data.datasets[0].data.push({x:Date.now(),y:pression}),e.data.datasets[1].data.push({x:Date.now(),y:presMoyen})}},ticks:{display:!1},grid:{color:couleurGrid}},y:{type:"linear",beginAtZero:!1,display:!0,position:scalesPositions,ticks:{color:couleurPression},grid:{color:couleurGrid},afterFit(e){e.width=yScaleWidth}}},responsive:!0,maintainAspectRatio:!1},d={datasets:[{cubicInterpolationMode:"default",data:histTempCtn,fill:{target:"origin",above:couleurFillCtn,below:couleurFillCtn},borderColor:couleurTempCtn,borderWidth:2,order:1,tension:.4,yAxisID:"y"},{cubicInterpolationMode:"default",data:histTCtnMoy,fill:!1,borderColor:couleurMoyCtn,borderWidth:3,order:2,tension:.4,yAxisID:"y"}]},u={plugins:{legend:{display:!1}},elements:{point:{radius:0}},scales:{x:{type:"realtime",realtime:{duration:interval*600,refresh:interval,delay:250,frameRate:50,onRefresh:e=>{e.data.datasets[0].data.push({x:Date.now(),y:tempctn}),e.data.datasets[1].data.push({x:Date.now(),y:ctnMoyen})}},ticks:{display:!0},grid:{color:couleurGrid}},y:{type:"linear",beginAtZero:!1,display:!0,position:scalesPositions,ticks:{color:couleurTempCtn},grid:{color:couleurGrid},afterFit(e){e.width=yScaleWidth}}},responsive:!0,maintainAspectRatio:!1},e=localStorage.getItem("graph0"),e!==null&&(graph0=e),setRadValue("gOrder0",graph0),e=localStorage.getItem("graph1"),e!==null&&(graph1=e),setRadValue("gOrder1",graph1),e=localStorage.getItem("graph2"),e!==null&&(graph2=e),setRadValue("gOrder2",graph2),setGraphicsContainers(),Window.graphVent=new Chart(document.getElementById("graphVent"),{type:"line",data:a,options:r}),Window.graphPres=new Chart(document.getElementById("graphPres"),{type:"line",data:c,options:l}),Window.graphTemp=new Chart(document.getElementById("graphTemp"),{type:"line",data:d,options:u}),appliqueTheme(),location.protocol=="file:"?refreshTimeoutID=setTimeout(function(){XMLHttpRequest_get(netDevURL+"/getvalues")},interval):refreshTimeoutID=setTimeout(function(){XMLHttpRequest_get("/getvalues")},interval),h.classList.add("noshow"),getAPconfig()}function XMLHttpRequest_get(e){var t,n,s=document.getElementById("heure");s!=null&&(n=new Date(Date.now()),s.textContent=n.getHours()+":"+n.getMinutes()+":"+n.getSeconds()+"."+n.getMilliseconds()),t=new XMLHttpRequest,t.onreadystatechange=function(){t.readyState==4&&(t.status==200||t.status==0?XMLHttpResult(e,t.responseXML,t.responseText):alert("XMLHttpRequest_get("+e+") : Error "+t.status))},t.open("GET",e,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send()}function XMLHttpResult(e,t){if(t!=null)if(e=="/getversion"||e==netDevURL+"/getversion"){var s,o,i,a,r,c,l,d,u,h,m,f=t.getElementsByTagName("string")[0].childNodes[0].nodeValue,p=document.getElementById("version");p.textContent=f,l=t.getElementsByTagName("screen")[0].childNodes[0].nodeValue,l=="NO"&&(c=document.getElementById("boutoWakeup"),c.classList.add("noshow"))}else e=="/history"||e==netDevURL+"/history"?graphHistoryintegration(t):e=="/getvalues"||e==netDevURL+"/getvalues"?historiqueEnCours===!1&&(newVent=Number(t.getElementsByTagName("v")[0].childNodes[0].nodeValue),vent<3?rafaleMax=3:rafaleMax=vent,Math.abs(newVent-vent)I = '+Number.parseFloat(vent).toFixed(1).padStart(4," ")+"m/s
",r.innerHTML+='A = '+Number.parseFloat(ventMoyen).toFixed(1)+" m/s",o=Number(t.getElementsByTagName("c")[0].childNodes[0].nodeValue),Math.abs(o-tempctn)<3&&(tempctn=o),calculMoyenneTemperature(),s=document.getElementById("valeurTemp"),s.innerHTML="",s.innerHTML+='I = '+Number.parseFloat(tempctn).toFixed(1)+"°C
",s.innerHTML+='A = '+Number.parseFloat(ctnMoyen).toFixed(1)+"°C",pression=calculPressionDouce(Number(t.getElementsByTagName("p")[0].childNodes[0].nodeValue)),calculMoyennePres(),a=document.getElementById("valeurPress"),a.innerHTML='I = '+Number.parseFloat(pression).toFixed(2)+"hPa
",a.innerHTML+='A = '+Number.parseFloat(presMoyen).toFixed(2)+"hPa"):e=="/getnetworks"||e==netDevURL+"/getnetworks"?(setNetworkList(t),attenteOK=!0):e=="/wificonnect"?(result=t.getElementsByTagName("result")[0].childNodes[0].nodeValue,alert(result=="OK"?"Connexion OK.":`Connexion error: `+result)):e=="/getapconfig"||e==netDevURL+"/getapconfig"?(i=t.getElementsByTagName("ssid")[0].textContent,d=t.getElementsByTagName("pwd")[0].textContent,u=document.getElementById("apSSID"),h=document.getElementById("apPwd1"),m=document.getElementById("bottomSSID"),u.value=i,h.value=d,m.textContent=i,apConfigChange=!1,inputConfigAP()):(e.split("?")[0]=="/setduree"||e.split("?")[0]==netDevURL+"/setduree")&&(result=t.getElementsByTagName("result")[0].childNodes[0].nodeValue,result=="OK"?(refreshPage(),closeSettings()):alert(result));(e=="/getvalues"||e==netDevURL+"/getvalues")&&historiqueEnCours===!1&&autoRefresh()}function graphHistoryintegration(e){historiqueEnCours=!0,clearTimeout(refreshTimeoutID);var t,n=!1;interval=Number(e.getElementsByTagName("d")[0].childNodes[0].nodeValue),interval==500?document.getElementById("d500").checked=!0:interval==1e3?document.getElementById("d1000").checked=!0:interval==2e3&&(document.getElementById("d2000").checked=!0),tX=Date.now(),tX=tX-interval/100*60*1e3,hist=e.getElementsByTagName("h");for(const e of hist)pression=calculPressionDouce(Number(e.getElementsByTagName("p")[0].childNodes[0].nodeValue)),pression!=0&&(calculMoyennePres(),vent=Number(e.getElementsByTagName("v")[0].childNodes[0].nodeValue),calculMoyenneVent(),t=Number(e.getElementsByTagName("c")[0].childNodes[0].nodeValue),n?Math.abs(t-tempctn)<3&&(tempctn=t):(tempctn=t,ctnMoyen=t,n=!0),calculMoyenneTemperature(),histVentData.push({x:tX,y:vent}),histVentMoy.push({x:tX,y:ventMoyen}),histTempCtn.push({x:tX,y:tempctn}),histTCtnMoy.push({x:tX,y:ctnMoyen}),histPression.push({x:tX,y:pression}),histPresMoy.push({x:tX,y:presMoyen})),tX+=interval;attenteOK=!0,historiqueEnCours=!1}function autoRefresh(){location.protocol=="file:"?refreshTimeoutID=setTimeout(function(){XMLHttpRequest_get(netDevURL+"/getvalues")},interval):refreshTimeoutID=setTimeout(function(){XMLHttpRequest_get("/getvalues")},interval)}function calculMoyenneVent(){isNaN(tblVents[tblVentsIdx])&&(tblVents[tblVentsIdx]=0),ventTotal=ventTotal-tblVents[tblVentsIdx],tblVents[tblVentsIdx]=vent,ventTotal=ventTotal+tblVents[tblVentsIdx],tblVentsIdx=tblVentsIdx+1,tblVentsIdx>=largeurMoyVent&&(tblVentsIdx=0,largeurVentFull=!0),largeurVentFull?ventMoyen=Math.round(ventTotal/largeurMoyVent*10)/10:ventMoyen=Math.round(ventTotal/tblVentsIdx*10)/10}function calculMoyennePres(){isNaN(tblPres[tblPresIdx])&&(tblPres[tblPresIdx]=0),presTotal=presTotal-tblPres[tblPresIdx],tblPres[tblPresIdx]=pression,presTotal=presTotal+tblPres[tblPresIdx],tblPresIdx=tblPresIdx+1,tblPresIdx>=largeurMoyVent&&(tblPresIdx=0,largeurPresFull=!0),largeurVentFull?presMoyen=Math.round(presTotal/largeurMoyVent*100)/100:presMoyen=Math.round(presTotal/tblPresIdx*100)/100}function calculPressionDouce(e){var t=0;return e>0?(isNaN(tblPresDoux[tblPresDouxIdx])&&(tblPresDoux[tblPresDouxIdx]=0),presDouxTotal=presDouxTotal-tblPresDoux[tblPresDouxIdx],tblPresDoux[tblPresDouxIdx]=e,presDouxTotal=presDouxTotal+tblPresDoux[tblPresDouxIdx],tblPresDouxIdx=tblPresDouxIdx+1,tblPresDouxIdx>=largDouxPres&&(tblPresDouxIdx=0,tblPresFull=!0),tblPresFull?t=presDouxTotal/largDouxPres:t=presDouxTotal/tblPresDouxIdx,t):0}function calculMoyenneTemperature(){isNaN(tblCtn[tblTempIdx])&&(tblCtn[tblTempIdx]=0),ctnTotal=ctnTotal-tblCtn[tblTempIdx],tblCtn[tblTempIdx]=tempctn,ctnTotal=ctnTotal+tblCtn[tblTempIdx],tblTempIdx=tblTempIdx+1,tblTempIdx>=largeurMoyTemp&&(tblTempIdx=0,largeurTempFull=!0),largeurTempFull?ctnMoyen=Math.round(ctnTotal/largeurMoyTemp*100)/100:ctnMoyen=Math.round(ctnTotal/tblTempIdx*100)/100}function changeSettings(){var e,t=document.getElementById("settingsDialog");t.classList.remove("noshow"),e=document.getElementById("attente0"),e.classList.remove("noshow"),resizeActiveColorTable(),setMainDialogColor(),getAPconfig(),get_networks()}function closeSettings(){var e=document.getElementById("settingsDialog");e.classList.add("noshow"),graphOrderChanged&&location.reload()}function loadTheme(){document.getElementById(cssClair)||(linkClair=document.createElement("link"),linkClair.id=cssClair,linkClair.rel="stylesheet",linkClair.type="text/css",linkClair.href=cssClair),document.getElementById(cssSombre)||(linkSombre=document.createElement("link"),linkSombre.id=cssSombre,linkSombre.rel="stylesheet",linkSombre.type="text/css",linkSombre.href=cssSombre);var e=document.getElementsByTagName("head")[0];cssFile==cssSombre?e.append(linkSombre):e.append(linkClair)}function changeTheme(e){theme=e;var t=document.getElementById(cssFile);theme=="clair"&&cssFile==cssSombre?(t.parentNode.replaceChild(linkClair,linkSombre),cssFile=cssClair):theme=="sombre"&&cssFile==cssClair&&(t.parentNode.replaceChild(linkSombre,linkClair),cssFile=cssSombre),localStorage.setItem("cssFile",cssFile),appliqueTheme()}function appliqueTheme(){setTimeout(()=>{var t=document.getElementById(cssFile).parentNode,e=getComputedStyle(t);couleurGrid=e.getPropertyValue("--couleurGrid"),couleurVent=e.getPropertyValue("--couleurVent"),couleurFillVent=getFillColor(couleurVent),couleurMoyVent=e.getPropertyValue("--couleurMoyVent"),couleurPression=e.getPropertyValue("--couleurPression"),couleurFillPression=getFillColor(couleurPression),couleurMoyPres=e.getPropertyValue("--couleurMoyPres"),couleurTempCtn=e.getPropertyValue("--couleurTempCtn"),couleurFillCtn=getFillColor(couleurTempCtn),couleurMoyCtn=e.getPropertyValue("--couleurMoyCtn"),getThemeColor(theme),document.body.style.setProperty("--couleurVent",couleurVent),document.body.style.setProperty("--couleurMoyVent",couleurMoyVent),document.body.style.setProperty("--couleurPression",couleurPression),document.body.style.setProperty("--couleurMoyPres",couleurMoyPres),document.body.style.setProperty("--couleurTempCtn",couleurTempCtn),document.body.style.setProperty("--couleurMoyCtn",couleurMoyCtn),Window.graphVent.options.scales.x.grid.color=couleurGrid,Window.graphVent.options.scales.y.grid.color=couleurGrid,Window.graphVent.options.scales.y.ticks.color=couleurVent,Window.graphVent.data.datasets[0].borderColor=couleurVent,Window.graphVent.data.datasets[0].fill.above=couleurFillVent,Window.graphVent.data.datasets[0].fill.below=couleurFillVent,Window.graphVent.data.datasets[1].borderColor=couleurMoyVent,Window.graphPres.options.scales.x.grid.color=couleurGrid,Window.graphPres.options.scales.y.grid.color=couleurGrid,Window.graphPres.options.scales.y.ticks.color=couleurPression,Window.graphPres.data.datasets[0].borderColor=couleurPression,Window.graphPres.data.datasets[0].fill.above=couleurFillPression,Window.graphPres.data.datasets[0].fill.below=couleurFillPression,Window.graphPres.data.datasets[1].borderColor=couleurMoyPres,Window.graphTemp.options.scales.x.grid.color=couleurGrid,Window.graphTemp.options.scales.y.grid.color=couleurGrid,Window.graphTemp.options.scales.y.ticks.color=couleurTempCtn,Window.graphTemp.data.datasets[0].borderColor=couleurTempCtn,Window.graphTemp.data.datasets[0].fill.above=couleurFillCtn,Window.graphTemp.data.datasets[0].fill.below=couleurFillCtn,Window.graphTemp.data.datasets[1].borderColor=couleurMoyCtn,setMainDialogColor()},500)}async function get_networks(){var e,t,n=document.getElementById("networkTable");for(n.innerHTML="",e=document.getElementById("ssidActuel"),e.value="",t=document.getElementById("ipActuel"),t.value="",attenteOK=!1,XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/getnetworks":"/getnetworks");!attenteOK;)await sleep(100);attenteOK=!1}function sleep(e){return new Promise(t=>setTimeout(t,e))}function setNetworkList(e){var s,o,a,u,h,m,t="",c="",r=0,n="",d="",l="",i="",f=document.getElementById("networkTable");if(t+=` `,t+=` `,t+=` @@ -21,4 +21,4 @@ const cssClair="style_theme_clair.css",cssSombre="style_theme_sombre.css";var cs `,t+=`
`,f.innerHTML=t,m=document.getElementById("attente0"),m.classList.add("noshow")}async function wifi_connect(e,t,n){var a="",l=document.getElementById("ssid_input"),s=document.getElementById("pwd_input"),r=document.getElementById("attente0"),o=document.getElementById("btnConnect"),i=document.getElementById("btnAnnuler");const c=document.getElementById("btnShowCliPasswd");for(s=document.getElementById("pwd_input"),s.type!=="password"&&(s.type="password",c.src="images/oeuil.svg",c.title="Show password"),l.value=e+" (ch."+t+")",s.value=n.replace("\\'","'"),connectOK=!0,suiteOK=!1,afficheDialog("dlgConnect"),o.disabled=!1,i.disabled=!1,s.focus();!suiteOK;)await sleep(100);suiteOK=!1,connectOK?(a=s.value,o.disabled=!0,i.disabled=!0,r.classList.remove("noshow"),XMLHttpRequest_post_wificonnect(e,a,t),setTimeout(function(){r.classList.add("noshow")},1e4),setTimeout(function(){closeDialog("dlgConnect")},1e4)):(closeDialog("dlgConnect"),o.disabled=!1,i.disabled=!1,s.value="")}function afficheDialog(e){var t=document.getElementById("dlgMask0"),n=document.getElementById(e);t.classList.remove("noshow"),window.setTimeout(function(){n.classList.remove("masquer")},.2)}function closeDialog(e){var t=document.getElementById("dlgMask0"),n=document.getElementById(e);n.classList.add("masquer"),window.setTimeout(function(){t.classList.add("noshow")},1)}function connect_clique(){connectOK=!0,suiteOK=!0,get_networks()}function connect_cancel(){connectOK=!1,suiteOK=!0}function connect_keyup(e){e.keyCode===13?document.getElementById("btnConnect").click():e.keyCode===27&&document.getElementById("btnAnnuler").click()}function XMLHttpRequest_post_wificonnect(e,t,n){var o,i,s=new XMLHttpRequest;s.onreadystatechange=function(){s.readyState==4&&(s.status==200||s.status==0?XMLHttpResult("/wificonnect",s.responseXML,s.responseText):alert("XMLHttpRequest_post_wificonnect() : Error "+s.status))},o=encodeURIComponent(e),i=encodeURIComponent(t),location.protocol=="file:"?s.open("POST",netDevURL+"/wificonnect",!0):s.open("POST","/wificonnect",!0),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send("ssid="+o+"&pwd="+i+"&channel="+n)}function deconnect_clique(){var e="",e=`Do you really want to disconnect from the current network and clear the client WiFi settings in the balance?`;confirm(e)&&XMLHttpRequest_get("deconnexion"),get_networks()}function refreshPage(){var e=document.getElementById("attente0");e.classList.remove("noshow"),histVentData=[],histVentMoy=[],vent=0,histPression=[],histPresMoy=[],pression=0,histTempCtn=[],histTCtnMoy=[],tempctn=0,tblVents=new Array(largeurMoyVent),tblVentsIdx=0,largeurVentFull=!1,ventTotal=0,tblPres=new Array(largeurMoyPres),tblPresIdx=0,largeurPresFull=!1,presTotal=0,largDouxPres=8,tblPresDoux=new Array(largDouxPres),tblPresDouxIdx=0,tblPresFull=!1,presDouxTotal=0,tblTempIdx=0,largeurTempFull=!1,delete tblCtn,tblCtn=new Array(largeurMoyTemp),ctnTotal=0,Window.graphVent.destroy(),Window.graphVent=null,Window.graphPres.destroy(),Window.graphPres=null,Window.graphTemp.destroy(),Window.graphTemp=null,index_onload()}function toggleFullscreen(){isFullScreen?closeFullscreen():openFullscreen(),window.scrollTo(0,0)}function openFullscreen(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}function closeFullscreen(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()}function fullscreenchanged(){bouton=document.getElementById("fullScreenButton"),height=window.innerHeight,width=window.innerWidth,document.getElementById("lapage").style.height=height+"px",document.getElementById("lapage").style.width=width+"px",document.fullscreenElement?(isFullScreen=!0,bouton.innerHTML="
Close full screen
 "):(isFullScreen=!1,bouton.innerHTML="
View in full screen
 ")}document.addEventListener("fullscreenchange",fullscreenchanged);function inputLargeurVent(){var e=document.getElementById("valMoyVent"),t=document.getElementById("lMoyVent").value;secondes=t*30,e.innerText=new Date(secondes*1e3).toISOString().substring(15,19)}function changeLargeurVent(){var e=document.getElementById("lMoyVent").value;largeurMoyVent=e*60,delete tblVents,tblVents=new Array(largeurMoyVent),tblVentsIdx=0,ventTotal=0,ventMoyen=0,Window.graphVent.data.datasets[1].data=[],localStorage.setItem("largeurMoyVent",largeurMoyVent)}function inputLargeurPres(){var e=document.getElementById("valMoyPres"),t=document.getElementById("lMoyPres").value;secondes=t*30,e.innerText=new Date(secondes*1e3).toISOString().substring(15,19)}function changeLargeurPres(){var e=document.getElementById("lMoyPres").value;largeurMoyPres=e*60,delete tblPres,tblPres=new Array(largeurMoyPres),tblVentsIdx=0,ventTotal=0,ventMoyen=0,Window.graphVent.data.datasets[1].data=[],localStorage.setItem("largeurMoyPres",largeurMoyPres)}function inputLargeurTemp(){var e=document.getElementById("valMoyTemp"),t=document.getElementById("lMoyTemp").value;secondes=t*30,e.innerText=new Date(secondes*1e3).toISOString().substring(15,19)}function changeLargeurTemp(){var e=document.getElementById("lMoyTemp").value;largeurMoyTemp=e*60,delete tblCtn,tblCtn=new Array(largeurMoyTemp),tblTempIdx=0,largeurTempFull=!1,ctnTotal=0,ctnMoyen=0,Window.graphTemp.data.datasets[1].data=[],localStorage.setItem("largeurMoyTemp",largeurMoyTemp)}function getAPconfig(){XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/getapconfig":"/getapconfig")}function toogleShowPasswd(e){if(e=="ap"){const e=document.getElementById("btnShowPasswd");var t,n=document.getElementById("apPwd1"),s=document.getElementById("apPwd2");n.type==="password"?(n.type="text",s.type="text",e.src="images/oeuil-barre.svg",e.title="Hide password"):(n.type="password",s.type="password",e.src="images/oeuil.svg",e.title="Show password")}else{const e=document.getElementById("btnShowCliPasswd");t=document.getElementById("pwd_input"),t.type==="password"?(t.type="text",e.src="images/oeuil-barre.svg",e.title="Hide password"):(t.type="password",e.src="images/oeuil.svg",e.title="Show password")}}function inputConfigAP(){var s=document.getElementById("apSSID"),t=document.getElementById("apPwd1"),n=document.getElementById("apPwd2"),e=document.getElementById("btnValideAP");t.value==n.value&&(t.value.length==0||t.value.length>=8)&&apConfigChange?(e.src="images/valid.svg",e.style.cursor="pointer"):(e.src="images/valid-disable.svg",e.style.cursor="default")}function updateAPconfig(){var e,n,s,o=document.getElementById("apSSID"),t=document.getElementById("apPwd1"),i=document.getElementById("apPwd2");t.value==i.value&&(t.value.length==0||t.value.length>=8)&&apConfigChange?(e=new XMLHttpRequest,e.onreadystatechange=function(){e.readyState==4&&alert(e.status==200||e.status==0?`updateAPconfig(): -`+e.responseText:"updateAPconfig() : Error "+e.status)},n=encodeURIComponent(o.value),s=encodeURIComponent(t.value),location.protocol=="file:"?e.open("POST",netDevURL+"/setapconfig",!0):e.open("POST","/setapconfig",!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send("ssid="+n+"&pwd="+s)):alert("Entered passwords are not identical!")}function resetSettings(){confirm("Reset preferences to default?")==!0&&(localStorage.clear(),location.reload())}function reboot(){confirm("Reboot the weather station?")==!0&&XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/reboot":"/reboot")}function toggleChrono(){var e=document.getElementById("cadre_chrono"),t=document.getElementById("boutonSon");chronoVisible?(e.classList.add("noshow"),t.classList.add("noshow"),chronoVisible=!1):(e.classList.remove("noshow"),t.classList.remove("noshow"),chronoVisible=!0)}function changeCountDown(){var e=document.getElementById("countDownTime");chronoRunning?e.value=chronoMaxTime:(chronoMaxTime=e.value,afficheChronoMaxTime(),localStorage.setItem("chronoMaxTime",chronoMaxTime))}function startStopChrono(){const e=document.getElementById("btnChrono");chronoRunning?confirm("Stopping time countdown?")==!0&&(chronoRunning=!1,afficheChronoMaxTime(),e.src="images/start-chrono.svg"):(chronoRunning=!0,chronoDebut=Date.now(),e.src="images/stop-chrono.svg",refreshChrono(),clignottementChrono(),noteNum=0,soundOn&&beep(500,notes[noteNum],2,"sine",function(){flagBeep=!1}))}function afficheChronoMaxTime(){var e=document.getElementById("chrono0");minutes=Math.trunc(chronoMaxTime/60),seconds=chronoMaxTime%60,newText=minutes.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1})+":"+seconds.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),e.innerHTML=newText}function refreshChrono(){var e,t=document.getElementById("chrono0");if(chronoRunning){if(e=chronoMaxTime*1e3-(Date.now()-chronoDebut),e>0)minutes=Math.trunc(e/6e4),seconds=Math.floor(e%6e4/1e3),newText=minutes.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1})+chronoSepar+seconds.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),t.innerHTML=newText,seconds==0&&soundOn&&chronoSepar==":"&&(flagBeep||(flagBeep=!0,minutes==0?duree=1e3:duree=500,noteNum++,noteNum>=notes.length&&(noteNum=0),beep(duree,notes[noteNum],2,"sine",function(){flagBeep=!1})));else{t.innerHTML="00:00",chronoRunning=!1;const e=document.getElementById("btnChrono");e.src="images/start-chrono.svg"}setTimeout(function(){refreshChrono()},500)}else afficheChronoMaxTime()}function clignottementChrono(){chronoSepar==":"?chronoSepar=" ":chronoSepar=":",chronoRunning?setTimeout(function(){clignottementChrono()},500):chronoSepar=":"}function beep(e,t,n,s,o){var i=audioCtx.createOscillator(),a=audioCtx.createGain();i.connect(a),a.connect(audioCtx.destination),n&&(a.gain.value=n),t&&(i.frequency.value=t),s&&(i.type=s),o&&(i.onended=o),e?duree=e/1e3:duree=.5,i.start(audioCtx.currentTime),i.stop(audioCtx.currentTime+duree)}function toggleSon(){const e=document.getElementById("boutonSon");soundOn?(e.src="images/sound-off.svg",soundOn=!1,localStorage.setItem("sound",soundOn)):(e.src="images/sound-on.svg",soundOn=!0,localStorage.setItem("sound",soundOn))}function wakeup(){XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/wakeup":"/wakeup")}function changeDuree(e){XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/setduree?duree="+e:"/setduree?duree="+e)}function clickColor(e,t,n){newColor="rgb("+e+", "+t+", "+n+")",document.getElementById("colorResult").style.backgroundColor=newColor,cellID="color."+e+"."+t+"."+n,table=document.getElementById("colorTable"),tBody=table.getElementsByTagName("tbody")[0],lignes=tBody.getElementsByTagName("tr");for(const e of lignes){cellules=e.getElementsByTagName("td");for(const e of cellules)e.getAttribute("id")==cellID?e.style.backgroundImage="url(images/coche.svg)":e.style.backgroundImage=""}}function openColor(e){colorEnCours=e,newColor=document.getElementById(e).style.backgroundColor;const[t,n,s,i]=getRVBA(newColor);clickColor(t,n,s);var o=document.getElementById("colorChooser");o.classList.remove("noshow"),bouton=document.getElementById("okButton"),taille=bouton.offsetHeight,colorResult=document.getElementById("colorResult"),colorResult.style.height=taille+"px",colorResult.style.width=taille+"px"}function setColor(){switch(colorEnCours){case"iw":couleurVent=newColor,couleurFillVent=getFillColor(couleurVent),Window.graphVent.options.scales.y.ticks.color=couleurVent,Window.graphVent.data.datasets[0].borderColor=couleurVent,Window.graphVent.data.datasets[0].fill.above=couleurFillVent,Window.graphVent.data.datasets[0].fill.below=couleurFillVent,document.getElementById("iw").style.backgroundColor=couleurVent,document.body.style.setProperty("--couleurVent",couleurVent),localStorage.setItem(theme+".couleurVent",couleurVent);break;case"ip":couleurPression=newColor,couleurFillPression=getFillColor(couleurPression),Window.graphPres.options.scales.y.ticks.color=couleurPression,Window.graphPres.data.datasets[0].borderColor=couleurPression,Window.graphPres.data.datasets[0].fill.above=couleurFillPression,Window.graphPres.data.datasets[0].fill.below=couleurFillPression,document.getElementById("ip").style.backgroundColor=couleurPression,document.body.style.setProperty("--couleurPression",couleurPression),localStorage.setItem(theme+".couleurPression",couleurPression);break;case"it":couleurTempCtn=newColor,couleurFillCtn=getFillColor(couleurTempCtn),Window.graphTemp.options.scales.y.ticks.color=couleurTempCtn,Window.graphTemp.data.datasets[0].borderColor=couleurTempCtn,Window.graphTemp.data.datasets[0].fill.above=couleurFillCtn,Window.graphTemp.data.datasets[0].fill.below=couleurFillCtn,document.getElementById("it").style.backgroundColor=couleurTempCtn,document.body.style.setProperty("--couleurTempCtn",couleurTempCtn),localStorage.setItem(theme+".couleurTempCtn",couleurTempCtn);break;case"aw":couleurMoyVent=newColor,Window.graphVent.data.datasets[1].borderColor=couleurMoyVent,document.getElementById("aw").style.backgroundColor=couleurMoyVent,document.body.style.setProperty("--couleurMoyVent",couleurMoyVent),localStorage.setItem(theme+".couleurMoyVent",couleurMoyVent);break;case"ap":couleurMoyPres=newColor,Window.graphPres.data.datasets[1].borderColor=couleurMoyPres,document.getElementById("ap").style.backgroundColor=couleurMoyPres,document.body.style.setProperty("--couleurMoyPres",couleurMoyPres),localStorage.setItem(theme+".couleurMoyPres",couleurMoyPres);break;case"at":couleurMoyCtn=newColor,Window.graphTemp.data.datasets[1].borderColor=couleurMoyCtn,document.getElementById("at").style.backgroundColor=couleurMoyCtn,document.body.style.setProperty("--couleurMoyCtn",couleurMoyCtn),localStorage.setItem(theme+".couleurMoyCtn",couleurMoyCtn);break;default:console.log("setColor(): Erreur, colorEnCours invalide")}closeColor()}function closeColor(){var e=document.getElementById("colorChooser");setTimeout(function(){e.classList.add("noshow")},10)}function getThemeColor(e){var t=localStorage.getItem(e+".couleurVent");t!==null&&(couleurVent=t,couleurFillVent=getFillColor(couleurVent)),t=localStorage.getItem(e+".couleurMoyVent"),t!==null&&(couleurMoyVent=t),t=localStorage.getItem(e+".couleurPression"),t!==null&&(couleurPression=t,couleurFillPression=getFillColor(couleurPression)),t=localStorage.getItem(e+".couleurMoyPres"),t!==null&&(couleurMoyPres=t),t=localStorage.getItem(e+".couleurTempCtn"),t!==null&&(couleurTempCtn=t,couleurFillCtn=getFillColor(couleurTempCtn)),t=localStorage.getItem(e+".couleurMoyCtn"),t!==null&&(couleurMoyCtn=t)}function getRVBA(e){const[t,n,s,o]=e.match(/\d+/g).map(Number);return[t,n,s,o]}function getFillColor(e){return[R,V,B,A]=getRVBA(e),"rgba("+R+", "+V+", "+B+", 0.2)"}function setMainDialogColor(){var e=document.getElementById("fondColorTheme");theme=="sombre"?(e.style.backgroundColor="black",e.style.color="white"):(e.style.backgroundColor="white",e.style.color="black"),document.getElementById("iw").style.backgroundColor=couleurVent,document.getElementById("ip").style.backgroundColor=couleurPression,document.getElementById("it").style.backgroundColor=couleurTempCtn,document.getElementById("aw").style.backgroundColor=couleurMoyVent,document.getElementById("ap").style.backgroundColor=couleurMoyPres,document.getElementById("at").style.backgroundColor=couleurMoyCtn}function resizeActiveColorTable(){var e,t=document.getElementById("actr1").offsetHeight,t=t*.8;radius=t/2,e=document.getElementById("iw"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("ip"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("it"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("aw"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("ap"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("at"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px"}function changeGraphOrder(e){e.name=="gOrder0"?(getRadValue("gOrder1")==e.value&&(setRadValue("gOrder1",graph0),graph1=graph0),getRadValue("gOrder2")==e.value&&(setRadValue("gOrder2",graph0),graph2=graph0),graph0=e.value):e.name=="gOrder1"?(getRadValue("gOrder0")==e.value&&(setRadValue("gOrder0",graph1),graph0=graph1),getRadValue("gOrder2")==e.value&&(setRadValue("gOrder2",graph1),graph2=graph1),graph1=e.value):e.name=="gOrder2"&&(getRadValue("gOrder0")==e.value&&(setRadValue("gOrder0",graph2),graph0=graph2),getRadValue("gOrder1")==e.value&&(setRadValue("gOrder1",graph2),graph1=graph2),graph2=e.value),localStorage.setItem("graph0",graph0),localStorage.setItem("graph1",graph1),localStorage.setItem("graph2",graph2),setGraphicsContainers(),graphOrderChanged=!0}function setRadValue(e,t){for(rad of document.getElementsByName(e))if(rad.value==t){rad.checked=!0;break}}function getRadValue(e){for(rad of document.getElementsByName(e))if(rad.checked){return rad.value;break}}function setGraphicsContainers(){CV='
',CV+='

~~~~m/s

',CV+="
",CV+=' ',CP='
',CP+='

~~~~hPa

',CP+="
",CP+=' ',CT='
',CT+='

~~~~°C

',CT+="
",CT+=' ',graph0=="Wind"?document.getElementById("container0").innerHTML=CV:graph0=="Pressure"?document.getElementById("container0").innerHTML=CP:graph0=="Temperature"&&(document.getElementById("container0").innerHTML=CT),graph1=="Wind"?document.getElementById("container1").innerHTML=CV:graph1=="Pressure"?document.getElementById("container1").innerHTML=CP:graph1=="Temperature"&&(document.getElementById("container1").innerHTML=CT),graph2=="Wind"?document.getElementById("container2").innerHTML=CV:graph2=="Pressure"?document.getElementById("container2").innerHTML=CP:graph2=="Temperature"&&(document.getElementById("container2").innerHTML=CT)} \ No newline at end of file +`+e.responseText:"updateAPconfig() : Error "+e.status)},n=encodeURIComponent(o.value),s=encodeURIComponent(t.value),location.protocol=="file:"?e.open("POST",netDevURL+"/setapconfig",!0):e.open("POST","/setapconfig",!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send("ssid="+n+"&pwd="+s)):alert("Entered passwords are not identical!")}function resetSettings(){confirm("Reset preferences to default?")==!0&&(localStorage.clear(),location.reload())}function reboot(){confirm("Reboot the weather station?")==!0&&XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/reboot":"/reboot")}function toggleChrono(){var e=document.getElementById("cadre_chrono"),t=document.getElementById("boutonSon");chronoVisible?(e.classList.add("noshow"),t.classList.add("noshow"),chronoVisible=!1):(e.classList.remove("noshow"),t.classList.remove("noshow"),chronoVisible=!0)}function changeCountDown(){var e=document.getElementById("countDownTime");chronoRunning?e.value=chronoMaxTime:(chronoMaxTime=e.value,afficheChronoMaxTime(),localStorage.setItem("chronoMaxTime",chronoMaxTime))}function startStopChrono(){const e=document.getElementById("btnChrono");chronoRunning?confirm("Stopping time countdown?")==!0&&(chronoRunning=!1,afficheChronoMaxTime(),e.src="images/start-chrono.svg"):(chronoRunning=!0,chronoDebut=Date.now(),e.src="images/stop-chrono.svg",refreshChrono(),clignottementChrono(),noteNum=0,soundOn&&beep(500,notes[noteNum],2,"sine",function(){flagBeep=!1}))}function afficheChronoMaxTime(){var e=document.getElementById("chrono0");minutes=Math.trunc(chronoMaxTime/60),seconds=chronoMaxTime%60,newText=minutes.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1})+":"+seconds.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),e.innerHTML=newText}function refreshChrono(){var e,t=document.getElementById("chrono0");if(chronoRunning){if(e=chronoMaxTime*1e3-(Date.now()-chronoDebut),e>0)minutes=Math.trunc(e/6e4),seconds=Math.floor(e%6e4/1e3),newText=minutes.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1})+chronoSepar+seconds.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),t.innerHTML=newText,seconds==0&&soundOn&&chronoSepar==":"&&(flagBeep||(flagBeep=!0,minutes==0?duree=1e3:duree=500,noteNum++,noteNum>=notes.length&&(noteNum=0),beep(duree,notes[noteNum],2,"sine",function(){flagBeep=!1})));else{t.innerHTML="00:00",chronoRunning=!1;const e=document.getElementById("btnChrono");e.src="images/start-chrono.svg"}setTimeout(function(){refreshChrono()},500)}else afficheChronoMaxTime()}function clignottementChrono(){chronoSepar==":"?chronoSepar=" ":chronoSepar=":",chronoRunning?setTimeout(function(){clignottementChrono()},500):chronoSepar=":"}function beep(e,t,n,s,o){var i=audioCtx.createOscillator(),a=audioCtx.createGain();i.connect(a),a.connect(audioCtx.destination),n&&(a.gain.value=n),t&&(i.frequency.value=t),s&&(i.type=s),o&&(i.onended=o),e?duree=e/1e3:duree=.5,i.start(audioCtx.currentTime),i.stop(audioCtx.currentTime+duree)}function toggleSon(){const e=document.getElementById("boutonSon");soundOn?(e.src="images/sound-off.svg",soundOn=!1,localStorage.setItem("sound",soundOn)):(e.src="images/sound-on.svg",soundOn=!0,localStorage.setItem("sound",soundOn))}function wakeup(){XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/wakeup":"/wakeup")}function changeDuree(e){XMLHttpRequest_get(location.protocol=="file:"?netDevURL+"/setduree?duree="+e:"/setduree?duree="+e)}function clickColor(e,t,n){newColor="rgb("+e+", "+t+", "+n+")",document.getElementById("colorResult").style.backgroundColor=newColor,cellID="color."+e+"."+t+"."+n,table=document.getElementById("colorTable"),tBody=table.getElementsByTagName("tbody")[0],lignes=tBody.getElementsByTagName("tr");for(const e of lignes){cellules=e.getElementsByTagName("td");for(const e of cellules)e.getAttribute("id")==cellID?e.style.backgroundImage="url(images/coche.svg)":e.style.backgroundImage=""}}function openColor(e){colorEnCours=e,newColor=document.getElementById(e).style.backgroundColor;const[t,n,s,i]=getRVBA(newColor);clickColor(t,n,s);var o=document.getElementById("colorChooser");o.classList.remove("noshow"),bouton=document.getElementById("okButton"),taille=bouton.offsetHeight,colorResult=document.getElementById("colorResult"),colorResult.style.height=taille+"px",colorResult.style.width=taille+"px"}function setColor(){switch(colorEnCours){case"iw":couleurVent=newColor,couleurFillVent=getFillColor(couleurVent),Window.graphVent.options.scales.y.ticks.color=couleurVent,Window.graphVent.data.datasets[0].borderColor=couleurVent,Window.graphVent.data.datasets[0].fill.above=couleurFillVent,Window.graphVent.data.datasets[0].fill.below=couleurFillVent,document.getElementById("iw").style.backgroundColor=couleurVent,document.body.style.setProperty("--couleurVent",couleurVent),localStorage.setItem(theme+".couleurVent",couleurVent);break;case"ip":couleurPression=newColor,couleurFillPression=getFillColor(couleurPression),Window.graphPres.options.scales.y.ticks.color=couleurPression,Window.graphPres.data.datasets[0].borderColor=couleurPression,Window.graphPres.data.datasets[0].fill.above=couleurFillPression,Window.graphPres.data.datasets[0].fill.below=couleurFillPression,document.getElementById("ip").style.backgroundColor=couleurPression,document.body.style.setProperty("--couleurPression",couleurPression),localStorage.setItem(theme+".couleurPression",couleurPression);break;case"it":couleurTempCtn=newColor,couleurFillCtn=getFillColor(couleurTempCtn),Window.graphTemp.options.scales.y.ticks.color=couleurTempCtn,Window.graphTemp.data.datasets[0].borderColor=couleurTempCtn,Window.graphTemp.data.datasets[0].fill.above=couleurFillCtn,Window.graphTemp.data.datasets[0].fill.below=couleurFillCtn,document.getElementById("it").style.backgroundColor=couleurTempCtn,document.body.style.setProperty("--couleurTempCtn",couleurTempCtn),localStorage.setItem(theme+".couleurTempCtn",couleurTempCtn);break;case"aw":couleurMoyVent=newColor,Window.graphVent.data.datasets[1].borderColor=couleurMoyVent,document.getElementById("aw").style.backgroundColor=couleurMoyVent,document.body.style.setProperty("--couleurMoyVent",couleurMoyVent),localStorage.setItem(theme+".couleurMoyVent",couleurMoyVent);break;case"ap":couleurMoyPres=newColor,Window.graphPres.data.datasets[1].borderColor=couleurMoyPres,document.getElementById("ap").style.backgroundColor=couleurMoyPres,document.body.style.setProperty("--couleurMoyPres",couleurMoyPres),localStorage.setItem(theme+".couleurMoyPres",couleurMoyPres);break;case"at":couleurMoyCtn=newColor,Window.graphTemp.data.datasets[1].borderColor=couleurMoyCtn,document.getElementById("at").style.backgroundColor=couleurMoyCtn,document.body.style.setProperty("--couleurMoyCtn",couleurMoyCtn),localStorage.setItem(theme+".couleurMoyCtn",couleurMoyCtn);break;default:console.log("setColor(): Erreur, colorEnCours invalide")}closeColor()}function closeColor(){var e=document.getElementById("colorChooser");setTimeout(function(){e.classList.add("noshow")},10)}function getThemeColor(e){var t=localStorage.getItem(e+".couleurVent");t!==null&&(couleurVent=t,couleurFillVent=getFillColor(couleurVent)),t=localStorage.getItem(e+".couleurMoyVent"),t!==null&&(couleurMoyVent=t),t=localStorage.getItem(e+".couleurPression"),t!==null&&(couleurPression=t,couleurFillPression=getFillColor(couleurPression)),t=localStorage.getItem(e+".couleurMoyPres"),t!==null&&(couleurMoyPres=t),t=localStorage.getItem(e+".couleurTempCtn"),t!==null&&(couleurTempCtn=t,couleurFillCtn=getFillColor(couleurTempCtn)),t=localStorage.getItem(e+".couleurMoyCtn"),t!==null&&(couleurMoyCtn=t)}function getRVBA(e){const[t,n,s,o]=e.match(/\d+/g).map(Number);return[t,n,s,o]}function getFillColor(e){return[R,V,B,A]=getRVBA(e),"rgba("+R+", "+V+", "+B+", 0.2)"}function setMainDialogColor(){var e=document.getElementById("fondColorTheme");theme=="sombre"?(e.style.backgroundColor="black",e.style.color="white"):(e.style.backgroundColor="white",e.style.color="black"),document.getElementById("iw").style.backgroundColor=couleurVent,document.getElementById("ip").style.backgroundColor=couleurPression,document.getElementById("it").style.backgroundColor=couleurTempCtn,document.getElementById("aw").style.backgroundColor=couleurMoyVent,document.getElementById("ap").style.backgroundColor=couleurMoyPres,document.getElementById("at").style.backgroundColor=couleurMoyCtn}function resizeActiveColorTable(){var e,t=document.getElementById("actr1").offsetHeight,t=t*.8;radius=t/2,e=document.getElementById("iw"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("ip"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("it"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("aw"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("ap"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px",e=document.getElementById("at"),e.style.width=t+"px",e.style.height=t+"px",e.style.borderRadius=radius+"px"}function changeGraphOrder(e){e.name=="gOrder0"?(getRadValue("gOrder1")==e.value&&(setRadValue("gOrder1",graph0),graph1=graph0),getRadValue("gOrder2")==e.value&&(setRadValue("gOrder2",graph0),graph2=graph0),graph0=e.value):e.name=="gOrder1"?(getRadValue("gOrder0")==e.value&&(setRadValue("gOrder0",graph1),graph0=graph1),getRadValue("gOrder2")==e.value&&(setRadValue("gOrder2",graph1),graph2=graph1),graph1=e.value):e.name=="gOrder2"&&(getRadValue("gOrder0")==e.value&&(setRadValue("gOrder0",graph2),graph0=graph2),getRadValue("gOrder1")==e.value&&(setRadValue("gOrder1",graph2),graph1=graph2),graph2=e.value),localStorage.setItem("graph0",graph0),localStorage.setItem("graph1",graph1),localStorage.setItem("graph2",graph2),setGraphicsContainers(),graphOrderChanged=!0}function changeScalesPos(e){scalesPositions=e.value,Window.graphVent.options.scales.y.position=scalesPositions,Window.graphPres.options.scales.y.position=scalesPositions,Window.graphTemp.options.scales.y.position=scalesPositions,localStorage.setItem("scalesPositions",scalesPositions)}function setRadValue(e,t){for(rad of document.getElementsByName(e))if(rad.value==t){rad.checked=!0;break}}function getRadValue(e){for(rad of document.getElementsByName(e))if(rad.checked){return rad.value;break}}function setGraphicsContainers(){CV='
',CV+='

~~~~m/s

',CV+="
",CV+=' ',CP='
',CP+='

~~~~hPa

',CP+="
",CP+=' ',CT='
',CT+='

~~~~°C

',CT+="
",CT+=' ',graph0=="Wind"?document.getElementById("container0").innerHTML=CV:graph0=="Pressure"?document.getElementById("container0").innerHTML=CP:graph0=="Temperature"&&(document.getElementById("container0").innerHTML=CT),graph1=="Wind"?document.getElementById("container1").innerHTML=CV:graph1=="Pressure"?document.getElementById("container1").innerHTML=CP:graph1=="Temperature"&&(document.getElementById("container1").innerHTML=CT),graph2=="Wind"?document.getElementById("container2").innerHTML=CV:graph2=="Pressure"?document.getElementById("container2").innerHTML=CP:graph2=="Temperature"&&(document.getElementById("container2").innerHTML=CT)} \ No newline at end of file diff --git a/WeThermic/data/style_principal.css b/WeThermic/data/style_principal.css index bfdd674..b3b7ce9 100644 --- a/WeThermic/data/style_principal.css +++ b/WeThermic/data/style_principal.css @@ -1 +1 @@ -:root{font-family:sans-serif}html,body{margin:0;padding:0;height:100%;width:100%;text-align:center}#lapage{height:100%;height:100vh}#valeursV,#valeursP,#valeursT{position:absolute;width:100%}.topRight{position:absolute;top:0;right:0;margin-right:5px}.fLeft{float:left;margin:0}.fRight{float:right;margin:0;padding-right:5px}.top10{margin-top:10px}.valeur{padding-left:50px;font-size:35px;font-weight:700}.valeur p{margin:0}.btn{width:48px;height:48px;margin-right:10px;cursor:pointer}#boutonReboot{margin-left:10px}.graph_container{height:33.333%}#fullScreenButton{display:inline-block;border:1px solid;border-radius:5px;width:fit-content;margin:auto;padding-top:5px;padding-bottom:5px;padding-left:10px;padding-right:10px;cursor:pointer}#refreshButton{display:inline-block;border:1px solid;border-radius:5px;width:fit-content;margin:auto;padding-top:5px;padding-bottom:5px;padding-left:10px;padding-right:10px;cursor:pointer}.settingsDialog{position:absolute;border:1px solid;top:0%;left:0%;width:100%;height:100%;overflow:auto;background-color:rgb(0 63 32/75%);color:#fff}.settingsDialog p{margin-top:10px;margin-bottom:5px;margin-left:20px;margin-right:10px}.settingsDialog button{font-size:15px}.leftAlign{text-align:left}.centerAlign{text-align:center}.noshow{display:none}.masquer{opacity:0}.netTables{width:100%;border-spacing:2px}.trlink{cursor:pointer;background-color:rgba(0,100,0,.5);height:40px}.centreVertical{vertical-align:bottom}.dlgMask{position:fixed;background-color:rgba(0,0,0,.5);left:0%;right:0%;top:0%;bottom:0%}.dialog{display:inline-block;position:fixed;border:1px solid;background-color:#e0e0e0;box-shadow:8px 8px 12px #3f3f3f;left:10%;top:15%;text-align:center;transition:all .5s ease-in-out;-webkit-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;-ms-transition:all .5s ease-in-out}#dlgConnect{color:#000}#activeNetwork{text-align:left}#activeNetwork input{margin-bottom:3px;text-align:center;background-color:beige}#activeNetwork label{margin-left:18px;width:13em;display:inline-block}#btnDeconnect{background-color:darkred;border:2px solid gray;float:right;margin-right:20px;padding-left:7px;padding-right:7px;border-radius:5px;cursor:pointer}#networkTable{margin-left:18px;margin-right:18px}.lignePartielle{margin-left:18px;margin-right:18px;width:2px}#ligneHaut{border-top:1px solid #fff}.dlgPwdContenu{margin:15px;height:70%}.dlgPwdContenu label{display:inline-block;width:17em;text-align:left;margin-top:15px}.dlgPwdContenu input{width:15em}#ssid_input{text-align:center}.alignement-droit{margin-right:10px;text-align:right}#cadre_attente{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%)}#cadre_chrono{font-size:80px;font-family:monospace,sans-serif;font-weight:700;position:absolute;top:52%;left:50%;transform:translate(-50%,-50%)}#cadre_chrono span{vertical-align:middle}#btnChrono{cursor:pointer}.attente{margin:auto;border:7px solid #f3f3f3;border-top:7px solid #ff0;border-right:12px solid green;border-bottom:16px solid blue;border-left:12px solid red;border-radius:50%;width:37px;height:37px;animation:spin 1.2s linear infinite}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.numScale{width:5em}.settingFieldset{width:90%;margin:0 auto;padding:5px 0}.nowarp{white-space:nowrap}.fullWidth{width:60%}#apConfig{text-align:left;display:table}#apConfig input{margin-bottom:3px;text-align:center;display:inline-block;background-color:beige}#apConfig label{width:13em;display:inline-block}.tblPwd{margin-left:20px}.tblPwdCenter{display:table-cell;vertical-align:middle}#btnShowPasswd,#btnValideAP{margin-left:20px;cursor:pointer}#colorChooser{width:80%;position:absolute;top:50vh;transform:translateY(-50%);left:10%;background-color:#a9a9a9}#colorChooser button{background-color:#d3d3d3;padding:15px;margin:10px;border-radius:10px;cursor:pointer}#okButton{margin-left:15px}#colorTable{width:100%;border-spacing:10px;cursor:pointer}#colorTable tr{height:60px}#colorTable td{background-position:50%;background-repeat:no-repeat}.clear{clear:both;height:0;overflow:hidden}#colorResult{display:inline-block;margin:10px;border-radius:50px}#fondColorTheme{margin-left:3px;margin-right:3px}.colorButton{cursor:pointer}#tblGraphOrder{width:80%;margin:auto} \ No newline at end of file +:root{font-family:sans-serif}html,body{margin:0;padding:0;height:100%;width:100%;text-align:center}#lapage{height:100%;height:100vh}#valeursV,#valeursP,#valeursT{position:absolute;width:100%}.topRight{position:absolute;top:0;right:0;margin-right:5px}.fLeft{float:left;margin:0}.fRight{float:right;margin:0;padding-right:5px}.top10{margin-top:10px}.valeur{padding-left:50px;font-size:35px;font-weight:700}.valeur p{margin:0}.btn{width:48px;height:48px;margin-right:10px;cursor:pointer}#boutonReboot{margin-left:10px}.graph_container{height:33.333%}#fullScreenButton{display:inline-block;border:1px solid;border-radius:5px;width:fit-content;margin:auto;padding-top:5px;padding-bottom:5px;padding-left:10px;padding-right:10px;cursor:pointer}#refreshButton{display:inline-block;border:1px solid;border-radius:5px;width:fit-content;margin:auto;padding-top:5px;padding-bottom:5px;padding-left:10px;padding-right:10px;cursor:pointer}.settingsDialog{position:absolute;border:1px solid;top:0%;left:0%;width:100%;height:100%;overflow:auto;background-color:rgb(0 63 32/75%);color:#fff}.settingsDialog p{margin-top:10px;margin-bottom:5px;margin-left:20px;margin-right:10px}.settingsDialog button{font-size:15px}.leftAlign{text-align:left}.centerAlign{text-align:center}.noshow{display:none}.masquer{opacity:0}.netTables{width:100%;border-spacing:2px}.trlink{cursor:pointer;background-color:rgba(0,100,0,.5);height:40px}.centreVertical{vertical-align:bottom}.dlgMask{position:fixed;background-color:rgba(0,0,0,.5);left:0%;right:0%;top:0%;bottom:0%}.dialog{display:inline-block;position:fixed;border:1px solid;background-color:#e0e0e0;box-shadow:8px 8px 12px #3f3f3f;left:10%;top:15%;text-align:center;transition:all .5s ease-in-out;-webkit-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;-ms-transition:all .5s ease-in-out}#dlgConnect{color:#000}#activeNetwork{text-align:left}#activeNetwork input{margin-bottom:3px;text-align:center;background-color:beige}#activeNetwork label{margin-left:18px;width:13em;display:inline-block}#btnDeconnect{background-color:darkred;border:2px solid gray;float:right;margin-right:20px;padding-left:7px;padding-right:7px;border-radius:5px;cursor:pointer}#networkTable{margin-left:18px;margin-right:18px}.lignePartielle{margin-left:18px;margin-right:18px;width:2px}#ligneHaut{border-top:1px solid #fff}.dlgPwdContenu{margin:15px;height:70%}.dlgPwdContenu label{display:inline-block;width:17em;text-align:left;margin-top:15px}.dlgPwdContenu input{width:15em}#ssid_input{text-align:center}.alignement-droit{margin-right:10px;text-align:right}#cadre_attente{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%)}#cadre_chrono{font-size:80px;font-family:monospace,sans-serif;font-weight:700;position:absolute;top:52%;left:50%;transform:translate(-50%,-50%)}#cadre_chrono span{vertical-align:middle}#btnChrono{cursor:pointer}.attente{margin:auto;border:7px solid #f3f3f3;border-top:7px solid #ff0;border-right:12px solid green;border-bottom:16px solid blue;border-left:12px solid red;border-radius:50%;width:37px;height:37px;animation:spin 1.2s linear infinite}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.numScale{width:5em}.settingFieldset{width:90%;margin:0 auto;padding:5px 0}.nowarp{white-space:nowrap}.fullWidth{width:60%}#apConfig{text-align:left;display:table}#apConfig input{margin-bottom:3px;text-align:center;display:inline-block;background-color:beige}#apConfig label{width:13em;display:inline-block}.tblPwd{margin-left:20px}.tblPwdCenter{display:table-cell;vertical-align:middle}#btnShowPasswd,#btnValideAP{margin-left:20px;cursor:pointer}#colorChooser{width:80%;position:absolute;top:50vh;transform:translateY(-50%);left:10%;background-color:#a9a9a9}#colorChooser button{background-color:#d3d3d3;padding:15px;margin:10px;border-radius:10px;cursor:pointer}#okButton{margin-left:15px}#colorTable{width:100%;border-spacing:10px;cursor:pointer}#colorTable tr{height:60px}#colorTable td{background-position:50%;background-repeat:no-repeat}.clear{clear:both;height:0;overflow:hidden}#colorResult{display:inline-block;margin:10px;border-radius:50px}#fondColorTheme{margin-left:3px;margin-right:3px}.colorButton{cursor:pointer}#tblGraphOrder{width:80%;margin:auto;border-collapse:collapse}.borderSup{border-top:1px solid} \ No newline at end of file