зеркало из https://github.com/mono/mvcwrench.git
Flush some minor updates.
svn path=/trunk/mvcwrench/; revision=152411
This commit is contained in:
Родитель
8a01d730ac
Коммит
84715dbd8c
|
@ -218,6 +218,28 @@ namespace MvcWrench.Controllers
|
|||
return View ("Index", strips);
|
||||
}
|
||||
|
||||
// GET: /Builds/monodevelop
|
||||
public ActionResult MonoDevelop ()
|
||||
{
|
||||
WebServices ws = new WebServices ();
|
||||
WebServiceLogin login = new WebServiceLogin ();
|
||||
|
||||
FrontPageResponse data = ws.GetFrontPageData2 (login, 10, null, null);
|
||||
|
||||
List<StatusStrip> strips = new List<StatusStrip> ();
|
||||
|
||||
StatusStrip strip_md = new StatusStrip ();
|
||||
strip_md.Name = "MonoDevelop - Trunk";
|
||||
//strip_md.Rows.Add (MonkeyWrenchHelper.GetRow (49, data, "dist"));
|
||||
strip_md.Rows.Add (MonkeyWrenchHelper.GetRow (131, data, "sle-11-i586"));
|
||||
|
||||
strips.Add (strip_md);
|
||||
|
||||
ViewData["PageTitle"] = "MonkeyWrench - MonoDevelop";
|
||||
|
||||
return View ("Index", strips);
|
||||
}
|
||||
|
||||
// GET: /Builds/other
|
||||
public ActionResult Other ()
|
||||
{
|
||||
|
@ -354,7 +376,7 @@ namespace MvcWrench.Controllers
|
|||
commit.Builder = data.WorkHost == null ? "" : data.WorkHost.host;
|
||||
commit.BuildDuration = TimeSpan.Zero;
|
||||
commit.CommitLog = "";
|
||||
commit.Email = SvnGravatars.GetInstance (Server.MapPath ("~/Content/gravatars.txt")).Get (commit.Author);
|
||||
commit.Email = SvnGravatars.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);
|
||||
|
@ -412,9 +434,9 @@ namespace MvcWrench.Controllers
|
|||
MonkeyWrench.Public.Public ws2 = new Public ();
|
||||
Revision r = ws2.GetRevisionByRevision (int.Parse (revision));
|
||||
|
||||
ViewData["PageTitle"] = string.Format ("MonkeyWrench - Revision {0}", r.RevisionNumber);
|
||||
ViewData["PageTitle"] = string.Format ("MonkeyWrench - Revision {0}", revision);
|
||||
|
||||
if (string.IsNullOrEmpty (r.FileDiff))
|
||||
if (r == null || string.IsNullOrEmpty (r.FileDiff))
|
||||
ViewData["Diff"] = "Diff not available";
|
||||
else {
|
||||
try {
|
||||
|
@ -579,6 +601,7 @@ namespace MvcWrench.Controllers
|
|||
|
||||
tv.Nodes.Add (new TreeViewNode ("Mono", "~/builds/mono", "~/Media/mono.png"));
|
||||
tv.Nodes.Add (new TreeViewNode ("Mono - Extended", "~/builds/monoextended", "~/Media/mono.png"));
|
||||
tv.Nodes.Add (new TreeViewNode ("MonoDevelop", "~/builds/monodevelop", "~/Media/monodevelop.png"));
|
||||
tv.Nodes.Add (new TreeViewNode ("Other Projects", "~/builds/other", "~/Media/bricks.png"));
|
||||
|
||||
return tv;
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace MvcWrench
|
|||
// 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 ("BuildsMonoDevelop", "builds/monodevelop", new { controller = "Builds", action = "MonoDevelop", 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 ("BuildsMsvc", "builds/msvc/{buildrevisionid}", new { controller = "Builds", action = "BuildStatus", id = "" });
|
||||
|
@ -55,6 +56,13 @@ namespace MvcWrench
|
|||
routes.MapRoute ("StatusDisplay", "status/{profile}/{reference}/{assembly}", new { controller = "Status", action = "Class" });
|
||||
routes.MapRoute ("StatusList", "status/{profile}/{reference}", new { controller = "Status", action = "List" });
|
||||
routes.MapRoute ("Status", "status", new { controller = "Status", action = "Index" });
|
||||
|
||||
// Bugs
|
||||
routes.MapRoute ("addtestcase", "bugs/view/{id}/addtestcase", new { controller = "Bugs", action = "AddTestCase" });
|
||||
|
||||
|
||||
routes.MapRoute ("User", "user/{action}", new { controller = "User", action = "Index" });
|
||||
routes.MapRoute ("UserID", "user/{action}/{id}", new { controller = "User", action = "Index" });
|
||||
|
||||
routes.MapRoute (
|
||||
"Default", // Route name
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 916 B |
|
@ -32,6 +32,11 @@ a:hover
|
|||
pre
|
||||
{
|
||||
font-size: 10pt;
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
input
|
||||
|
@ -109,10 +114,12 @@ input
|
|||
background-color: #326A9A;
|
||||
}
|
||||
|
||||
#topmenu a
|
||||
#topmenu li a
|
||||
{
|
||||
background-position: 10px 10px;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
padding: 6px 10px 0px 10px;
|
||||
padding: 6px 10px 0px 32px;
|
||||
font-weight: bold;
|
||||
color: #FFF;
|
||||
}
|
||||
|
@ -122,11 +129,6 @@ input
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
#topmenu a img
|
||||
{
|
||||
margin: 0px 7px 0px 0px;
|
||||
}
|
||||
|
||||
/* Main Content */
|
||||
#content
|
||||
{
|
||||
|
@ -666,4 +668,42 @@ li.row-header { background-image: none; background-color: #FFFFFF; font-weight:
|
|||
{
|
||||
color: #999999;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.th-select
|
||||
{
|
||||
background-color: #EAEAEA;
|
||||
border: solid 1px #EAEAEA;
|
||||
font-size: 12px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#build-steps a
|
||||
{
|
||||
color: #696969;
|
||||
}
|
||||
|
||||
a.withimg
|
||||
{
|
||||
background-position: 5px center;
|
||||
background-repeat: no-repeat;
|
||||
padding: 5px 5px 5px 25px;
|
||||
}
|
||||
|
||||
td.test-case
|
||||
{
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
td.fail { background-color: #F36868; }
|
||||
td.testfail { background-color: #FFCC66; }
|
||||
td.executing { background-color: #FFF095; }
|
||||
td.success { background-color: #A5E368; }
|
||||
td.queued { border: solid 1px #cccccc; }
|
||||
|
||||
.monospace
|
||||
{
|
||||
font-family: Monaco,Consolas,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
|
||||
}
|
|
@ -32,39 +32,18 @@ using System.IO;
|
|||
|
||||
namespace MvcWrench.Models
|
||||
{
|
||||
public class SvnGravatars
|
||||
public static class SvnGravatars
|
||||
{
|
||||
private static SvnGravatars instance;
|
||||
private static Dictionary<string, string> gravatars;
|
||||
private static DateTime retrieved;
|
||||
|
||||
private Dictionary<string, string> gravatars;
|
||||
|
||||
public SvnGravatars ()
|
||||
public static string Get (string svnuser)
|
||||
{
|
||||
gravatars = new Dictionary<string, string> ();
|
||||
}
|
||||
|
||||
public static SvnGravatars GetInstance (string source)
|
||||
{
|
||||
if (instance == null) {
|
||||
SvnGravatars grav = new SvnGravatars ();
|
||||
|
||||
using (StreamReader sr = new StreamReader (source)) {
|
||||
string line;
|
||||
|
||||
while ((line = sr.ReadLine ()) != null) {
|
||||
string[] pieces = line.Split (',');
|
||||
grav.gravatars.Add (pieces[0], pieces[1]);
|
||||
}
|
||||
}
|
||||
|
||||
instance = grav;
|
||||
if (gravatars == null || DateTime.Now.Subtract (retrieved).TotalMinutes > 10) {
|
||||
gravatars = UserRepository.GetSvnGravatars ();
|
||||
retrieved = DateTime.Now;
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public string Get (string svnuser)
|
||||
{
|
||||
|
||||
if (gravatars.ContainsKey (svnuser))
|
||||
return gravatars[svnuser];
|
||||
|
||||
|
|
|
@ -226,5 +226,29 @@ namespace MvcWrench.Models
|
|||
|
||||
return roles;
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> GetSvnGravatars ()
|
||||
{
|
||||
NpgsqlConnection conn = new NpgsqlConnection (conn_string);
|
||||
NpgsqlCommand comm = conn.CreateCommand ();
|
||||
|
||||
string sql = "SELECT svn, gravatar FROM users WHERE svn <> '' AND gravatar <> ''";
|
||||
comm.CommandText = sql;
|
||||
|
||||
conn.Open ();
|
||||
|
||||
NpgsqlDataReader reader = comm.ExecuteReader ();
|
||||
|
||||
Dictionary<string, string> gravatars = new Dictionary<string,string> ();
|
||||
|
||||
while (reader.Read ())
|
||||
gravatars.Add ((string)reader["svn"], (string)reader["gravatar"]);
|
||||
|
||||
reader.Close ();
|
||||
comm.Dispose ();
|
||||
conn.Close ();
|
||||
|
||||
return gravatars;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="right_content_placeholder" runat="server">
|
||||
<div class="right-content-pad">
|
||||
<% if (Model != null) { %>
|
||||
<div id="commit">
|
||||
<div class="human" style="width: 100%">
|
||||
<div class="revision">
|
||||
|
@ -13,7 +14,7 @@
|
|||
</div>
|
||||
<div class="actor">
|
||||
<div class="gravatar">
|
||||
<img alt="" src="<%= MvcWrench.UserHelpers.EmailToGravatar (MvcWrench.Models.SvnGravatars.GetInstance (Server.MapPath ("~/Content/gravatars.txt")).Get (Model.Author), 30) %>" />
|
||||
<img alt="" src="<%= MvcWrench.UserHelpers.EmailToGravatar (MvcWrench.Models.SvnGravatars.Get (Model.Author), 30) %>" />
|
||||
</div>
|
||||
<div class="name"><%= Model.Author %></div>
|
||||
<div class="date">about <%= (DateTime.Now.Subtract (new TimeSpan (1, 0, 0)) - Model.Time).ToFriendlySpan ()%> ago</div>
|
||||
|
@ -21,7 +22,7 @@
|
|||
<pre><%= Html.Encode (Model.SvnLog.TrimEnd ())%></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% } %>
|
||||
<% if ((ViewData["Diff"]).GetType () == typeof(string)) { %>
|
||||
<br /><%= ViewData["Diff"] %>
|
||||
<% } else { %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
|
||||
|
||||
<div class="bugchart">
|
||||
<div class="bugtitle"><a href="http://www.mono-project.com/Bugs">Open Mono Bugs - Last 7 Days</a></div>
|
||||
<div class="bugtitle"><a href="http://www.mono-project.com/Bugs">Open Mono Bugs - Last 14 Days</a></div>
|
||||
<img style="margin-top:10px;" src="http://chart.apis.google.com/chart?
|
||||
chs=300x175
|
||||
&chd=t:<%= (string)Model %>
|
||||
|
@ -10,7 +10,7 @@ chs=300x175
|
|||
&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" />
|
||||
alt="Open Mono Bugs - Last 14 Days" />
|
||||
<table style="margin-left: 58px; margin-top: 10px;">
|
||||
<tr>
|
||||
<td><a href="http://mono-project.com/Bugs"><img src="Media/bug_link.png" alt="Bugzilla" /></a></td>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<div class="actor">
|
||||
<div class="gravatar">
|
||||
<img alt="" src="<%= MvcWrench.UserHelpers.EmailToGravatar (MvcWrench.Models.SvnGravatars.GetInstance (Server.MapPath ("~/Content/gravatars.txt")).Get (item.Author), 30) %>" />
|
||||
<img alt="" src="<%= MvcWrench.UserHelpers.EmailToGravatar (MvcWrench.Models.SvnGravatars.Get (item.Author), 30) %>" />
|
||||
</div>
|
||||
<div class="name"><%= item.Author %></div>
|
||||
<div class="date">about <%= (DateTime.Now.Subtract (new TimeSpan (1, 0, 0)) - item.Time).ToFriendlySpan () %> ago</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<%
|
||||
} else {
|
||||
%>
|
||||
<%= Html.ActionLink("Sign in / Create account", "login", "user") %>
|
||||
<%
|
||||
<%--<%= Html.ActionLink("Sign in / Create account", "login", "user") %>
|
||||
--%><%
|
||||
}
|
||||
%>
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
List<MvcWrench.Models.Tab> tabs = (List<MvcWrench.Models.Tab>)ViewData["TabMenu"];
|
||||
%>
|
||||
<ul>
|
||||
<% foreach (var tab in tabs) { %> <li><a href="<%= Html.ResolveUrl (tab.Url) %>"><img src="<%= Html.ResolveUrl (tab.Image) %>" alt="<%= Html.Encode (tab.Name) %>" /><%= Html.Encode (tab.Name) %></a></li>
|
||||
<% foreach (var tab in tabs) { %> <li><a style="background-image: url(<%= Html.ResolveUrl (tab.Image) %>);" href="<%= Html.ResolveUrl (tab.Url) %>"><%= Html.Encode (tab.Name) %></a></li>
|
||||
<% } %></ul>
|
Загрузка…
Ссылка в новой задаче