Skip to content

Commit

Permalink
fixes some naming booboos
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-dupdyke committed Mar 1, 2024
1 parent 75fa1dc commit a184d13
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace ghosts.api.Areas.Animator.Controllers.Api
[ApiController]
[Produces("application/json")]
[Route("api/[controller]")]
public class NpcAddressesController: ControllerBase
public class NpcsAddressesController: ControllerBase
{
/// <summary>
/// Get random addressProfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ namespace ghosts.api.Areas.Animator.Controllers.Api;
[ApiController]
[Produces("application/json")]
[Route("api/[controller]")]
public class NpcController : ControllerBase
public class NpcsController : ControllerBase
{
private readonly ApplicationDbContext _context;

public NpcController(ApplicationDbContext context)
public NpcsController(ApplicationDbContext context)
{
_context = context;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ namespace ghosts.api.Areas.Animator.Controllers.Api;
[ApiController]
[Produces("application/json")]
[Route("api/[controller]/{campaign}/{enclave}")]
public class NpcEnclaveController : ControllerBase
public class NpcsEnclaveController : ControllerBase
{
private readonly ApplicationDbContext _context;

public NpcEnclaveController(ApplicationDbContext context)
public NpcsEnclaveController(ApplicationDbContext context)
{
_context = context;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ namespace ghosts.api.Areas.Animator.Controllers.Api;
[ApiController]
[Produces("application/json")]
[Route("api/[controller]")]
public class NpcGenerateController : ControllerBase
public class NpcsGenerateController : ControllerBase
{
private static readonly Logger _log = LogManager.GetCurrentClassLogger();
private readonly ApplicationDbContext _context;

public NpcGenerateController(ApplicationDbContext context)
public NpcsGenerateController(ApplicationDbContext context)
{
_context = context;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ namespace ghosts.api.Areas.Animator.Controllers.Api;
[ApiController]
[Produces("application/json")]
[Route("api/[controller]")]
public class NpcInsiderThreatController : ControllerBase
public class NpcsInsiderThreatController : ControllerBase
{
private readonly ApplicationDbContext _context;

public NpcInsiderThreatController(ApplicationDbContext context)
public NpcsInsiderThreatController(ApplicationDbContext context)
{
this._context = context;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ namespace ghosts.api.Areas.Animator.Controllers.Api;
[ApiController]
[Produces("application/json")]
[Route("api/[controller]")]
public class NpcTeamController : ControllerBase
public class NpcsTeamController : ControllerBase
{
private static readonly Logger _log = LogManager.GetCurrentClassLogger();
private readonly ApplicationDbContext _context;

public NpcTeamController(ApplicationDbContext context)
public NpcsTeamController(ApplicationDbContext context)
{
this._context = context;
}
Expand Down
22 changes: 14 additions & 8 deletions src/Ghosts.Api/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
@using System.Net.Mime
@using Ghosts.Domain.Code
@{
var request = Context.Request;
var host = request.Host.Host; // Get the host without port
var scheme = request.Scheme; // Get the scheme (http or https)
var grafanaUrl = $"{scheme}://{host}:3000"; // Construct the URL with the new port
}

<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -23,9 +29,6 @@
<a href="@Url.Action("Index", "Home", new { area = "" })?" class="me-lg-3 nav-link">GHOSTS</a>

<ul class="nav">
<li class="nav-item">
<a href="/swagger" class="nav-link" target="_blank">API Swagger</a>
</li>
<li class="nav-item">
@Html.ActionLink("Activities", "Index", "ViewActivities", new { Area = "Animator" }, new { @class = "nav-link" })
</li>
Expand All @@ -48,12 +51,15 @@
<footer class="py-3 my-4 border-top text-muted small">
<div class="container text-center text-md-start">
<div class="row justify-content-between">
<div class="col-md-3 col-lg-4 col-xl-3">
<p>CERT © 2017. All rights reserved.</p>
<div class="col-xl-6 mb-md-0">
<p>GHOSTS v<span>@ApplicationDetails.Version</span> (@ApplicationDetails.VersionFile). CERT © 2017. All rights reserved.</p>
</div>
<div class="col-md-4 col-lg-3 col-xl-3 mb-md-0 text-md-end">
<div class="col-xl-6 mb-md-0 text-md-end">
<p>
GHOSTS v<span>@ApplicationDetails.Version</span> (@ApplicationDetails.VersionFile) | <a href="https://github.com/cmu-sei/GHOSTS" target="_blank" class="link-secondary">GitHub</a> | <a href="https://cmu-sei.github.io/GHOSTS/" target="_blank" class="link-secondary">Docs</a>
<a href="/swagger" class="link-secondary" target="_blank">API Swagger</a> |
<a href="@grafanaUrl" class="link-secondary" target="_blank">Grafana</a> |
<a href="https://github.com/cmu-sei/GHOSTS" target="_blank" class="link-secondary">GitHub</a> |
<a href="https://cmu-sei.github.io/GHOSTS/" target="_blank" class="link-secondary">Docs</a>
</p>
</div>
</div>
Expand Down

0 comments on commit a184d13

Please sign in to comment.