async function loadResources(){ const resources = await api(API + "/resources/active"); const mappings = await api(API + "/domainmap"); const table = document.getElementById("resources"); table.innerHTML = ""; resources.forEach(r => { let ips = ""; if(Array.isArray(r.ips)){ ips = r.ips.map(ip => "" + (ip.type || "") + " " + ip.ip + "" ).join(""); } let domains = mappings .filter(m => m.resource_id == r.id) .map(m => "🌐 " + m.domain_name + "") .join(""); const tr = document.createElement("tr"); tr.innerHTML = `