mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-02 15:11:13 -04:00
Merge branch 'main' of https://github.com/GSA/notifications-admin into 1544-data-viz-total-message-allowance
# Conflicts: # app/main/views/dashboard.py # package-lock.json # package.json
This commit is contained in:
@@ -29,13 +29,13 @@
|
||||
});
|
||||
|
||||
var socket = io();
|
||||
var serviceId = ctx.getAttribute('data-service-id');
|
||||
|
||||
socket.on('connect', function() {
|
||||
socket.emit('fetch_daily_stats', serviceId);
|
||||
socket.emit('fetch_daily_stats_by_user');
|
||||
});
|
||||
|
||||
socket.on('daily_stats_update', function(data) {
|
||||
socket.on('daily_stats_by_user_update', function(data) {
|
||||
// console.log('Data received:', data);
|
||||
var labels = [];
|
||||
var deliveredData = [];
|
||||
|
||||
@@ -50,13 +50,14 @@
|
||||
});
|
||||
|
||||
socket.on('error', function(data) {
|
||||
console.log('Error:', data);
|
||||
// console.log('Error:', data);
|
||||
});
|
||||
|
||||
var sevenDaysButton = document.getElementById('sevenDaysButton');
|
||||
if (sevenDaysButton) {
|
||||
sevenDaysButton.addEventListener('click', function() {
|
||||
socket.emit('fetch_daily_stats', serviceId);
|
||||
socket.emit('fetch_daily_stats_by_user');
|
||||
// console.log('clicked');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user