Rename pool -> pools controller.

This commit is contained in:
Christian Smith 2017-03-08 16:53:00 +11:00
Родитель ad125e55f8
Коммит 9cc7e8f033
8 изменённых файлов: 21 добавлений и 21 удалений

Просмотреть файл

@ -296,7 +296,7 @@
<Compile Include="Controllers\AuthorizedController.cs" />
<Compile Include="Controllers\ConfigBasedAuthorization.cs" />
<Compile Include="Controllers\ConfigBasedMvcAuthorizeAttribute.cs" />
<Compile Include="Controllers\PoolController.cs" />
<Compile Include="Controllers\PoolsController.cs" />
<Compile Include="Controllers\DatabasesController.cs" />
<Compile Include="Controllers\RepositoriesController.cs" />
<Compile Include="Controllers\SearchesController.cs" />
@ -419,12 +419,12 @@
<Content Include="Views\Searches\New.cshtml" />
<Content Include="Views\Searches\Show.cshtml" />
<Content Include="Views\Searches\Visualize.cshtml" />
<Content Include="Views\Pool\Index.cshtml" />
<Content Include="Views\Pool\New.cshtml" />
<Content Include="Views\Pools\Index.cshtml" />
<Content Include="Views\Pools\New.cshtml" />
<Content Include="Scripts\jquery-2.1.3.min.map" />
<Content Include="Views\Repositories\Index.cshtml" />
<Content Include="Views\Databases\Index.cshtml" />
<Content Include="Views\Pool\Show.cshtml" />
<Content Include="Views\Pools\Show.cshtml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AzureBlast\AzureBlast.csproj">

Просмотреть файл

@ -7,7 +7,7 @@ namespace Microsoft.Azure.Blast.Web.Controllers
{
public class DatabasesController : AuthorizedController
{
// GET: Database
[Route("databases")]
public ActionResult Index()
{
return View();

Просмотреть файл

@ -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);

Просмотреть файл

@ -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();

Просмотреть файл

@ -4,7 +4,7 @@
<p>&nbsp;</p>
<a href="/Pool/New" class="btn btn-info" role="button">Create a Pool</a>
<a href="/pools/new" class="btn btn-info" role="button">Create a Pool</a>
<p>&nbsp;</p>
@ -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 = "<tr>\
<td>\
<a href='/Pool/" + pool.id + "'>"+pool.id+"</a>\
<a href='/pools/" + pool.id + "'>"+pool.id+"</a>\
</td>\
<td> \
" + displayName + "\

Просмотреть файл

@ -6,7 +6,7 @@
<p>&nbsp;</p>
<ol class="breadcrumb">
<li><a href="/Pool">Pools</a></li>
<li><a href="/pools">Pools</a></li>
<li class="active">New Pool</li>
</ol>
@ -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");

Просмотреть файл

@ -6,7 +6,7 @@
<p>&nbsp;</p>
<ol class="breadcrumb">
<li><a href="/Pool">Pools</a></li>
<li><a href="/pools">Pools</a></li>
<li class="active">@Model.Pool.Id</li>
</ol>
@ -100,8 +100,8 @@
<td>@(computeNode.StartTaskInformation == null ? "" : computeNode.StartTaskInformation.State.ToString())</td>
<td>@(computeNode.StartTaskInformation == null || computeNode.StartTaskInformation.ExitCode == null ? "" : computeNode.StartTaskInformation.ExitCode.ToString())</td>
<td>@(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))))</td>
<td>@Html.ActionLink("stdout.txt", "DownloadStartTaskFile", "Pool", new { poolId = Model.Pool.Id, computeNodeId = computeNode.Id, fileName = "stdout", fileExtension = "txt" }, null)</td>
<td>@Html.ActionLink("stderr.txt", "DownloadStartTaskFile", "Pool", new { poolId = Model.Pool.Id, computeNodeId = computeNode.Id, fileName = "stderr" , fileExtension = "txt" }, null)</td>
<td>@Html.ActionLink("stdout.txt", "DownloadStartTaskFile", "Pools", new { poolId = Model.Pool.Id, computeNodeId = computeNode.Id, fileName = "stdout", fileExtension = "txt" }, null)</td>
<td>@Html.ActionLink("stderr.txt", "DownloadStartTaskFile", "Pools", new { poolId = Model.Pool.Id, computeNodeId = computeNode.Id, fileName = "stderr" , fileExtension = "txt" }, null)</td>
</tr>
}
</tbody>

Просмотреть файл

@ -42,7 +42,7 @@
<li>@Html.ActionLink("Searches", "Index", "Searches")</li>
<li>@Html.ActionLink("Databases", "Index", "Databases")</li>
<li>@Html.ActionLink("External Repositories", "Index", "Repositories")</li>
<li>@Html.ActionLink("Pools", "Index", "Pool")</li>
<li>@Html.ActionLink("Pools", "Index", "Pools")</li>
</ul>
@Html.Partial("_LoginPartial")
</div>