Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
A servlet filter has been added in trunk of svn (revision 2604):
http://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/main
/java/net/bull/javamelody/CustomResourceFilter.java
The doc says: Servlet filter to customize resources in html reports, such as
css file.
For example, add the following, before the monitoring filter, in the web.xml
file of your webapp, in order to use your own css or icons:
<filter>
<filter-name>customResourceFilter</filter-name>
<filter-class>net.bull.javamelody.CustomResourceFilter</filter-class>
<init-param>
<param-name>monitoring.css</param-name>
<param-value>/customMonitoring.css</param-value>
</init-param>
<init-param>
<param-name>bullets/green.png</param-name>
<param-value>/static/bullets/red.png</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>customResourceFilter</filter-name>
<url-pattern>/monitoring</url-pattern>
</filter-mapping>
Then add files "customMonitoring.css" and "static/bullets/red.png" at the root
of the web content in your webapp.
You can replace every web resource in this directory and sub-directories:
http://code.google.com/p/javamelody/source/browse/#svn%2Ftrunk%2Fjavamelody-core
%2Fsrc%2Fmain%2Fresources%2Fnet%2Fbull%2Fjavamelody%2Fresource
If you want to try, you will need the next release (1.36) or the new build from
the trunk including the fix:
http://javamelody.googlecode.com/files/javamelody-20120311.jar
Original comment by evernat@free.fr
on 10 Mar 2012 at 11:40
Original comment by evernat@free.fr
on 10 Mar 2012 at 11:41
[deleted comment]
Please submit your best CSS file to the users' group:
http://groups.google.com/group/javamelody
The current CSS is at:
http://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/main
/resources/net/bull/javamelody/resource/monitoring.css
Original comment by evernat@free.fr
on 11 Mar 2012 at 12:20
Thank you for the addition of this kind of filter which is a step in the right
direction.
However, it feels a little bit like a "hack", only redirecting resources to
some other location.
This solution is also unable to change the colors/layout/size of the RRD graphs
and to change the layout of the html (e.g. to get rid of the <html><body> tags
to be able to "inline" the monitoring into some application output stream, e.g.
from jsps).
Original comment by mineral_...@gmx.de
on 15 Mar 2012 at 1:50
Original issue reported on code.google.com by
evernat@free.fr
on 10 Mar 2012 at 11:16