Merge branch 'main' of https://github.com/GSA/notifications-admin into 1674-match-recent-batches-to-wireframe

# Conflicts:
#	tests/javascripts/activityChart.test.js
This commit is contained in:
Jonathan Bobel
2024-08-08 15:07:03 -04:00
8 changed files with 104 additions and 25 deletions

View File

@@ -185,7 +185,7 @@
return;
}
var socket = io();
var socket = io("/services");
var eventType = type === 'service' ? 'fetch_daily_stats' : 'fetch_daily_stats_by_user';
var socketConnect = type === 'service' ? 'daily_stats_update' : 'daily_stats_by_user_update';
@@ -193,6 +193,10 @@
socket.emit(eventType);
});
socket.on('connect_error', function(error) {
console.error('WebSocket connection error:', error);
});
socket.on(socketConnect, function(data) {
var labels = [];