Search code examples
ruby-on-railsrubypluginssonarqubejfreechart

How could I create a Sonar Plugin to exhibit simple images?


I'm developing a Sonarqube plugin which is a PostJob that generates some simple charts stored in jpeg format using the JFreeChart library. Since I don't have any knowledge on Rails web-development (and ruby language neither) I got stucked when it comes to show that generated images on the project dashboard (in a widget).

I tried to follow Deor's tutorial in which he shows the method

 image_tag(url_for_static(:plugin => 'idemetadata', :path => 'check-round-yes-small.png'), :size => '16x16', :style => 'vertical-align:middle') 

but it seems that this method only allows to show images which are stored under /static folder in the plugin .jar file.

All I need is a way of exhibiting images stored into my local filesystem (which are generated by the PostJob extension I mentioned). Could someone please give me a clue on how to do that?

Thank you all in advance! Jefferson


Solution

  • Why not using standard html tags?

    <img src="PATH">
    

    I developed a widget that shows graphics from graphite. It works fine with the html tags.