From 9cc7e8f0338d7f972d516d8edc01374094bfa107 Mon Sep 17 00:00:00 2001 From: Christian Smith Date: Wed, 8 Mar 2017 16:53:00 +1100 Subject: [PATCH] Rename pool -> pools controller. --- .../AzureBlast/AzureBlast.Web/AzureBlast.Web.csproj | 8 ++++---- .../Controllers/DatabasesController.cs | 2 +- .../{PoolController.cs => PoolsController.cs} | 12 ++++++------ .../Controllers/RepositoriesController.cs | 2 +- .../Views/{Pool => Pools}/Index.cshtml | 6 +++--- .../AzureBlast.Web/Views/{Pool => Pools}/New.cshtml | 4 ++-- .../AzureBlast.Web/Views/{Pool => Pools}/Show.cshtml | 6 +++--- .../AzureBlast.Web/Views/Shared/_Layout.cshtml | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) rename LifeSciences/AzureBlast/AzureBlast.Web/Controllers/{PoolController.cs => PoolsController.cs} (87%) rename LifeSciences/AzureBlast/AzureBlast.Web/Views/{Pool => Pools}/Index.cshtml (91%) rename LifeSciences/AzureBlast/AzureBlast.Web/Views/{Pool => Pools}/New.cshtml (95%) rename LifeSciences/AzureBlast/AzureBlast.Web/Views/{Pool => Pools}/Show.cshtml (92%) diff --git a/LifeSciences/AzureBlast/AzureBlast.Web/AzureBlast.Web.csproj b/LifeSciences/AzureBlast/AzureBlast.Web/AzureBlast.Web.csproj index 9c42eab..ca5ac44 100644 --- a/LifeSciences/AzureBlast/AzureBlast.Web/AzureBlast.Web.csproj +++ b/LifeSciences/AzureBlast/AzureBlast.Web/AzureBlast.Web.csproj @@ -296,7 +296,7 @@ - + @@ -419,12 +419,12 @@ - - + + - + diff --git a/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/DatabasesController.cs b/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/DatabasesController.cs index 855f2d8..1e1f1f5 100644 --- a/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/DatabasesController.cs +++ b/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/DatabasesController.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.Blast.Web.Controllers { public class DatabasesController : AuthorizedController { - // GET: Database + [Route("databases")] public ActionResult Index() { return View(); diff --git a/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/PoolController.cs b/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/PoolsController.cs similarity index 87% rename from LifeSciences/AzureBlast/AzureBlast.Web/Controllers/PoolController.cs rename to LifeSciences/AzureBlast/AzureBlast.Web/Controllers/PoolsController.cs index b5cdc4c..543965a 100644 --- a/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/PoolController.cs +++ b/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/PoolsController.cs @@ -5,7 +5,6 @@ using System.IO; using System.Linq; using System.Net.Mime; using System.Text; -using System.Web; using System.Web.Mvc; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Blast.Configuration; @@ -13,23 +12,24 @@ using Microsoft.Azure.Blast.Web.Models; namespace Microsoft.Azure.Blast.Web.Controllers { - public class PoolController : AuthorizedController + public class PoolsController : AuthorizedController { private readonly BlastConfiguration _configuration; private readonly BatchClient _batchClient; - public PoolController(BlastConfiguration configuration) + public PoolsController(BlastConfiguration configuration) { _configuration = configuration; _batchClient = configuration.BatchClient; } + [Route("pools")] public ActionResult Index() { return View(); } - [Route("Pool/New")] + [Route("pools/new")] public ActionResult New() { var model = new NewPoolModel @@ -39,7 +39,7 @@ namespace Microsoft.Azure.Blast.Web.Controllers return View(model); } - [Route("Pool/{poolId}")] + [Route("pools/{poolId}")] public ActionResult Show(string poolId) { var pool = _batchClient.PoolOperations.GetPool(poolId); @@ -58,7 +58,7 @@ namespace Microsoft.Azure.Blast.Web.Controllers return View(model); } - [Route("Pool/{poolId}/computenodes/{computeNodeId}/files/{fileName}/{fileExtension}")] + [Route("pools/{poolId}/computenodes/{computeNodeId}/files/{fileName}/{fileExtension}")] public ActionResult DownloadStartTaskFile(string poolId, string computeNodeId, string fileName, string fileExtension) { var pool = _batchClient.PoolOperations.GetPool(poolId); diff --git a/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/RepositoriesController.cs b/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/RepositoriesController.cs index 2886e9e..42fa541 100644 --- a/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/RepositoriesController.cs +++ b/LifeSciences/AzureBlast/AzureBlast.Web/Controllers/RepositoriesController.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Blast.Web.Controllers _externalRepositoryManager = externalRepositoryManager; } - // GET: Repositories + [Route("repositories")] public ActionResult Index(string id) { var repos = _externalRepositoryManager.ListRepositories().ToList(); diff --git a/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/Index.cshtml b/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/Index.cshtml similarity index 91% rename from LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/Index.cshtml rename to LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/Index.cshtml index ffd5260..e199e89 100644 --- a/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/Index.cshtml +++ b/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/Index.cshtml @@ -4,7 +4,7 @@

 

-Create a Pool +Create a Pool

 

@@ -48,7 +48,7 @@ contentType: false, processData: false, success: function (response) { - window.location.href = "/Pool"; + window.location.href = "/pools"; }, error: function (data) { $('#btnCreatePool').removeClass("disabled"); @@ -70,7 +70,7 @@ var tr = "\ \ - "+pool.id+"\ + "+pool.id+"\ \ \ " + displayName + "\ diff --git a/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/New.cshtml b/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/New.cshtml similarity index 95% rename from LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/New.cshtml rename to LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/New.cshtml index 6a23680..5aa4639 100644 --- a/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/New.cshtml +++ b/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/New.cshtml @@ -6,7 +6,7 @@

 

@@ -112,7 +112,7 @@ contentType: "application/json", data: request, success: function (response) { - window.location.href = "/Pool"; + window.location.href = "/pools"; }, error: function (data) { $('#btnCreatePool').removeClass("disabled"); diff --git a/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/Show.cshtml b/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/Show.cshtml similarity index 92% rename from LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/Show.cshtml rename to LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/Show.cshtml index 7b67756..778838e 100644 --- a/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pool/Show.cshtml +++ b/LifeSciences/AzureBlast/AzureBlast.Web/Views/Pools/Show.cshtml @@ -6,7 +6,7 @@

 

@@ -100,8 +100,8 @@ @(computeNode.StartTaskInformation == null ? "" : computeNode.StartTaskInformation.State.ToString()) @(computeNode.StartTaskInformation == null || computeNode.StartTaskInformation.ExitCode == null ? "" : computeNode.StartTaskInformation.ExitCode.ToString()) @(computeNode.StartTaskInformation == null || computeNode.StartTaskInformation.SchedulingError == null ? "" : string.Format("Category: {0}Code: {1}Details: {2}", computeNode.StartTaskInformation.SchedulingError.Category, computeNode.StartTaskInformation.SchedulingError.Code, string.Join(",", computeNode.StartTaskInformation.SchedulingError.Details.Select(detail => detail.Name + ": " + detail.Value)))) - @Html.ActionLink("stdout.txt", "DownloadStartTaskFile", "Pool", new { poolId = Model.Pool.Id, computeNodeId = computeNode.Id, fileName = "stdout", fileExtension = "txt" }, null) - @Html.ActionLink("stderr.txt", "DownloadStartTaskFile", "Pool", new { poolId = Model.Pool.Id, computeNodeId = computeNode.Id, fileName = "stderr" , fileExtension = "txt" }, null) + @Html.ActionLink("stdout.txt", "DownloadStartTaskFile", "Pools", new { poolId = Model.Pool.Id, computeNodeId = computeNode.Id, fileName = "stdout", fileExtension = "txt" }, null) + @Html.ActionLink("stderr.txt", "DownloadStartTaskFile", "Pools", new { poolId = Model.Pool.Id, computeNodeId = computeNode.Id, fileName = "stderr" , fileExtension = "txt" }, null) } diff --git a/LifeSciences/AzureBlast/AzureBlast.Web/Views/Shared/_Layout.cshtml b/LifeSciences/AzureBlast/AzureBlast.Web/Views/Shared/_Layout.cshtml index 58c7fd2..6ce4b02 100644 --- a/LifeSciences/AzureBlast/AzureBlast.Web/Views/Shared/_Layout.cshtml +++ b/LifeSciences/AzureBlast/AzureBlast.Web/Views/Shared/_Layout.cshtml @@ -42,7 +42,7 @@
  • @Html.ActionLink("Searches", "Index", "Searches")
  • @Html.ActionLink("Databases", "Index", "Databases")
  • @Html.ActionLink("External Repositories", "Index", "Repositories")
  • -
  • @Html.ActionLink("Pools", "Index", "Pool")
  • +
  • @Html.ActionLink("Pools", "Index", "Pools")
  • @Html.Partial("_LoginPartial")