xyplon
commited on
Update static/models.js
Browse files- static/models.js +21 -6
static/models.js
CHANGED
@@ -1,6 +1,27 @@
|
|
1 |
// DO NOT TRY TO COPY MY UI OR STYLE
|
2 |
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
const div = document.getElementById('imshow');
|
5 |
let width = 1024
|
6 |
let height = 1024
|
@@ -224,9 +245,3 @@ btn.onclick = async () => {
|
|
224 |
|
225 |
}
|
226 |
|
227 |
-
window.addEventListener('load', function() {
|
228 |
-
const socket = io('https://xyplon.onrender.com');
|
229 |
-
socket.on('update', function(data) {
|
230 |
-
document.getElementById('stats').textContent = `Pending (Generating): ${data["Pending Requests"]} Total Requests: ${data["Total Requests"]}`;
|
231 |
-
});
|
232 |
-
});
|
|
|
1 |
// DO NOT TRY TO COPY MY UI OR STYLE
|
2 |
|
3 |
|
4 |
+
|
5 |
+
window.addEventListener('load', function() {
|
6 |
+
const socket = io('https://xyplon.onrender.com', {
|
7 |
+
reconnectionAttempts: 3,
|
8 |
+
timeout: 10000
|
9 |
+
});
|
10 |
+
|
11 |
+
socket.on('connect', function() {
|
12 |
+
console.log('Connected to Socket.IO server');
|
13 |
+
});
|
14 |
+
|
15 |
+
socket.on('connect_error', function(error) {
|
16 |
+
console.error('Connection error:', error);
|
17 |
+
});
|
18 |
+
|
19 |
+
socket.on('update', function(data) {
|
20 |
+
document.getElementById('stats').textContent = `Pending (Generating): ${data["Pending Requests"]} Total Requests: ${data["Total Requests"]}`;
|
21 |
+
});
|
22 |
+
});
|
23 |
+
|
24 |
+
|
25 |
const div = document.getElementById('imshow');
|
26 |
let width = 1024
|
27 |
let height = 1024
|
|
|
245 |
|
246 |
}
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|