ui: major UX polish and bug fixes for dashboard
- Added global loading spinner and page transitions. - Improved sidebar with tooltips and persistent collapsed state. - Fixed chart memory leaks by properly destroying instances on page change. - Unified WebSocket event handling and status indicators. - Refined stat cards, tables, and modal interactions. - Added real backend integration for logout and session management.
This commit is contained in:
@@ -77,12 +77,18 @@ class ClientsPage {
|
||||
try {
|
||||
const data = await window.api.get('/usage/clients');
|
||||
|
||||
if (!data || data.length === 0) {
|
||||
const canvas = document.getElementById('client-usage-chart');
|
||||
if (canvas) canvas.closest('.chart-container').style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
const chartData = {
|
||||
labels: data.map(item => item.client_id),
|
||||
datasets: [{
|
||||
label: 'Requests',
|
||||
data: data.map(item => item.requests),
|
||||
color: '#3b82f6'
|
||||
color: '#6366f1'
|
||||
}]
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user