diff --git a/docs/troubleshooting/visual-studio.md b/docs/troubleshooting/visual-studio.md index 8d46df73f..603a7d2d0 100644 --- a/docs/troubleshooting/visual-studio.md +++ b/docs/troubleshooting/visual-studio.md @@ -16,4 +16,13 @@ Make sure that you installed at least the ASP.NET and Web Development workloads 1. Open **Visual Studio Installer** which should've been installed together with Visual Studio 2. In the **installed** section find the card with your current Visual Studio version and click on **Modify** ![Click on Modify for your VS version](images/VSWorkloadsStep1.png){: .mt-3} -3. In the upcoming dialog make sure that inside the **Workloads** section at least the **ASP.NET** and **Web Development** workloads are checked. If not, check them now and then click on **Modify** located in the bottom right corner to install the missing workloads. ![Add the missing workloads](images/VSWorkloadsStep2.png){: .mt-3} \ No newline at end of file +3. In the upcoming dialog make sure that inside the **Workloads** section at least the **ASP.NET** and **Web Development** workloads are checked. If not, check them now and then click on **Modify** located in the bottom right corner to install the missing workloads. ![Add the missing workloads](images/VSWorkloadsStep2.png){: .mt-3} + +## Trusting Certificates + +In case you get a Trusted Certificate addition failure, clear and re-add dev certificates in the relevant dotnet project: + +``` +dotnet dev-certs https --clean +dotnet dev-certs https --trust +``` \ No newline at end of file diff --git a/src/OWS.sln b/src/OWS.sln index 99fc1cfb5..abdfbf892 100644 --- a/src/OWS.sln +++ b/src/OWS.sln @@ -33,7 +33,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OWSTests", "OWSTests\OWSTes EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OWSGlobalData", "OWSGlobalData\OWSGlobalData.csproj", "{06C26295-CDA9-4AF2-BF15-57274D0E84D3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OWSManagement", "OWSManagement\OWSManagement.csproj", "{64DBC291-970E-47F1-AC1F-94F3990649BB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OWSManagement", "OWSManagement\OWSManagement.csproj", "{3E4CB381-355C-4408-9BA1-16F2D32B19A7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -85,10 +85,10 @@ Global {06C26295-CDA9-4AF2-BF15-57274D0E84D3}.Debug|Any CPU.Build.0 = Debug|Any CPU {06C26295-CDA9-4AF2-BF15-57274D0E84D3}.Release|Any CPU.ActiveCfg = Release|Any CPU {06C26295-CDA9-4AF2-BF15-57274D0E84D3}.Release|Any CPU.Build.0 = Release|Any CPU - {64DBC291-970E-47F1-AC1F-94F3990649BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {64DBC291-970E-47F1-AC1F-94F3990649BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {64DBC291-970E-47F1-AC1F-94F3990649BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {64DBC291-970E-47F1-AC1F-94F3990649BB}.Release|Any CPU.Build.0 = Release|Any CPU + {3E4CB381-355C-4408-9BA1-16F2D32B19A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E4CB381-355C-4408-9BA1-16F2D32B19A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E4CB381-355C-4408-9BA1-16F2D32B19A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E4CB381-355C-4408-9BA1-16F2D32B19A7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/OWSData/Repositories/Implementations/MSSQL/InstanceManagementRepository.cs b/src/OWSData/Repositories/Implementations/MSSQL/InstanceManagementRepository.cs index 90a0a953f..75b47b226 100644 --- a/src/OWSData/Repositories/Implementations/MSSQL/InstanceManagementRepository.cs +++ b/src/OWSData/Repositories/Implementations/MSSQL/InstanceManagementRepository.cs @@ -85,6 +85,19 @@ public async Task GetServerInstanceFromPort(Guid cust } } + public async Task> GetActiveWorldServersByLoad(Guid customerGUID) + { + using (Connection) + { + var parameters = new DynamicParameters(); + parameters.Add("@CustomerGUID", customerGUID); + List outputWorldServers = (List)await Connection.QueryAsync(GenericQueries.GetActiveWorldServersByLoad, + parameters, + commandType: CommandType.Text); + return outputWorldServers; + } + } + public async Task> GetZoneInstancesForWorldServer(Guid customerGUID, int worldServerID) { IEnumerable output; diff --git a/src/OWSData/Repositories/Implementations/MySQL/InstanceManagementRepository.cs b/src/OWSData/Repositories/Implementations/MySQL/InstanceManagementRepository.cs index e017dad92..ba0c87ead 100644 --- a/src/OWSData/Repositories/Implementations/MySQL/InstanceManagementRepository.cs +++ b/src/OWSData/Repositories/Implementations/MySQL/InstanceManagementRepository.cs @@ -11,6 +11,7 @@ using OWSData.Repositories.Interfaces; using OWSData.SQL; using OWSShared.Options; +using OWSData.Models.Tables; namespace OWSData.Repositories.Implementations.MySQL { @@ -77,6 +78,19 @@ public async Task GetServerInstanceFromPort(Guid cust } } + public async Task> GetActiveWorldServersByLoad(Guid customerGUID) + { + using (Connection) + { + var parameters = new DynamicParameters(); + parameters.Add("@CustomerGUID", customerGUID); + List outputWorldServers = (List)await Connection.QueryAsync(GenericQueries.GetActiveWorldServersByLoad, + parameters, + commandType: CommandType.Text); + return outputWorldServers; + } + } + public async Task> GetZoneInstancesForWorldServer(Guid customerGUID, int worldServerID) { IEnumerable output; diff --git a/src/OWSData/Repositories/Implementations/Postgres/InstanceManagementRepository.cs b/src/OWSData/Repositories/Implementations/Postgres/InstanceManagementRepository.cs index 3bcb9100e..208d4cc57 100644 --- a/src/OWSData/Repositories/Implementations/Postgres/InstanceManagementRepository.cs +++ b/src/OWSData/Repositories/Implementations/Postgres/InstanceManagementRepository.cs @@ -11,6 +11,7 @@ using OWSData.Repositories.Interfaces; using OWSData.SQL; using OWSShared.Options; +using OWSData.Models.Tables; namespace OWSData.Repositories.Implementations.Postgres { @@ -77,6 +78,19 @@ public async Task GetServerInstanceFromPort(Guid cust } } + public async Task> GetActiveWorldServersByLoad(Guid customerGUID) + { + using (Connection) + { + var parameters = new DynamicParameters(); + parameters.Add("@CustomerGUID", customerGUID); + List outputWorldServers = (List)await Connection.QueryAsync(GenericQueries.GetActiveWorldServersByLoad, + parameters, + commandType: CommandType.Text); + return outputWorldServers; + } + } + public async Task> GetZoneInstancesForWorldServer(Guid customerGUID, int worldServerID) { IEnumerable output; diff --git a/src/OWSData/Repositories/Interfaces/IInstanceManagementRepository.cs b/src/OWSData/Repositories/Interfaces/IInstanceManagementRepository.cs index 63dc9442e..e903f71d7 100644 --- a/src/OWSData/Repositories/Interfaces/IInstanceManagementRepository.cs +++ b/src/OWSData/Repositories/Interfaces/IInstanceManagementRepository.cs @@ -1,5 +1,6 @@ using OWSData.Models.Composites; using OWSData.Models.StoredProcs; +using OWSData.Models.Tables; using System; using System.Collections.Generic; using System.Text; @@ -11,6 +12,7 @@ public interface IInstanceManagementRepository { Task GetZoneInstance(Guid customerGUID, int zoneInstanceId); Task GetServerInstanceFromPort(Guid customerGUID, string serverIP, int port); + Task> GetActiveWorldServersByLoad(Guid customerGUID); Task> GetZoneInstancesForWorldServer(Guid customerGUID, int worldServerID); Task SetZoneInstanceStatus(Guid customerGUID, int zoneInstanceID, int instanceStatus); Task ShutDownWorldServer(Guid customerGUID, int worldServerID); diff --git a/src/OWSData/SQL/MSSQLQueries.cs b/src/OWSData/SQL/MSSQLQueries.cs index 15254a680..dee50fc25 100644 --- a/src/OWSData/SQL/MSSQLQueries.cs +++ b/src/OWSData/SQL/MSSQLQueries.cs @@ -53,8 +53,10 @@ FROM Users U WHERE U.CustomerGUID=@CustomerGUID AND U.UserGUID=@UserGUID"; - public static readonly string GetUserFromEmailSQL = @"SELECT U.Email, U.FirstName, U.LastName, U.CreateDate, U.LastAccess, U.Role + public static readonly string GetUserFromEmailSQL = @"SELECT U.Email, U.FirstName, U.LastName, U.CreateDate, U.LastAccess, U.Role, US.UserSessionGUID FROM Users U + LEFT JOIN UserSessions US + ON U.UserGUID=US.UserGUID WHERE U.CustomerGUID=@CustomerGUID AND U.Email=@Email"; diff --git a/src/OWSData/SQL/MySQLQueries.cs b/src/OWSData/SQL/MySQLQueries.cs index 7fe337448..dec5de715 100644 --- a/src/OWSData/SQL/MySQLQueries.cs +++ b/src/OWSData/SQL/MySQLQueries.cs @@ -46,8 +46,10 @@ FROM Users U WHERE U.CustomerGUID=@CustomerGUID AND U.UserGUID=@UserGUID"; - public static readonly string GetUserFromEmailSQL = @"SELECT U.Email, U.FirstName, U.LastName, U.CreateDate, U.LastAccess, U.Role + public static readonly string GetUserFromEmailSQL = @"SELECT U.Email, U.FirstName, U.LastName, U.CreateDate, U.LastAccess, U.Role, US.UserSessionGUID FROM Users U + LEFT JOIN UserSessions US + ON U.UserGUID=US.UserGUID WHERE U.CustomerGUID=@CustomerGUID AND U.Email=@Email"; diff --git a/src/OWSData/SQL/PostgresQueries.cs b/src/OWSData/SQL/PostgresQueries.cs index 1f897fe3e..14ce7fa83 100644 --- a/src/OWSData/SQL/PostgresQueries.cs +++ b/src/OWSData/SQL/PostgresQueries.cs @@ -56,8 +56,10 @@ FROM Users U WHERE U.CustomerGUID=@CustomerGUID::UUID AND U.UserGUID=@UserGUID"; - public static readonly string GetUserFromEmailSQL = @"SELECT U.Email, U.FirstName, U.LastName, U.CreateDate, U.LastAccess, U.Role + public static readonly string GetUserFromEmailSQL = @"SELECT U.Email, U.FirstName, U.LastName, U.CreateDate, U.LastAccess, U.Role, US.UserSessionGUID FROM Users U + LEFT JOIN UserSessions US + ON U.UserGUID=US.UserGUID WHERE U.CustomerGUID=@CustomerGUID::UUID AND U.Email=@Email"; diff --git a/src/OWSInstanceLauncher/Properties/launchSettings.json b/src/OWSInstanceLauncher/Properties/launchSettings.json index c9105ed54..aee6885d9 100644 --- a/src/OWSInstanceLauncher/Properties/launchSettings.json +++ b/src/OWSInstanceLauncher/Properties/launchSettings.json @@ -1,12 +1,4 @@ { - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:52758/", - "sslPort": 44306 - } - }, "profiles": { "IIS Express": { "commandName": "IISExpress", @@ -22,6 +14,24 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "applicationUrl": "https://localhost:5001;http://localhost:5000" + }, + "WSL": { + "commandName": "WSL2", + "launchBrowser": true, + "launchUrl": "https://localhost:5001", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000" + }, + "distributionName": "" + } + }, + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:52758/", + "sslPort": 44306 } } } \ No newline at end of file diff --git a/src/OWSManagement/.dockerignore b/src/OWSManagement/.dockerignore index dc1bfc4e8..75d94cf19 100644 --- a/src/OWSManagement/.dockerignore +++ b/src/OWSManagement/.dockerignore @@ -1,4 +1,4 @@ -bin/ -obj/ +**/bin +**/obj wwwroot/dist wwwroot/node_modules diff --git a/src/OWSManagement/Components/App.razor b/src/OWSManagement/Components/App.razor new file mode 100644 index 000000000..0ca806535 --- /dev/null +++ b/src/OWSManagement/Components/App.razor @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/OWSManagement/Components/Layout/MainLayout.razor b/src/OWSManagement/Components/Layout/MainLayout.razor new file mode 100644 index 000000000..9abc97225 --- /dev/null +++ b/src/OWSManagement/Components/Layout/MainLayout.razor @@ -0,0 +1,20 @@ +@inherits LayoutComponentBase + +
+ + +
+
+ @Body +
+ +
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
diff --git a/src/OWSManagement/Components/Layout/MainLayout.razor.css b/src/OWSManagement/Components/Layout/MainLayout.razor.css new file mode 100644 index 000000000..038baf178 --- /dev/null +++ b/src/OWSManagement/Components/Layout/MainLayout.razor.css @@ -0,0 +1,96 @@ +.page { + position: relative; + display: flex; + flex-direction: column; +} + +main { + flex: 1; +} + +.sidebar { + background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); +} + +.top-row { + background-color: #f7f7f7; + border-bottom: 1px solid #d6d5d5; + justify-content: flex-end; + height: 3.5rem; + display: flex; + align-items: center; +} + + .top-row ::deep a, .top-row ::deep .btn-link { + white-space: nowrap; + margin-left: 1.5rem; + text-decoration: none; + } + + .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { + text-decoration: underline; + } + + .top-row ::deep a:first-child { + overflow: hidden; + text-overflow: ellipsis; + } + +@media (max-width: 640.98px) { + .top-row { + justify-content: space-between; + } + + .top-row ::deep a, .top-row ::deep .btn-link { + margin-left: 0; + } +} + +@media (min-width: 641px) { + .page { + flex-direction: row; + } + + .sidebar { + width: 250px; + height: 100vh; + position: sticky; + top: 0; + } + + .top-row { + position: sticky; + top: 0; + z-index: 1; + } + + .top-row.auth ::deep a:first-child { + flex: 1; + text-align: right; + width: 0; + } + + .top-row, article { + padding-left: 2rem !important; + padding-right: 1.5rem !important; + } +} + +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } diff --git a/src/OWSManagement/Components/Layout/NavMenu.razor b/src/OWSManagement/Components/Layout/NavMenu.razor new file mode 100644 index 000000000..dceb3de68 --- /dev/null +++ b/src/OWSManagement/Components/Layout/NavMenu.razor @@ -0,0 +1,60 @@ + + + + + + diff --git a/src/OWSManagement/Components/Layout/NavMenu.razor.css b/src/OWSManagement/Components/Layout/NavMenu.razor.css new file mode 100644 index 000000000..fdef6b399 --- /dev/null +++ b/src/OWSManagement/Components/Layout/NavMenu.razor.css @@ -0,0 +1,104 @@ +.navbar-toggler { + appearance: none; + cursor: pointer; + width: 3.5rem; + height: 2.5rem; + color: white; + position: absolute; + top: 0.5rem; + right: 1rem; + border: 1px solid rgba(255, 255, 255, 0.1); + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1); +} + +.navbar-toggler:checked { + background-color: rgba(255, 255, 255, 0.5); +} + +.top-row { + height: 3.5rem; + background-color: rgba(0,0,0,0.4); +} + +.navbar-brand { + font-size: 1.1rem; +} + +.bi { + display: inline-block; + position: relative; + width: 1.25rem; + margin-right: 0.75rem; + top: -1px; + background-size: cover; +} + +.bi-house-door-fill-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E"); +} + +.bi-plus-square-fill-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E"); +} + +.bi-list-nested-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E"); +} + +.nav-item { + font-size: 0.9rem; + padding-bottom: 0.5rem; +} + + .nav-item:first-of-type { + padding-top: 1rem; + } + + .nav-item:last-of-type { + padding-bottom: 1rem; + } + + .nav-item ::deep .nav-link { + color: #d7d7d7; + background: none; + border: none; + border-radius: 4px; + height: 3rem; + display: flex; + align-items: center; + line-height: 3rem; + width: 100%; + } + +.nav-item ::deep a.active { + background-color: rgba(255,255,255,0.37); + color: white; +} + +.nav-item ::deep .nav-link:hover { + background-color: rgba(255,255,255,0.1); + color: white; +} + +.nav-scrollable { + display: none; +} + +.navbar-toggler:checked ~ .nav-scrollable { + display: block; +} + +@media (min-width: 641px) { + .navbar-toggler { + display: none; + } + + .nav-scrollable { + /* Never collapse the sidebar for wide screens */ + display: block; + + /* Allow sidebar to scroll for tall menus */ + height: calc(100vh - 3.5rem); + overflow-y: auto; + } +} diff --git a/src/OWSManagement/Components/Pages/Characters.razor b/src/OWSManagement/Components/Pages/Characters.razor new file mode 100644 index 000000000..203278a35 --- /dev/null +++ b/src/OWSManagement/Components/Pages/Characters.razor @@ -0,0 +1,58 @@ +@page "/characters" +@using OWSManagement.Services +@using OWSData.Models.StoredProcs; +@using System.Text.Json +@using System.Text.Json.Serialization +@using System.Text +@inject IHttpClientFactory ClientFactory +@inject IConfiguration Configuration +@inject ICharactersService CharactersService + +Characters + +

Characters

+ +

Search for user email addresses to see characters.

+ + + Placeholder + + + + +@if (characters == null) +{ +

Loading... Try searching for a new email address

+} +else +{ + + + + + + + + +} + +@code { + [SupplyParameterFromQuery] + public string? Email { get; set; } = ""; + + private IEnumerable? characters; + + public async Task NewSearch() + { + if (!string.IsNullOrWhiteSpace(Email)) + { + characters = await CharactersService.GetCharactersAsync(Email)!; + } + } + + protected override async Task OnInitializedAsync() + { + await NewSearch(); + } +} diff --git a/src/OWSManagement/Components/Pages/Dashboard.razor b/src/OWSManagement/Components/Pages/Dashboard.razor new file mode 100644 index 000000000..d678b11df --- /dev/null +++ b/src/OWSManagement/Components/Pages/Dashboard.razor @@ -0,0 +1,29 @@ +@page "/" + +Home + + +
+
+ +

Open World Server 2

+

By SabreDartStudios

+
+ + + + + + +
+
+
+
+ + diff --git a/src/OWSManagement/Components/Pages/Error.razor b/src/OWSManagement/Components/Pages/Error.razor new file mode 100644 index 000000000..576cc2d2f --- /dev/null +++ b/src/OWSManagement/Components/Pages/Error.razor @@ -0,0 +1,36 @@ +@page "/Error" +@using System.Diagnostics + +Error + +

Error.

+

An error occurred while processing your request.

+ +@if (ShowRequestId) +{ +

+ Request ID: @RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/src/OWSManagement/Components/Pages/GlobalData.razor b/src/OWSManagement/Components/Pages/GlobalData.razor new file mode 100644 index 000000000..836d35ba5 --- /dev/null +++ b/src/OWSManagement/Components/Pages/GlobalData.razor @@ -0,0 +1,22 @@ +@page "/global-data" +@using OWSManagement.Services +@using OWSData.Models.Tables +@using System.Text.Json +@using System.Text.Json.Serialization +@using System.Text +@inject IHttpClientFactory ClientFactory +@inject IConfiguration Configuration + +Global Data + +

Global Data

+ +

This component demonstrates showing data.

+ +@code { + + protected override async Task OnInitializedAsync() + { + + } +} diff --git a/src/OWSManagement/Components/Pages/Settings.razor b/src/OWSManagement/Components/Pages/Settings.razor new file mode 100644 index 000000000..8ed34a8de --- /dev/null +++ b/src/OWSManagement/Components/Pages/Settings.razor @@ -0,0 +1,22 @@ +@page "/settings" +@using OWSManagement.Services +@using OWSData.Models.Tables +@using System.Text.Json +@using System.Text.Json.Serialization +@using System.Text +@inject IHttpClientFactory ClientFactory +@inject IConfiguration Configuration + +Settings + +

Settings

+ +

This component demonstrates showing data.

+ +@code { + + protected override async Task OnInitializedAsync() + { + + } +} diff --git a/src/OWSManagement/Components/Pages/Users.razor b/src/OWSManagement/Components/Pages/Users.razor new file mode 100644 index 000000000..380b69973 --- /dev/null +++ b/src/OWSManagement/Components/Pages/Users.razor @@ -0,0 +1,80 @@ +@page "/users" +@using OWSManagement.Components.Templates +@using OWSManagement.DTOs +@using OWSManagement.Services +@using OWSData.Models.Tables +@using System.Text.Json +@using System.Text.Json.Serialization +@using System.Text +@inject IHttpClientFactory ClientFactory +@inject IConfiguration Configuration +@inject IUsersService UsersService +@inject DialogService DialogService + +Users + + +

+ Users +

+ +
+ +@if (users == null) +{ +

Loading...

+} +else +{ + + + + + + + + + + + +} + +@code { + private IEnumerable? users; + + AddUserDTO addUser = new AddUserDTO(); + + protected override async Task OnInitializedAsync() + { + users = await UsersService.GetUsersAsync(); + } + + public async Task OpenEditUser(EditUserDTO editUser) + { + await DialogService.OpenSideAsync($"Edit User", + new Dictionary() { { "User", editUser } }, + new SideDialogOptions() { Style = "top: 0;", Width = "50%", ShowMask = false, Position = DialogPosition.Right }); + + users = await UsersService.GetUsersAsync(); + } + + public async Task OpenAddUser() + { + await DialogService.OpenSideAsync($"Add User", + new Dictionary() { { "User", addUser } }, + new SideDialogOptions() { Style = "top: 0;", Width = "50%", ShowMask = false, Position = DialogPosition.Right }); + + users = await UsersService.GetUsersAsync(); + } +} diff --git a/src/OWSManagement/Components/Pages/WorldServers.razor b/src/OWSManagement/Components/Pages/WorldServers.razor new file mode 100644 index 000000000..efa4e2c6b --- /dev/null +++ b/src/OWSManagement/Components/Pages/WorldServers.razor @@ -0,0 +1,39 @@ +@page "/world-servers" +@using OWSManagement.Services +@using OWSData.Models.Tables +@using System.Text.Json +@using System.Text.Json.Serialization +@using System.Text +@inject IHttpClientFactory ClientFactory +@inject IConfiguration Configuration +@inject IInstanceManagementService InstanceManagementService + +World Servers + +

World Servers

+ +@if (worldServers == null) +{ +

Loading...

+} +else +{ + + + + + + + + +} + +@code { + private IEnumerable? worldServers; + + protected override async Task OnInitializedAsync() + { + worldServers = await InstanceManagementService.GetWorldServersAsync(); + } +} diff --git a/src/OWSManagement/Components/Pages/ZoneInstances.razor b/src/OWSManagement/Components/Pages/ZoneInstances.razor new file mode 100644 index 000000000..8cea22d95 --- /dev/null +++ b/src/OWSManagement/Components/Pages/ZoneInstances.razor @@ -0,0 +1,22 @@ +@page "/zone-instances" +@using OWSManagement.Services +@using OWSData.Models.Tables +@using System.Text.Json +@using System.Text.Json.Serialization +@using System.Text +@inject IHttpClientFactory ClientFactory +@inject IConfiguration Configuration + +Zone Instances + +

Zone Instances

+ +

This component demonstrates showing data.

+ +@code { + + protected override async Task OnInitializedAsync() + { + + } +} diff --git a/src/OWSManagement/Components/Pages/Zones.razor b/src/OWSManagement/Components/Pages/Zones.razor new file mode 100644 index 000000000..4aeeb3917 --- /dev/null +++ b/src/OWSManagement/Components/Pages/Zones.razor @@ -0,0 +1,22 @@ +@page "/zones" +@using OWSManagement.Services +@using OWSData.Models.Tables +@using System.Text.Json +@using System.Text.Json.Serialization +@using System.Text +@inject IHttpClientFactory ClientFactory +@inject IConfiguration Configuration + +Zones + +

Zones

+ +

This component demonstrates showing data.

+ +@code { + + protected override async Task OnInitializedAsync() + { + + } +} diff --git a/src/OWSManagement/Components/Routes.razor b/src/OWSManagement/Components/Routes.razor new file mode 100644 index 000000000..f756e19df --- /dev/null +++ b/src/OWSManagement/Components/Routes.razor @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/OWSManagement/Components/Templates/AddUserTemplate.razor b/src/OWSManagement/Components/Templates/AddUserTemplate.razor new file mode 100644 index 000000000..ef1a0de64 --- /dev/null +++ b/src/OWSManagement/Components/Templates/AddUserTemplate.razor @@ -0,0 +1,61 @@ +@page "/users/add/{user}" +@using OWSManagement.DTOs +@using OWSManagement.Services +@inject IUsersService UsersService + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@code { + + [Parameter] public AddUserDTO? user { get; set; } + [Inject] DialogService? Service { get; set; } + + async Task AddUser(AddUserDTO arg) + { + await UsersService.AddUserAsync(arg); + Service!.CloseSide(); + } +} diff --git a/src/OWSManagement/Components/Templates/EditUserTemplate.razor b/src/OWSManagement/Components/Templates/EditUserTemplate.razor new file mode 100644 index 000000000..9945ef23c --- /dev/null +++ b/src/OWSManagement/Components/Templates/EditUserTemplate.razor @@ -0,0 +1,58 @@ +@page "/users/edit/{user}" +@using OWSManagement.DTOs +@using OWSManagement.Services +@inject IUsersService UsersService + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@code { + + [Parameter] public EditUserDTO? user { get; set; } + [Inject] DialogService? Service { get; set; } + + async Task EditUser (EditUserDTO arg) + { + await UsersService.EditUserAsync(arg); + Service!.CloseSide(); + } +} diff --git a/src/OWSManagement/Components/_Imports.razor b/src/OWSManagement/Components/_Imports.razor new file mode 100644 index 000000000..53afac75c --- /dev/null +++ b/src/OWSManagement/Components/_Imports.razor @@ -0,0 +1,12 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using static Microsoft.AspNetCore.Components.Web.RenderMode +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using Radzen +@using Radzen.Blazor +@using OWSManagement +@using OWSManagement.Components diff --git a/src/OWSManagement/Controllers/SystemController.cs b/src/OWSManagement/Controllers/SystemController.cs deleted file mode 100644 index 5febba1b0..000000000 --- a/src/OWSManagement/Controllers/SystemController.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using System.Threading.Tasks; - -namespace OWSManagement.Controllers -{ - /// - /// Public System API calls. - /// - /// - /// Contains system related API calls that are all publicly accessible. - /// - [Route("api/[controller]")] - [ApiController] - public class SystemController : Controller - { - /// - /// Gets the Api Status. - /// - /// - /// Get the Api Status and return true - /// - [HttpGet] - [Route("Status")] - public IActionResult Status() - { - return Ok(true); - } - } -} diff --git a/src/OWSManagement/Controllers/UsersController.cs b/src/OWSManagement/Controllers/UsersController.cs deleted file mode 100644 index 60feeccf6..000000000 --- a/src/OWSManagement/Controllers/UsersController.cs +++ /dev/null @@ -1,86 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Filters; -using OWSData.Models.Composites; -using OWSData.Models.Tables; -using OWSData.Repositories.Interfaces; -using OWSManagement.DTOs; -using OWSManagement.Requests.Users; -using OWSShared.Interfaces; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace OWSManagement.Controllers -{ - [Route("api/[controller]")] - [ApiController] - public class UsersController : Controller - { - private readonly IHeaderCustomerGUID _customerGuid; - private readonly IUsersRepository _usersRepository; - - public UsersController(IHeaderCustomerGUID customerGuid, IUsersRepository usersRepository) - { - _customerGuid = customerGuid; - _usersRepository = usersRepository; - } - - public override void OnActionExecuting(ActionExecutingContext context) - { - if (_customerGuid.CustomerGUID == Guid.Empty) - { - context.Result = new UnauthorizedResult(); - } - } - - - /// - /// Get all Users - /// - /// - /// Gets a list of all users for this CustomerGUID - /// - [HttpGet] - [Route("")] - [Produces(typeof(IEnumerable))] - public async Task> Get() - { - GetUsersRequest getUsersRequest = new GetUsersRequest(_customerGuid.CustomerGUID, _usersRepository); - - return await getUsersRequest.Handle(); - } - - /// - /// Add a User - /// - /// - /// Adds a new user - /// - [HttpPost] - [Route("")] - [Produces(typeof(SuccessAndErrorMessage))] - public async Task Post([FromBody] AddUserDTO addUserDTO) - { - AddUserRequest addUserRequest = new AddUserRequest(_customerGuid.CustomerGUID, addUserDTO, _usersRepository); - - return await addUserRequest.Handle(); - } - - /// - /// Edit a User - /// - /// - /// Edit an existing user. Don't allow editing of the password. - /// - [HttpPut] - [Route("")] - [Produces(typeof(SuccessAndErrorMessage))] - public async Task Put([FromBody] EditUserDTO editUserDTO) - { - EditUserRequest editUserRequest = new EditUserRequest(_customerGuid.CustomerGUID, editUserDTO, _usersRepository); - - return await editUserRequest.Handle(); - } - } -} diff --git a/src/OWSManagement/DTOs/AddUserDTO.cs b/src/OWSManagement/DTOs/AddUserDTO.cs index 204c5c491..71761e9d6 100644 --- a/src/OWSManagement/DTOs/AddUserDTO.cs +++ b/src/OWSManagement/DTOs/AddUserDTO.cs @@ -2,9 +2,9 @@ { public class AddUserDTO { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - public string Password { get; set; } + public string? FirstName { get; set; } + public string? LastName { get; set; } + public string? Email { get; set; } + public string? Password { get; set; } } } diff --git a/src/OWSManagement/DTOs/EditUserDTO.cs b/src/OWSManagement/DTOs/EditUserDTO.cs index 1479ddc24..bced4655f 100644 --- a/src/OWSManagement/DTOs/EditUserDTO.cs +++ b/src/OWSManagement/DTOs/EditUserDTO.cs @@ -1,12 +1,10 @@ -using System; - -namespace OWSManagement.DTOs +namespace OWSManagement.DTOs { public class EditUserDTO { public Guid UserGUID { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } + public string? FirstName { get; set; } + public string? LastName { get; set; } + public string? Email { get; set; } } } diff --git a/src/OWSManagement/Dockerfile b/src/OWSManagement/Dockerfile index aae152061..383ff8703 100644 --- a/src/OWSManagement/Dockerfile +++ b/src/OWSManagement/Dockerfile @@ -1,31 +1,25 @@ -#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. +#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +USER app WORKDIR /app -EXPOSE 80 -EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["OWSManagement/OWSManagement.csproj", "OWSManagement/"] -COPY ["OWSShared/OWSShared.csproj", "OWSShared/"] COPY ["OWSData/OWSData.csproj", "OWSData/"] -RUN dotnet restore "OWSManagement/OWSManagement.csproj" +COPY ["OWSShared/OWSShared.csproj", "OWSShared/"] +RUN dotnet restore "./OWSManagement/./OWSManagement.csproj" COPY . . WORKDIR "/src/OWSManagement" -RUN dotnet build "OWSManagement.csproj" -c Release -o /app/build - -FROM node:latest as build-node -WORKDIR /wwwroot -COPY --from=build /src/OWSManagement/wwwroot . -RUN npm install -RUN npm run build +RUN dotnet build "./OWSManagement.csproj" -c $BUILD_CONFIGURATION -o /app/build FROM build AS publish -RUN dotnet publish "OWSManagement.csproj" -c Release -o /app/publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./OWSManagement.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -COPY --from=build-node /wwwroot/dist ./wwwroot/dist ENTRYPOINT ["dotnet", "OWSManagement.dll"] \ No newline at end of file diff --git a/src/OWSManagement/Dockerfile.original b/src/OWSManagement/Dockerfile.original new file mode 100644 index 000000000..91801c7c3 --- /dev/null +++ b/src/OWSManagement/Dockerfile.original @@ -0,0 +1,24 @@ +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY ["OWSManagement/OWSManagement.csproj", "OWSManagement/"] +COPY ["OWSShared/OWSShared.csproj", "OWSShared/"] +COPY ["OWSData/OWSData.csproj", "OWSData/"] +RUN dotnet restore "OWSManagement/OWSManagement.csproj" +COPY . . +WORKDIR "/src/OWSManagement" +RUN dotnet build "OWSManagement.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "OWSManagement.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "OWSManagement.dll"] \ No newline at end of file diff --git a/src/OWSManagement/OWSManagement.csproj b/src/OWSManagement/OWSManagement.csproj index 576c8a98a..cd52989d5 100644 --- a/src/OWSManagement/OWSManagement.csproj +++ b/src/OWSManagement/OWSManagement.csproj @@ -1,64 +1,20 @@ - + - net6.0 - 9805f064-639a-42e6-9e13-a99860a79187 + net8.0 + enable + enable Linux - ..\docker-compose.dcproj - false - true - 4.5 - wwwroot/dist/** - wwwroot\ - $(DefaultItemExcludes);$(SpaRoot)node_modules\** - http://localhost:5173 - npm run dev + b41953bb-9d91-4959-8737-00291b717854 - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - diff --git a/src/OWSManagement/OWSManagement.xml b/src/OWSManagement/OWSManagement.xml deleted file mode 100644 index 98d932879..000000000 --- a/src/OWSManagement/OWSManagement.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - OWSManagement - - - - - Public System API calls. - - - Contains system related API calls that are all publicly accessible. - - - - - Gets the Api Status. - - - Get the Api Status and return true - - - - diff --git a/src/OWSManagement/Program.cs b/src/OWSManagement/Program.cs index 67a55dbc2..8bc787d31 100644 --- a/src/OWSManagement/Program.cs +++ b/src/OWSManagement/Program.cs @@ -1,30 +1,65 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.Hosting.StaticWebAssets; +using OWSData.Repositories.Interfaces; +using OWSManagement.Components; +using OWSManagement.Services; +using Radzen; +var builder = WebApplication.CreateBuilder(args); +// Add services to the container. +builder.Services.AddRazorComponents() + .AddInteractiveServerComponents(); +builder.Services.AddHttpClient(); +builder.Services.AddRadzenComponents(); -namespace OWSManagement +StaticWebAssetsLoader.UseStaticWebAssets(builder.Environment, builder.Configuration); //Add this + +var Configuration = new ConfigurationBuilder() + .AddJsonFile("appsettings.json") + .AddEnvironmentVariables() + .Build(); + +builder.Services.Configure(Configuration.GetSection(OWSShared.Options.StorageOptions.SectionName)); + +var OWSStorageConfig = Configuration.GetSection("OWSStorageConfig"); +if (OWSStorageConfig.Exists()) { - public class Program + string dbBackend = OWSStorageConfig.GetValue("OWSDBBackend"); + + switch (dbBackend) { - public static void Main(string[] args) - { - try - { - CreateHostBuilder(args).Build().Run(); - } - catch - { - throw; - } - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureLogging((hostContext, builder) => - { - builder.ClearProviders(); - builder.AddConsole(); - }) - .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); + case "postgres": + builder.Services.AddTransient(); + builder.Services.AddTransient(); + builder.Services.AddTransient(); + break; + case "mysql": + builder.Services.AddTransient(); + builder.Services.AddTransient(); + builder.Services.AddTransient(); + break; + default: // Default to MSSQL + builder.Services.AddTransient(); + builder.Services.AddTransient(); + builder.Services.AddTransient(); + break; } -} \ No newline at end of file +} + +builder.Services.AddSingleton(); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error", createScopeForErrors: true); +} + +app.UseStaticFiles(); +app.UseAntiforgery(); + +app.MapRazorComponents() + .AddInteractiveServerRenderMode(); + +app.Run(); diff --git a/src/OWSManagement/Properties/launchSettings.json b/src/OWSManagement/Properties/launchSettings.json index 16d677f74..5db29daa3 100644 --- a/src/OWSManagement/Properties/launchSettings.json +++ b/src/OWSManagement/Properties/launchSettings.json @@ -1,29 +1,17 @@ { - "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:45135", - "sslPort": 44367 - } - }, "profiles": { - "OWSManagement": { + "http": { "commandName": "Project", "launchBrowser": true, - "launchUrl": "", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + "ASPNETCORE_ENVIRONMENT": "Development" }, - "applicationUrl": "http://localhost:5205", - "dotnetRunMessages": true + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:5103" }, "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, - "launchUrl": "swagger", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -31,9 +19,20 @@ "Docker": { "commandName": "Docker", "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger", - "publishAllPorts": true, - "useSSL": true + "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", + "environmentVariables": { + "ASPNETCORE_HTTP_PORTS": "8080" + }, + "publishAllPorts": true + } + }, + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:60090", + "sslPort": 0 } } } \ No newline at end of file diff --git a/src/OWSManagement/Requests/Users/AddUserRequest.cs b/src/OWSManagement/Requests/Users/AddUserRequest.cs deleted file mode 100644 index fafe8ca9a..000000000 --- a/src/OWSManagement/Requests/Users/AddUserRequest.cs +++ /dev/null @@ -1,30 +0,0 @@ -using OWSData.Models.Composites; -using OWSData.Models.Tables; -using OWSData.Repositories.Interfaces; -using OWSManagement.DTOs; -using System; -using System.Reflection.Metadata; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; - -namespace OWSManagement.Requests.Users -{ - public class AddUserRequest - { - private readonly Guid _customerGuid; - private AddUserDTO _addUserDTO { get; set; } - private readonly IUsersRepository _usersRepository; - - public AddUserRequest(Guid customerGuid, AddUserDTO addUserDTO, IUsersRepository usersRepository) - { - _customerGuid = customerGuid; - _addUserDTO = addUserDTO; - _usersRepository = usersRepository; - } - - public async Task Handle() - { - return await _usersRepository.RegisterUser(_customerGuid, _addUserDTO.Email, _addUserDTO.Password, _addUserDTO.FirstName, _addUserDTO.LastName); - } - } -} diff --git a/src/OWSManagement/Requests/Users/EditUserRequest.cs b/src/OWSManagement/Requests/Users/EditUserRequest.cs deleted file mode 100644 index 5ff7f05d8..000000000 --- a/src/OWSManagement/Requests/Users/EditUserRequest.cs +++ /dev/null @@ -1,27 +0,0 @@ -using OWSData.Models.Composites; -using OWSData.Repositories.Interfaces; -using OWSManagement.DTOs; -using System.Threading.Tasks; -using System; - -namespace OWSManagement.Requests.Users -{ - public class EditUserRequest - { - private readonly Guid _customerGuid; - private EditUserDTO _editUserDTO { get; set; } - private readonly IUsersRepository _usersRepository; - - public EditUserRequest(Guid customerGuid, EditUserDTO editUserDTO, IUsersRepository usersRepository) - { - _customerGuid = customerGuid; - _editUserDTO = editUserDTO; - _usersRepository = usersRepository; - } - - public async Task Handle() - { - return await _usersRepository.UpdateUser(_customerGuid, _editUserDTO.UserGUID, _editUserDTO.FirstName, _editUserDTO.LastName, _editUserDTO.Email); - } - } -} diff --git a/src/OWSManagement/Requests/Users/GetUsersRequest.cs b/src/OWSManagement/Requests/Users/GetUsersRequest.cs deleted file mode 100644 index 1ebdef28c..000000000 --- a/src/OWSManagement/Requests/Users/GetUsersRequest.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.CodeAnalysis.CSharp; -using OWSData.Models.Tables; -using OWSData.Repositories.Interfaces; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace OWSManagement.Requests.Users -{ - public class GetUsersRequest - { - private readonly Guid _customerGuid; - private readonly IUsersRepository _usersRepository; - - public GetUsersRequest(Guid customerGuid, IUsersRepository usersRepository) - { - _customerGuid = customerGuid; - _usersRepository = usersRepository; - } - public async Task> Handle() - { - return await _usersRepository.GetUsers(_customerGuid); ; - } - } -} diff --git a/src/OWSManagement/Services/CharactersService.cs b/src/OWSManagement/Services/CharactersService.cs new file mode 100644 index 000000000..a9e09d4f4 --- /dev/null +++ b/src/OWSManagement/Services/CharactersService.cs @@ -0,0 +1,37 @@ +using OWSData.Models.StoredProcs; +using OWSData.Repositories.Interfaces; + +namespace OWSManagement.Services { + public interface ICharactersService + { + Task> GetCharactersAsync(String email); + } + + public class CharactersService : ICharactersService + { + private readonly Guid _customerGUID; + private readonly ICharactersRepository _charactersRepository; + private readonly IUsersRepository _usersRepository; + + public CharactersService(ICharactersRepository charactersRepository, IUsersRepository usersRepository, IConfiguration config) + { + _customerGUID = new Guid(config["OWSManagementOptions:OWSAPIKey"]); + _charactersRepository = charactersRepository; + _usersRepository = usersRepository; + } + public async Task> GetCharactersAsync(String email) + { + var user = await _usersRepository.GetUserFromEmail(_customerGUID, email); + + if (user != null) { + var allCharacters = await _usersRepository.GetAllCharacters(_customerGUID, user.UserSessionGUID); + return allCharacters; + } + else + { + return []; + } + + } + } +} \ No newline at end of file diff --git a/src/OWSManagement/Services/InstanceManagementService.cs b/src/OWSManagement/Services/InstanceManagementService.cs new file mode 100644 index 000000000..2dadfdea7 --- /dev/null +++ b/src/OWSManagement/Services/InstanceManagementService.cs @@ -0,0 +1,25 @@ +using OWSData.Models.Tables; +using OWSData.Repositories.Interfaces; + +namespace OWSManagement.Services +{ + public interface IInstanceManagementService + { + Task> GetWorldServersAsync(); + } + public class InstanceManagementService : IInstanceManagementService + { + private readonly Guid _customerGuid; + private readonly IInstanceManagementRepository _instanceManagementRepository; + + public InstanceManagementService(IInstanceManagementRepository instanceManagementRepository, IConfiguration config) + { + _customerGuid = new Guid(config["OWSManagementOptions:OWSAPIKey"]); + _instanceManagementRepository = instanceManagementRepository; + } + public async Task> GetWorldServersAsync() + { + return await _instanceManagementRepository.GetActiveWorldServersByLoad(_customerGuid); + } + } +} diff --git a/src/OWSManagement/Services/UsersService.cs b/src/OWSManagement/Services/UsersService.cs new file mode 100644 index 000000000..dd086979f --- /dev/null +++ b/src/OWSManagement/Services/UsersService.cs @@ -0,0 +1,39 @@ +using OWSData.Models.Composites; +using OWSData.Models.Tables; +using OWSData.Repositories.Interfaces; +using OWSManagement.DTOs; + +namespace OWSManagement.Services +{ + public interface IUsersService + { + Task> GetUsersAsync(); + Task AddUserAsync(AddUserDTO addUserDTO); + Task EditUserAsync(EditUserDTO editUserDTO); + } + public class UsersService : IUsersService + { + private readonly Guid _customerGuid; + private readonly IUsersRepository _usersRepository; + + public UsersService(IUsersRepository usersRepository, IConfiguration config) + { + _customerGuid = new Guid(config["OWSManagementOptions:OWSAPIKey"]); + _usersRepository = usersRepository; + } + public async Task> GetUsersAsync() + { + return await _usersRepository.GetUsers(_customerGuid); + } + + public async Task AddUserAsync(AddUserDTO addUserDTO) + { + return await _usersRepository.RegisterUser(_customerGuid, addUserDTO.Email, addUserDTO.Password, addUserDTO.FirstName, addUserDTO.LastName); + } + + public async Task EditUserAsync(EditUserDTO editUserDTO) + { + return await _usersRepository.UpdateUser(_customerGuid, editUserDTO.UserGUID, editUserDTO.FirstName, editUserDTO.LastName, editUserDTO.Email); + } + } +} diff --git a/src/OWSManagement/Startup.cs b/src/OWSManagement/Startup.cs deleted file mode 100644 index 370cf5bde..000000000 --- a/src/OWSManagement/Startup.cs +++ /dev/null @@ -1,153 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.DataProtection; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.OpenApi.Models; -using OWSData.Repositories.Interfaces; -using OWSShared.Implementations; -using OWSShared.Interfaces; -using OWSShared.Middleware; -using SimpleInjector; -using System; -using System.IO; -using System.Net.Http.Headers; - -namespace OWSManagement -{ - public class Startup - { - private Container container = new SimpleInjector.Container(); - - public Startup(IConfiguration configuration) - { - container.Options.ResolveUnregisteredConcreteTypes = false; - - Configuration = new ConfigurationBuilder() - .AddJsonFile("appsettings.json") - .AddEnvironmentVariables() - .Build(); - } - - public IConfiguration Configuration { get; } - - public void ConfigureServices(IServiceCollection services) - { - - services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo("./temp/DataProtection-Keys")); - - services.AddMemoryCache(); - - services.AddHttpContextAccessor(); - - services.AddControllers(); - - services.AddSimpleInjector(container, options => { - options.AddAspNetCore() - .AddControllerActivation(); - }); - - services.Configure(Configuration.GetSection(OWSShared.Options.ManagementOptions.SectionName)); - services.Configure(Configuration.GetSection(OWSShared.Options.APIPathOptions.SectionName)); - - var owsManagementOptions = new OWSShared.Options.ManagementOptions(); - Configuration.GetSection(OWSShared.Options.ManagementOptions.SectionName).Bind(owsManagementOptions); - - var apiPathOptions = new OWSShared.Options.APIPathOptions(); - Configuration.GetSection(OWSShared.Options.APIPathOptions.SectionName).Bind(apiPathOptions); - - services.AddSpaStaticFiles(options => options.RootPath = "wwwroot/dist"); - - services.AddSwaggerGen(c => { - c.SwaggerDoc("v1", new OpenApiInfo { Title = "Open World Server Management API", Version = "v1" }); - - c.AddSecurityDefinition("X-CustomerGUID", new OpenApiSecurityScheme - { - Description = "Authorization header using the X-CustomerGUID scheme", - Name = "X-CustomerGUID", - In = ParameterLocation.Header, - Type = SecuritySchemeType.ApiKey, - Scheme = "X-CustomerGUID" - }); - - c.OperationFilter(); - - var filePath = Path.Combine(System.AppContext.BaseDirectory, "OWSManagement.xml"); - c.IncludeXmlComments(filePath); - }); - - services.AddHttpClient("OWSPublicApi", c => - { - c.BaseAddress = new Uri(apiPathOptions.InternalPublicApiURL); - c.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); - c.DefaultRequestHeaders.Add("User-Agent", "OWSManagement"); - c.DefaultRequestHeaders.Add("X-CustomerGUID", owsManagementOptions.OWSAPIKey); - }); - - services.Configure(Configuration.GetSection(OWSShared.Options.StorageOptions.SectionName)); - - InitializeContainer(services); - - } - - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - - app.UseSimpleInjector(container); - - app.UseMiddleware(container); - - app.UseSwagger(); - app.UseSwaggerUI(c => - { - c.SwaggerEndpoint("./v1/swagger.json", "Open World Server Management API"); - }); - - app.UseStaticFiles(); - app.UseSpaStaticFiles(); - - app.UseRouting(); - - app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); - app.UseSpa(spa => - { - if (!env.IsDevelopment()) - { - spa.Options.SourcePath = "wwwroot/dist"; - } - }); - - container.Verify(); - } - - private void InitializeContainer(IServiceCollection services) - { - var OWSStorageConfig = Configuration.GetSection("OWSStorageConfig"); - if (OWSStorageConfig.Exists()) - { - string dbBackend = OWSStorageConfig.GetValue("OWSDBBackend"); - - switch (dbBackend) - { - case "postgres": - container.Register(Lifestyle.Transient); - container.Register(Lifestyle.Transient); - break; - case "mysql": - container.Register(Lifestyle.Transient); - container.Register(Lifestyle.Transient); - break; - default: // Default to MSSQL - container.Register(Lifestyle.Transient); - container.Register(Lifestyle.Transient); - break; - } - } - - container.Register(Lifestyle.Scoped); - - } - } -} diff --git a/src/OWSManagement/wwwroot/.gitignore b/src/OWSManagement/wwwroot/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/src/OWSManagement/wwwroot/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/src/OWSManagement/wwwroot/.vscode/extensions.json b/src/OWSManagement/wwwroot/.vscode/extensions.json deleted file mode 100644 index c0a6e5a48..000000000 --- a/src/OWSManagement/wwwroot/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] -} diff --git a/src/OWSManagement/wwwroot/README.md b/src/OWSManagement/wwwroot/README.md deleted file mode 100644 index ef72fd524..000000000 --- a/src/OWSManagement/wwwroot/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Vue 3 + TypeScript + Vite - -This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` - - diff --git a/src/OWSManagement/wwwroot/package-lock.json b/src/OWSManagement/wwwroot/package-lock.json deleted file mode 100644 index 44a2978ab..000000000 --- a/src/OWSManagement/wwwroot/package-lock.json +++ /dev/null @@ -1,1060 +0,0 @@ -{ - "name": "managementapp", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "managementapp", - "version": "0.0.0", - "dependencies": { - "axios": "^1.3.2", - "vue": "^3.2.47", - "vue-router": "^4.1.6", - "vuetify": "^3.1.3" - }, - "devDependencies": { - "@types/node": "^18.13.0", - "@vitejs/plugin-vue": "^4.0.0", - "typescript": "^4.9.3", - "vite": "^4.1.0", - "vue-tsc": "^1.0.24" - } - }, - "node_modules/@babel/parser": { - "version": "7.20.15", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.15.tgz", - "integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", - "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", - "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", - "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", - "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", - "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", - "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", - "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", - "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", - "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", - "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", - "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", - "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", - "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", - "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", - "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", - "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", - "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", - "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", - "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", - "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", - "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", - "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@types/node": { - "version": "18.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", - "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==", - "dev": true - }, - "node_modules/@vitejs/plugin-vue": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.0.0.tgz", - "integrity": "sha512-e0X4jErIxAB5oLtDqbHvHpJe/uWNkdpYV83AOG2xo2tEVSzCzewgJMtREZM30wXnM5ls90hxiOtAuVU6H5JgbA==", - "dev": true, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "vite": "^4.0.0", - "vue": "^3.2.25" - } - }, - "node_modules/@volar/language-core": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.0.24.tgz", - "integrity": "sha512-vTN+alJiWwK0Pax6POqrmevbtFW2dXhjwWiW/MW4f48eDYPLdyURWcr8TixO7EN/nHsUBj2udT7igFKPtjyAKg==", - "dev": true, - "dependencies": { - "@volar/source-map": "1.0.24", - "muggle-string": "^0.1.0" - } - }, - "node_modules/@volar/source-map": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.0.24.tgz", - "integrity": "sha512-Qsv/tkplx18pgBr8lKAbM1vcDqgkGKQzbChg6NW+v0CZc3G7FLmK+WrqEPzKlN7Cwdc6XVL559Nod8WKAfKr4A==", - "dev": true, - "dependencies": { - "muggle-string": "^0.1.0" - } - }, - "node_modules/@volar/typescript": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.0.24.tgz", - "integrity": "sha512-f8hCSk+PfKR1/RQHxZ79V1NpDImHoivqoizK+mstphm25tn/YJ/JnKNjZHB+o21fuW0yKlI26NV3jkVb2Cc/7A==", - "dev": true, - "dependencies": { - "@volar/language-core": "1.0.24" - } - }, - "node_modules/@volar/vue-language-core": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@volar/vue-language-core/-/vue-language-core-1.0.24.tgz", - "integrity": "sha512-2NTJzSgrwKu6uYwPqLiTMuAzi7fAY3yFy5PJ255bGJc82If0Xr+cW8pC80vpjG0D/aVLmlwAdO4+Ya2BI8GdDg==", - "dev": true, - "dependencies": { - "@volar/language-core": "1.0.24", - "@volar/source-map": "1.0.24", - "@vue/compiler-dom": "^3.2.45", - "@vue/compiler-sfc": "^3.2.45", - "@vue/reactivity": "^3.2.45", - "@vue/shared": "^3.2.45", - "minimatch": "^5.1.1", - "vue-template-compiler": "^2.7.14" - } - }, - "node_modules/@volar/vue-typescript": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@volar/vue-typescript/-/vue-typescript-1.0.24.tgz", - "integrity": "sha512-9a25oHDvGaNC0okRS47uqJI6FxY4hUQZUsxeOUFHcqVxZEv8s17LPuP/pMMXyz7jPygrZubB/qXqHY5jEu/akA==", - "dev": true, - "dependencies": { - "@volar/typescript": "1.0.24", - "@volar/vue-language-core": "1.0.24" - } - }, - "node_modules/@vue/compiler-core": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.47.tgz", - "integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz", - "integrity": "sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==", - "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz", - "integrity": "sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz", - "integrity": "sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==", - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "node_modules/@vue/devtools-api": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz", - "integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==" - }, - "node_modules/@vue/reactivity": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.47.tgz", - "integrity": "sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==", - "dependencies": { - "@vue/shared": "3.2.47" - } - }, - "node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz", - "integrity": "sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "node_modules/@vue/runtime-core": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.47.tgz", - "integrity": "sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==", - "dependencies": { - "@vue/reactivity": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "node_modules/@vue/runtime-dom": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.47.tgz", - "integrity": "sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==", - "dependencies": { - "@vue/runtime-core": "3.2.47", - "@vue/shared": "3.2.47", - "csstype": "^2.6.8" - } - }, - "node_modules/@vue/server-renderer": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.47.tgz", - "integrity": "sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==", - "dependencies": { - "@vue/compiler-ssr": "3.2.47", - "@vue/shared": "3.2.47" - }, - "peerDependencies": { - "vue": "3.2.47" - } - }, - "node_modules/@vue/shared": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.47.tgz", - "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/axios": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.2.tgz", - "integrity": "sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" - }, - "node_modules/de-indent": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", - "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", - "dev": true - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/muggle-string": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.1.0.tgz", - "integrity": "sha512-Tr1knR3d2mKvvWthlk7202rywKbiOm4rVFLsfAaSIhJ6dt9o47W4S+JMtWhd/PW9Wrdew2/S2fSvhz3E2gkfEg==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rollup": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.14.0.tgz", - "integrity": "sha512-o23sdgCLcLSe3zIplT9nQ1+r97okuaiR+vmAPZPTDYB7/f3tgWIYNyiQveMsZwshBT0is4eGax/HH83Q7CG+/Q==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead" - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/vite": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.1.tgz", - "integrity": "sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==", - "dev": true, - "dependencies": { - "esbuild": "^0.16.14", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.10.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vue": { - "version": "3.2.47", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.47.tgz", - "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==", - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-sfc": "3.2.47", - "@vue/runtime-dom": "3.2.47", - "@vue/server-renderer": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "node_modules/vue-router": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.1.6.tgz", - "integrity": "sha512-DYWYwsG6xNPmLq/FmZn8Ip+qrhFEzA14EI12MsMgVxvHFDYvlr4NXpVF5hrRH1wVcDP8fGi5F4rxuJSl8/r+EQ==", - "dependencies": { - "@vue/devtools-api": "^6.4.5" - }, - "funding": { - "url": "https://github.com/sponsors/posva" - }, - "peerDependencies": { - "vue": "^3.2.0" - } - }, - "node_modules/vue-template-compiler": { - "version": "2.7.14", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz", - "integrity": "sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==", - "dev": true, - "dependencies": { - "de-indent": "^1.0.2", - "he": "^1.2.0" - } - }, - "node_modules/vue-tsc": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-1.0.24.tgz", - "integrity": "sha512-mmU1s5SAqE1nByQAiQnao9oU4vX+mSdsgI8H57SfKH6UVzq/jP9+Dbi2GaV+0b4Cn361d2ln8m6xeU60ApiEXg==", - "dev": true, - "dependencies": { - "@volar/vue-language-core": "1.0.24", - "@volar/vue-typescript": "1.0.24" - }, - "bin": { - "vue-tsc": "bin/vue-tsc.js" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "node_modules/vuetify": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.1.3.tgz", - "integrity": "sha512-QE/yXvHKDnlK9sjjMoZy9cAovNabpI97xg9RD+mAEDgSUaZNCX/jy7Qn0bP1DjJNeAsR2oAlcO0C2WhrsYe9kw==", - "engines": { - "node": "^12.20 || >=14.13" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/johnleider" - }, - "peerDependencies": { - "vite-plugin-vuetify": "^1.0.0-alpha.12", - "vue": "^3.2.0", - "vue-i18n": "^9.0.0", - "webpack-plugin-vuetify": "^2.0.0-alpha.11" - }, - "peerDependenciesMeta": { - "vite-plugin-vuetify": { - "optional": true - }, - "vue-i18n": { - "optional": true - }, - "webpack-plugin-vuetify": { - "optional": true - } - } - } - } -} diff --git a/src/OWSManagement/wwwroot/package.json b/src/OWSManagement/wwwroot/package.json deleted file mode 100644 index 6f3dac4fa..000000000 --- a/src/OWSManagement/wwwroot/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "managementapp", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vue-tsc && vite build", - "preview": "vite preview" - }, - "dependencies": { - "axios": "^1.3.2", - "vue": "^3.2.47", - "vue-router": "^4.1.6", - "vuetify": "^3.1.3" - }, - "devDependencies": { - "@types/node": "^18.13.0", - "@vitejs/plugin-vue": "^4.0.0", - "typescript": "^4.9.3", - "vite": "^4.1.0", - "vue-tsc": "^1.0.24" - } -} diff --git a/src/OWSManagement/wwwroot/public/vite.svg b/src/OWSManagement/wwwroot/public/vite.svg deleted file mode 100644 index e7b8dfb1b..000000000 --- a/src/OWSManagement/wwwroot/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/App.vue b/src/OWSManagement/wwwroot/src/App.vue deleted file mode 100644 index ca2a61a90..000000000 --- a/src/OWSManagement/wwwroot/src/App.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - diff --git a/src/OWSManagement/wwwroot/src/assets/vue.svg b/src/OWSManagement/wwwroot/src/assets/vue.svg deleted file mode 100644 index 770e9d333..000000000 --- a/src/OWSManagement/wwwroot/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/components/CharactersGrid.vue b/src/OWSManagement/wwwroot/src/components/CharactersGrid.vue deleted file mode 100644 index ca79767f9..000000000 --- a/src/OWSManagement/wwwroot/src/components/CharactersGrid.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/components/Dashboard.vue b/src/OWSManagement/wwwroot/src/components/Dashboard.vue deleted file mode 100644 index 394727c6b..000000000 --- a/src/OWSManagement/wwwroot/src/components/Dashboard.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - diff --git a/src/OWSManagement/wwwroot/src/components/GlobalDataGrid.vue b/src/OWSManagement/wwwroot/src/components/GlobalDataGrid.vue deleted file mode 100644 index 80975be74..000000000 --- a/src/OWSManagement/wwwroot/src/components/GlobalDataGrid.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/components/SideNav.vue b/src/OWSManagement/wwwroot/src/components/SideNav.vue deleted file mode 100644 index f1885c124..000000000 --- a/src/OWSManagement/wwwroot/src/components/SideNav.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/components/UsersAdd.vue b/src/OWSManagement/wwwroot/src/components/UsersAdd.vue deleted file mode 100644 index 8d8d9c8da..000000000 --- a/src/OWSManagement/wwwroot/src/components/UsersAdd.vue +++ /dev/null @@ -1,134 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/components/UsersGrid.vue b/src/OWSManagement/wwwroot/src/components/UsersGrid.vue deleted file mode 100644 index 8ee15d0f2..000000000 --- a/src/OWSManagement/wwwroot/src/components/UsersGrid.vue +++ /dev/null @@ -1,185 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/components/WorldServersGrid.vue b/src/OWSManagement/wwwroot/src/components/WorldServersGrid.vue deleted file mode 100644 index 6db96ef04..000000000 --- a/src/OWSManagement/wwwroot/src/components/WorldServersGrid.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/components/ZoneInstancesGrid.vue b/src/OWSManagement/wwwroot/src/components/ZoneInstancesGrid.vue deleted file mode 100644 index ca056e31a..000000000 --- a/src/OWSManagement/wwwroot/src/components/ZoneInstancesGrid.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/components/ZonesGrid.vue b/src/OWSManagement/wwwroot/src/components/ZonesGrid.vue deleted file mode 100644 index e06d579c8..000000000 --- a/src/OWSManagement/wwwroot/src/components/ZonesGrid.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/main.ts b/src/OWSManagement/wwwroot/src/main.ts deleted file mode 100644 index b42b9218d..000000000 --- a/src/OWSManagement/wwwroot/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { createApp } from 'vue'; -import './style.css'; -import App from './App.vue'; -import router from './router'; -import { vuetify } from './plugins/vuetify'; - -createApp(App).use(router).use(vuetify).mount('#app'); diff --git a/src/OWSManagement/wwwroot/src/owsApi.ts b/src/OWSManagement/wwwroot/src/owsApi.ts deleted file mode 100644 index f0e9c7357..000000000 --- a/src/OWSManagement/wwwroot/src/owsApi.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { owsApiClient } from "../src/owsApiClient"; - -const client: owsApiClient = new owsApiClient("/api"); - -export default { - - getUsers() { - return client.get('/Users'); - }, - addUser(data: Record) { - return client.post('/Users', data); - }, - updateUser(data: Record) { - return client.put('/Users', data); - }, - -} \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/owsApiClient.ts b/src/OWSManagement/wwwroot/src/owsApiClient.ts deleted file mode 100644 index 85af94a91..000000000 --- a/src/OWSManagement/wwwroot/src/owsApiClient.ts +++ /dev/null @@ -1,148 +0,0 @@ -import axios from 'axios'; -import { AxiosInstance } from 'axios'; - -/** - * Create a new Axios client instance - * @see https://github.com/mzabriskie/axios#creating-an-instance - */ -const getClient = (baseUrl = "") => { - - const options: object | undefined = { - baseURL: baseUrl, - headers: { - 'Content-Type': 'application/json', - 'Accept': 'application/json', - 'X-CustomerGUID': '' - }, - timeout: 60000 - }; - - const client = axios.create(options); - - client.interceptors.response.use( - function (response) { - return response; - }, - function (error) { - const res = error.response; - if (res === null) { - window.location.href = "/"; - console.error("Timeout!"); - } - else { - if (res.status === 401) { - window.location.href = "/"; - console.error("Unauthorized API Call!"); - } - if (res.status === 500) { - alert("An error has occured!"); - } - } - - return Promise.reject(error); - } - ); - - - return client; -}; - -class owsApiClient { - client: AxiosInstance; - - constructor(baseUrl: string) { - this.client = getClient(baseUrl); - } - - get(url: string, conf = {}) { - return this.client.get(url, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - } - - delete(url: string, conf = {}) { - return this.client.delete(url, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - } - - head(url: string, conf = {}) { - return this.client.head(url, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - } - - options(url: string, conf = {}) { - return this.client.options(url, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - } - - post(url: string, data = {}, conf = {}) { - return this.client.post(url, data, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - } - - put(url: string, data = {}, conf = {}) { - return this.client.put(url, data, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - } - - patch(url: string, data = {}, conf = {}) { - return this.client.patch(url, data, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - } -} - -export { owsApiClient }; - -/** - * Base HTTP Client - */ -export default { - // Provide request methods with the default base_url - get(url: string, conf = {}) { - return getClient().get(url, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - }, - - delete(url: string, conf = {}) { - return getClient().delete(url, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - }, - - head(url: string, conf = {}) { - return getClient().head(url, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - }, - - options(url: string, conf = {}) { - return getClient().options(url, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - }, - - post(url: string, data = {}, conf = {}) { - return getClient().post(url, data, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - }, - - put(url: string, data = {}, conf = {}) { - return getClient().put(url, data, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - }, - - patch(url: string, data = {}, conf = {}) { - return getClient().patch(url, data, conf) - .then(response => Promise.resolve(response)) - .catch(error => Promise.reject(error)); - }, -}; \ No newline at end of file diff --git a/src/OWSManagement/wwwroot/src/plugins/vuetify.ts b/src/OWSManagement/wwwroot/src/plugins/vuetify.ts deleted file mode 100644 index 83613c0fd..000000000 --- a/src/OWSManagement/wwwroot/src/plugins/vuetify.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { createVuetify, ThemeDefinition } from 'vuetify'; -import * as vuetifyComponents from 'vuetify/lib/components/index'; -import * as directives from 'vuetify/lib/directives/index'; -import { aliases, mdi } from 'vuetify/iconsets/mdi'; -import * as labs from 'vuetify/labs/components'; -import 'vuetify/styles' - -const myCustomLightTheme: ThemeDefinition = { - dark: false, - colors: { - background: '#FFFFFF', - surface: '#FFFFFF', - primary: '#6200EE', - 'primary-darken-1': '#3700B3', - secondary: '#03DAC6', - 'secondary-darken-1': '#018786', - error: '#B00020', - info: '#2196F3', - success: '#4CAF50', - warning: '#FB8C00', - } - } - -export const vuetify = createVuetify({ - directives, - theme:{ - defaultTheme: 'light', - themes:{ - myCustomLightTheme, - } - }, - components: { - ...vuetifyComponents, - ...labs, - }, - icons: { - defaultSet: 'mdi', - aliases, - sets: { - mdi, - } - }, - defaults: { - VDataTable: { - fixedHeader: true, - noDataText: 'Results not found', - }, - }, - -}); diff --git a/src/OWSManagement/wwwroot/src/router/index.ts b/src/OWSManagement/wwwroot/src/router/index.ts deleted file mode 100644 index 28736731c..000000000 --- a/src/OWSManagement/wwwroot/src/router/index.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { createWebHistory, createRouter } from "vue-router"; -import Dashboard from "../components/Dashboard.vue"; -import UsersGrid from "../components/UsersGrid.vue"; -import CharactersGrid from "../components/CharactersGrid.vue"; -import WorldServersGrid from "../components/WorldServersGrid.vue"; -import ZonesGrid from "../components/ZonesGrid.vue"; -import ZoneInstancesGrid from "../components/ZoneInstancesGrid.vue"; -import GlobalDataGrid from "../components/GlobalDataGrid.vue"; - -const routes = [ - { - path: "/", - name: "Dashboard", - component: Dashboard, - meta: { - requiresAuth: false - } - }, - { - path: "/users", - name: "UsersGrid", - component: UsersGrid, - meta: { - requiresAuth: false - } - }, - { - path: "/characters", - name: "CharactersGrid", - component: CharactersGrid, - meta: { - requiresAuth: false - } - }, - { - path: "/worldservers", - name: "WorldServersGrid", - component: WorldServersGrid, - meta: { - requiresAuth: false - } - }, - { - path: "/zones", - name: "ZonesGrid", - component: ZonesGrid, - meta: { - requiresAuth: false - } - }, - { - path: "/zoneinstances", - name: "ZoneInstancesGrid", - component: ZoneInstancesGrid, - meta: { - requiresAuth: false - } - }, - { - path: "/globaldata", - name: "GlobalDataGrid", - component: GlobalDataGrid, - meta: { - requiresAuth: false - } - }, -]; - -const router = createRouter({ - history: createWebHistory(), - routes, -}); - -export default router; diff --git a/src/OWSManagement/wwwroot/src/style.css b/src/OWSManagement/wwwroot/src/style.css deleted file mode 100644 index adefd91f4..000000000 --- a/src/OWSManagement/wwwroot/src/style.css +++ /dev/null @@ -1,21 +0,0 @@ -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - - diff --git a/src/OWSManagement/wwwroot/src/vite-env.d.ts b/src/OWSManagement/wwwroot/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/src/OWSManagement/wwwroot/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/src/OWSManagement/wwwroot/tsconfig.json b/src/OWSManagement/wwwroot/tsconfig.json deleted file mode 100644 index 863732a01..000000000 --- a/src/OWSManagement/wwwroot/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "module": "ESNext", - "moduleResolution": "Node", - "strict": true, - "jsx": "preserve", - "resolveJsonModule": true, - "isolatedModules": true, - "esModuleInterop": true, - "lib": [ "ESNext", "DOM" ], - "skipLibCheck": true, - "noEmit": true, - "types": [ - "vuetify", - "vite/client" - ] - }, - "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/src/OWSManagement/wwwroot/tsconfig.node.json b/src/OWSManagement/wwwroot/tsconfig.node.json deleted file mode 100644 index 9d31e2aed..000000000 --- a/src/OWSManagement/wwwroot/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/src/OWSManagement/wwwroot/vite.config.ts b/src/OWSManagement/wwwroot/vite.config.ts deleted file mode 100644 index 91785c368..000000000 --- a/src/OWSManagement/wwwroot/vite.config.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { fileURLToPath, URL } from 'url'; -import { defineConfig } from 'vite'; -import vue from '@vitejs/plugin-vue'; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [vue()], - resolve: { - alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) - } - }, - server: { - port: 5173, - https: false, - strictPort: true, - proxy: { - '/api': { - target: 'http://localhost:5205', - changeOrigin: true, - secure: false, - //rewrite: (path) => path.replace(/^\/api/, '/api') - ws: true, - configure: (proxy, _options) => { - proxy.on('error', (err, _req, _res) => { - console.log('proxy error', err); - }); - proxy.on('proxyReq', (proxyReq, req, _res) => { - console.log('Sending Request to the Target:', req.method, req.url); - }); - proxy.on('proxyRes', (proxyRes, req, _res) => { - console.log('Received Response from the Target:', proxyRes.statusCode, req.url); - }); - }, - } - } - } -});