1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

Added stylesheet for report rendering

This commit is contained in:
Sven Merk 2019-03-04 11:51:43 +01:00
parent 2c00d8cdd0
commit fc9adfd536
2 changed files with 65 additions and 2 deletions

60
resources/piper.css Normal file
View File

@ -0,0 +1,60 @@
body {
font-family: Arial, Verdana;
}
table {
border-collapse: collapse;
}
div.code {
font-family: "Courier New", "Lucida Console";
}
th {
border-top: 1px solid #ddd;
}
th, td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
.bold {
font-weight: bold;
}
.nobullets {
list-style-type:none;
padding-left: 0;
padding-bottom: 0;
margin: 0;
}
.notok {
background-color: #ffe5e5;
padding: 5px
}
.warn {
background-color: #ffff99;
padding: 5px
}
.ok {
background-color: #e1f5a9;
padding: 5px
}
.green{
color: olivedrab;
}
.red{
color: orangered;
}
.risk-yellow{
padding: 5px;
color: rgba(255, 255, 0, 0.6);
}
.risk-grey{
background-color: rgba(212, 212, 212, 0.7);
padding: 5px;
}
.risk-black{
background-color: rgba(0, 0, 0, 0.75);
padding: 5px;
}

View File

@ -58,6 +58,9 @@ void call(Map parameters = [:]) {
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
.mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName ?: env.STAGE_NAME, STEP_CONFIG_KEYS)
.mixin([
style : libraryResource('piper.css')
])
.mixin(parameters, PARAMETER_KEYS)
.dependingOn('scanType').mixin('buildDescriptorFile')
.dependingOn('scanType').mixin('configFilePath')
@ -341,7 +344,7 @@ def getReportHtml(config, vulnerabilityList, numSevereVulns) {
totalSevereVulnerabilities : numSevereVulns,
totalVulnerabilities : vulnerabilityList.size(),
vulnerabilityTable : vulnerabilityTable,
whitesourceProductName : config.whitesourceProductName,
whitesourceProjectNames : config.whitesourceProjectNames
whitesourceProductName : config.productName,
whitesourceProjectNames : config.projectNames
]).toString()
}