     }
            return response.json();
        })
        .then(data => {
            allDevicesData = data.devices || [];
            renderAllDevicesTable();
            
            // Hide loading, show content
            document.getElementById('allDevicesLoading').style.display = 'none';
            document.getElementById('allDevicesContent').style.display = 'block';
        })
        .catch(error => {
            console.error('Error loading device revenues:', error);
            
            