Vista Sidebar Gadget for Cruise Control.NET
1. Making HTTP requests via XmlHttpRequest object
2. Using ActiveX objects
I decided to use the 1st option and then google provided me with this useful post about using CCTry managed API to communicate with the CC.NET service through .NET Remoting. I then quickly came with the following scheme:
The white squares are the components that I had to implement:
1. CC.NET Sidebar Gadget
2. CC.NET Xml Web Service
I've opened VS2005 and quickly implemented the CC.NET Web Service. I've implemented one method with the following signature:
public string GetProjectStatuses()
This method gets all projects and their statuses from the CC.NET Service by using .NET Remoting. It returns a string array (a string per registered project) then. The string contains the name of the project , its status and the CC.NET Dashboard url - all delimited by the | symbol.
My Project 1|Success|http://ccnetserver/ccnet
That was not quite elegant solution, but it was the shorter dev path :)
I've power up my Vista box then and soon I had my gadget running: The gadget displays a list of projects registered in the CC.NET Service. Green light means that the project is in good health and red means that the projects build is bad:
The gadget provides a settings dialog where the user may provide the CC.NET Web Service Url and time interval to poll the web service.
The CC.NET Gadget(and CC.NET Web Service) source code may be download from here.
Next time I'll blog about the CC.NET Gadget source code...stay tuned
Sidebar Gadget Links:
Vista Sidebar and Gadgets
Windows Sidebar team's blog
Daniel Moth blog
Further reading Vista Sidebar Gadget for Cruise Control.NET - Explained