-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Checkin for the TeamCityMonitor project. this has been create…
…d from the Sample application in TeamCitySharp
- Loading branch information
0 parents
commit f2a964f
Showing
139 changed files
with
84,538 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
obj | ||
bin | ||
deploy | ||
*.csproj.user | ||
*.suo | ||
*ReSharper* | ||
*.orig | ||
*.dotCover | ||
output | ||
*.TeamCityMonitor.sln.metaproj* | ||
*.DotSettings.* | ||
nuget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
License: http://stack72.mit-license.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#TeamCityMonitor | ||
|
||
Build Monitor based on TeamCitySharp | ||
|
||
##License | ||
http://stack72.mit-license.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual Studio 2010 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamCityMonitor", "TeamCityMonitor\TeamCityMonitor.csproj", "{4CF6D742-60E7-481A-BD9C-3B6D5D661B76}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{4CF6D742-60E7-481A-BD9C-3B6D5D661B76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{4CF6D742-60E7-481A-BD9C-3B6D5D661B76}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{4CF6D742-60E7-481A-BD9C-3B6D5D661B76}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{4CF6D742-60E7-481A-BD9C-3B6D5D661B76}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Web.Mvc; | ||
|
||
namespace BuildMonitor.Areas.Admin | ||
{ | ||
public class AdminAreaRegistration : AreaRegistration | ||
{ | ||
public override string AreaName | ||
{ | ||
get | ||
{ | ||
return "Admin"; | ||
} | ||
} | ||
|
||
public override void RegisterArea(AreaRegistrationContext context) | ||
{ | ||
context.MapRoute( | ||
"Admin_default", | ||
"Admin/{controller}/{action}/{id}", | ||
new { Controller="Features", action = "Index", id = UrlParameter.Optional } | ||
); | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
TeamCityMonitor/Areas/Admin/Controllers/FeaturesController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System.Web.Mvc; | ||
using BuildMonitor.Models; | ||
using BuildMonitor.Models.Entities; | ||
|
||
namespace BuildMonitor.Areas.Admin.Controllers | ||
{ | ||
public class FeaturesController : Controller | ||
{ | ||
private readonly FeatureRepository featuresRepo; | ||
|
||
public FeaturesController() | ||
{ | ||
featuresRepo = new FeatureRepository(); | ||
} | ||
// | ||
// GET: /Admin/Features/ | ||
|
||
public ActionResult Index() | ||
{ | ||
var features = featuresRepo.GetAllFeatures(); | ||
return View(features); | ||
} | ||
|
||
public ActionResult FeatureDetails(int featureId) | ||
{ | ||
var feature = featuresRepo.GetFeature(featureId); | ||
return View(feature); | ||
} | ||
|
||
public ActionResult AddFeature() | ||
{ | ||
return View(); | ||
} | ||
|
||
[HttpPost] | ||
public ActionResult AddFeature(Feature feature) | ||
{ | ||
var successful = featuresRepo.AddFeature(feature); | ||
return View(); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@model BuildMonitor.Models.Entities.Feature | ||
|
||
@{ | ||
ViewBag.Title = "title"; | ||
} | ||
|
||
<h2>Add New Feature</h2> |
7 changes: 7 additions & 0 deletions
7
TeamCityMonitor/Areas/Admin/Views/Features/FeatureDetails.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@model BuildMonitor.Models.Entities.Feature | ||
|
||
@{ | ||
ViewBag.Title = "title"; | ||
} | ||
|
||
<h2>@Model.FeatureName</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@model List<BuildMonitor.Models.Entities.Feature> | ||
|
||
@{ | ||
ViewBag.Title = "Index"; | ||
} | ||
|
||
<h2>Index</h2> | ||
<table> | ||
<tr> | ||
<th>Id</th> | ||
<th>Feature Name</th> | ||
<th>Enabled?</th> | ||
</tr> | ||
@foreach (var feature in Model) | ||
{ | ||
<tr> | ||
<td>@feature.FeatureSwitchId</td> | ||
<td>@Html.ActionLink(feature.FeatureName, "FeatureDetails", new {featureId = feature.FeatureSwitchId}, null)</td> | ||
<td>@feature.Enabled</td> | ||
</tr> | ||
} | ||
</table> | ||
|
||
@Html.ActionLink("Add New Feature", "AddFeature"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0"?> | ||
|
||
<configuration> | ||
<configSections> | ||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | ||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | ||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
|
||
<system.web.webPages.razor> | ||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
<pages pageBaseType="System.Web.Mvc.WebViewPage"> | ||
<namespaces> | ||
<add namespace="System.Web.Mvc" /> | ||
<add namespace="System.Web.Mvc.Ajax" /> | ||
<add namespace="System.Web.Mvc.Html" /> | ||
<add namespace="System.Web.Routing" /> | ||
</namespaces> | ||
</pages> | ||
</system.web.webPages.razor> | ||
|
||
<appSettings> | ||
<add key="webpages:Enabled" value="false" /> | ||
</appSettings> | ||
|
||
<system.web> | ||
<httpHandlers> | ||
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/> | ||
</httpHandlers> | ||
|
||
<!-- | ||
Enabling request validation in view pages would cause validation to occur | ||
after the input has already been processed by the controller. By default | ||
MVC performs request validation before a controller processes the input. | ||
To change this behavior apply the ValidateInputAttribute to a | ||
controller or action. | ||
--> | ||
<pages | ||
validateRequest="false" | ||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" | ||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" | ||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | ||
<controls> | ||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> | ||
</controls> | ||
</pages> | ||
</system.web> | ||
|
||
<system.webServer> | ||
<validation validateIntegratedModeConfiguration="false" /> | ||
|
||
<handlers> | ||
<remove name="BlockViewHandler"/> | ||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> | ||
</handlers> | ||
</system.webServer> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Web; | ||
using System.Web.Mvc; | ||
|
||
namespace BuildMonitor.Attributes | ||
{ | ||
public class DisableCaching : ActionFilterAttribute | ||
{ | ||
public override void OnResultExecuting(ResultExecutingContext filterContext) | ||
{ | ||
filterContext.HttpContext.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)); | ||
filterContext.HttpContext.Response.Cache.SetValidUntilExpires(false); | ||
filterContext.HttpContext.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches); | ||
filterContext.HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache); | ||
filterContext.HttpContext.Response.Cache.SetNoStore(); | ||
|
||
base.OnResultExecuting(filterContext); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.