Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/troubleshooting/visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
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
```
10 changes: 5 additions & 5 deletions src/OWS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ public async Task<GetServerInstanceFromPort> GetServerInstanceFromPort(Guid cust
}
}

public async Task<IEnumerable<WorldServers>> GetActiveWorldServersByLoad(Guid customerGUID)
{
using (Connection)
{
var parameters = new DynamicParameters();
parameters.Add("@CustomerGUID", customerGUID);
List<WorldServers> outputWorldServers = (List<WorldServers>)await Connection.QueryAsync<WorldServers>(GenericQueries.GetActiveWorldServersByLoad,
parameters,
commandType: CommandType.Text);
return outputWorldServers;
}
}

public async Task<IEnumerable<GetZoneInstancesForWorldServer>> GetZoneInstancesForWorldServer(Guid customerGUID, int worldServerID)
{
IEnumerable<GetZoneInstancesForWorldServer> output;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using OWSData.Repositories.Interfaces;
using OWSData.SQL;
using OWSShared.Options;
using OWSData.Models.Tables;

namespace OWSData.Repositories.Implementations.MySQL
{
Expand Down Expand Up @@ -77,6 +78,19 @@ public async Task<GetServerInstanceFromPort> GetServerInstanceFromPort(Guid cust
}
}

public async Task<IEnumerable<WorldServers>> GetActiveWorldServersByLoad(Guid customerGUID)
{
using (Connection)
{
var parameters = new DynamicParameters();
parameters.Add("@CustomerGUID", customerGUID);
List<WorldServers> outputWorldServers = (List<WorldServers>)await Connection.QueryAsync<WorldServers>(GenericQueries.GetActiveWorldServersByLoad,
parameters,
commandType: CommandType.Text);
return outputWorldServers;
}
}

public async Task<IEnumerable<GetZoneInstancesForWorldServer>> GetZoneInstancesForWorldServer(Guid customerGUID, int worldServerID)
{
IEnumerable<GetZoneInstancesForWorldServer> output;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using OWSData.Repositories.Interfaces;
using OWSData.SQL;
using OWSShared.Options;
using OWSData.Models.Tables;

namespace OWSData.Repositories.Implementations.Postgres
{
Expand Down Expand Up @@ -77,6 +78,19 @@ public async Task<GetServerInstanceFromPort> GetServerInstanceFromPort(Guid cust
}
}

public async Task<IEnumerable<WorldServers>> GetActiveWorldServersByLoad(Guid customerGUID)
{
using (Connection)
{
var parameters = new DynamicParameters();
parameters.Add("@CustomerGUID", customerGUID);
List<WorldServers> outputWorldServers = (List<WorldServers>)await Connection.QueryAsync<WorldServers>(GenericQueries.GetActiveWorldServersByLoad,
parameters,
commandType: CommandType.Text);
return outputWorldServers;
}
}

public async Task<IEnumerable<GetZoneInstancesForWorldServer>> GetZoneInstancesForWorldServer(Guid customerGUID, int worldServerID)
{
IEnumerable<GetZoneInstancesForWorldServer> output;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -11,6 +12,7 @@ public interface IInstanceManagementRepository
{
Task<GetServerInstanceFromPort> GetZoneInstance(Guid customerGUID, int zoneInstanceId);
Task<GetServerInstanceFromPort> GetServerInstanceFromPort(Guid customerGUID, string serverIP, int port);
Task<IEnumerable<WorldServers>> GetActiveWorldServersByLoad(Guid customerGUID);
Task<IEnumerable<GetZoneInstancesForWorldServer>> GetZoneInstancesForWorldServer(Guid customerGUID, int worldServerID);
Task<SuccessAndErrorMessage> SetZoneInstanceStatus(Guid customerGUID, int zoneInstanceID, int instanceStatus);
Task<SuccessAndErrorMessage> ShutDownWorldServer(Guid customerGUID, int worldServerID);
Expand Down
4 changes: 3 additions & 1 deletion src/OWSData/SQL/MSSQLQueries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
4 changes: 3 additions & 1 deletion src/OWSData/SQL/MySQLQueries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
4 changes: 3 additions & 1 deletion src/OWSData/SQL/PostgresQueries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
26 changes: 18 additions & 8 deletions src/OWSInstanceLauncher/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:52758/",
"sslPort": 44306
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
Expand All @@ -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
}
}
}
4 changes: 2 additions & 2 deletions src/OWSManagement/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bin/
obj/
**/bin
**/obj
wwwroot/dist
wwwroot/node_modules
22 changes: 22 additions & 0 deletions src/OWSManagement/Components/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="_content/Radzen.Blazor/css/material-base.css">
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="OWSManagement.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet />
</head>

<body>
<Routes @rendermode="InteractiveServer" />
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
<script src="_framework/blazor.web.js"></script>
</body>

</html>
20 changes: 20 additions & 0 deletions src/OWSManagement/Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@inherits LayoutComponentBase

<div class="page">
<div class="sidebar">
<NavMenu />
</div>

<main>
<article class="content px-4">
@Body
</article>
<RadzenComponents />
</main>
</div>

<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
96 changes: 96 additions & 0 deletions src/OWSManagement/Components/Layout/MainLayout.razor.css
Original file line number Diff line number Diff line change
@@ -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;
}
Loading