DmitrMakeev commited on
Commit
0c07eda
·
verified ·
1 Parent(s): 60964ab

Update online.html

Browse files
Files changed (1) hide show
  1. online.html +29 -1
online.html CHANGED
@@ -623,6 +623,34 @@ document.getElementById("but_sliv").addEventListener("click", function() {
623
  // Создаём график
624
  Plotly.newPlot("parametersChart", traces, layout);
625
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
626
  function updateValues(data) {
627
  document.getElementById("dey").textContent = data.dey;
628
  document.getElementById("wek").textContent = data.wek;
@@ -634,7 +662,7 @@ document.getElementById("but_sliv").addEventListener("click", function() {
634
  document.getElementById("tA").textContent = data.tA;
635
  document.getElementById("hDm").textContent = data.hDm;
636
  document.getElementById("sVen").textContent = data.sVen;
637
- document.getElementById("rFul").textContent = data.rFul;
638
  document.getElementById("rLi").textContent = data.rLi;
639
  document.getElementById("rWat").textContent = data.rWat;
640
  document.getElementById("rRas").textContent = data.rRas;
 
623
  // Создаём график
624
  Plotly.newPlot("parametersChart", traces, layout);
625
 
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+ function updateRFul(value) {
634
+ const elem = document.getElementById("rFul");
635
+ if (value === "0") {
636
+ elem.textContent = "СТОП";
637
+ elem.style.color = "red"; // Красный для СТОП
638
+ } else {
639
+ elem.textContent = "РАБОТА";
640
+ elem.style.color = "green"; // Зелёный для РАБОТА
641
+ }
642
+ }
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
  function updateValues(data) {
655
  document.getElementById("dey").textContent = data.dey;
656
  document.getElementById("wek").textContent = data.wek;
 
662
  document.getElementById("tA").textContent = data.tA;
663
  document.getElementById("hDm").textContent = data.hDm;
664
  document.getElementById("sVen").textContent = data.sVen;
665
+ updateRFul(data.rFul);
666
  document.getElementById("rLi").textContent = data.rLi;
667
  document.getElementById("rWat").textContent = data.rWat;
668
  document.getElementById("rRas").textContent = data.rRas;