Separated the js to make it easier to test

This commit is contained in:
Jonathan Bobel
2024-07-18 15:27:17 -04:00
parent 2e81f6f45a
commit afd82f3742
8 changed files with 759 additions and 257 deletions

View File

@@ -361,7 +361,7 @@
}
createChart('#weeklyChart', labels, deliveredData, failedData);
createTable('#weeklyTable', 'activityChart', labels, deliveredData, failedData);
createTable('weeklyTable', 'activityChart', labels, deliveredData, failedData);
});
socket.on('error', function(data) {
@@ -544,10 +544,10 @@
});
// Export functions for testing
window.createTotalMessagesChart = createTotalMessagesChart;
window.handleDropdownChange = handleDropdownChange;
window.fetchData = fetchData;
window.createChart = createChart;
window.createTable = createTable;
// window.createTotalMessagesChart = createTotalMessagesChart;
// window.handleDropdownChange = handleDropdownChange;
// window.fetchData = fetchData;
// window.createChart = createChart;
// window.createTable = createTable;
})(window);