mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +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.Status400BadRequest)]
|
||||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
[ProducesResponseType(StatusCodes.Status503ServiceUnavailable)]
|
[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
|
// check for valid service
|
||||||
if (_serverQueryService == null)
|
if (_serverQueryService == null)
|
||||||
|
|
@ -70,7 +70,7 @@ namespace ServerManager.WebApplication.Controllers
|
||||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
[ProducesResponseType(StatusCodes.Status503ServiceUnavailable)]
|
[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
|
// check for valid service
|
||||||
if (_serverQueryService == null)
|
if (_serverQueryService == null)
|
||||||
|
|
@ -105,7 +105,7 @@ namespace ServerManager.WebApplication.Controllers
|
||||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
[ProducesResponseType(StatusCodes.Status503ServiceUnavailable)]
|
[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
|
// check for valid service
|
||||||
if (_serverQueryService == null)
|
if (_serverQueryService == null)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
|
<EnvironmentName>Development</EnvironmentName>
|
||||||
<Configurations>Debug;Release;Debug - Beta</Configurations>
|
<Configurations>Debug;Release;Debug - Beta</Configurations>
|
||||||
<ApplicationIcon>Art\favicon.ico</ApplicationIcon>
|
<ApplicationIcon>Art\favicon.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
@ -28,4 +29,16 @@
|
||||||
<ProjectReference Include="..\QueryMaster\QueryMaster.csproj" />
|
<ProjectReference Include="..\QueryMaster\QueryMaster.csproj" />
|
||||||
</ItemGroup>
|
</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>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,15 @@
|
||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"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"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
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