MCPcopy Create free account
hub / github.com/adobe/Marinus / display_nslookup

Function display_nslookup

web_server/public/javascripts/api.js:161–181  ·  view source on GitHub ↗
(results)

Source from the content-addressed store, hash-verified

159}
160
161function display_nslookup(results) {
162 var resDiv = document.getElementById('hostingLocation');
163 var displayHTML = create_h3("NSLookup Results");
164 if (Object.hasOwn(results, "ips")) {
165 for (let i = 0; i < results['ips'].length; i++) {
166 displayHTML += create_anchor("/ip?search=" + results["ips"][i]["address"], results["ips"][i]["address"], "_blank") + ", ";
167 }
168 displayHTML = displayHTML.substring(0, displayHTML.length - 2);
169 } else if (Object.hasOwn(results, "Error")) {
170 resDiv.innerHTML = results["Error"].toString();
171 } else if (Object.hasOwn(results, "domains")) {
172 for (let i = 0; i < results['domains'].length; i++) {
173 displayHTML += results['domains'][i] + " ";
174 }
175 } else if (typeof results === "string") {
176 displayHTML += results;
177 } else {
178 displayHTML += "Unknown Response";
179 }
180 resDiv.innerHTML += displayHTML + "<br/><br/>";
181}
182
183function do_nslookup(target) {
184 var url = "/api/v1.0/utilities/nslookup";

Callers

nothing calls this directly

Calls 2

create_h3Function · 0.85
create_anchorFunction · 0.85

Tested by

no test coverage detected