Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions dojo/templates/dojo/endpoint_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "chartjs-adapter-moment/dist/chartjs-adapter-moment.js" %}"></script>
<script src="{{ host }}{% static "dojo/js/metrics.js" %}"></script>
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var data = {};
var data_1 = [];
var ticks = [];
Expand Down Expand Up @@ -346,8 +346,9 @@ <h6>Notes</h6>
[4, info],
];
open_findings(d1, d2, d3, d4, d5, ticks);
});
}

{% if include_table_of_contents%}
window.onload = function () {
var toc = "";
var level = 3;
Expand Down Expand Up @@ -417,7 +418,18 @@ <h6>Notes</h6>
}

document.getElementById("toc").innerHTML += toc;

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted Chart.js canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}

</script>
{% endblock %}
14 changes: 12 additions & 2 deletions dojo/templates/dojo/engagement_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "chartjs-adapter-moment/dist/chartjs-adapter-moment.js" %}"></script>
<script src="{{ host }}{% static "dojo/js/metrics.js" %}"></script>
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var data = {};
var data_1 = [];
var ticks = [];
Expand Down Expand Up @@ -497,7 +497,7 @@ <h6>Notes</h6>
opened_per_month_2(critical, high, medium, low);
{% endif %}

});
}

{% if include_table_of_contents%}
window.onload = function () {
Expand Down Expand Up @@ -569,7 +569,17 @@ <h6>Notes</h6>
}

document.getElementById("toc").innerHTML += toc;

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted Chart.js canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}
</script>
{% endblock %}
16 changes: 14 additions & 2 deletions dojo/templates/dojo/finding_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "chartjs-adapter-moment/dist/chartjs-adapter-moment.js" %}"></script>
<script src="{{ host }}{% static "dojo/js/metrics.js" %}"></script>
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var data = {};
var data_1 = [];
var ticks = [];
Expand Down Expand Up @@ -331,8 +331,9 @@ <h6>Notes</h6>
[4, info],
];
open_findings(d1, d2, d3, d4, d5, ticks);
});
}

{% if include_table_of_contents%}
window.onload = function () {
var toc = "";
var level = 3;
Expand Down Expand Up @@ -406,7 +407,18 @@ <h6>Notes</h6>
if (document.getElementById("toc") != null) {
document.getElementById("toc").innerHTML += toc;
}

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted Chart.js canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}

</script>
{% endblock %}
16 changes: 14 additions & 2 deletions dojo/templates/dojo/product_endpoint_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ <h6>Notes</h6>
<script src="{% static "dojo/js/metrics.js" %}"></script>
{% endblock metrics %}
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var critical = 0;
var high = 0;
var medium = 0;
Expand Down Expand Up @@ -471,8 +471,9 @@ <h6>Notes</h6>
i++;
});
finding_age(data_1, ticks);
});
}

{% if include_table_of_contents%}
window.onload = function () {
var toc = "";
var level = 3;
Expand Down Expand Up @@ -542,6 +543,17 @@ <h6>Notes</h6>
}

document.getElementById("toc").innerHTML += toc;

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted Chart.js canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}
</script>
{% endblock %}
16 changes: 14 additions & 2 deletions dojo/templates/dojo/product_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "chartjs-adapter-moment/dist/chartjs-adapter-moment.js" %}"></script>
<script src="{{ host }}{% static "dojo/js/metrics.js" %}"></script>
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var critical = 0;
var high = 0;
var medium = 0;
Expand Down Expand Up @@ -488,8 +488,9 @@ <h6>Notes</h6>
i++;
});
finding_age(data_1, ticks);
});
}

{% if include_table_of_contents%}
window.onload = function () {
var toc = "";
var level = 3;
Expand Down Expand Up @@ -559,6 +560,17 @@ <h6>Notes</h6>
}

document.getElementById("toc").innerHTML += toc;

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted Chart.js canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}
</script>
{% endblock %}
14 changes: 12 additions & 2 deletions dojo/templates/dojo/product_type_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "chartjs-adapter-moment/dist/chartjs-adapter-moment.js" %}"></script>
<script src="{{ host }}{% static "dojo/js/metrics.js" %}"></script>
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var critical = 0;
var high = 0;
var medium = 0;
Expand Down Expand Up @@ -375,7 +375,7 @@ <h6>Notes</h6>
{% endfor %}
opened_per_month_2(critical, high, medium, low);
{% endif %}
});
}

