iceAnalytics('${device.deviceID || ''}')" title="Detailed Analytics">
                    <i class="bi bi-bar-chart"></i>
                </button>
            </td>
        `;
        
        tbody.appendChild(row);
    });
    
    // Render pagination
    renderPagination(totalPages);
}

function renderPagination(totalPages) {
    const paginationContainer = document.getElementById('allDevicesPagination');
    if (!paginationContainer) return;
    
    paginationContainer.innerHTML = '';
    
    if (to