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

Function addCountBox

web_server/public/javascripts/api.js:684–707  ·  view source on GitHub ↗
(results, source)

Source from the content-addressed store, hash-verified

682}
683
684function addCountBox(results, source) {
685 if (results['count'] !== 0) {
686 document.getElementById("scanInformation").style.display = "block";
687 let dataRow = document.getElementById("scanDataRow");
688 dataRow.appendChild(create_div_data(source, create_button(results.count, source + "_button", "icon", "M", "search")));
689 let titleRow = document.getElementById("scanTitleRow");
690
691 if (source === "22") {
692 titleRow.appendChild(create_div_title(source, "SSH"));
693 } else if (source === "25") {
694 titleRow.appendChild(create_div_title(source, "SMTP"));
695 } else if (source === "80") {
696 titleRow.appendChild(create_div_title(source, "HTTP"));
697 } else if (source === "443") {
698 titleRow.appendChild(create_div_title(source, "HTTPS"));
699 } else if (source === "465") {
700 titleRow.appendChild(create_div_title(source, "SMTPS"));
701 } else {
702 titleRow.appendChild(create_div_title(source, "Other"));
703 }
704
705 document.getElementById(source + "_button").addEventListener("click", display_scan_records);
706 }
707}
708
709function zgrab_rec(type, value) {
710

Callers

nothing calls this directly

Calls 3

create_buttonFunction · 0.85
create_div_dataFunction · 0.70
create_div_titleFunction · 0.70

Tested by

no test coverage detected