[prev in list] [next in list] [prev in thread] [next in thread]
List: mono-patches
Subject: [Mono-patches] r150591 - in trunk/mvcwrench: . Controllers Helpers
From: "Jonathan Pobst (monkey () jpobst ! com)" <mono-patches-list () lists ! ximian ! com>
Date: 2010-01-30 3:46:19
Message-ID: 20100130034619.ACF2E9472C () mono-cvs ! ximian ! com
[Download RAW message or body]
Author: jpobst
Date: 2010-01-29 22:46:19 -0500 (Fri, 29 Jan 2010)
New Revision: 150591
Added:
trunk/mvcwrench/Controllers/HomeController.cs
trunk/mvcwrench/Media/bug.png
trunk/mvcwrench/Media/house.png
trunk/mvcwrench/Views/Home/
trunk/mvcwrench/Views/Home/BugChart.ascx
trunk/mvcwrench/Views/Home/BugList.ascx
trunk/mvcwrench/Views/Home/Home.aspx
trunk/mvcwrench/Views/Home/RecentRevisions.ascx
trunk/mvcwrench/Web References/MonkeyWrench.Public/Revision.datasource
Modified:
trunk/mvcwrench/Controllers/ApplicationController.cs
trunk/mvcwrench/Controllers/BuildsController.cs
trunk/mvcwrench/Global.asax.cs
trunk/mvcwrench/Helpers/BugzillaInterface.cs
trunk/mvcwrench/Helpers/ExpiringCache.cs
trunk/mvcwrench/Helpers/MonkeyWrenchHelper.cs
trunk/mvcwrench/Media/style.css
trunk/mvcwrench/MvcWrench.csproj
trunk/mvcwrench/Views/Builds/StatusStrip.ascx
trunk/mvcwrench/Web References/MonkeyWrench.Public/Public.wsdl
trunk/mvcwrench/Web References/MonkeyWrench.Public/Reference.cs
Log:
Implement a dashboard for Mono.
Modified: trunk/mvcwrench/Controllers/ApplicationController.cs
===================================================================
--- trunk/mvcwrench/Controllers/ApplicationController.cs 2010-01-30 02:26:30 UTC (rev \
150590)
+++ trunk/mvcwrench/Controllers/ApplicationController.cs 2010-01-30 03:46:19 UTC (rev \
150591) @@ -39,6 +39,7 @@
{
List<Tab> tabs = new List<Tab> ();
+ tabs.Add (new Tab ("Home", "~/", "~/Media/house.png", 1));
tabs.Add (new Tab ("Builds", "~/builds", "~/Media/bricks.png", 1));
tabs.Add (new Tab ("Class Status", "~/status", "~/Media/chart_line.png", 1));
Modified: trunk/mvcwrench/Controllers/BuildsController.cs
===================================================================
--- trunk/mvcwrench/Controllers/BuildsController.cs 2010-01-30 02:26:30 UTC (rev \
150590)
+++ trunk/mvcwrench/Controllers/BuildsController.cs 2010-01-30 03:46:19 UTC (rev \
150591) @@ -40,7 +40,7 @@
// GET: /Builds/Official
public ActionResult Index ()
{
- string new_rev_link = "builds/{0}/{1}/{2}";
+ string new_rev_link = "~/builds/{0}/{1}/{2}";
WebServices ws = new WebServices ();
WebServiceLogin login = new WebServiceLogin ();
@@ -354,7 +354,7 @@
commit.Builder = data.WorkHost == null ? "" : data.WorkHost.host;
commit.BuildDuration = TimeSpan.Zero;
commit.CommitLog = "";
- commit.Email = UserHelpers.SvnUserToEmail (SvnGravatars.GetInstance \
(Server.MapPath ("~/Content/gravatars.txt")).Get (commit.Author)); + commit.Email = \
SvnGravatars.GetInstance (Server.MapPath ("~/Content/gravatars.txt")).Get \
(commit.Author);
// Download the commit log to add
string url = string.Format \
("http://build.mono-project.com/GetRevisionLog.aspx?id={0}", data.Revision.id); @@ \
-467,10 +467,10 @@ return true;
case "mono26|macos-10.4-ppc":
lane = 62;
- host = 2;
+ host = 5;
return true;
case "mono24|dist":
- lane = 60;
+ lane = 61;
host = 2;
return true;
case "mono24|sle-11-i586":
@@ -491,7 +491,7 @@
return true;
case "mono24|macos-10.4-ppc":
lane = 60;
- host = 2;
+ host = 5;
return true;
}
Added: trunk/mvcwrench/Controllers/HomeController.cs
===================================================================
--- trunk/mvcwrench/Controllers/HomeController.cs (rev 0)
+++ trunk/mvcwrench/Controllers/HomeController.cs 2010-01-30 03:46:19 UTC (rev \
150591) @@ -0,0 +1,61 @@
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2010 Jonathan Pobst
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Web.Mvc;
+using MvcWrench.MonkeyWrench.Public;
+
+namespace MvcWrench.Controllers
+{
+ public class HomeController : ApplicationController
+ {
+ public ActionResult Index ()
+ {
+ List<BugzillaEntry> bugs = (List<BugzillaEntry>)Cache.Instance.Get ("buglist");
+
+ if (bugs == null) {
+ bugs = BugzillaInterface.GetLatestBugs ();
+ Cache.Instance.Add ("buglist", bugs, 3 * 60);
+ }
+
+ Revision[] recent_revisions = (Revision[])Cache.Instance.Get \
("recent_revisions"); +
+ if (recent_revisions == null) {
+ try {
+ MonkeyWrench.Public.Public ws = new MvcWrench.MonkeyWrench.Public.Public ();
+ recent_revisions = ws.GetProductLatestRevisions (1, 20);
+ Cache.Instance.Add ("recent_revisions", recent_revisions, 5 * 60);
+ } catch (Exception) {
+ recent_revisions = new Revision[0];
+ }
+ }
+
+ ViewData["Revisions"] = recent_revisions;
+
+ return View ("Home", bugs);
+ }
+ }
+}
Property changes on: trunk/mvcwrench/Controllers/HomeController.cs
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/mvcwrench/Global.asax.cs
===================================================================
--- trunk/mvcwrench/Global.asax.cs 2010-01-30 02:26:30 UTC (rev 150590)
+++ trunk/mvcwrench/Global.asax.cs 2010-01-30 03:46:19 UTC (rev 150591)
@@ -42,12 +42,12 @@
routes.IgnoreRoute ("{resource}.axd/{*pathInfo}");
// Builds
+ routes.MapRoute ("BuildsMsvcLog", \
"builds/msvc/{buildrevisionid}/{completedstepid}", new { controller = "Builds", \
action = "BuildStatusLog", id = "" }); routes.MapRoute ("BuildsMonoExtended", \
"builds/monoextended", new { controller = "Builds", action = "MonoExtended", id = "" \
}); routes.MapRoute ("BuildsOther", "builds/other", new { controller = "Builds", \
action = "Other", id = "" }); routes.MapRoute ("BuildsMonoRevision", \
"builds/{project}/{platform}/{revision}", new { controller = "Builds", action = \
"RevisionDetails", id = "" }); routes.MapRoute ("BuildsMono", "builds/mono", new { \
controller = "Builds", action = "Index", id = "" }); routes.MapRoute ("BuildsMsvc", \
"builds/msvc/{buildrevisionid}", new { controller = "Builds", action = "BuildStatus", \
id = "" });
- routes.MapRoute ("BuildsMsvcLog", \
"builds/msvc/{buildrevisionid}/{completedstepid}", new { controller = "Builds", \
action = "BuildStatusLog", id = "" }); routes.MapRoute ("BuildsOverview", "builds", \
new { controller = "Builds", action = "Index", id = "" });
// Status
@@ -58,7 +58,7 @@
routes.MapRoute (
"Default", // Route name
"{controller}/{action}/{id}", // URL with \
parameters
- new { controller = "Builds", action = "Index", id = "" } // Parameter \
defaults + new { controller = "Home", action = "Index", id = "" } // Parameter \
defaults );
}
Modified: trunk/mvcwrench/Helpers/BugzillaInterface.cs
===================================================================
--- trunk/mvcwrench/Helpers/BugzillaInterface.cs 2010-01-30 02:26:30 UTC (rev 150590)
+++ trunk/mvcwrench/Helpers/BugzillaInterface.cs 2010-01-30 03:46:19 UTC (rev 150591)
@@ -30,26 +30,107 @@
using System.ServiceModel.Syndication;
using System.Xml;
-namespace MvcWrench.Helpers
+namespace MvcWrench
{
public static class BugzillaInterface
{
- private static ExpiringCache cache = new ExpiringCache (10 * 60);
-
- private static List<SyndicationItem> GetLatestBugs ()
+ private static ExpiringCache cache = new ExpiringCache ();
+
+ public static List<BugzillaEntry> GetLatestBugs ()
{
- int count = 15;
+ List<BugzillaEntry> bugs = (List<BugzillaEntry>)cache.Get ("bugs");
+
+ if (bugs == null) {
+ int count = 10;
+
+ string url = @"https://bugzilla.novell.com/buglist.cgi?chfield=[Bug%20creation]&c \
hfieldfrom=7d&chfieldto=Now&classification=Mono&product=Mono%20Tasks&product=Mono%3A%2 \
0Class%20Libraries%20&product=Mono%3A%20Compilers&product=Mono%3A%20Debugger&product=M \
ono%3A%20Doctools&product=Mono%3A%20Runtime&product=Mono%3A%20Tools&query_format=advanced&ctype=rss";
+
+ SyndicationFeed feed = null;
+
+ using (XmlTextReader r = new XmlTextReader (url))
+ feed = SyndicationFeed.Load (r);
+
+ IEnumerable<SyndicationItem> items = feed.Items.OrderByDescending (p => \
p.Id).Take (count); +
+ bugs = new List<BugzillaEntry> ();
+
+ foreach (var item in items)
+ bugs.Add (new BugzillaEntry (item));
+
+ cache.Add ("bugs", bugs, 10 * 60);
+ }
- string url = @"https://bugzilla.novell.com/buglist.cgi?chfield=[Bug%20creation]&ch \
fieldfrom=7d&chfieldto=Now&classification=Mono&product=Mono%20Tasks&product=Mono%3A%20 \
Class%20Libraries%20&product=Mono%3A%20Compilers&product=Mono%3A%20Debugger&product=Mo \
no%3A%20Doctools&product=Mono%3A%20Runtime&product=Mono%3A%20Tools&query_format=advanced&ctype=rss";
+ return bugs;
+ }
+ }
- SyndicationFeed feed = null;
+ public class BugzillaEntry
+ {
+ public string Number { get; set; }
+ public string Url { get; set; }
+ public string Title { get; set; }
+ public DateTimeOffset Date { get; set; }
+ public string Product { get; set; }
+ public string Component { get; set; }
+ public string Reporter { get; set; }
+ public string AssignedTo { get; set; }
+ public BugzillaStatus Status { get; set; }
- using (XmlTextReader r = new XmlTextReader (url))
- feed = SyndicationFeed.Load (r);
+ public BugzillaEntry ()
+ {
+ }
- IEnumerable<SyndicationItem> items = feed.Items.OrderByDescending (p => \
p.Id).Take (count); + public BugzillaEntry (SyndicationItem entry)
+ {
+ Url = entry.Id;
+ Title = entry.Title.Text;
+ Number = Url.Substring (Url.Length - 6);
+ Date = entry.LastUpdatedTime;
- return items.ToList ();
+ XmlDocument doc = new XmlDocument ();
+ doc.LoadXml (entry.Summary.Text);
+
+ Product = GetData (doc, "bz_feed_product");
+ Component = GetData (doc, "bz_feed_component");
+ Reporter = GetData (doc, "bz_feed_reporter");
+ AssignedTo = GetData (doc, "bz_feed_assignee");
+
+ string status = GetData (doc, "bz_feed_bug_status");
+
+ switch (status.ToLowerInvariant ()) {
+ case "new":
+ case "assigned":
+ Status = BugzillaStatus.New;
+ break;
+ case "reopened":
+ Status = BugzillaStatus.Reopened;
+ break;
+ case "resolved":
+ Status = BugzillaStatus.Resolved;
+ break;
+ }
}
+
+ private string GetData (XmlDocument doc, string type)
+ {
+ XmlElement xe = (XmlElement)doc.SelectSingleNode (string.Format \
("//table/tr[@class = \"{0}\"]", type)); +
+ if (xe == null)
+ return string.Empty;
+
+ XmlElement child = (XmlElement)xe.LastChild;
+
+ if (child == null)
+ return string.Empty;
+
+ return child.InnerText;
+ }
}
+
+ public enum BugzillaStatus
+ {
+ New,
+ Reopened,
+ Resolved
+ }
}
Modified: trunk/mvcwrench/Helpers/ExpiringCache.cs
===================================================================
--- trunk/mvcwrench/Helpers/ExpiringCache.cs 2010-01-30 02:26:30 UTC (rev 150590)
+++ trunk/mvcwrench/Helpers/ExpiringCache.cs 2010-01-30 03:46:19 UTC (rev 150591)
@@ -28,16 +28,19 @@
using System.Linq;
using System.Web;
-namespace MvcWrench.Helpers
+namespace MvcWrench
{
+ public static class Cache
+ {
+ public static ExpiringCache Instance = new ExpiringCache ();
+ }
+
public class ExpiringCache
{
- private int timeout;
private Dictionary<string, CacheItem> cache = new Dictionary<string,CacheItem> ();
- public ExpiringCache (int seconds)
+ public ExpiringCache ()
{
- timeout = seconds;
}
public void Add (string key, object item, int timeout)
Modified: trunk/mvcwrench/Helpers/MonkeyWrenchHelper.cs
===================================================================
--- trunk/mvcwrench/Helpers/MonkeyWrenchHelper.cs 2010-01-30 02:26:30 UTC (rev \
150590)
+++ trunk/mvcwrench/Helpers/MonkeyWrenchHelper.cs 2010-01-30 03:46:19 UTC (rev \
150591) @@ -112,6 +112,25 @@
return row;
}
+
+ public static StatusStripRow GetHeaderRow (BuildRevision[] revs)
+ {
+ StatusStripRow row = new StatusStripRow ();
+ row.IsHeader = true;
+ row.HeaderText = "Mono - Trunk";
+
+ foreach (var item in revs) {
+ StatusStripCell cell = new StatusStripCell ();
+ cell.Text = item.Author;
+ //cell.Status = item.Status;
+
+ //cell.Url = string.Format ("~/builds/msvc/{0}", item.Id);
+ cell.IsHeader = true;
+ row.Cells.Add (cell);
+ }
+
+ return row;
+ }
private static int ConvertState (int state)
{
Added: trunk/mvcwrench/Media/bug.png
===================================================================
(Binary files differ)
Property changes on: trunk/mvcwrench/Media/bug.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mvcwrench/Media/house.png
===================================================================
(Binary files differ)
Property changes on: trunk/mvcwrench/Media/house.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/mvcwrench/Media/style.css
===================================================================
--- trunk/mvcwrench/Media/style.css 2010-01-30 02:26:30 UTC (rev 150590)
+++ trunk/mvcwrench/Media/style.css 2010-01-30 03:46:19 UTC (rev 150591)
@@ -418,6 +418,14 @@
width: 40em;
}
+#commit .human .revision
+{
+ font-size: 13px;
+ font-weight: bold;
+ margin-bottom: 5px;
+ float: right;
+}
+
#commit .human .actor
{
clear: left;
@@ -438,14 +446,15 @@
#commit .human .actor .name
{
- line-height: 1.5em;
+ line-height: 18px;
+ font-size: 13px;
}
#commit .human .actor .date
{
color: #888;
- font-size: 90%;
- line-height: 1em;
+ line-height: 15px;
+ font-size: 12px;
}
#commit .machine
@@ -552,3 +561,56 @@
#build-steps tr.fail { background-color: #FFDDDD; }
#build-steps tr.testfail { background-color: #FFCC66; }
#build-steps tr.executing { background-color: #FFF095; }
+
+.buglist
+{
+ width: 330px;
+ background-color: #eeeeee;
+ border: solid 1px #cccccc;
+ padding: 5px;
+ color: Black;
+ font-size: 12px;
+ -moz-border-radius: 5px;
+ margin: 10px;
+}
+
+.buglist table tr td a
+{
+ color: #000000;
+}
+
+.buglist table tr td a:hover
+{
+ text-decoration: underline;
+}
+
+.buglist table tr td
+{
+ font-size: 12px;
+}
+
+.buglist table tr td.strike
+{
+ text-decoration: line-through;
+}
+
+.bugchart
+{
+ width: 330px;
+ background-color: #ffffff;
+ border: solid 1px #cccccc;
+ padding: 5px;
+ color: Black;
+ font-size: 16px;
+ font-weight: bold;
+ -moz-border-radius: 5px;
+ margin: 10px;
+ text-align: center;
+}
+
+.bugtitle
+{
+ text-align: center;
+ font-size: 16px;
+ font-weight: bold;
+}
\ No newline at end of file
Modified: trunk/mvcwrench/MvcWrench.csproj
===================================================================
--- trunk/mvcwrench/MvcWrench.csproj 2010-01-30 02:26:30 UTC (rev 150590)
+++ trunk/mvcwrench/MvcWrench.csproj 2010-01-30 03:46:19 UTC (rev 150591)
@@ -40,6 +40,9 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.EnterpriseServices" />
+ <Reference Include="System.ServiceModel.Web">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
<Reference Include="System.Web.Abstractions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
@@ -53,6 +56,7 @@
<ItemGroup>
<Compile Include="Controllers\ApplicationController.cs" />
<Compile Include="Controllers\BuildsController.cs" />
+ <Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\StatusController.cs" />
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
@@ -61,6 +65,7 @@
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
+ <Compile Include="Helpers\BugzillaInterface.cs" />
<Compile Include="Helpers\ExpiringCache.cs" />
<Compile Include="Helpers\MonkeyWrenchHelper.cs" />
<Compile Include="Helpers\UserHelpers.cs" />
@@ -178,16 +183,22 @@
<Content Include="Media\BreadCrumb\bc_bg.png" />
<Content Include="Media\BreadCrumb\bc_separator.png" />
<Content Include="Media\bricks.png" />
+ <Content Include="Media\bug.png" />
<Content Include="Media\calendar.png" />
<Content Include="Media\error.png" />
<Content Include="Media\fail.png" />
+ <Content Include="Media\house.png" />
<Content Include="Media\moon.png" />
<Content Include="Media\pass.png" />
<Content Include="Media\report.png" />
+ <Content Include="Views\Home\BugChart.ascx" />
+ <Content Include="Views\Home\BugList.ascx" />
<Content Include="Views\Builds\BuildStatus.aspx" />
<Content Include="Views\Builds\BuildStatusLog.aspx" />
<Content Include="Views\Builds\BuildStepList.ascx" />
<Content Include="Views\Builds\BuildStepTable.ascx" />
+ <Content Include="Views\Home\Home.aspx" />
+ <Content Include="Views\Home\RecentRevisions.ascx" />
<Content Include="Views\Builds\RevisionDetails.aspx" />
<Content Include="Views\Shared\CommitHeader.ascx" />
<Content Include="Views\Status\Index.aspx" />
@@ -205,6 +216,9 @@
<Generator>MSDiscoCodeGenerator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
+ <None Include="Web References\MonkeyWrench.Public\Revision.datasource">
+ <DependentUpon>Reference.map</DependentUpon>
+ </None>
<None Include="Web \
References\mono-build\DBLaneDeletionDirectiveView.datasource"> \
<DependentUpon>Reference.map</DependentUpon> </None>
Modified: trunk/mvcwrench/Views/Builds/StatusStrip.ascx
===================================================================
--- trunk/mvcwrench/Views/Builds/StatusStrip.ascx 2010-01-30 02:26:30 UTC (rev \
150590)
+++ trunk/mvcwrench/Views/Builds/StatusStrip.ascx 2010-01-30 03:46:19 UTC (rev \
150591) @@ -26,7 +26,7 @@
<% foreach (MvcWrench.Models.StatusStripRow row in Model.Rows) { %><ul \
class="statusstrip"> <% if (string.IsNullOrEmpty (row.HeaderUrl)) { %>
- <li class="title <%= string.Format ("gr_{0}", \
MvcWrench.Models.StatusStripCell.GetStatusColor (row.Cells[0].Status)) %>" \
style="width: 115px"><%= row.HeaderText %></li> + <li class="title <%= string.Format \
("gr_{0}", MvcWrench.Models.StatusStripCell.GetStatusColor (row.Cells[0].Status)) %> \
<%= row.IsHeader ? "row-header" : "" %>" style="width: 115px"><%= row.HeaderText \
%></li> <% } else { %>
<li class="title <%= string.Format ("gr_{0}", \
MvcWrench.Models.StatusStripCell.GetStatusColor (row.Cells[0].Status)) %>" \
style="width: 115px"><a href="<%= Html.ResolveUrl (row.HeaderUrl) %>"><%= \
row.HeaderText %></a></li> <% } %>
Added: trunk/mvcwrench/Views/Home/BugChart.ascx
===================================================================
--- trunk/mvcwrench/Views/Home/BugChart.ascx (rev 0)
+++ trunk/mvcwrench/Views/Home/BugChart.ascx 2010-01-30 03:46:19 UTC (rev 150591)
@@ -0,0 +1,14 @@
+<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
+
+<div class="bugchart">
+Open Mono Bugs - Last 7 Days
+<img style="margin-top:10px;" src="http://chart.apis.google.com/chart?
+chs=300x175
+&chd=t:77,73,71,78,74,69,65|21,19,16,13,18,18,12
+&cht=lc
+&chco=76A4FB,A5E368
+&chm=b,E9F2FF,0,1,0|B,E2EED7,1,2,0
+&chdl=Bugs|Bugs With Patches
+&chdlp=b"
+alt="Open Mono Bugs - Last 7 Days" />
+</div>
\ No newline at end of file
Added: trunk/mvcwrench/Views/Home/BugList.ascx
===================================================================
--- trunk/mvcwrench/Views/Home/BugList.ascx (rev 0)
+++ trunk/mvcwrench/Views/Home/BugList.ascx 2010-01-30 03:46:19 UTC (rev 150591)
@@ -0,0 +1,12 @@
+<%@ Control Language="C#" \
Inherits="System.Web.Mvc.ViewUserControl<List<MvcWrench.BugzillaEntry>>" %> +<div \
class="buglist"> +<div class="bugtitle">Latest Reported Bugs</div>
+<table cellspacing="5">
+<% foreach (var item in Model) { %>
+ <tr>
+ <td><a href="<%= item.Url %>"><img alt="bug" src="<%= ResolveClientUrl \
("~/Media/bug.png") %>" /></a></td> + <td class="<%= item.Status == \
MvcWrench.BugzillaStatus.Resolved ? "strike" : "" %>"><a href="<%= item.Url %>"><%= \
item.Title %></a></td> + </tr>
+<% } %>
+</table>
+</div>
\ No newline at end of file
Added: trunk/mvcwrench/Views/Home/Home.aspx
===================================================================
--- trunk/mvcwrench/Views/Home/Home.aspx (rev 0)
+++ trunk/mvcwrench/Views/Home/Home.aspx 2010-01-30 03:46:19 UTC (rev 150591)
@@ -0,0 +1,19 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" \
Inherits="System.Web.Mvc.ViewPage" %> +
+<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+ MonkeyWrench
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
+ <table style="width: 100%">
+ <tr style="vertical-align: top;">
+ <td style="width:100%;">
+ <% Html.RenderPartial ("RecentRevisions", ViewData["Revisions"]); %>
+ </td>
+ <td>
+ <% Html.RenderPartial ("BugChart", Model); %>
+ <% Html.RenderPartial ("BugList", Model); %>
+ </td>
+ </tr>
+ </table>
+</asp:Content>
Added: trunk/mvcwrench/Views/Home/RecentRevisions.ascx
===================================================================
--- trunk/mvcwrench/Views/Home/RecentRevisions.ascx (rev 0)
+++ trunk/mvcwrench/Views/Home/RecentRevisions.ascx 2010-01-30 03:46:19 UTC (rev \
150591) @@ -0,0 +1,17 @@
+<%@ Control Language="C#" \
Inherits="System.Web.Mvc.ViewUserControl<MvcWrench.MonkeyWrench.Public.Revision[]>" \
%> +
+<% foreach (var item in Model) { %>
+ <div id="commit" style="margin-left: 10px;">
+ <div class="human" style="width: 100%">
+ <div class="revision">Revision <%= item.RevisionNumber %></div>
+ <div class="actor">
+ <div class="gravatar">
+ <img alt="" src="<%= MvcWrench.UserHelpers.EmailToGravatar \
(item.Author, 30) %>" /> + </div>
+ <div class="name"><%= item.Author %></div>
+ <div class="date"><%= item.Time.ToString () %></div>
+ </div>
+ <pre><%= item.SvnLog %></pre>
+ </div>
+ </div>
+<% } %>
Modified: trunk/mvcwrench/Web References/MonkeyWrench.Public/Public.wsdl
===================================================================
--- trunk/mvcwrench/Web References/MonkeyWrench.Public/Public.wsdl 2010-01-30 \
02:26:30 UTC (rev 150590)
+++ trunk/mvcwrench/Web References/MonkeyWrench.Public/Public.wsdl 2010-01-30 \
03:46:19 UTC (rev 150591) @@ -79,6 +79,38 @@
</s:sequence>
</s:complexType>
</s:element>
+ <s:element name="GetProductLatestRevisions">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="productID" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="limit" type="s:int" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetProductLatestRevisionsResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" \
name="GetProductLatestRevisionsResult" type="tns:ArrayOfRevision" /> + \
</s:sequence> + </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfRevision">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Revision" \
nillable="true" type="tns:Revision" /> + </s:sequence>
+ </s:complexType>
+ <s:complexType name="Revision">
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="Id" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="ProductId" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="RevisionNumber" type="s:int" \
/> + <s:element minOccurs="1" maxOccurs="1" name="Time" type="s:dateTime" />
+ <s:element minOccurs="0" maxOccurs="1" name="Author" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:int" />
+ <s:element minOccurs="0" maxOccurs="1" name="SvnLog" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="FileDiff" type="s:string" />
+ </s:sequence>
+ </s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="GetRecentDataSoapIn">
@@ -99,6 +131,12 @@
<wsdl:message name="GetBuildLogSoapOut">
<wsdl:part name="parameters" element="tns:GetBuildLogResponse" />
</wsdl:message>
+ <wsdl:message name="GetProductLatestRevisionsSoapIn">
+ <wsdl:part name="parameters" element="tns:GetProductLatestRevisions" />
+ </wsdl:message>
+ <wsdl:message name="GetProductLatestRevisionsSoapOut">
+ <wsdl:part name="parameters" element="tns:GetProductLatestRevisionsResponse" />
+ </wsdl:message>
<wsdl:portType name="PublicSoap">
<wsdl:operation name="GetRecentData">
<wsdl:input message="tns:GetRecentDataSoapIn" />
@@ -112,6 +150,10 @@
<wsdl:input message="tns:GetBuildLogSoapIn" />
<wsdl:output message="tns:GetBuildLogSoapOut" />
</wsdl:operation>
+ <wsdl:operation name="GetProductLatestRevisions">
+ <wsdl:input message="tns:GetProductLatestRevisionsSoapIn" />
+ <wsdl:output message="tns:GetProductLatestRevisionsSoapOut" />
+ </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PublicSoap" type="tns:PublicSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -142,6 +184,15 @@
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="GetProductLatestRevisions">
+ <soap:operation soapAction="http://tempuri.org/GetProductLatestRevisions" \
style="document" /> + <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="PublicSoap12" type="tns:PublicSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -172,6 +223,15 @@
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="GetProductLatestRevisions">
+ <soap12:operation soapAction="http://tempuri.org/GetProductLatestRevisions" \
style="document" /> + <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:service name="Public">
<wsdl:port name="PublicSoap" binding="tns:PublicSoap">
Modified: trunk/mvcwrench/Web References/MonkeyWrench.Public/Reference.cs
===================================================================
--- trunk/mvcwrench/Web References/MonkeyWrench.Public/Reference.cs 2010-01-30 \
02:26:30 UTC (rev 150590)
+++ trunk/mvcwrench/Web References/MonkeyWrench.Public/Reference.cs 2010-01-30 \
03:46:19 UTC (rev 150591) @@ -35,6 +35,8 @@
private System.Threading.SendOrPostCallback GetBuildLogOperationCompleted;
+ private System.Threading.SendOrPostCallback \
GetProductLatestRevisionsOperationCompleted; +
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
@@ -83,6 +85,9 @@
public event GetBuildLogCompletedEventHandler GetBuildLogCompleted;
/// <remarks/>
+ public event GetProductLatestRevisionsCompletedEventHandler \
GetProductLatestRevisionsCompleted; +
+ /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetRecentData", \
RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", \
Use=System.Web.Services.Description.SoapBindingUse.Literal, \
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public \
BuildRevision[] GetRecentData(string product) {
object[] results = this.Invoke("GetRecentData", new object[] {
@@ -170,6 +175,37 @@
}
/// <remarks/>
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetProductLatestRevisions", \
RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", \
Use=System.Web.Services.Description.SoapBindingUse.Literal, \
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + \
public Revision[] GetProductLatestRevisions(int productID, int limit) { + \
object[] results = this.Invoke("GetProductLatestRevisions", new object[] { + \
productID, + limit});
+ return ((Revision[])(results[0]));
+ }
+
+ /// <remarks/>
+ public void GetProductLatestRevisionsAsync(int productID, int limit) {
+ this.GetProductLatestRevisionsAsync(productID, limit, null);
+ }
+
+ /// <remarks/>
+ public void GetProductLatestRevisionsAsync(int productID, int limit, object \
userState) { + if ((this.GetProductLatestRevisionsOperationCompleted == \
null)) { + this.GetProductLatestRevisionsOperationCompleted = new \
System.Threading.SendOrPostCallback(this.OnGetProductLatestRevisionsOperationCompleted);
+ }
+ this.InvokeAsync("GetProductLatestRevisions", new object[] {
+ productID,
+ limit}, this.GetProductLatestRevisionsOperationCompleted, \
userState); + }
+
+ private void OnGetProductLatestRevisionsOperationCompleted(object arg) {
+ if ((this.GetProductLatestRevisionsCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = \
((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + \
this.GetProductLatestRevisionsCompleted(this, new \
GetProductLatestRevisionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, \
invokeArgs.Cancelled, invokeArgs.UserState)); + }
+ }
+
+ /// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
@@ -299,6 +335,111 @@
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
+ public partial class Revision {
+
+ private int idField;
+
+ private int productIdField;
+
+ private int revisionNumberField;
+
+ private System.DateTime timeField;
+
+ private string authorField;
+
+ private int statusField;
+
+ private string svnLogField;
+
+ private string fileDiffField;
+
+ /// <remarks/>
+ public int Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ /// <remarks/>
+ public int ProductId {
+ get {
+ return this.productIdField;
+ }
+ set {
+ this.productIdField = value;
+ }
+ }
+
+ /// <remarks/>
+ public int RevisionNumber {
+ get {
+ return this.revisionNumberField;
+ }
+ set {
+ this.revisionNumberField = value;
+ }
+ }
+
+ /// <remarks/>
+ public System.DateTime Time {
+ get {
+ return this.timeField;
+ }
+ set {
+ this.timeField = value;
+ }
+ }
+
+ /// <remarks/>
+ public string Author {
+ get {
+ return this.authorField;
+ }
+ set {
+ this.authorField = value;
+ }
+ }
+
+ /// <remarks/>
+ public int Status {
+ get {
+ return this.statusField;
+ }
+ set {
+ this.statusField = value;
+ }
+ }
+
+ /// <remarks/>
+ public string SvnLog {
+ get {
+ return this.svnLogField;
+ }
+ set {
+ this.svnLogField = value;
+ }
+ }
+
+ /// <remarks/>
+ public string FileDiff {
+ get {
+ return this.fileDiffField;
+ }
+ set {
+ this.fileDiffField = value;
+ }
+ }
+ }
+
+ /// <remarks/>
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.4927")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public partial class CompletedBuildStep {
private long idField;
@@ -487,6 +628,32 @@
}
}
}
+
+ /// <remarks/>
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", \
"2.0.50727.4927")] + public delegate void \
GetProductLatestRevisionsCompletedEventHandler(object sender, \
GetProductLatestRevisionsCompletedEventArgs e); +
+ /// <remarks/>
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", \
"2.0.50727.4927")] + [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class GetProductLatestRevisionsCompletedEventArgs : \
System.ComponentModel.AsyncCompletedEventArgs { +
+ private object[] results;
+
+ internal GetProductLatestRevisionsCompletedEventArgs(object[] results, \
System.Exception exception, bool cancelled, object userState) : + \
base(exception, cancelled, userState) { + this.results = results;
+ }
+
+ /// <remarks/>
+ public Revision[] Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((Revision[])(this.results[0]));
+ }
+ }
+ }
}
#pragma warning restore 1591
\ No newline at end of file
Added: trunk/mvcwrench/Web References/MonkeyWrench.Public/Revision.datasource
===================================================================
--- trunk/mvcwrench/Web References/MonkeyWrench.Public/Revision.datasource \
(rev 0)
+++ trunk/mvcwrench/Web References/MonkeyWrench.Public/Revision.datasource 2010-01-30 \
03:46:19 UTC (rev 150591) @@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ This file is automatically generated by Visual Studio .Net. It is
+ used to store generic object data source configuration information.
+ Renaming the file extension or editing the content of this file may
+ cause the file to be unrecognizable by the program.
+-->
+<GenericObjectDataSource DisplayName="Revision" Version="1.0" \
xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + \
<TypeInfo>MvcWrench.MonkeyWrench.Public.Revision, Web \
References.MonkeyWrench.Public.Reference.cs, Version=0.0.0.0, Culture=neutral, \
PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource>
\ No newline at end of file
_______________________________________________
Mono-patches maillist - Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic