Spaces:
Sleeping
Sleeping
DmitrMakeev
commited on
Commit
•
1e9310c
1
Parent(s):
856645f
Create settings.html
Browse files- settings.html +77 -0
settings.html
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<meta charset="utf-8" />
|
5 |
+
<meta name="viewport" content="width=device-width" />
|
6 |
+
<title>My static Space</title>
|
7 |
+
<link rel="stylesheet" href="https://huggingface.co/spaces/vk-ai-system/flask_inference_api/resolve/main/style.css" />
|
8 |
+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
</head>
|
15 |
+
<body>
|
16 |
+
<h1>Онлайн данные системы</h1>
|
17 |
+
<p>День : <span id="dey"></span></p>
|
18 |
+
<p>Неделя: <span id="wek"></span></p>
|
19 |
+
<br>
|
20 |
+
<p>PH раствора: <span id="ph"></span></p>
|
21 |
+
<p>EC раствора: <span id="ec"></span></p>
|
22 |
+
<p>Т. раствора: <span id="tS"></span></p>
|
23 |
+
<p>Т. воздуха: <span id="tA"></span></p>
|
24 |
+
<p>Вл. воздуха: <span id="hDm"></span></p>
|
25 |
+
<p>Об. вентилятора: <span id="sVen"></span></p>
|
26 |
+
<br>
|
27 |
+
<p>Система: <span id="rFul"></span></p>
|
28 |
+
<p>Освещение: <span id="rLi"></span></p>
|
29 |
+
<p>Под.воды: <span id="rWat"></span></p>
|
30 |
+
<p>Под. раствора: <span id="rRas"></span></p>
|
31 |
+
<p>Доз. pH: <span id="rPH"></span></p>
|
32 |
+
<p>Доз. EC: <span id="rEC"></span></p>
|
33 |
+
<p>Слив: <span id="rSl"></span></p>
|
34 |
+
<p>Ур. раствора: <span id="rLe"></span></p>
|
35 |
+
<p>Дат. затопления: <span id="alW"></span></p>
|
36 |
+
|
37 |
+
|
38 |
+
<script>
|
39 |
+
function updateValues(data) {
|
40 |
+
document.getElementById("dey").textContent = data.dey;
|
41 |
+
document.getElementById("wek").textContent = data.wek;
|
42 |
+
document.getElementById("ph").textContent = data.ph;
|
43 |
+
document.getElementById("ec").textContent = data.ec;
|
44 |
+
document.getElementById("tS").textContent = data.tS;
|
45 |
+
document.getElementById("tA").textContent = data.tA;
|
46 |
+
document.getElementById("hDm").textContent = data.hDm;
|
47 |
+
document.getElementById("sVen").textContent = data.sVen;
|
48 |
+
document.getElementById("rFul").textContent = data.rFul;
|
49 |
+
document.getElementById("rLi").textContent = data.rLi;
|
50 |
+
document.getElementById("rWat").textContent = data.rWat;
|
51 |
+
document.getElementById("rRas").textContent = data.rRas;
|
52 |
+
document.getElementById("rPH").textContent = data.rPH;
|
53 |
+
document.getElementById("rEC").textContent = data.rEC;
|
54 |
+
document.getElementById("rSl").textContent = data.rSl;
|
55 |
+
document.getElementById("rLe").textContent = data.rLe;
|
56 |
+
document.getElementById("alW").textContent = data.alW;
|
57 |
+
|
58 |
+
}
|
59 |
+
|
60 |
+
function fetchValues() {
|
61 |
+
var xhr = new XMLHttpRequest();
|
62 |
+
xhr.open("GET", "/settings_api", true);
|
63 |
+
xhr.setRequestHeader("Content-Type", "application/json");
|
64 |
+
xhr.onreadystatechange = function () {
|
65 |
+
if (xhr.readyState === 4 && xhr.status === 200) {
|
66 |
+
var response = JSON.parse(xhr.responseText);
|
67 |
+
updateValues(response);
|
68 |
+
}
|
69 |
+
};
|
70 |
+
xhr.send();
|
71 |
+
}
|
72 |
+
|
73 |
+
fetchValues();
|
74 |
+
setInterval(fetchValues, 10000);
|
75 |
+
</script>
|
76 |
+
</body>
|
77 |
+
</html>
|