Subdomain Anzeige mit Ips
This commit is contained in:
+18
-1
@@ -82,6 +82,23 @@ async function loadDomains(){
|
|||||||
const domains = await api(API + "/domains")
|
const domains = await api(API + "/domains")
|
||||||
const subs = await api(API + "/subdomains")
|
const subs = await api(API + "/subdomains")
|
||||||
|
|
||||||
|
const resources = window.resources || []
|
||||||
|
|
||||||
|
subs.forEach(s => {
|
||||||
|
|
||||||
|
const server = resources.find(r =>
|
||||||
|
Array.isArray(r.ips) &&
|
||||||
|
r.ips.some(ip => ip.ip === s.ip_address)
|
||||||
|
)
|
||||||
|
|
||||||
|
if(server){
|
||||||
|
|
||||||
|
document.getElementById("subserver-"+s.id).innerText = server.name
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
const table = document.getElementById("domains")
|
const table = document.getElementById("domains")
|
||||||
table.innerHTML = ""
|
table.innerHTML = ""
|
||||||
|
|
||||||
@@ -96,7 +113,7 @@ const sublist = subs
|
|||||||
|
|
||||||
↳ ${s.subdomain}.${s.domain_name}
|
↳ ${s.subdomain}.${s.domain_name}
|
||||||
<span id="subdns-${s.id}">...</span>
|
<span id="subdns-${s.id}">...</span>
|
||||||
|
<span id="subserver-${s.id}" class="serverlink"></span>
|
||||||
<button onclick="deleteSub(${s.id})">Delete</button>
|
<button onclick="deleteSub(${s.id})">Delete</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user