mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-10 03:14:58 -04:00
update js
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
const socket = io('http://localhost:6011');
|
||||
const jobId = document.querySelector("[data-job-id]").dataset.jobId;
|
||||
|
||||
socket.on('connect', () => {
|
||||
console.log('Connected to server');
|
||||
});
|
||||
|
||||
socket.on('connect', () => {
|
||||
console.log('✅ Connected to server');
|
||||
});
|
||||
|
||||
socket.on('job_update', (data) => {
|
||||
console.log('📡 Received job update:', data);
|
||||
document.getElementById('status').innerText = `Job ${data.job_id}: ${data.status}`;
|
||||
|
||||
if (data.job_id === jobId) {
|
||||
document.getElementById('status').innerText = `Job ${data.job_id}: ${data.status}`;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user