File size: 2,924 Bytes
1e9310c
 
 
 
 
 
 
3c11f53
4eba8a4
 
1e9310c
ea22cb5
d0ddd2f
 
 
 
 
1e9310c
d0ddd2f
 
 
5457996
ea22cb5
1e9310c
 
 
 
cc6cdde
1e9310c
8cde8ac
 
8b3a17d
87bc521
8cde8ac
8b3a17d
674330c
8cde8ac
87bc521
 
275f266
423467b
 
 
 
 
275f266
423467b
 
 
 
 
 
 
275f266
423467b
 
 
 
 
 
 
275f266
423467b
 
 
93c573b
1e9310c
9159ff4
 
1e9310c
28742bb
a107db1
1e9310c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width" />
		<title>My static Space</title>
		<link rel="stylesheet" href="https://huggingface.co/spaces/vk-ai-system/flask_inference_api/resolve/main/style.css" />


    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">

<style>
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button;
  opacity: 1;
}

input[type="number"] {
  -moz-appearance: textfield;
}

</style>

      
	</head>
<body>
  <h1>Настройки системы</h1>

  <br>
<h4>Уроыень pH</h4>  
  <p>EEPROM : <span id="pH_eep"></span></p>

<form>
   <label for="pH_set">Новое : </label>
   <input type="number"  id="pH_set" value="5.6" min="1" max="14" step="0.05">
</form>


<div class="card-group">
  <div class="card">
    <img src="..." class="card-img-top" alt="...">
    <div class="card-body">
      <h5 class="card-title">Card title</h5>
      <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
      <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
    </div>
  </div>
  <div class="card">
    <img src="..." class="card-img-top" alt="...">
    <div class="card-body">
      <h5 class="card-title">Card title</h5>
      <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
      <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
    </div>
  </div>
  <div class="card">
    <img src="..." class="card-img-top" alt="...">
    <div class="card-body">
      <h5 class="card-title">Card title</h5>
      <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
      <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
    </div>
  </div>
</div>
  
  <script>

    
    function updateValues(data) {
      document.getElementById("pH_eep").textContent = data.ph_eep;
    
      
    }
    
    function fetchValues() {
      var xhr = new XMLHttpRequest();
      xhr.open("GET", "/settings_api", true);
      xhr.setRequestHeader("Content-Type", "application/json");
      xhr.onreadystatechange = function () {
        if (xhr.readyState === 4 && xhr.status === 200) {
          var response = JSON.parse(xhr.responseText);
          updateValues(response);
        }
      };
      xhr.send();
    }
    
    fetchValues();
    setInterval(fetchValues, 10000);
  </script>
</body>
</html>