updated web interface - logs and config not working

This commit is contained in:
2025-08-09 06:49:00 -07:00
parent b481694ad2
commit 07d19cfd7a
9 changed files with 919 additions and 486 deletions

View File

@@ -0,0 +1,37 @@
// Initialize the activity progress chart
document.addEventListener('DOMContentLoaded', function() {
// Fetch activity stats from the API
fetch('/api/activities/stats')
.then(response => response.json())
.then(data => {
// Create doughnut chart
const ctx = document.getElementById('activityChart').getContext('2d');
const chart = new Chart(ctx, {
type: 'doughnut',
data: {
labels: ['Downloaded', 'Missing'],
datasets: [{
data: [data.downloaded, data.missing],
backgroundColor: ['#28a745', '#dc3545'],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
},
title: {
display: true,
text: 'Activity Status'
}
}
}
});
})
.catch(error => {
console.error('Error fetching activity stats:', error);
});
});