aconrad / pycobertura

A code coverage diff tool for Cobertura reports
MIT License
116 stars 39 forks source link

No highlight when html page is online #183

Closed nbauma109 closed 6 months ago

nbauma109 commented 6 months ago

I managed to generate an html report with the highlighted parts successfully. However, when I put the page online, the styles are not showing. I had a look at the html and all styles seem embedded. I tried to move the html file to another location and it's still showing highlights as long as it's local. But when I try to show the page online (on a Jenkins server), no styles are showing.

nbauma109 commented 6 months ago

Apparently the answer is to enable inline CSS in Jenkins in Manage -> console:

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'none'; style-src 'unsafe-inline'; img-src 'self'; script-src 'none';");

nbauma109 commented 6 months ago

It was indeed the issue. Problem solved :)