diff --git a/Server/Controllers/PagesController.cs b/Server/Controllers/PagesController.cs deleted file mode 100644 index 8bf3f31..0000000 --- a/Server/Controllers/PagesController.cs +++ /dev/null @@ -1,79 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Filters; -using OI.Metrology.Server.Models; -using OI.Metrology.Shared.Models.Stateless; -using OI.Metrology.Shared.ViewModels; - -namespace OI.Metrology.Server.Controllers; - -public class PagesController : Controller -{ - - private readonly bool _IsTestDatabase; - private readonly AppSettings _AppSettings; - private readonly IMetrologyRepository _MetrologyRepository; - - public PagesController(AppSettings appSettings, IMetrologyRepository metrologyRepository) - { - _AppSettings = appSettings; - _MetrologyRepository = metrologyRepository; - _IsTestDatabase = appSettings.ConnectionString.Contains("test", StringComparison.InvariantCultureIgnoreCase); - } - - public override void OnActionExecuted(ActionExecutedContext context) - { - base.OnActionExecuted(context); - ViewBag.IsTestDatabase = _IsTestDatabase; - } - - private string GetApiUrl() => string.IsNullOrEmpty(_AppSettings.ApiUrl) ? Url.Content("~/") : _AppSettings.ApiUrl[0] == '~' ? Url.Content(_AppSettings.ApiUrl) : _AppSettings.ApiUrl; - - [HttpGet] - [Route("/")] - public IActionResult Index() - { - ViewBag.ApiUrl = GetApiUrl(); - return View("AwaitingDispo"); - } - - [HttpGet] - [Route("/AwaitingDispo")] - [Route("/Metrology/AwaitingDispo")] - public IActionResult AwaitingDispo() - { - ViewBag.ApiUrl = GetApiUrl(); - return View(); - } - - [HttpGet] - [Route("/RunInfo")] - [Route("/Metrology/RunInfo")] - public IActionResult RunInfo([FromQuery] int tooltypeid = 1, [FromQuery] int headerid = 0) - { - RunInfo m = new() - { - ToolTypeID = tooltypeid, - HeaderID = headerid, - HeaderAttachmentID = Guid.Empty, - }; - if (headerid > 0) - { - m.HeaderAttachmentID = _MetrologyRepository.GetHeaderAttachmentID(tooltypeid, headerid); - } - ViewBag.ApiUrl = GetApiUrl(); - return View(m); - } - - [HttpGet] - [Route("/RunHeaders")] - [Route("/Metrology/RunHeaders")] - public IActionResult RunHeaders() - { - ViewBag.ApiUrl = GetApiUrl(); - return View(); - } - - [HttpGet] - [Route("/Crash")] - public IActionResult Crash() => throw new Exception("Test unhandled exception"); -} \ No newline at end of file diff --git a/Server/Views/Pages/AwaitingDispo.cshtml b/Server/Views/Pages/AwaitingDispo.cshtml deleted file mode 100644 index b2247bb..0000000 --- a/Server/Views/Pages/AwaitingDispo.cshtml +++ /dev/null @@ -1,28 +0,0 @@ -@{ - ViewData["Title"] = "Awaiting Disposition"; -} - -
- - | -- - | -
- |
-
- |
-
- - - -
+ + + +
+ + + +
+ + | ++ + | +
+ |
+
+ |
+