Followed these steps and the graph is being displayed perfectly.
Many thanks for your help!
On Wednesday, October 31, 2012 8:45:43 AM UTC, mpapo - Michaël Pailloncy
wrote:
> Hi,
>
>
>
> You can access to images of your plugin like this :
>
> - add your images to src/main/webapp/images in your project
>
> - add your image in your jelly file like this
> : <img src="${rootURL}/plugin/yourPluginName/images/yourIcon.png"/>
>
>
>
> ${rootURL} refers to the root path of Jenkins.
>
>
>
> Michaël
>
> 2012/10/25 LordShacks <[email protected] <javascript:>>
>
>> Hi
>>
>> I am new to Jenkins and am writing a custom plugin similar to CppCheck
>> that
>> takes in XML files from a test unit and displays the results as a graph.
>>
>> I have successfully created a graph from my XML file and saved this to
>> disk
>> as a .png file. I am now trying to get my ProjectAction's index.jelly file
>> to display this graph image.
>>
>> I have seen from other plugins (Cppcheck) that this should be achievable
>> by
>> simply using the html tag < img/ >. I have tried doing this but I cannot
>> seem to get the image to display.
>>
>> I am unsure what to put for the src section of the image tag. If I simply
>> put < img src="graph.png"/ >, (as I have done for icons) nothing get's
>> displayed. I have also tried to specify the directory on my system where
>> the
>> file is located: < img src="/home/user/Desktop/graph.png"/ > but it still
>> does not display the graph. Where do I have to have the graph file located
>> so that the index.jelly file can find it?
>>
>> Many thanks
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://jenkins.361315.n4.nabble.com/Displaying-Images-with-Jelly-tp4644335.html
>> Sent from the Jenkins dev mailing list archive at Nabble.com.
>>
>
>