diff --git a/dependency-check-core/src/main/resources/templates/HtmlReport.vsl b/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
index 332377d10..4bdc1ffba 100644
--- a/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
+++ b/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
@@ -83,16 +83,50 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
xml += $("#modal-text").text().replace(/\n/g,'\n ');
xml += '\n';
$('#modal-text').text(xml).focus().select();
+ $('#modal-add-header').toggleClass('active');
});
});
- function copyText(name, sha1, type, val) {
+ function suppressSwitchTo(switchTo) {
+ $('#modal-suppress-change-to-sha1').toggleClass('active');
+ $('#modal-suppress-change-to-gav').toggleClass('active');
+ setCopyText($('#suppress-name').val(),
+ switchTo,
+ $('#suppress-'+switchTo).val(),
+ $('#suppress-type').val(),
+ $('#suppress-val').val());
+ }
+ function copyText(name, sha1, gav, type, val) {
+ $('#suppress-name').val(name);
+ $('#suppress-type').val(type);
+ $('#suppress-val').val(val);
+ $('#suppress-sha1').val(sha1);
+ $('#suppress-gav').val(gav);
+ if (gav=='') {
+ if ($('#modal-suppress-change-to-gav').hasClass('active')) {
+ $('#modal-suppress-change-to-gav').toggleClass('active');
+ }
+ if ($('#modal-suppress-change-to-sha1').hasClass('active')) {
+ $('#modal-suppress-change-to-sha1').toggleClass('active');
+ }
+ setCopyText(name, 'sha1', sha1, type, val);
+ } else {
+ if ($('#modal-suppress-change-to-gav').hasClass('active')) {
+ $('#modal-suppress-change-to-gav').toggleClass('active');
+ }
+ if (!$('#modal-suppress-change-to-sha1').hasClass('active')) {
+ $('#modal-suppress-change-to-sha1').toggleClass('active');
+ }
+ setCopyText(name, 'gav', gav, type, val);
+ }
+ }
+ function setCopyText(name, matchType, matchValue, suppressType, suppressVal) {
xml = '
Severity: #if ($vuln.cvssScore<4.0) Low