mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-13 13:22:28 +00:00
Add endpoints for status monitoring
This commit is contained in:
parent
34d0ec0337
commit
99f7dadb21
5 changed files with 54 additions and 18 deletions
|
@ -0,0 +1,12 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.API.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("/api/v1")]
|
||||
[Produces("application/json")]
|
||||
public class StatusController : ControllerBase
|
||||
{
|
||||
[HttpGet("status")]
|
||||
public IActionResult GetStatus() => this.Ok();
|
||||
}
|
|
@ -15,32 +15,32 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj"/>
|
||||
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="gitVersion.txt"/>
|
||||
<None Remove="gitVersion.txt" />
|
||||
<EmbeddedResource Include="gitVersion.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Remove="gitBranch.txt"/>
|
||||
<None Remove="gitBranch.txt" />
|
||||
<EmbeddedResource Include="gitBranch.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Remove="gitRemotes.txt"/>
|
||||
<None Remove="gitRemotes.txt" />
|
||||
<EmbeddedResource Include="gitRemotes.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Remove="gitUnpushed.txt"/>
|
||||
<None Remove="gitUnpushed.txt" />
|
||||
<EmbeddedResource Include="gitUnpushed.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="git describe --long --always --dirty --exclude=\* --abbrev=8 > "$(ProjectDir)/gitVersion.txt""/>
|
||||
<Exec Command="git branch --show-current > "$(ProjectDir)/gitBranch.txt""/>
|
||||
<Exec Command="git remote -v > "$(ProjectDir)/gitRemotes.txt""/>
|
||||
<Exec Command="git log --branches --not --remotes --oneline > "$(ProjectDir)/gitUnpushed.txt""/>
|
||||
<Exec Command="git describe --long --always --dirty --exclude=\* --abbrev=8 > "$(ProjectDir)/gitVersion.txt"" />
|
||||
<Exec Command="git branch --show-current > "$(ProjectDir)/gitBranch.txt"" />
|
||||
<Exec Command="git remote -v > "$(ProjectDir)/gitRemotes.txt"" />
|
||||
<Exec Command="git log --branches --not --remotes --oneline > "$(ProjectDir)/gitUnpushed.txt"" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("/LITTLEBIGPLANETPS3_XML")]
|
||||
[Produces("application/json")]
|
||||
public class StatusController : ControllerBase
|
||||
{
|
||||
[HttpGet("status")]
|
||||
public IActionResult GetStatus() => this.Ok();
|
||||
}
|
|
@ -10,32 +10,32 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj"/>
|
||||
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="gitVersion.txt"/>
|
||||
<None Remove="gitVersion.txt" />
|
||||
<EmbeddedResource Include="gitVersion.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Remove="gitBranch.txt"/>
|
||||
<None Remove="gitBranch.txt" />
|
||||
<EmbeddedResource Include="gitBranch.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Remove="gitRemotes.txt"/>
|
||||
<None Remove="gitRemotes.txt" />
|
||||
<EmbeddedResource Include="gitRemotes.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Remove="gitUnpushed.txt"/>
|
||||
<None Remove="gitUnpushed.txt" />
|
||||
<EmbeddedResource Include="gitUnpushed.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="git describe --long --always --dirty --exclude=\* --abbrev=8 > "$(ProjectDir)/gitVersion.txt""/>
|
||||
<Exec Command="git branch --show-current > "$(ProjectDir)/gitBranch.txt""/>
|
||||
<Exec Command="git remote -v > "$(ProjectDir)/gitRemotes.txt""/>
|
||||
<Exec Command="git log --branches --not --remotes --oneline > "$(ProjectDir)/gitUnpushed.txt""/>
|
||||
<Exec Command="git describe --long --always --dirty --exclude=\* --abbrev=8 > "$(ProjectDir)/gitVersion.txt"" />
|
||||
<Exec Command="git branch --show-current > "$(ProjectDir)/gitBranch.txt"" />
|
||||
<Exec Command="git remote -v > "$(ProjectDir)/gitRemotes.txt"" />
|
||||
<Exec Command="git log --branches --not --remotes --oneline > "$(ProjectDir)/gitUnpushed.txt"" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.Website.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("/")]
|
||||
[Produces("application/json")]
|
||||
public class StatusController : ControllerBase
|
||||
{
|
||||
[HttpGet("status")]
|
||||
public IActionResult GetStatus() => this.Ok();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue