Spaces:
Sleeping
Sleeping
Update settings.html
Browse files- settings.html +2 -2
settings.html
CHANGED
@@ -129,7 +129,7 @@ input[type="number"] {
|
|
129 |
|
130 |
<script>
|
131 |
|
132 |
-
function
|
133 |
document.getElementById("pH_set").textContent = "7.5";
|
134 |
document.getElementById("ph_on_set").textContent = data.ph_on_eep;
|
135 |
document.getElementById("ec_set").textContent = data.ec_eep;
|
@@ -150,7 +150,7 @@ function fetchValues_eep_set() {
|
|
150 |
xhr.onreadystatechange = function () {
|
151 |
if (xhr.readyState === 4 && xhr.status === 200) {
|
152 |
var response = JSON.parse(xhr.responseText);
|
153 |
-
|
154 |
}
|
155 |
};
|
156 |
xhr.send();
|
|
|
129 |
|
130 |
<script>
|
131 |
|
132 |
+
function updateValues(data) {
|
133 |
document.getElementById("pH_set").textContent = "7.5";
|
134 |
document.getElementById("ph_on_set").textContent = data.ph_on_eep;
|
135 |
document.getElementById("ec_set").textContent = data.ec_eep;
|
|
|
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();
|