                // Update the badge
                    const badge = card.querySelector('.badge');
                    if (isOnline) {
                        badge.className = 'badge badge-primary mr-2';
                        badge.textContent = 'Active';
                    } else {
                        badge.className = 'badge badge-secondary mr-2';
                        badge.textContent = 'Inactive';
                    }
                }
            });
        }
    </script>
</body>
</html>