{% if include_table_of_contents%}
window.onload = function () {
Expand Down Expand Up @@ -447,7 +447,17 @@ <h6>Notes</h6>
}

document.getElementById("toc").innerHTML += toc;

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted Chart.js canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}
</script>
{% endblock %}
20 changes: 18 additions & 2 deletions dojo/templates/dojo/test_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "dojo/js/metrics.js" %}"></script>
<script type="text/javascript">
{% if include_executive_summary %}
$(function () {
function renderReportCharts() {
var critical = 0;
var high = 0;
var medium = 0;
Expand Down Expand Up @@ -474,7 +474,6 @@ <h6>Notes</h6>
[4, info],
];
open_findings(d1, d2, d3, d4, d5, ticks);
});

var data = {};
var data_1 = []
Expand Down Expand Up @@ -510,8 +509,10 @@ <h6>Notes</h6>
{% if endpoint_opened_per_month %}
opened_per_month_2(critical, high, medium, low);
{% endif %}
}
{% endif %}

{% if include_table_of_contents%}
window.onload = function () {
var toc = "";
var level = 3;
Expand Down Expand Up @@ -582,6 +583,21 @@ <h6>Notes</h6>
}

document.getElementById("toc").innerHTML += toc;

{% if include_executive_summary %}
// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted Chart.js canvases, leaving blank charts.
renderReportCharts();
{% endif %}
};
{% else %}
{% if include_executive_summary %}
$(function () {
renderReportCharts();
});
{% endif %}
{% endif %}
</script>
{% endblock %}
16 changes: 14 additions & 2 deletions dojo/templates_classic/dojo/endpoint_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "flot/jquery.flot.stack.js" %}"></script>
<script src="{{ host }}{% static "dojo/js/classic/metrics.js" %}"></script>
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var data = {};
var data_1 = [];
var ticks = [];
Expand Down Expand Up @@ -348,8 +348,9 @@ <h6>Notes</h6>
[4, info],
];
open_findings(d1, d2, d3, d4, d5, ticks);
});
}

{% if include_table_of_contents%}
window.onload = function () {
var toc = "";
var level = 3;
Expand Down Expand Up @@ -419,7 +420,18 @@ <h6>Notes</h6>
}

document.getElementById("toc").innerHTML += toc;

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted chart canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}

</script>
{% endblock %}
14 changes: 12 additions & 2 deletions dojo/templates_classic/dojo/engagement_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "flot/jquery.flot.stack.js" %}"></script>
<script src="{{ host }}{% static "dojo/js/classic/metrics.js" %}"></script>
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var data = {};
var data_1 = [];
var ticks = [];
Expand Down Expand Up @@ -499,7 +499,7 @@ <h6>Notes</h6>
opened_per_month_2(critical, high, medium, low);
{% endif %}

});
}

{% if include_table_of_contents%}
window.onload = function () {
Expand Down Expand Up @@ -571,7 +571,17 @@ <h6>Notes</h6>
}

document.getElementById("toc").innerHTML += toc;

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted chart canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}
</script>
{% endblock %}
16 changes: 14 additions & 2 deletions dojo/templates_classic/dojo/finding_pdf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ <h6>Notes</h6>
<script src="{{ host }}{% static "flot/jquery.flot.stack.js" %}"></script>
<script src="{{ host }}{% static "dojo/js/classic/metrics.js" %}"></script>
<script type="text/javascript">
$(function () {
function renderReportCharts() {
var data = {};
var data_1 = [];
var ticks = [];
Expand Down Expand Up @@ -327,8 +327,9 @@ <h6>Notes</h6>
[4, info],
];
open_findings(d1, d2, d3, d4, d5, ticks);
});
}

{% if include_table_of_contents%}
window.onload = function () {
var toc = "";
var level = 3;
Expand Down Expand Up @@ -402,7 +403,18 @@ <h6>Notes</h6>
if (document.getElementById("toc") != null) {
document.getElementById("toc").innerHTML += toc;
}

// Render the summary charts AFTER the table-of-contents builder has
// rewritten #contents.innerHTML. Rendering earlier (on
// DOMContentLoaded) means this reassignment re-parses the subtree and
// discards the already-painted chart canvases, leaving blank charts.
renderReportCharts();
};
{% else %}
$(function () {
renderReportCharts();
});
{% endif %}

</script>
{% endblock %}
Loading
Loading