Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

sfwebui: use placeholder for empty chart on scaninfo page

Brendan Coles17ece667a55c
diff --git a/dyn/scaninfo.tmpl b/dyn/scaninfo.tmpl
index 6f4339d7..5d7af1cd 100644
--- a/dyn/scaninfo.tmpl
+++ b/dyn/scaninfo.tmpl
@@ -361,8 +361,11 @@
$('#scanstatusbadge').removeClass(["alert-info", "alert-warning", "alert-danger"]).addClass(statusy);
$('#status').html(scanStatus);
$("#vbarsummary").empty();
- sf_viz_vbar("#vbarsummary", scanSummary);
-
+ if (scanSummary.length == 0) {
+ $("#vbarsummary").append("<div id='scansummary-content' class='alert alert-warning'><h4>No data.</h4>If the scan is still running please try again soon.</div>");
+ } else {
+ sf_viz_vbar("#vbarsummary", scanSummary);
+ }
$("#loader").fadeOut(500);
});
}