(results)
| 515 | } |
| 516 | |
| 517 | function process_srv(results) { |
| 518 | |
| 519 | for (let result in results) { |
| 520 | let value = results[result]['value']; |
| 521 | let parts = value.split(" "); |
| 522 | let port = parts[2]; |
| 523 | if (!(Object.hasOwn(SrvRecords, port))) { |
| 524 | SrvRecords[port] = []; |
| 525 | } |
| 526 | SrvRecords[port].push([results[result]['fqdn'], results[result]['value']]) |
| 527 | } |
| 528 | |
| 529 | let ports = Object.keys(SrvRecords); |
| 530 | |
| 531 | for (let portValue in ports) { |
| 532 | var elem = document.getElementById("srvPortListBody"); |
| 533 | var row = elem.insertRow(0); |
| 534 | var cell1 = row.insertCell(0); |
| 535 | cell1.style = "text-align:center; padding: 10px;"; |
| 536 | var cell2 = row.insertCell(1); |
| 537 | cell2.style = "text-align:center; padding: 10px;"; |
| 538 | cell1.innerHTML = "Port " + ports[portValue]; |
| 539 | cell2.appendChild(create_button(SrvRecords[ports[portValue]].length.toString(), 'srv-' + ports[portValue], 'variant')); |
| 540 | } |
| 541 | |
| 542 | for (let portValue in ports) { |
| 543 | let elem2 = document.getElementById("srv-" + ports[portValue]); |
| 544 | if (elem2 != null) { |
| 545 | elem2.addEventListener("click", getSrvPortIPList); |
| 546 | } |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | function get_srv_records() { |
| 551 | let url = api_map['dns_srv']; |
nothing calls this directly
no test coverage detected