How to add graph to jsp
Hi!
I want to show several graphs for different projects on my custom page.
I'm new to TeamCity plugins development, so I started from https://confluence.jetbrains.com/display/TCD9/Custom+Statistics
To insert statistics chart into a jsp page:<%@taglib prefix="stats" tagdir="/WEB-INF/tags/chart"%><stats:buildChart id="g1" valueType="BuildDuration"/>
But this is obsolete information for TC9.
Can anybody show a simple example displaying graph? Or any additional info about graphs?
Please sign in to leave a comment.
Ok, i can add graph to Statistics tab with SimplePageExtension and:
But how to display it on custom page, provided by BaseController?
Hello.jsp:
Unfortunatly page throws NPE in stats:buildGraph.
How to understand whats wrong? Any ideas?
Hi Dmitrii,
The problem is that <buildGraph> requires BuildGraphHelper bean in the model. It isn't in the openapi, however there is a simple way to get it - there is special controller accessible on "/buildGraph.html" which provides the bean. It requires only "jsp" attribute leading to your page. Somewhat like this should work:
Yeap, this documentation is really outdated. We will update it.
Thanks! It works with