Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBenes3 committed Dec 1, 2023
1 parent 61cc5d0 commit a9816e9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@
</tr>
<tr>
<th>Car 1 last json</th>
<th></th>
<td id="car1TimeStamp"></td>
<td>
<button class="custom-button" id="car1Button">Car 1</button>
<div id="car1Panel"></div>
</td>
</tr>
<tr>
<th>Car 2 last json</th>
<th></th>
<td id="car2TimeStamp"></td>
<td>
<button class="custom-button" id="car2Button">Car 2</button>
<div id="car2Panel"></div>
</td>
</tr>
<tr>
<th>Car 3 last json</th>
<th></th>
<td id="car3TimeStamp"></td>
<td>
<button class="custom-button" id="car3Button">Car 3</button>
<div id="car3Panel"></div>
Expand Down Expand Up @@ -622,8 +622,8 @@
} else {
timestampBackgroundColor = 'rgba(255, 0, 0, 0.7)';
}
document.getElementById('car1Panel').textContent = timestamp.toLocaleString('en-US', { hour12: false }) + ", (-" + timeDifferenceInSeconds + "s)";
document.getElementById('car1Panel').style.backgroundColor = timestampBackgroundColor;
document.getElementById('car1TimeStamp').textContent = timestamp.toLocaleString('en-US', { hour12: false }) + ", (-" + timeDifferenceInSeconds + "s)";
document.getElementById('car1TimeStamp').style.backgroundColor = timestampBackgroundColor;
} else {
console.log('Received undefined data from the server');
}
Expand Down Expand Up @@ -653,8 +653,8 @@
} else {
timestampBackgroundColor = 'rgba(255, 0, 0, 0.7)';
}
document.getElementById('car2Panel').textContent = timestamp.toLocaleString('en-US', { hour12: false }) + ", (-" + timeDifferenceInSeconds + "s)";
document.getElementById('car2Panel').style.backgroundColor = timestampBackgroundColor;
document.getElementById('car2TimeStamp').textContent = timestamp.toLocaleString('en-US', { hour12: false }) + ", (-" + timeDifferenceInSeconds + "s)";
document.getElementById('car2TimeStamp').style.backgroundColor = timestampBackgroundColor;
} else {
console.log('Received undefined data from the server');
}
Expand Down Expand Up @@ -683,8 +683,8 @@
} else {
timestampBackgroundColor = 'rgba(255, 0, 0, 0.7)';
}
document.getElementById('car3Panel').textContent = timestamp.toLocaleString('en-US', { hour12: false }) + ", (-" + timeDifferenceInSeconds + "s)";
document.getElementById('car3Panel').style.backgroundColor = timestampBackgroundColor;
document.getElementById('car3TimeStamp').textContent = timestamp.toLocaleString('en-US', { hour12: false }) + ", (-" + timeDifferenceInSeconds + "s)";
document.getElementById('car3TimeStamp').style.backgroundColor = timestampBackgroundColor;
} else {
console.log('Received undefined data from the server');
}
Expand Down

0 comments on commit a9816e9

Please sign in to comment.