qualinsight-plugins-sonarqube-badges icon indicating copy to clipboard operation
qualinsight-plugins-sonarqube-badges copied to clipboard

Badge size/font

Open finnyb opened this issue 8 years ago • 5 comments

My badge size is slightly off. This appears to affect all badges.

http://bjj.is-a-player.com:9000/api/badges/measure?key=net.thejavashop%3Ajavampd%3Aorigin%2Fdevelop&metric=sqale_debt_ratio

Thanks

finnyb avatar Jan 08 '17 14:01 finnyb

Hi, sorry for the late reply but I was on holidays until today.

This issue should not appear since 2.0.1: if the font is missing on the OS, a fallback font is supposed to be used and the badge size should be computed correctly. I need to better understand your context in order to help you. Can you thus provide the following information please ?

  • operating system and version
  • java version
  • SonarQube version
  • is it a docker based SQ instance ?
  • SVG Badges plugin version
  • Content of your sonar.log file (the best would be if you could stop your SQ instance, rename your existing sonar.log file, then restart SQ, try to display a badge, then stop your SQ instance and send me the log file, this would ensure that we have fresh logs)

Note: it appears that your SQ instance is currently down, can you please restart it ? I need to check the content of the generated SVG file.

Cheers,

Michel

pawlakm avatar Jan 09 '17 21:01 pawlakm

Thanks Michel. My SQ instance is back up. I'll get you the info asap.

Thanks

finnyb avatar Jan 11 '17 23:01 finnyb

Hi Bill,

Could you manage retrieving the sonar.log file ? I checked the source of the generated SVG file and it looks like the plugin wasn't able to use the preferred font to compute image width. It tries then to use a fallback font (that is bundled with the plugin) but the width keeps being computed incorrectly (as if the sans-serif font was being used). Without the logs I won't be able to help you.

Best regards,

Michel

pawlakm avatar Jan 13 '17 06:01 pawlakm

operating system and version CentOS Linux release 7.3.1611 (Core)

java version jdk1.8.0_25

SonarQube version 6.2

is it a docker based SQ instance ? No

SVG Badges plugin version 3.0.1

Content of your sonar.log file (the best would be if you could stop your SQ instance, rename your existing sonar.log file, then restart SQ, try to display a badge, then stop your SQ instance and send me the log file, this would ensure that we have fresh logs)

I didn't note much in the sonar.log but here it is. I launched a few different types of badges. Is there any other log that might help?

sonar.txt

finnyb avatar Jan 15 '17 23:01 finnyb

size calculation for metrics seems to be not correct. see attached screen shot:

image

the text for "quality gate" fits in the badge whereas "coverage on new code" is missing the first and the last character. Additionally the number display should be rounded with one decimal place. should i make an additional issue for that?

displayed in firefox 54.0 on Linux running sonarqube server 6.5 with badge plugin 3.0.1

Thx, Peter

phermsdorf avatar Aug 31 '17 07:08 phermsdorf