Spaces:
Runtime error
Runtime error
Update pressure.html
Browse files- pressure.html +10 -1
pressure.html
CHANGED
@@ -2,11 +2,20 @@
|
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
-
<title>Pressure Dashboard</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
</head>
|
7 |
<body>
|
8 |
<h1>Zone Pressure Dashboard</h1>
|
9 |
<img src="data:image/png;base64,{{ heatmap_img }}" alt="Zone Pressure Heatmap">
|
|
|
10 |
<h2>Rewards</h2>
|
11 |
<ul>
|
12 |
{% for unit, reward in rewards.items() %}
|
|
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
+
<title>Zone Pressure Dashboard</title>
|
6 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.0/socket.io.js"></script>
|
7 |
+
<script type="text/javascript">
|
8 |
+
var socket = io();
|
9 |
+
socket.on('update_pressure', function(data) {
|
10 |
+
document.getElementById('pressures').innerHTML = JSON.stringify(data);
|
11 |
+
// Optionally update heatmap image here
|
12 |
+
});
|
13 |
+
</script>
|
14 |
</head>
|
15 |
<body>
|
16 |
<h1>Zone Pressure Dashboard</h1>
|
17 |
<img src="data:image/png;base64,{{ heatmap_img }}" alt="Zone Pressure Heatmap">
|
18 |
+
<div id="pressures">{{ pressures }}</div>
|
19 |
<h2>Rewards</h2>
|
20 |
<ul>
|
21 |
{% for unit, reward in rewards.items() %}
|