mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Added config files
This commit is contained in:
parent
564ab7b319
commit
e9b6283e5e
8 changed files with 83 additions and 32 deletions
|
|
@ -35,7 +35,7 @@ namespace ServerManager.WebApplication.Controllers
|
|||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
[ProducesResponseType(StatusCodes.Status503ServiceUnavailable)]
|
||||
public ActionResult GetServerStatus_V1([FromRoute] string ipString, [FromRoute] int port)
|
||||
public ActionResult<ServerStatusResponse> GetServerStatus_V1([FromRoute] string ipString, [FromRoute] int port)
|
||||
{
|
||||
// check for valid service
|
||||
if (_serverQueryService == null)
|
||||
|
|
@ -70,7 +70,7 @@ namespace ServerManager.WebApplication.Controllers
|
|||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
[ProducesResponseType(StatusCodes.Status503ServiceUnavailable)]
|
||||
public ActionResult GetServerStatus_V2([FromRoute] string managerCode, [FromRoute] string ipString, [FromRoute] int port)
|
||||
public ActionResult<ServerStatusResponse> GetServerStatus_V2([FromRoute] string managerCode, [FromRoute] string ipString, [FromRoute] int port)
|
||||
{
|
||||
// check for valid service
|
||||
if (_serverQueryService == null)
|
||||
|
|
@ -105,7 +105,7 @@ namespace ServerManager.WebApplication.Controllers
|
|||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
[ProducesResponseType(StatusCodes.Status503ServiceUnavailable)]
|
||||
public ActionResult GetServerStatus_V3([FromRoute] string managerCode, [FromRoute] string managerVersion, [FromRoute] string ipString, [FromRoute] int port)
|
||||
public ActionResult<ServerStatusResponse> GetServerStatus_V3([FromRoute] string managerCode, [FromRoute] string managerVersion, [FromRoute] string ipString, [FromRoute] int port)
|
||||
{
|
||||
// check for valid service
|
||||
if (_serverQueryService == null)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<EnvironmentName>Development</EnvironmentName>
|
||||
<Configurations>Debug;Release;Debug - Beta</Configurations>
|
||||
<ApplicationIcon>Art\favicon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
|
@ -28,4 +29,16 @@
|
|||
<ProjectReference Include="..\QueryMaster\QueryMaster.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="web.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="web.Development.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="web.Production.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -5,5 +5,15 @@
|
|||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"EnableSwagger": true,
|
||||
"SwaggerRoutePrefix": "",
|
||||
|
||||
"ManagerCodes": [
|
||||
{
|
||||
"Name": "Unknown",
|
||||
"Code": "00000000-0000-0000-0000-000000000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
27
src/ServerManager.WebApplication/appsettings.Production.json
Normal file
27
src/ServerManager.WebApplication/appsettings.Production.json
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"EnableSwagger": true,
|
||||
"SwaggerRoutePrefix": "",
|
||||
|
||||
"ManagerCodes": [
|
||||
{
|
||||
"Name": "Unknown",
|
||||
"Code": "00000000-0000-0000-0000-000000000000"
|
||||
},
|
||||
{
|
||||
"Name": "Ark",
|
||||
"Code": "ED89B8FA-0E0B-46CC-A90B-595E69AE9A7E"
|
||||
},
|
||||
{
|
||||
"Name": "Conan",
|
||||
"Code": "F2653C3D-BC83-440A-AD99-FD9D9466DE04"
|
||||
},
|
||||
{
|
||||
"Name": "Dark and Light",
|
||||
"Code": "D80E19F9-33D2-4466-9177-A11506998E48"
|
||||
},
|
||||
{
|
||||
"Name": "Pantropy",
|
||||
"Code": "BE852556-BFC7-4AF2-82F3-F8A1CAF5C241"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -6,31 +6,5 @@
|
|||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"EnableSwagger": true,
|
||||
"SwaggerRoutePrefix": "",
|
||||
|
||||
"ManagerCodes": [
|
||||
{
|
||||
"Name": "Unknown",
|
||||
"Code": "00000000-0000-0000-0000-000000000000"
|
||||
},
|
||||
{
|
||||
"Name": "Ark",
|
||||
"Code": "ED89B8FA-0E0B-46CC-A90B-595E69AE9A7E"
|
||||
},
|
||||
{
|
||||
"Name": "Conan",
|
||||
"Code": "F2653C3D-BC83-440A-AD99-FD9D9466DE04"
|
||||
},
|
||||
{
|
||||
"Name": "Dark and Light",
|
||||
"Code": "D80E19F9-33D2-4466-9177-A11506998E48"
|
||||
},
|
||||
{
|
||||
"Name": "Pantropy",
|
||||
"Code": "BE852556-BFC7-4AF2-82F3-F8A1CAF5C241"
|
||||
}
|
||||
]
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
|
|
|||
12
src/ServerManager.WebApplication/web.Development.config
Normal file
12
src/ServerManager.WebApplication/web.Development.config
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- For more information on using transformations
|
||||
see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<system.webServer>
|
||||
<aspNetCore>
|
||||
<environmentVariables>
|
||||
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
|
||||
</environmentVariables>
|
||||
</aspNetCore>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
12
src/ServerManager.WebApplication/web.Production.config
Normal file
12
src/ServerManager.WebApplication/web.Production.config
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- For more information on using transformations
|
||||
see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<system.webServer>
|
||||
<aspNetCore>
|
||||
<environmentVariables>
|
||||
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
|
||||
</environmentVariables>
|
||||
</aspNetCore>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
3
src/ServerManager.WebApplication/web.config
Normal file
3
src/ServerManager.WebApplication/web.config
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
</configuration>
|
||||
Loading…
Add table
Add a link
Reference in a new issue