Re: Display Cobertura result in Dashboard

vck <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hi,

I have had the same requirement and 
I did not find any good way to do it.
However, here s my workaround :

1) Modify Dashboard config.xml to add another tab
<subtab class="net.sourceforge.cruisecontrol.dashboard.widgets.MyWidget" />

2) Code a MyWidget class and compile it and place it in the 
cruisecontrol-bin-2.8.2/webapps/dashboard/WEB-INF/classes/
net/sourceforge/cruisecontrol/dashboard/widgets location.

3) Restart cc. It should now come up with a new tab in the dashboard.

For my case : I have the following info in the tab which 
provides a link to another location which stores the reports.

package net.sourceforge.cruisecontrol.dashboard.widgets;

import java.util.Map;

public class MyWidget implements Widget {

	public String getDisplayName() {
		return "Code Coverage Metrics";
	}

	public Object getOutput(Map parameters) {
		
		return "<a href=\"http://<ip of the box where cc is
running:8080/dashboard/metrics/\"> " +
				"Click here to view metrics </a>";
	}


Hope that helps.
If anyone has better ways, pls suggest.

thnx
~v



------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.