Skip to content

Commit

Permalink
commiting for push to appharbor
Browse files Browse the repository at this point in the history
  • Loading branch information
Exjobb committed Nov 8, 2011
1 parent fc7852f commit 3496e06
Show file tree
Hide file tree
Showing 15 changed files with 216 additions and 83 deletions.
203 changes: 140 additions & 63 deletions DeployBoard/DeployBoard.6.0.ReSharper.user

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion DeployBoard/DeployBoard.Tests/DeployBoard.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Controllers\HomeControllerTest.cs" />
<Compile Include="TestSpecs.cs" />
<Compile Include="DeployNumberSpec.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="App.config" />
Expand Down
18 changes: 18 additions & 0 deletions DeployBoard/DeployBoard.Tests/DeployNumberSpec.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cone;
using DeployBoard.Models;
using DeployBoard.Controllers;

namespace DeployBoard.Tests
{
[Describe(typeof(DeployNumberSpec))]
class DeployNumberSpec
{
HomeController controller = new HomeController();

}
}

Binary file modified DeployBoard/DeployBoard.Tests/bin/Debug/DeployBoard.Tests.dll
Binary file not shown.
Binary file not shown.
Binary file modified DeployBoard/DeployBoard.Tests/obj/Debug/DeployBoard.Tests.dll
Binary file not shown.
Binary file not shown.
Binary file modified DeployBoard/DeployBoard.suo
Binary file not shown.
Binary file modified DeployBoard/DeployBoard/App_Data/DeployBoard.mdf
Binary file not shown.
Binary file modified DeployBoard/DeployBoard/App_Data/DeployBoard_log.LDF
Binary file not shown.
24 changes: 13 additions & 11 deletions DeployBoard/DeployBoard/Content/Style.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ header ul#menu {

}

input.add-build, input.add-build:disabled:hover, input.button.add-build.disabled:hover {
input.add-build, input.add-build:disabled:hover, input.button.add-build {
height: 30px;
width:80px;
padding: 0;
Expand All @@ -184,16 +184,14 @@ margin-left: 10px;
font-family: helvetica,arial,freesans,clean,sans-serif;
font-weight: bold;
font-size: 12px;
color: #333;
text-shadow: 1px 1px 0 white;
white-space: nowrap;
border: none;
overflow: visible;
background: #DDD;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');
background: -webkit-gradient(linear,0% 0,0% 100%,from(white),to(#E1E1E1));
background: -moz-linear-gradient(-90deg,white,#E1E1E1);
border-bottom: 1px solid #EBEBEB;
color: white;
text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3);
background: #60B044;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8add6d',endColorstr='#60b044');
background: -webkit-gradient(linear,left top,left bottom,from(#8ADD6D),to(#60B044));
background: -moz-linear-gradient(top,#8ADD6D,#60B044);
border-color: #74BB5A;
border-bottom-color: #509338;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
Expand All @@ -205,6 +203,10 @@ cursor: pointer;

}

input.add-build, input.add-build:disabled:hover, input.button.add-build.disabled:hover {

}

#cpx {
margin:0;
padding:0;
Expand Down
35 changes: 35 additions & 0 deletions DeployBoard/DeployBoard/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Mvc;
Expand All @@ -9,6 +10,13 @@ namespace DeployBoard.Controllers
{
public class HomeController : Controller
{
private DeployBoardEntities _deployBoardEntities;

public HomeController()
{
_deployBoardEntities = new DeployBoardEntities();
}

public ActionResult Index()
{

Expand All @@ -26,6 +34,33 @@ public ActionResult About()
return View();
}

[HttpPost]
public ActionResult InsertDeployNumber(ApplicationViewModel model)
{
try
{
if(ModelState.IsValid)
{
_deployBoardEntities.AddToApplications(model.DeployNumber);
_deployBoardEntities.SaveChanges();
return RedirectToAction("Index");


}

}
catch (DataException)
{

ModelState.AddModelError("", "oops sorry to say but something went wrong");
}


return View("Error");


}


}
}
15 changes: 9 additions & 6 deletions DeployBoard/DeployBoard/Models/ApplicationViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DeployBoard.Models
{
Expand All @@ -12,8 +8,15 @@ public class ApplicationViewModel
public int ApplicationId { get; set; }
public string Name { get; set; }
public int ServerId { get; set; }
private int _deployNumber;

[RegularExpression(@"[-+]?[0-9]*\.?[0-9]?[0-9]", ErrorMessage = "Number required.")]
public int DeployNumber { get; set; }
public int DeployNumber
{
get { return _deployNumber; }
set { _deployNumber = value; }
}

public ICollection<Environment> Environments { get; set; }
}
}
2 changes: 0 additions & 2 deletions DeployBoard/DeployBoard/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
ViewBag.Title = "Home Page";
}


<h2></h2>
<div id="sheet">
<div class="wrapper">
<div id="board">
@using(Html.BeginForm("", "" ))
<table id="deploy-board" cellpadding="0" cellspacing="0">
<thead>
<tr>
Expand Down
Binary file not shown.

0 comments on commit 3496e06

Please sign in to comment.