mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 19:03:30 -05:00
removed comments
This commit is contained in:
@@ -6,14 +6,12 @@
|
||||
socket.on('connect', function() {
|
||||
console.log('Connected to the server'); // Debug log, i'll delete later
|
||||
socket.emit('fetch_daily_stats', serviceId);
|
||||
socket.emit('fetch_single_month_notification_stats', serviceId);
|
||||
socket.emit('fetch_monthly_stats_by_year', serviceId);
|
||||
});
|
||||
|
||||
//this is for previous 7 days
|
||||
socket.on('daily_stats_update', function(data) {
|
||||
console.log('Received daily_stats_update:', data);
|
||||
// Process the data
|
||||
|
||||
var labels = [];
|
||||
var deliveredData = [];
|
||||
// var failureData = [];
|
||||
@@ -31,23 +29,13 @@
|
||||
myBarChart.data.datasets[0].data = deliveredData;
|
||||
myBarChart.update();
|
||||
});
|
||||
//this is for a single month
|
||||
socket.on('single_month_notification_stats_update', function(data) {
|
||||
console.log('Received single_month_notification_stats_update:', data);
|
||||
// Update Chart.js with new data here
|
||||
});
|
||||
//this is for monthly stats by year
|
||||
socket.on('monthly_stats_by_year_update', function(data) {
|
||||
console.log('Received monthly_stats_by_year_update:', data);
|
||||
// Update Chart.js with new data here
|
||||
});
|
||||
|
||||
socket.on('error', function(data) {
|
||||
console.log('Error:', data);
|
||||
});
|
||||
|
||||
sevenDaysButton.addEventListener('click', function() {
|
||||
socket.emit('fetch_monthly_stats_by_year', serviceId);
|
||||
socket.emit('fetch_daily_stats', serviceId);
|
||||
console.log('button click'); // Debug log, i'll delete later
|
||||
});
|
||||
|
||||
@@ -56,7 +44,7 @@
|
||||
var myBarChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [], // Initialize with empty data
|
||||
labels: [],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Delivered',
|
||||
|
||||
Reference in New Issue
Block a user