DmitrMakeev
commited on
Commit
•
e1510f1
1
Parent(s):
85e2c1f
Update settings.html
Browse files- settings.html +2 -34
settings.html
CHANGED
@@ -35,7 +35,7 @@ input[type="number"] {
|
|
35 |
<p>EEPROM : <span id="pH_eep"></span></p>
|
36 |
<form>
|
37 |
<label for="pH_set">Новое : </label>
|
38 |
-
<input type="number" id="pH_set" value="" min="1" max="14" step="0.01">
|
39 |
</form>
|
40 |
<button id="pH_set_but" type="button" class="btn btn-primary">Записать</button>
|
41 |
|
@@ -72,7 +72,7 @@ input[type="number"] {
|
|
72 |
|
73 |
<form>
|
74 |
<label for="ec_A_set">Новое : </label>
|
75 |
-
<input type="number" id="ec_A_set" value="" min="0.1" max="20" step="0.01">
|
76 |
</form>
|
77 |
<br>
|
78 |
<h4>EC доз. B_ON sec.</h4>
|
@@ -127,38 +127,6 @@ input[type="number"] {
|
|
127 |
|
128 |
|
129 |
|
130 |
-
<script>
|
131 |
-
|
132 |
-
function fetchValues_eep_set(data) {
|
133 |
-
document.getElementById("pH_set").value = "7.5"; // Значение устанавливается в атрибут value, а не textContent
|
134 |
-
document.getElementById("ph_on_set").value = data.ph_on_eep;
|
135 |
-
document.getElementById("ec_set").textContent = data.ec_eep;
|
136 |
-
document.getElementById("ec_A_set").textContent = data.ec_A_eep;
|
137 |
-
document.getElementById("ec_B_set").textContent = data.ec_B_eep;
|
138 |
-
document.getElementById("ec_C_set").textContent = data.ec_C_eep;
|
139 |
-
document.getElementById("l_ON_h_set").textContent = data.l_ON_h_eep;
|
140 |
-
document.getElementById("l_ON_m_set").textContent = data.l_ON_m_eep;
|
141 |
-
document.getElementById("l_OFF_h_set").textContent = data.l_OFF_h_eep;
|
142 |
-
document.getElementById("l_OFF_m_set").textContent = data.l_OFF_m_eep;
|
143 |
-
document.getElementById("t_Voz_eep_set").textContent = data.t_Voz_eep;
|
144 |
-
}
|
145 |
-
|
146 |
-
function fetchValues_eep_set() {
|
147 |
-
var xhr = new XMLHttpRequest();
|
148 |
-
xhr.open("GET", "/settings_api", true);
|
149 |
-
xhr.setRequestHeader("Content-Type", "application/json");
|
150 |
-
xhr.onreadystatechange = function () {
|
151 |
-
if (xhr.readyState === 4 && xhr.status === 200) {
|
152 |
-
var response = JSON.parse(xhr.responseText);
|
153 |
-
updateValues(response); // Вот здесь исправление
|
154 |
-
}
|
155 |
-
};
|
156 |
-
xhr.send();
|
157 |
-
}
|
158 |
-
|
159 |
-
fetchValues_eep_set();
|
160 |
-
|
161 |
-
</script>
|
162 |
|
163 |
|
164 |
|
|
|
35 |
<p>EEPROM : <span id="pH_eep"></span></p>
|
36 |
<form>
|
37 |
<label for="pH_set">Новое : </label>
|
38 |
+
<input type="number" id="pH_set" value="5.7" min="1" max="14" step="0.01">
|
39 |
</form>
|
40 |
<button id="pH_set_but" type="button" class="btn btn-primary">Записать</button>
|
41 |
|
|
|
72 |
|
73 |
<form>
|
74 |
<label for="ec_A_set">Новое : </label>
|
75 |
+
<input type="number" id="ec_A_set" value="1.5" min="0.1" max="20" step="0.01">
|
76 |
</form>
|
77 |
<br>
|
78 |
<h4>EC доз. B_ON sec.</h4>
|
|
|
127 |
|
128 |
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
|
132 |
|