From a6d8b00f990d413829e3f61417215fc839655d5b Mon Sep 17 00:00:00 2001
From: pfh59 <109206285+pfh59@users.noreply.github.com>
Date: Sat, 5 Aug 2023 11:38:39 +0200
Subject: [PATCH 1/2] Update ci-cd.yaml (#110)
update JDK for sonarcloud.
See doc prerequisites : https://docs.sonarsource.com/sonarqube/latest/requirements/prerequisites-and-overview/
---
.github/workflows/ci-cd.yaml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml
index 69f48234..32372b7f 100644
--- a/.github/workflows/ci-cd.yaml
+++ b/.github/workflows/ci-cd.yaml
@@ -18,9 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup JDK 11 🦴
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v3
with:
- java-version: 1.11
+ distribution: 'oracle'
+ java-version: 17
- name: Setup .NET7 🦴
uses: actions/setup-dotnet@v2
From c22154f859d458b2facb89ebdd4961e1055ed723 Mon Sep 17 00:00:00 2001
From: pfh59 <109206285+pfh59@users.noreply.github.com>
Date: Sat, 5 Aug 2023 11:59:41 +0200
Subject: [PATCH 2/2] Last fixes (#109)
* appsettings ignore
* untrack appsettings.Development.json
* update docs and read scopes from appsettings
* update docs
* FIX : #108
Add new test with sigs with km
* fix TU sighelper with km
fix main layout
* fix db issue with duplicate entry
add foreign key and cascade action
fix selectedMap cache
fix ynshcro with selectMapCache
fix color button
fix TU
* Delete .DS_Store
* delete bad file
* Update ci-cd.yaml
update JDK for sonarcloud.
See doc prerequisites : https://docs.sonarsource.com/sonarqube/latest/requirements/prerequisites-and-overview/
---
.gitignore | 8 +-
README.md | 5 +-
WHMapper.Tests/Db/DbIntegrationTest.cs | 53 ++--
WHMapper.Tests/SDE/SDEUniverseTest.cs | 16 +-
.../WHHelper/EveWHAccessHelperTest.cs | 40 +--
.../WHHelper/WHSignatureHelperTest.cs | 4 +-
WHMapper.Tests/WHMapper.Tests.csproj | 6 -
WHMapper.Tests/appsettings.Development.json | 17 --
WHMapper.Tests/appsettings.json | 4 +-
WHMapper/.DS_Store | Bin 10244 -> 0 bytes
WHMapper/Data/WHMapperContext.cs | 4 +
...ner.cs => 20230805074405_Init.Designer.cs} | 18 +-
...5194538_Init.cs => 20230805074405_Init.cs} | 65 +++--
.../WHMapperContextModelSnapshot.cs | 16 +-
WHMapper/Pages/Mapper/Add.cs | 53 +++-
WHMapper/Pages/Mapper/Add.razor | 6 +-
WHMapper/Pages/Mapper/Overview.cs | 101 +++++---
WHMapper/Pages/Mapper/Overview.razor | 164 ++++++------
WHMapper/Pages/Mapper/Signatures/Import.cs | 4 +-
WHMapper/Pages/Mapper/Signatures/Import.razor | 4 +-
.../Pages/Mapper/Signatures/Overview.razor | 148 +++++------
.../Pages/Mapper/SystemInfos/Overview.razor | 4 +-
WHMapper/Program.cs | 18 +-
WHMapper/Repositories/ADefaultRepository.cs | 16 +-
.../WHAccesses/WHAccessRepository.cs | 113 +++++----
.../WHAdmins/WHAdminRepository.cs | 109 ++++----
.../Repositories/WHMaps/WHMapRepository.cs | 126 ++++-----
.../WHSignatures/WHSignatureRepository.cs | 239 +++++++++---------
.../WHSystemLinks/WHSystemLinkRepository.cs | 109 ++++----
.../WHSystems/WHSystemRepository.cs | 166 ++++++------
WHMapper/Services/SDE/ISDEServices.cs | 2 +-
WHMapper/Services/SDE/SDEServices.cs | 20 +-
.../WHSignatures/IWHSignatureHelper.cs | 2 +
.../WHSignatures/WHSignatureHelper.cs | 4 +-
WHMapper/WHMapper.csproj | 5 +-
WHMapper/appsettings.Development.json | 10 -
WHMapper/appsettings.json | 7 +-
WHMapper/wwwroot/favicon.ico | Bin 5430 -> 28143 bytes
docs/administration.md | 1 +
docs/authentication.md | 15 ++
docs/favicon.ico | Bin 0 -> 28143 bytes
docs/img/authentication/ccp_characters.png | Bin 0 -> 883162 bytes
docs/img/authentication/ccp_sso.png | Bin 0 -> 964161 bytes
docs/img/authentication/login.png | Bin 0 -> 31258 bytes
docs/img/main.png | Bin 0 -> 29365 bytes
docs/img/map/all.png | Bin 0 -> 68682 bytes
docs/img/map/same_system_type_identifer.png | Bin 0 -> 46153 bytes
docs/index.md | 10 +
docs/map.md | 71 ++++++
docs/signature.md | 1 +
docs/system.md | 1 +
51 files changed, 989 insertions(+), 796 deletions(-)
delete mode 100644 WHMapper.Tests/appsettings.Development.json
delete mode 100644 WHMapper/.DS_Store
rename WHMapper/Migrations/{20230705194538_Init.Designer.cs => 20230805074405_Init.Designer.cs} (93%)
rename WHMapper/Migrations/{20230705194538_Init.cs => 20230805074405_Init.cs} (91%)
delete mode 100644 WHMapper/appsettings.Development.json
create mode 100644 docs/administration.md
create mode 100644 docs/authentication.md
create mode 100644 docs/favicon.ico
create mode 100644 docs/img/authentication/ccp_characters.png
create mode 100644 docs/img/authentication/ccp_sso.png
create mode 100644 docs/img/authentication/login.png
create mode 100644 docs/img/main.png
create mode 100644 docs/img/map/all.png
create mode 100644 docs/img/map/same_system_type_identifer.png
create mode 100644 docs/index.md
create mode 100644 docs/map.md
create mode 100644 docs/signature.md
create mode 100644 docs/system.md
diff --git a/.gitignore b/.gitignore
index 0cc9cd20..db0b5c12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,9 +4,6 @@
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
-#unzip SDE ressources
-Resources/SDE/universe/
-
# User-specific files
*.rsuser
*.suo
@@ -15,6 +12,11 @@ Resources/SDE/universe/
*.sln.docstates
.vs
.DS_Store
+**/appsettings.Development.json
+**/appsettings.Production.json
+#unzip SDE ressources
+**/Resources/SDE/universe/
+
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
diff --git a/README.md b/README.md
index 40e8a8b6..4fbadd22 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
-# eve-whmapper [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![GitHub top language](https://img.shields.io/github/languages/top/pfh59/eve-whmapper) ![GitHub language count](https://img.shields.io/github/languages/count/pfh59/eve-whmapper) [![Continous Integration and Deployement](https://github.com/pfh59/eve-whmapper/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/pfh59/eve-whmapper/actions/workflows/ci-cd.yaml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pfh59_eve-whmapper&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=pfh59_eve-whmapper) ![GitHub commit activity (main)](https://img.shields.io/github/commit-activity/m/pfh59/eve-whmapper) ![GitLab tag (self-managed)](https://img.shields.io/gitlab/v/tag/eve-whmapper)
+# EvE-WHMapper
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![GitHub top language](https://img.shields.io/github/languages/top/pfh59/eve-whmapper) ![GitHub language count](https://img.shields.io/github/languages/count/pfh59/eve-whmapper) [![Continous Integration and Deployement](https://github.com/pfh59/eve-whmapper/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/pfh59/eve-whmapper/actions/workflows/ci-cd.yaml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pfh59_eve-whmapper&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=pfh59_eve-whmapper) ![GitHub commit activity (main)](https://img.shields.io/github/commit-activity/m/pfh59/eve-whmapper) ![GitLab tag (self-managed)](https://img.shields.io/gitlab/v/tag/eve-whmapper)
## Description
@@ -156,7 +157,7 @@ sudo ./stop.sh
-[![view - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](/docs/ "Go to project documentation")
+[![view - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](/docs/index.md "Go to project documentation")
diff --git a/WHMapper.Tests/Db/DbIntegrationTest.cs b/WHMapper.Tests/Db/DbIntegrationTest.cs
index f15ca695..082a3b57 100644
--- a/WHMapper.Tests/Db/DbIntegrationTest.cs
+++ b/WHMapper.Tests/Db/DbIntegrationTest.cs
@@ -1,5 +1,7 @@
-using Microsoft.EntityFrameworkCore;
+using System;
+using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
using WHMapper.Data;
using WHMapper.Models.Db;
using WHMapper.Models.Db.Enums;
@@ -31,9 +33,10 @@ public class DbIntegrationTest
private const int FOOBAR_SYSTEM_ID2 = 1234567;
private const string FOOBAR_SHORT_UPDATED = "FooBarU";
- private WHMapperContext _context;
+ private IDbContextFactory _contextFactory;
+
+
-
public DbIntegrationTest()
{
//Create DB Context
@@ -42,10 +45,13 @@ public DbIntegrationTest()
.AddEnvironmentVariables()
.Build();
- var optionBuilder = new DbContextOptionsBuilder();
- optionBuilder.UseNpgsql(configuration["ConnectionStrings:DefaultConnection"]);
+ var services = new ServiceCollection();
+ services.AddDbContextFactory(options =>
+ options.UseNpgsql(configuration.GetConnectionString("DefaultConnection")));
+
+ var provider = services.BuildServiceProvider();
+ _contextFactory = provider.GetService>();
- _context = new WHMapperContext(optionBuilder.Options);
}
@@ -53,11 +59,14 @@ public DbIntegrationTest()
[Fact, Priority(1)]
public async Task DeleteAndCreateDatabse()
{
- //Delete all to make a fresh Db
- bool dbDeleted = await _context.Database.EnsureDeletedAsync();
- Assert.True(dbDeleted);
- bool dbCreated = await _context.Database.EnsureCreatedAsync();
- Assert.True(dbCreated);
+ using (var context = _contextFactory.CreateDbContext())
+ {
+ //Delete all to make a fresh Db
+ bool dbDeleted = await context.Database.EnsureDeletedAsync();
+ Assert.True(dbDeleted);
+ bool dbCreated = await context.Database.EnsureCreatedAsync();
+ Assert.True(dbCreated);
+ }
}
@@ -65,7 +74,7 @@ public async Task DeleteAndCreateDatabse()
public async Task CRUD_WHMAP()
{
//Create IWHMapRepository
- IWHMapRepository repo = new WHMapRepository(_context);
+ IWHMapRepository repo = new WHMapRepository(_contextFactory);
//ADD WHMAP
var result = await repo.Create(new WHMap(FOOBAR));
@@ -99,7 +108,7 @@ public async Task CRUD_WHSystem()
{
//init MAP
//Create IWHMapRepository
- IWHMapRepository repoMap = new WHMapRepository(_context);
+ IWHMapRepository repoMap = new WHMapRepository(_contextFactory);
//ADD WHMAP
var map = await repoMap.Create(new WHMap(FOOBAR));
@@ -107,7 +116,7 @@ public async Task CRUD_WHSystem()
Assert.Equal(FOOBAR, map?.Name);
//Create IWHMapRepository
- IWHSystemRepository repo = new WHSystemRepository(_context);
+ IWHSystemRepository repo = new WHSystemRepository(_contextFactory);
//GETALL system => return empty arry
@@ -173,7 +182,7 @@ public async Task CRUD_WHLink()
{
//init MAP
//Create IWHMapRepository
- IWHMapRepository repoMap = new WHMapRepository(_context);
+ IWHMapRepository repoMap = new WHMapRepository(_contextFactory);
//ADD WHMAP
var map = await repoMap.Create(new WHMap(FOOBAR));
@@ -182,7 +191,7 @@ public async Task CRUD_WHLink()
//Create IWHMapRepository
- IWHSystemRepository repoWH = new WHSystemRepository(_context);
+ IWHSystemRepository repoWH = new WHSystemRepository(_contextFactory);
Assert.NotNull(map);
var whSys1 = await repoWH.Create(new WHSystem(map.Id,FOOBAR_SYSTEM_ID, FOOBAR, 1));
Assert.NotNull(whSys1);
@@ -201,7 +210,7 @@ public async Task CRUD_WHLink()
//Create IWHMapRepository
- IWHSystemLinkRepository repo = new WHSystemLinkRepository(_context);
+ IWHSystemLinkRepository repo = new WHSystemLinkRepository(_contextFactory);
//add whsystem link
var link = await repo.Create(new WHSystemLink(map.Id,whSys1.Id, whSys2.Id));
@@ -249,7 +258,7 @@ public async Task CRUD_WHSignature()
{
//init MAP
//Create IWHMapRepository
- IWHMapRepository repoMap = new WHMapRepository(_context);
+ IWHMapRepository repoMap = new WHMapRepository(_contextFactory);
//ADD WHMAP
var map = await repoMap.Create(new WHMap(FOOBAR));
@@ -258,7 +267,7 @@ public async Task CRUD_WHSignature()
//Create IWHMapRepository
- IWHSystemRepository repoWH = new WHSystemRepository(_context);
+ IWHSystemRepository repoWH = new WHSystemRepository(_contextFactory);
Assert.NotNull(map);
var whSys1 = await repoWH.Create(new WHSystem(map.Id, FOOBAR_SYSTEM_ID, FOOBAR, 1));
Assert.NotNull(whSys1);
@@ -269,7 +278,7 @@ public async Task CRUD_WHSignature()
//Create IWHMapRepository
- IWHSignatureRepository repo = new WHSignatureRepository(_context);
+ IWHSignatureRepository repo = new WHSignatureRepository(_contextFactory);
//ADD WHSignature
var result = await repo.Create(new WHSignature(whSys1.Id,FOOBAR));
@@ -356,7 +365,7 @@ public async Task CRUD_WHSignature()
public async Task CRUD_WHAdmin()
{
//Create IWHMapRepository
- IWHAdminRepository repo = new WHAdminRepository(_context);
+ IWHAdminRepository repo = new WHAdminRepository(_contextFactory);
//ADD WHMAP
var result = await repo.Create(new WHAdmin(EVE_CHARACTERE_ID, "TOTO"));
@@ -390,7 +399,7 @@ public async Task CRUD_WHAdmin()
public async Task CRUD_WHAccess()
{
//Create IWHMapRepository
- IWHAccessRepository repo = new WHAccessRepository(_context);
+ IWHAccessRepository repo = new WHAccessRepository(_contextFactory);
//ADD WHMAP
var result = await repo.Create(new WHAccess(EVE_CORPO_ID,"TOTO", WHAccessEntity.Corporation));
diff --git a/WHMapper.Tests/SDE/SDEUniverseTest.cs b/WHMapper.Tests/SDE/SDEUniverseTest.cs
index 923f8180..b9d02883 100644
--- a/WHMapper.Tests/SDE/SDEUniverseTest.cs
+++ b/WHMapper.Tests/SDE/SDEUniverseTest.cs
@@ -29,39 +29,39 @@ public SDEUniverseTest()
}
[Fact]
- public void Search_System()
+ public async void Search_System()
{
//TEST empty
- var empty_result = _services.SearchSystem("");
+ var empty_result = await _services.SearchSystem("");
Assert.Null(empty_result);
//TEST JITA
- var jita_result = _services.SearchSystem(SOLAR_SYSTEM_JITA_NAME);
+ var jita_result = await _services.SearchSystem(SOLAR_SYSTEM_JITA_NAME);
Assert.NotNull(jita_result);
Assert.Single(jita_result);
//TEST JI for JITA partial
- var ji_result = _services.SearchSystem(SOLAR_SYSTEM_JIT_NAME);
+ var ji_result = await _services.SearchSystem(SOLAR_SYSTEM_JIT_NAME);
Assert.NotNull(ji_result);
Assert.Contains(ji_result, x => x.Name.Contains(SOLAR_SYSTEM_JITA_NAME, StringComparison.OrdinalIgnoreCase));
//TEST AMARR
- var amarr_result = _services.SearchSystem(SOLAR_SYSTEM_AMARR_NAME);
+ var amarr_result = await _services.SearchSystem(SOLAR_SYSTEM_AMARR_NAME);
Assert.NotNull(amarr_result);
Assert.Single(amarr_result);
//TEST AMA for AMARR partial
- var ama_result = _services.SearchSystem(SOLAR_SYSTEM_AMA_NAME);
+ var ama_result = await _services.SearchSystem(SOLAR_SYSTEM_AMA_NAME);
Assert.NotNull(ama_result);
Assert.Contains(ama_result, x => x.Name.Contains(SOLAR_SYSTEM_AMARR_NAME, StringComparison.OrdinalIgnoreCase));
//TEST WH
- var wh_result = _services.SearchSystem(SOLAR_SYSTEM_WH_NAME);
+ var wh_result = await _services.SearchSystem(SOLAR_SYSTEM_WH_NAME);
Assert.NotNull(wh_result);
Assert.Single(wh_result);
- var wh_partial_result = _services.SearchSystem(SOLAR_SYSTEM_WH_PARTIAL_NAME);
+ var wh_partial_result = await _services.SearchSystem(SOLAR_SYSTEM_WH_PARTIAL_NAME);
Assert.NotNull(wh_partial_result);
Assert.Contains(wh_partial_result, x => x.Name.Contains(SOLAR_SYSTEM_WH_NAME, StringComparison.OrdinalIgnoreCase));
diff --git a/WHMapper.Tests/WHHelper/EveWHAccessHelperTest.cs b/WHMapper.Tests/WHHelper/EveWHAccessHelperTest.cs
index 42c59e78..a742666b 100644
--- a/WHMapper.Tests/WHHelper/EveWHAccessHelperTest.cs
+++ b/WHMapper.Tests/WHHelper/EveWHAccessHelperTest.cs
@@ -1,5 +1,6 @@
using System;
using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Internal;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@@ -27,32 +28,35 @@ public class EveWHAccessHelperTest
private int EVE_CORPO_ID = 1344654522;
private int EVE_ALLIANCE_ID = 1354830081;
- private WHMapperContext _context;
+ IDbContextFactory _contextFactory;
private IEveMapperAccessHelper _accessHelper;
private IWHAccessRepository _whAccessRepository;
private IWHAdminRepository _whAdminRepository;
+
+
public EveWHAccessHelperTest()
{
- var services = new ServiceCollection();
- services.AddHttpClient();
- var provider = services.BuildServiceProvider();
- var httpclientfactory = provider.GetService();
-
-
//Create DB Context
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.AddEnvironmentVariables()
.Build();
- var optionBuilder = new DbContextOptionsBuilder();
- optionBuilder.UseNpgsql(configuration["ConnectionStrings:DefaultConnection"]);
+ var services = new ServiceCollection();
+ services.AddDbContextFactory(options =>
+ options.UseNpgsql(configuration.GetConnectionString("DefaultConnection")));
- _context = new WHMapperContext(optionBuilder.Options);
- _whAccessRepository = new WHAccessRepository(_context);
- _whAdminRepository = new WHAdminRepository(_context);
+ services.AddHttpClient();
+
+ var provider = services.BuildServiceProvider();
+ var httpclientfactory = provider.GetService();
+
+
+ _contextFactory = provider.GetService>();
+ _whAccessRepository = new WHAccessRepository(_contextFactory);
+ _whAdminRepository = new WHAdminRepository(_contextFactory);
_accessHelper = new EveMapperAccessHelper(_whAccessRepository,_whAdminRepository, new CharacterServices(httpclientfactory.CreateClient()));
@@ -62,10 +66,14 @@ public EveWHAccessHelperTest()
public async Task Delete_And_Create_DB()
{
//Delete all to make a fresh Db
- bool dbDeleted = await _context.Database.EnsureDeletedAsync();
- Assert.True(dbDeleted);
- bool dbCreated = await _context.Database.EnsureCreatedAsync();
- Assert.True(dbCreated);
+
+ using (var context = _contextFactory.CreateDbContext())
+ {
+ bool dbDeleted = await context.Database.EnsureDeletedAsync();
+ Assert.True(dbDeleted);
+ bool dbCreated = await context.Database.EnsureCreatedAsync();
+ Assert.True(dbCreated);
+ }
}
diff --git a/WHMapper.Tests/WHHelper/WHSignatureHelperTest.cs b/WHMapper.Tests/WHHelper/WHSignatureHelperTest.cs
index 0b19f5d5..3478af20 100644
--- a/WHMapper.Tests/WHHelper/WHSignatureHelperTest.cs
+++ b/WHMapper.Tests/WHHelper/WHSignatureHelperTest.cs
@@ -12,7 +12,7 @@ public class WHSignatureHelperTest
{
private const int WH_ID = 1;
private const string SCAN_USER = "FOOBAR";
- private const string DSCAN = "IGU-360\tCosmic Signature\t\t\t0,0%\t37,21 AU\nRNN-835\tCosmic Signature\t\t\t0,0%\t21,98 AU\nETT-010\tCosmic Signature\t\t\t0,0%\t27,03 AU\nHBO-538\tCosmic Signature\t\t\t0,0%\t38,17 AU\nOBF-800\tCosmic Signature\t\t\t0,0%\t35,48 AU\nBNU-740\tCosmic Signature\t\t\t0,0%\t34,86 AU\nAWU-108\tCosmic Signature\tGas Site\t\t0,0%\t26,19 AU\nDXY-229\tCosmic Signature\tGas Site\tSizeable Perimeter Reservoir\t100,0%\t28,07 AU\nQBJ-502\tCosmic Signature\tRelic Site\tRuined Guristas Monument Site\t100,0%\t25,45 AU\nXQX-010\tCosmic Signature\tWormhole\tUnstable Wormhole\t100,0%\t23,50 AU";
+ private const string DSCAN = "IGU-360\tCosmic Signature\t\t\t0,0%\t37,21 AU\nWAM-436\tCosmic Signature\tWormhole\tUnstable Wormhole\t100,0%\t101 km\nRNN-835\tCosmic Signature\t\t\t0,0%\t21,98 AU\nETT-010\tCosmic Signature\t\t\t0,0%\t27,03 AU\nHBO-538\tCosmic Signature\t\t\t0,0%\t38,17 AU\nOBF-800\tCosmic Signature\t\t\t0,0%\t35,48 AU\nBNU-740\tCosmic Signature\t\t\t0,0%\t34,86 AU\nAWU-108\tCosmic Signature\tGas Site\t\t0,0%\t26,19 AU\nDXY-229\tCosmic Signature\tGas Site\tSizeable Perimeter Reservoir\t100,0%\t28,07 AU\nQBJ-502\tCosmic Signature\tRelic Site\tRuined Guristas Monument Site\t100,0%\t25,45 AU\nXQX-010\tCosmic Signature\tWormhole\tUnstable Wormhole\t100,0%\t23,50 AU";
private const string FIRST_SIG_NAME = "IGU-360";
private const string LAST_SIG_NAME = "XQX-010";
private const string UNSTABLE_WORMHOLE = "Unstable Wormhole";
@@ -46,7 +46,7 @@ public async Task Parse_Scan_Result_Test()
var parseDSCAN1= await _whHelper.ParseScanResult(SCAN_USER, WH_ID,DSCAN);
Assert.NotEmpty(parseDSCAN1);
- Assert.Equal(10, parseDSCAN1.Count());
+ Assert.Equal(11, parseDSCAN1.Count());
var firstSig = parseDSCAN1.First();
diff --git a/WHMapper.Tests/WHMapper.Tests.csproj b/WHMapper.Tests/WHMapper.Tests.csproj
index f995933e..d08c42e9 100644
--- a/WHMapper.Tests/WHMapper.Tests.csproj
+++ b/WHMapper.Tests/WHMapper.Tests.csproj
@@ -31,7 +31,6 @@
-
@@ -52,11 +51,6 @@
PreserveNewest
PreserveNewest
-
- true
- PreserveNewest
- PreserveNewest
-
diff --git a/WHMapper.Tests/appsettings.Development.json b/WHMapper.Tests/appsettings.Development.json
deleted file mode 100644
index d391b713..00000000
--- a/WHMapper.Tests/appsettings.Development.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "DetailedErrors": true,
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information",
- "Microsoft.EntityFrameworkCore.Database.Command": "Information"
- }
- },
- "AllowedHosts": "*",
-
- "ConnectionStrings": {
- "DefaultConnection": "server=localhost;port=5432;database=whmapper;User Id=postgres;Password=secret"
- }
-}
-
diff --git a/WHMapper.Tests/appsettings.json b/WHMapper.Tests/appsettings.json
index 305fab3b..cc70f30f 100644
--- a/WHMapper.Tests/appsettings.json
+++ b/WHMapper.Tests/appsettings.json
@@ -10,8 +10,8 @@
"AllowedHosts": "*",
"EveSSO": {
"Domain": "login.eveonline.com",
- "ClientId": "39eee319b2d14a4a9ba3e9eb1b1410b8",
- "Secret": "Qg5uFfjYcqhvrw6FdXhxTMHM9yxNBBb8N3BYGvCN",
+ "ClientId": "",
+ "Secret": "",
"DefaultScopes": [
"esi-location.read_location.v1",
"esi-location.read_ship_type.v1",
diff --git a/WHMapper/.DS_Store b/WHMapper/.DS_Store
deleted file mode 100644
index 35331f579bc90d0dcc76e99c63fc1a73cdd75cff..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 10244
zcmeHML2uJA6ninI$tRcW`5F>xuSlh|PrS`j+{D(zajZdp>L>58Z(
z^$h$F4oF<#kMLhO!S|eOO5AkQ1Y$7RmHnLfeU9_J=jYfZB2n%)3q&Rn8OSU%^C)5x
zw{sp#Q^B1@NC7;NLoRvLqa378ngPv#Wqys*@=BQkR+m&A>PVym!A!HQJy9>PGhOb$Z9w8~!gg17}eM)atKvjUGgWK&z78B}oR5ZS_WyBJRkEgpK_
zL#sn}bR^=o(r;#Bzw!7F3O+#%9*gpnAMsj^L9ZLI@~zReIz2C+|1PEy$?2I{W7e26
zUR8IULDj2!{a(55zTm58j$<{B>-EO-PHRxhTzl-;UcFe`lLw^fwr+^Y=R#C<~UhqQ0FM41ZNo~!gS5jK>k?Q
ziJcy&XkRqFe=3?NBq#(+kJp7}Kr^5j&b7H-bFC_$pJdTHy$MLw}().HasIndex(x => new { x.SoloarSystemId }).IsUnique(true);
modelBuilder.Entity().HasIndex(x => new { x.Name }).IsUnique(true);
modelBuilder.Entity().HasOne().WithMany(x => x.WHSystems).HasForeignKey(x =>x.WHMapId).IsRequired().OnDelete(DeleteBehavior.Cascade);
+ modelBuilder.Entity().HasMany().WithOne().HasForeignKey(x=>x.IdWHSystemFrom).OnDelete(DeleteBehavior.Cascade);
+ modelBuilder.Entity().HasMany().WithOne().HasForeignKey(x => x.IdWHSystemTo).OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity().ToTable("SystemLinks");
modelBuilder.Entity().HasIndex(x => new { x.IdWHSystemFrom, x.IdWHSystemTo }).IsUnique(true);
modelBuilder.Entity().HasOne().WithMany(x => x.WHSystemLinks).HasForeignKey(x =>x.WHMapId).IsRequired().OnDelete(DeleteBehavior.Cascade);
+
modelBuilder.Entity().ToTable("Signatures");
modelBuilder.Entity().HasIndex(x => new { x.Name }).IsUnique(true);
diff --git a/WHMapper/Migrations/20230705194538_Init.Designer.cs b/WHMapper/Migrations/20230805074405_Init.Designer.cs
similarity index 93%
rename from WHMapper/Migrations/20230705194538_Init.Designer.cs
rename to WHMapper/Migrations/20230805074405_Init.Designer.cs
index 6a67c0d9..3c90b340 100644
--- a/WHMapper/Migrations/20230705194538_Init.Designer.cs
+++ b/WHMapper/Migrations/20230805074405_Init.Designer.cs
@@ -12,7 +12,7 @@
namespace WHMapper.Migrations
{
[DbContext(typeof(WHMapperContext))]
- [Migration("20230705194538_Init")]
+ [Migration("20230805074405_Init")]
partial class Init
{
///
@@ -20,7 +20,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "7.0.5")
+ .HasAnnotation("ProductVersion", "7.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -216,6 +216,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.HasKey("Id");
+ b.HasIndex("IdWHSystemTo");
+
b.HasIndex("WHMapId");
b.HasIndex("IdWHSystemFrom", "IdWHSystemTo")
@@ -244,6 +246,18 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
modelBuilder.Entity("WHMapper.Models.Db.WHSystemLink", b =>
{
+ b.HasOne("WHMapper.Models.Db.WHSystem", null)
+ .WithMany()
+ .HasForeignKey("IdWHSystemFrom")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("WHMapper.Models.Db.WHSystem", null)
+ .WithMany()
+ .HasForeignKey("IdWHSystemTo")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
b.HasOne("WHMapper.Models.Db.WHMap", null)
.WithMany("WHSystemLinks")
.HasForeignKey("WHMapId")
diff --git a/WHMapper/Migrations/20230705194538_Init.cs b/WHMapper/Migrations/20230805074405_Init.cs
similarity index 91%
rename from WHMapper/Migrations/20230705194538_Init.cs
rename to WHMapper/Migrations/20230805074405_Init.cs
index 76cae5ea..b1c7b622 100644
--- a/WHMapper/Migrations/20230705194538_Init.cs
+++ b/WHMapper/Migrations/20230805074405_Init.cs
@@ -54,30 +54,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
table.PrimaryKey("PK_Maps", x => x.Id);
});
- migrationBuilder.CreateTable(
- name: "SystemLinks",
- columns: table => new
- {
- Id = table.Column(type: "integer", nullable: false)
- .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
- WHMapId = table.Column(type: "integer", nullable: false),
- IdWHSystemFrom = table.Column(type: "integer", nullable: false),
- IdWHSystemTo = table.Column(type: "integer", nullable: false),
- IsEndOfLifeConnection = table.Column(type: "boolean", nullable: false),
- Size = table.Column(type: "integer", nullable: false),
- MassStatus = table.Column(type: "integer", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_SystemLinks", x => x.Id);
- table.ForeignKey(
- name: "FK_SystemLinks_Maps_WHMapId",
- column: x => x.WHMapId,
- principalTable: "Maps",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
migrationBuilder.CreateTable(
name: "Systems",
columns: table => new
@@ -130,6 +106,42 @@ protected override void Up(MigrationBuilder migrationBuilder)
onDelete: ReferentialAction.Cascade);
});
+ migrationBuilder.CreateTable(
+ name: "SystemLinks",
+ columns: table => new
+ {
+ Id = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ WHMapId = table.Column(type: "integer", nullable: false),
+ IdWHSystemFrom = table.Column(type: "integer", nullable: false),
+ IdWHSystemTo = table.Column(type: "integer", nullable: false),
+ IsEndOfLifeConnection = table.Column(type: "boolean", nullable: false),
+ Size = table.Column(type: "integer", nullable: false),
+ MassStatus = table.Column(type: "integer", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_SystemLinks", x => x.Id);
+ table.ForeignKey(
+ name: "FK_SystemLinks_Maps_WHMapId",
+ column: x => x.WHMapId,
+ principalTable: "Maps",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_SystemLinks_Systems_IdWHSystemFrom",
+ column: x => x.IdWHSystemFrom,
+ principalTable: "Systems",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_SystemLinks_Systems_IdWHSystemTo",
+ column: x => x.IdWHSystemTo,
+ principalTable: "Systems",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
migrationBuilder.CreateIndex(
name: "IX_Accesses_EveEntityId_EveEntity",
table: "Accesses",
@@ -165,6 +177,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: new[] { "IdWHSystemFrom", "IdWHSystemTo" },
unique: true);
+ migrationBuilder.CreateIndex(
+ name: "IX_SystemLinks_IdWHSystemTo",
+ table: "SystemLinks",
+ column: "IdWHSystemTo");
+
migrationBuilder.CreateIndex(
name: "IX_SystemLinks_WHMapId",
table: "SystemLinks",
diff --git a/WHMapper/Migrations/WHMapperContextModelSnapshot.cs b/WHMapper/Migrations/WHMapperContextModelSnapshot.cs
index 38bc4b7a..c07b1fd5 100644
--- a/WHMapper/Migrations/WHMapperContextModelSnapshot.cs
+++ b/WHMapper/Migrations/WHMapperContextModelSnapshot.cs
@@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "7.0.5")
+ .HasAnnotation("ProductVersion", "7.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -213,6 +213,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.HasKey("Id");
+ b.HasIndex("IdWHSystemTo");
+
b.HasIndex("WHMapId");
b.HasIndex("IdWHSystemFrom", "IdWHSystemTo")
@@ -241,6 +243,18 @@ protected override void BuildModel(ModelBuilder modelBuilder)
modelBuilder.Entity("WHMapper.Models.Db.WHSystemLink", b =>
{
+ b.HasOne("WHMapper.Models.Db.WHSystem", null)
+ .WithMany()
+ .HasForeignKey("IdWHSystemFrom")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("WHMapper.Models.Db.WHSystem", null)
+ .WithMany()
+ .HasForeignKey("IdWHSystemTo")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
b.HasOne("WHMapper.Models.Db.WHMap", null)
.WithMany("WHSystemLinks")
.HasForeignKey("WHMapId")
diff --git a/WHMapper/Pages/Mapper/Add.cs b/WHMapper/Pages/Mapper/Add.cs
index f54dbcb1..0966b97e 100644
--- a/WHMapper/Pages/Mapper/Add.cs
+++ b/WHMapper/Pages/Mapper/Add.cs
@@ -29,6 +29,14 @@ namespace WHMapper.Pages.Mapper
[Authorize(Policy = "Access")]
public partial class Add : Microsoft.AspNetCore.Components.ComponentBase
{
+ private const string MSG_SEARCH_ERROR = "Search System Error";
+ private const string MSG_BAD_SOLAR_SYSTEM_NAME_ERROR = "Bad solar system name";
+ private const string MSG_ADD_WORHMOLE_DB_ERROR = "Add Wormhole db error";
+
+
+ [Inject]
+ public ILogger Logger { get; set; } = null!;
+
[Inject]
private IEveMapperHelper MapperServices { get; set; } = null!;
@@ -64,6 +72,7 @@ public partial class Add : Microsoft.AspNetCore.Components.ComponentBase
private HashSet _systems = null!;
private string _searchResult = string.Empty;
+ private bool _searchInProgress = false;
private SemaphoreSlim _semaphoreSlim = new SemaphoreSlim(1, 1);
@@ -98,18 +107,20 @@ private async Task Submit()
}
var solarSystem = await EveServices.UniverseServices.GetSystem(sdeSolarSystem.SolarSystemID);
- // var newWHSystem = await DbWHMaps.AddWHSystem(CurrentWHMap.Id, new WHSystem(solarSystem.SystemId, solarSystem.Name, solarSystem.SecurityStatus, MouseX, MouseY));//change position
var newWHSystem = await DbWHSystems.Create(new WHSystem(CurrentWHMap.Id,solarSystem.SystemId, solarSystem.Name, solarSystem.SecurityStatus, MouseX, MouseY)); //change position
if (newWHSystem == null)
{
- //Logger.LogError("Add Wormhole db error");
- Snackbar?.Add("Add Wormhole db error", Severity.Error);
+ Logger.LogError(MSG_ADD_WORHMOLE_DB_ERROR);
+ Snackbar?.Add(MSG_ADD_WORHMOLE_DB_ERROR, Severity.Error);
+ return;
}
+
var nodeModel = await MapperServices.DefineEveSystemNodeModel(newWHSystem);
+ CurrentWHMap.WHSystems.Add(newWHSystem);
CurrentDiagram?.Nodes.Add(nodeModel);
Snackbar?.Add(String.Format("{0} solar system successfully added",nodeModel.Name), Severity.Success);
@@ -128,7 +139,8 @@ private async Task Submit()
}
else
{
- Snackbar?.Add("Bad solar system name", Severity.Error);
+ Logger.LogError(MSG_BAD_SOLAR_SYSTEM_NAME_ERROR);
+ Snackbar?.Add(MSG_BAD_SOLAR_SYSTEM_NAME_ERROR, Severity.Error);
MudDialog.Close(DialogResult.Cancel);
}
}
@@ -141,35 +153,50 @@ private void Cancel()
private async Task?> Search(string value)
{
-
- if (string.IsNullOrEmpty(value) || SDEServices == null)
- return null;
+ try
+ {
- _systems = SDEServices.SearchSystem(value).ToHashSet();
+ if (string.IsNullOrEmpty(value) || SDEServices == null || value.Length < 3 || _searchInProgress)
+ return null;
+ _systems?.Clear();
+ _searchInProgress = true;
- if (_systems != null)
- return _systems.Select(x => x.Name);
- else
- return null;
- }
+ _systems = (HashSet)await SDEServices.SearchSystem(value);
+
+ _searchInProgress = false;
+ if (_systems != null)
+ return _systems.Select(x => x.Name);
+ else
+ return null;
+ }
+ catch(Exception ex)
+ {
+ Logger.LogError(ex, MSG_SEARCH_ERROR);
+ Snackbar.Add(MSG_SEARCH_ERROR, Severity.Error);
+ return null;
+ }
+}
private IEnumerable Validate(string value)
{
if (string.IsNullOrWhiteSpace(value))
{
+ _searchInProgress = false;
yield return "The system solar name is required";
yield break;
}
if (value.Length<3)
{
+ _searchInProgress = false;
yield return "Please enter 3 or more characters";
yield break;
}
if(_systems==null || _systems.Where(x=>x.Name.ToLower() == value.ToLower()).FirstOrDefault()==null)
{
+ _searchInProgress = false;
yield return "Bad Solar system name";
yield break;
}
diff --git a/WHMapper/Pages/Mapper/Add.razor b/WHMapper/Pages/Mapper/Add.razor
index f78f67e2..f558c6ce 100644
--- a/WHMapper/Pages/Mapper/Add.razor
+++ b/WHMapper/Pages/Mapper/Add.razor
@@ -5,11 +5,11 @@
+ AdornmentIcon="@Icons.Material.Filled.Search" AdornmentColor="Color.Primary" MinCharacters="3" />
- Cancel
- Add System
+ Cancel
+ Add System
diff --git a/WHMapper/Pages/Mapper/Overview.cs b/WHMapper/Pages/Mapper/Overview.cs
index c7e4462c..ddfcacab 100644
--- a/WHMapper/Pages/Mapper/Overview.cs
+++ b/WHMapper/Pages/Mapper/Overview.cs
@@ -25,9 +25,6 @@
using WHMapper.Services.WHSignature;
using WHMapper.Services.EveMapper;
using Blazor.Diagrams.Core.Behaviors;
-
-
-
namespace WHMapper.Pages.Mapper
{
@@ -280,6 +277,7 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
var newSystemNode = await MapperServices.DefineEveSystemNodeModel(newWHSystem);
newSystemNode.OnLocked += OnWHSystemNodeLocked;
+ _selectedWHMap.WHSystems.Add(newWHSystem);
Diagram?.Nodes?.Add(newSystemNode);
}
}
@@ -294,14 +292,16 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
{
try
{
- if (wormholeId > 0 && mapId == _selectedWHMap?.Id)
+ if (DbWHMaps!=null && _selectedWHMap!=null && wormholeId > 0 && _selectedWHMap?.Id== mapId)
{
- var sustemNodeToDelete = Diagram?.Nodes?.FirstOrDefault(x => ((EveSystemNodeModel)x).IdWH == wormholeId);
- if (sustemNodeToDelete != null)
+ _selectedWHMap = await DbWHMaps.GetById(mapId);
+ var systemNodeToDelete = Diagram?.Nodes?.FirstOrDefault(x => ((EveSystemNodeModel)x).IdWH == wormholeId);
+ if (systemNodeToDelete != null)
{
- Diagram?.Nodes?.Remove(sustemNodeToDelete);
+ Diagram?.Nodes?.Remove(systemNodeToDelete);
- if (((EveSystemNodeModel)sustemNodeToDelete).IdWH == _currentWHSystemId)
+
+ if (((EveSystemNodeModel)systemNodeToDelete).IdWH == _currentWHSystemId)
{
_currentLocation = null;
_currentSystemNode = null;
@@ -312,6 +312,7 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
StateHasChanged();
}
}
+
}
}
}
@@ -325,30 +326,17 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
{
try
{
- if (linKId > 0 && mapId == _selectedWHMap?.Id)
+ if (DbWHMaps != null && linKId > 0 && _selectedWHMap!=null && _selectedWHMap?.Id== mapId )
{
-
- var link = await DbWHSystemLinks.GetById(linKId);
- while (link == null)
- link = await DbWHSystemLinks.GetById(linKId);
-
- var whFrom = await DbWHSystems.GetById(link.IdWHSystemFrom);
- while (whFrom == null)
- whFrom = await DbWHSystems.GetById(link.IdWHSystemFrom);
-
-
- var whTo = await DbWHSystems.GetById(link.IdWHSystemTo);
- while (whTo == null)
- whTo = await DbWHSystems.GetById(link.IdWHSystemTo);
-
- if (whFrom != null && whTo != null)
+ _selectedWHMap = await DbWHMaps.GetById(mapId);
+ var link = _selectedWHMap.WHSystemLinks.Where(x => x.Id == linKId).SingleOrDefault();
+ if (link != null)
{
- EveSystemNodeModel newSystemNodeFrom = Diagram?.Nodes?.FirstOrDefault(x => string.Equals(x.Title, whFrom.Name, StringComparison.OrdinalIgnoreCase)) as EveSystemNodeModel;
- EveSystemNodeModel newSystemNodeTo = Diagram?.Nodes?.FirstOrDefault(x => string.Equals(x.Title, whTo.Name, StringComparison.OrdinalIgnoreCase)) as EveSystemNodeModel;
+ EveSystemNodeModel? newSystemNodeFrom = (EveSystemNodeModel?)(Diagram?.Nodes?.FirstOrDefault(x => (x as EveSystemNodeModel).IdWH == link.IdWHSystemFrom));
+ EveSystemNodeModel? newSystemNodeTo = (EveSystemNodeModel?)(Diagram?.Nodes?.FirstOrDefault(x => (x as EveSystemNodeModel).IdWH == link.IdWHSystemTo));
Diagram?.Links?.Add(new EveSystemLinkModel(link, newSystemNodeFrom, newSystemNodeTo));
}
}
-
}
catch (Exception ex)
{
@@ -356,12 +344,14 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
}
});
- _hubConnection.On("NotifyLinkRemoved", (user, mapId, linKId) =>
+ _hubConnection.On("NotifyLinkRemoved", async (user, mapId, linKId) =>
{
try
{
- if (linKId > 0 && mapId == _selectedWHMap?.Id)
- {
+ if (DbWHMaps != null && linKId > 0 && _selectedWHMap != null && _selectedWHMap?.Id == mapId)
+ {
+ _selectedWHMap = await DbWHMaps.GetById(mapId);
+
var linkToDel = Diagram?.Links?.FirstOrDefault(x => ((EveSystemLinkModel)x).Id == linKId);
if (linkToDel != null)
Diagram?.Links?.Remove(linkToDel);
@@ -374,12 +364,14 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
}
});
- _hubConnection.On("NotifyWormoleMoved", (user, mapId, wormholeId, posX, posY) =>
+ _hubConnection.On("NotifyWormoleMoved", async (user, mapId, wormholeId, posX, posY) =>
{
try
{
- if (wormholeId > 0 && mapId == _selectedWHMap?.Id)
+ if (DbWHMaps != null && _selectedWHMap != null && wormholeId > 0 && _selectedWHMap?.Id == mapId)
{
+ _selectedWHMap = await DbWHMaps.GetById(mapId);
+
var whToMoved = Diagram?.Nodes?.FirstOrDefault(x => ((EveSystemNodeModel)x).IdWH == wormholeId);
if (whToMoved != null)
whToMoved.SetPosition(posX, posY);
@@ -391,12 +383,13 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
}
});
- _hubConnection.On("NotifyLinkChanged", (user, mapId, linkId, eol, size, mass) =>
+ _hubConnection.On("NotifyLinkChanged",async (user, mapId, linkId, eol, size, mass) =>
{
try
{
- if (linkId > 0 && mapId == _selectedWHMap?.Id)
+ if (DbWHMaps != null && linkId > 0 && _selectedWHMap != null && _selectedWHMap?.Id == mapId)
{
+ _selectedWHMap = await DbWHMaps.GetById(mapId);
var linkToChanged = Diagram?.Links?.FirstOrDefault(x => ((EveSystemLinkModel)x).Id == linkId);
if (linkToChanged != null)
{
@@ -413,12 +406,13 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
}
});
- _hubConnection.On("NotifyWormholeNameExtensionChanged", (user, mapId, wormholeId) =>
+ _hubConnection.On("NotifyWormholeNameExtensionChanged", async (user, mapId, wormholeId) =>
{
try
{
- if (wormholeId > 0 && mapId == _selectedWHMap?.Id)
+ if (DbWHMaps != null && _selectedWHMap != null && wormholeId > 0 && _selectedWHMap?.Id == mapId)
{
+ _selectedWHMap = await DbWHMaps.GetById(mapId);
EveSystemNodeModel systemToIncrementNameExtenstion = (EveSystemNodeModel)Diagram?.Nodes?.FirstOrDefault(x => ((EveSystemNodeModel)x).IdWH == wormholeId);
if (systemToIncrementNameExtenstion != null)
systemToIncrementNameExtenstion.Refresh();
@@ -435,8 +429,9 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
{
try
{
- if (_selectedWHMap!=null && _selectedSystemNode!=null && wormholeId > 0 && mapId == _selectedWHMap.Id)
+ if (DbWHMaps != null && _selectedWHMap != null && wormholeId > 0 && _selectedWHMap?.Id == mapId)
{
+ _selectedWHMap = await DbWHMaps.GetById(mapId);
if (_selectedSystemNode.IdWH == wormholeId)
{
await WHSignaturesView.Restore();
@@ -457,6 +452,7 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
{
if (_selectedWHMap != null && _selectedSystemNode != null && wormholeId > 0 && mapId == _selectedWHMap.Id)
{
+ _selectedWHMap = await DbWHMaps.GetById(mapId);
EveSystemNodeModel whChangeLock = (EveSystemNodeModel)Diagram?.Nodes?.FirstOrDefault(x => ((EveSystemNodeModel)x).IdWH == wormholeId);
if(whChangeLock!=null)
{
@@ -883,7 +879,13 @@ private async Task Restore()
WHMaps = await DbWHMaps.GetAll();
}
- _selectedWHMap = WHMaps.FirstOrDefault();
+ else
+ {
+ _selectedWHMap = WHMaps.FirstOrDefault();
+ }
+
+
+
if (_selectedWHMap != null && _selectedWHMap.WHSystems.Count > 0)
{
@@ -899,6 +901,7 @@ private async Task Restore()
if (_selectedWHMap!=null && _selectedWHMap.WHSystemLinks!=null && _selectedWHMap.WHSystemLinks.Count > 0)
{
+
foreach (WHSystemLink dbWHSysLink in _selectedWHMap.WHSystemLinks)
{
var whFrom = await DbWHSystems.GetById(dbWHSysLink.IdWHSystemFrom);
@@ -913,7 +916,10 @@ private async Task Restore()
else
{
Logger.LogWarning("Bad Link,Auto remove");
- await DbWHSystemLinks.DeleteById(dbWHSysLink.Id);
+ if(await DbWHSystemLinks.DeleteById(dbWHSysLink.Id))
+ {
+ _selectedWHMap.WHSystemLinks.Remove(dbWHSysLink);
+ }
}
}
}
@@ -979,6 +985,15 @@ private async Task DeletedNodeOnMap(WHMap map, EveSystemNodeModel node)
if (await DbWHSystems.DeleteById(node.IdWH) != null)
{
+ var whSystemToDelete = map.WHSystems.FirstOrDefault(x => x.Id == node.IdWH);
+ if(whSystemToDelete!=null)
+ map.WHSystems.Remove(whSystemToDelete);
+
+ //db link will be automatically delete via db foreignkey cascade
+ var whSystemLinksToDetele = map.WHSystemLinks.Where(x => x.IdWHSystemFrom == node.IdWH || x.IdWHSystemTo == node.IdWH);
+ foreach(var linkToDelete in whSystemLinksToDetele)
+ map.WHSystemLinks.Remove(linkToDelete);
+
await NotifyWormholeRemoved(map.Id, node.IdWH);
return true;
}
@@ -1004,6 +1019,10 @@ private async Task DeletedLinkOnMap(WHMap map, EveSystemLinkModel link)
if(await DbWHSystemLinks.DeleteById(link.Id))
{
+ var whSystemLinkToDelete = map.WHSystemLinks.FirstOrDefault(x => x.Id == link.Id);
+ if (whSystemLinkToDelete != null)
+ map.WHSystemLinks.Remove(whSystemLinkToDelete);
+
await NotifyLinkRemoved(map.Id, link.Id);
return true;
}
@@ -1075,6 +1094,7 @@ private async Task CreateLink(WHMap map, EveSystemNodeModel src, EveSystem
if (newLink != null)
{
+ _selectedWHMap.WHSystemLinks.Add(newLink);
Diagram.Links.Add(new EveSystemLinkModel(newLink, src, target));
await this.NotifyLinkAdded(map.Id, newLink.Id);
@@ -1221,6 +1241,7 @@ private async Task AutoMapper()
newSystemNode.OnLocked += OnWHSystemNodeLocked;
await newSystemNode.AddConnectedUser(_userName);
+ _selectedWHMap.WHSystems.Add(newWHSystem);
Diagram.Nodes.Add(newSystemNode);
await this.NotifyWormoleAdded(_selectedWHMap.Id, newWHSystem.Id);
await this.NotifyUserPosition(_currentSolarSystem.Name);
@@ -1470,7 +1491,7 @@ private async Task OpenSearchAndAddDialog(MouseEventArgs args)
if (!result.Cancelled)
{
int whAddedId = (int)result.Data;
- if(whAddedId>0)
+ if (whAddedId > 0)
await this.NotifyWormoleAdded(_selectedWHMap.Id, whAddedId);
}
diff --git a/WHMapper/Pages/Mapper/Overview.razor b/WHMapper/Pages/Mapper/Overview.razor
index 756f67ac..f079dfa9 100644
--- a/WHMapper/Pages/Mapper/Overview.razor
+++ b/WHMapper/Pages/Mapper/Overview.razor
@@ -9,94 +9,86 @@
-
-
-
-
-
- @if (!FeatureFlag.DISABLE_MULTI_MAP())
- {
-
-
- @foreach (var item in WHMaps)
- {
-
-
-
-
-
-
-
- }
-
-
- @if (_isAdmin)
- {
-
-
-
-
-
- }
-
-
- }
- else
- {
-
-
-
-
-
+
+
+
+ @if (!FeatureFlag.DISABLE_MULTI_MAP())
+ {
+
+
+ @foreach (var item in WHMaps)
+ {
+
+
+
+
+
+
-
- }
-
-
- @if (_selectedSystemLink == null && _selectedSystemNode == null)
- {
- Add System
- }
+ }
+
+
+ @if (_isAdmin)
+ {
+
+
+
+
+
+ }
+
+
+ }
+ else
+ {
+
+
+
+
+
+ }
+
+
+ @if (_selectedSystemLink == null && _selectedSystemNode == null)
+ {
+ Add System
+ }
- @if (_selectedSystemLink != null)
- {
- Toggle EOL
-
-
-
- Normal
- Critical
- Verge
-
-
+ @if (_selectedSystemLink != null)
+ {
+
Toggle EOL
+
+
+
+ Normal
+ Critical
+ Verge
+
+
-
-
- Small
- Medium
- Large
- XLarge
-
-
-
- }
+
+
+ Small
+ Medium
+ Large
+ XLarge
+
+
+
+ }
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/WHMapper/Pages/Mapper/Signatures/Import.cs b/WHMapper/Pages/Mapper/Signatures/Import.cs
index 7306f6b1..e5cb2f24 100644
--- a/WHMapper/Pages/Mapper/Signatures/Import.cs
+++ b/WHMapper/Pages/Mapper/Signatures/Import.cs
@@ -24,8 +24,6 @@ namespace WHMapper.Pages.Mapper.Signatures
[Authorize(Policy = "Access")]
public partial class Import : Microsoft.AspNetCore.Components.ComponentBase
{
- private const string _scanResultRegex = "[a-zA-Z]{3}-[0-9]{3}\\s([a-zA-Z\\s]+)[0-9]*.[0-9]+%\\s[0-9]*.[0-9]+\\sAU";
-
[Inject]
private IEveUserInfosServices UserService { get; set; } = null!;
@@ -48,7 +46,7 @@ public partial class Import : Microsoft.AspNetCore.Components.ComponentBase
private FluentValueValidator
_ccValidator = new FluentValueValidator(x => x
.NotEmpty()
.NotNull()
- .Matches(_scanResultRegex));
+ .Matches(IWHSignatureHelper.SCAN_VALIDATION_REGEX));
private string _scanResult = String.Empty;
private bool _lazyDeleted = false;
diff --git a/WHMapper/Pages/Mapper/Signatures/Import.razor b/WHMapper/Pages/Mapper/Signatures/Import.razor
index be160ce2..697050b7 100644
--- a/WHMapper/Pages/Mapper/Signatures/Import.razor
+++ b/WHMapper/Pages/Mapper/Signatures/Import.razor
@@ -8,7 +8,7 @@
- Cancel
- Update Signatures
+ Cancel
+ Update Signatures
diff --git a/WHMapper/Pages/Mapper/Signatures/Overview.razor b/WHMapper/Pages/Mapper/Signatures/Overview.razor
index b7b65e1a..7816b0a9 100644
--- a/WHMapper/Pages/Mapper/Signatures/Overview.razor
+++ b/WHMapper/Pages/Mapper/Signatures/Overview.razor
@@ -1,84 +1,84 @@
@using WHMapper.Models.DTO.Anoik;
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
- Group
- Type
- Created
- Created by
- Updated
- Updated by
-
-
-
-
-
-
- @context.Name
- @context.Group
- @if (@context.Group == Models.Db.Enums.WHSignatureGroup.Wormhole && !String.IsNullOrEmpty(context.Type) && context.Type.Contains(" -> "))
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+ Group
+ Type
+ Created
+ Created by
+ Updated
+ Updated by
+
+
+
+
+
+
+ @context.Name
+ @context.Group
+ @if (@context.Group == Models.Db.Enums.WHSignatureGroup.Wormhole && !String.IsNullOrEmpty(context.Type) && context.Type.Contains(" -> "))
+ {
+ var splitRes = @context.Type.Split(" -> ");
+ @context.Type
+ }
+ else
+ {
+ @context.Type
+ }
+ @(DateDiff(_currentDateTime,context.Created))
+ @context.CreatedBy
+ @(DateDiff(_currentDateTime,context.Updated))
+ @context.UpdatedBy
+
+
+
+
+
+ @context.Name
+
+
+ @foreach (WHMapper.Models.Db.Enums.WHSignatureGroup item in Enum.GetValues(typeof(WHMapper.Models.Db.Enums.WHSignatureGroup)))
+ {
+ @GetDisplayText(item)
+ }
+
+
+
+
+ @if (@context.Group == Models.Db.Enums.WHSignatureGroup.Wormhole)
{
- var splitRes = @context.Type.Split(" -> ");
- @context.Type
+
+ @foreach (WormholeTypeInfo wti in AnoikServices.GetWormholeTypes().Result)
+ {
+ @wti.ToString()
+ }
+
}
else
{
- @context.Type
+
}
- @(DateDiff(_currentDateTime,context.Created))
- @context.CreatedBy
- @(DateDiff(_currentDateTime,context.Updated))
- @context.UpdatedBy
-
-
-
-
-
- @context.Name
-
-
- @foreach (WHMapper.Models.Db.Enums.WHSignatureGroup item in Enum.GetValues(typeof(WHMapper.Models.Db.Enums.WHSignatureGroup)))
- {
- @GetDisplayText(item)
- }
-
+
+ @(DateDiff(_currentDateTime,context.Created))
+ @context.CreatedBy
+ @(DateDiff(_currentDateTime,context.Updated))
+ @context.UpdatedBy
+
+
-
-
- @if (@context.Group == Models.Db.Enums.WHSignatureGroup.Wormhole)
- {
-
- @foreach (WormholeTypeInfo wti in AnoikServices.GetWormholeTypes().Result)
- {
- @wti.ToString()
- }
-
- }
- else
- {
-
- }
-
- @(DateDiff(_currentDateTime,context.Created))
- @context.CreatedBy
- @(DateDiff(_currentDateTime,context.Updated))
- @context.UpdatedBy
-
-
-
\ No newline at end of file
diff --git a/WHMapper/Pages/Mapper/SystemInfos/Overview.razor b/WHMapper/Pages/Mapper/SystemInfos/Overview.razor
index 2aa48f56..3f00b1f7 100644
--- a/WHMapper/Pages/Mapper/SystemInfos/Overview.razor
+++ b/WHMapper/Pages/Mapper/SystemInfos/Overview.razor
@@ -1,4 +1,4 @@
-
+
Name:
@@ -66,4 +66,4 @@
}
-
+
\ No newline at end of file
diff --git a/WHMapper/Program.cs b/WHMapper/Program.cs
index 9096f5d6..7df0a55f 100644
--- a/WHMapper/Program.cs
+++ b/WHMapper/Program.cs
@@ -56,8 +56,8 @@
// Add services to the container.
-builder.Services.AddDbContext(options =>
- options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")),ServiceLifetime.Transient);
+builder.Services.AddDbContextFactory(options =>
+ options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddSignalR();
@@ -99,6 +99,10 @@
IConfigurationSection evessoConf = builder.Configuration.GetSection("EveSSO");
+IConfigurationSection evessoConfScopes = evessoConf.GetSection("DefaultScopes");
+
+
+
AuthenticationBuilder authenticationBuilder = builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options =>
{
@@ -110,11 +114,11 @@
options.ClientSecret = evessoConf["Secret"];
options.CallbackPath = new PathString("/sso/callback");
options.Scope.Clear();
- options.Scope.Add("esi-location.read_location.v1");
- options.Scope.Add("esi-location.read_ship_type.v1");
- options.Scope.Add("esi-ui.open_window.v1");
- options.Scope.Add("esi-ui.write_waypoint.v1");
- options.Scope.Add("esi-search.search_structures.v1");
+
+ foreach (string scope in evessoConfScopes.Get())
+ options.Scope.Add(scope);
+
+
options.SaveTokens = true;
options.UsePkce = true;
})
diff --git a/WHMapper/Repositories/ADefaultRepository.cs b/WHMapper/Repositories/ADefaultRepository.cs
index 9ffaa4dd..80217fff 100644
--- a/WHMapper/Repositories/ADefaultRepository.cs
+++ b/WHMapper/Repositories/ADefaultRepository.cs
@@ -2,7 +2,8 @@
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
-
+using Microsoft.EntityFrameworkCore;
+
namespace WHMapper.Repositories
{
@@ -12,9 +13,9 @@ namespace WHMapper.Repositories
/// Server DbContext
/// Object to Manage in database
/// type of Id of Object
- public abstract class ADefaultRepository : IDefaultRepository
+ public abstract class ADefaultRepository where C : DbContext
{
- protected readonly C _dbContext;
+ protected readonly IDbContextFactory _contextFactory;
protected abstract Task?> AGetAll();
protected abstract Task AGetById(U id);
@@ -22,12 +23,9 @@ public abstract class ADefaultRepository : IDefaultRepository
protected abstract Task AUpdate(U id, T item);
protected abstract Task ADeleteById(U id);
-
- protected static SemaphoreSlim semSlim = new SemaphoreSlim(1, 1);
-
- public ADefaultRepository(C dbContext)
+ public ADefaultRepository(IDbContextFactory dbContext)
{
- _dbContext = dbContext;
+ _contextFactory = dbContext;
}
public async Task Create(T item)
@@ -56,5 +54,7 @@ public async Task DeleteById(U id)
return await AUpdate(id, item);
}
+
+
}
}
diff --git a/WHMapper/Repositories/WHAccesses/WHAccessRepository.cs b/WHMapper/Repositories/WHAccesses/WHAccessRepository.cs
index 003f1bda..c21f2d89 100644
--- a/WHMapper/Repositories/WHAccesses/WHAccessRepository.cs
+++ b/WHMapper/Repositories/WHAccesses/WHAccessRepository.cs
@@ -8,94 +8,97 @@ namespace WHMapper.Repositories.WHAccesses
{
public class WHAccessRepository : ADefaultRepository, IWHAccessRepository
{
- public WHAccessRepository(WHMapperContext context) : base(context)
+ public WHAccessRepository(IDbContextFactory context)
+ : base(context)
{
}
protected override async Task ACreate(WHAccess item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- await _dbContext.DbWHAccesses.AddAsync(item);
- await _dbContext.SaveChangesAsync();
+ try
+ {
+ await context.DbWHAccesses.AddAsync(item);
+ await context.SaveChangesAsync();
- return item;
- }
- catch (Exception ex)
- {
- return null;
- }
- finally
- {
- semSlim.Release();
- }
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+ }
}
protected override async Task ADeleteById(int id)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- var deleteRow = await _dbContext.DbWHAccesses.Where(x => x.Id == id).ExecuteDeleteAsync();
- if (deleteRow > 0)
- return true;
- else
+ try
+ {
+ var deleteRow = await context.DbWHAccesses.Where(x => x.Id == id).ExecuteDeleteAsync();
+ if (deleteRow > 0)
+ return true;
+ else
+ return false;
+ }
+ catch (Exception ex)
+ {
return false;
- }
- catch (Exception ex)
- {
- return false;
- }
- finally
- {
- semSlim.Release();
+ }
}
}
protected override async Task?> AGetAll()
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- return await _dbContext.DbWHAccesses.ToListAsync();
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ return await context.DbWHAccesses.ToListAsync();
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task AGetById(int id)
{
- await semSlim.WaitAsync();
- try
- {
- return await _dbContext.DbWHAccesses.FindAsync(id);
- }
- finally
+ using (var context = _contextFactory.CreateDbContext())
{
- semSlim.Release();
- }
+ try
+ {
+ return await context.DbWHAccesses.FindAsync(id);
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+ }
}
protected override async Task AUpdate(int id, WHAccess item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- if (id != item.Id)
- return null;
+ try
+ {
+ if (id != item.Id)
+ return null;
- _dbContext.DbWHAccesses.Update(item);
- await _dbContext.SaveChangesAsync();
- return item;
- }
- finally
- {
- semSlim.Release();
+ context.DbWHAccesses.Update(item);
+ await context.SaveChangesAsync();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
}
diff --git a/WHMapper/Repositories/WHAdmins/WHAdminRepository.cs b/WHMapper/Repositories/WHAdmins/WHAdminRepository.cs
index a3e7caad..8f218608 100644
--- a/WHMapper/Repositories/WHAdmins/WHAdminRepository.cs
+++ b/WHMapper/Repositories/WHAdmins/WHAdminRepository.cs
@@ -8,94 +8,97 @@ namespace WHMapper.Repositories.WHAdmins
{
public class WHAdminRepository : ADefaultRepository, IWHAdminRepository
{
- public WHAdminRepository(WHMapperContext context) : base(context)
+ public WHAdminRepository(IDbContextFactory context)
+ : base(context)
{
}
protected override async Task ACreate(WHAdmin item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- await _dbContext.DbWHAdmins.AddAsync(item);
- await _dbContext.SaveChangesAsync();
+ try
+ {
+ await context.DbWHAdmins.AddAsync(item);
+ await context.SaveChangesAsync();
- return item;
- }
- catch (Exception ex)
- {
- return null;
- }
- finally
- {
- semSlim.Release();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task ADeleteById(int id)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- var deleteRow = await _dbContext.DbWHAdmins.Where(x => x.Id == id).ExecuteDeleteAsync();
- if (deleteRow > 0)
- return true;
- else
+ try
+ {
+ var deleteRow = await context.DbWHAdmins.Where(x => x.Id == id).ExecuteDeleteAsync();
+ if (deleteRow > 0)
+ return true;
+ else
+ return false;
+ }
+ catch (Exception ex)
+ {
return false;
- }
- catch (Exception ex)
- {
- return false;
- }
- finally
- {
- semSlim.Release();
+ }
}
}
protected override async Task?> AGetAll()
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- return await _dbContext.DbWHAdmins.ToListAsync();
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ return await context.DbWHAdmins.ToListAsync();
+ }
+ catch(Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task AGetById(int id)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- return await _dbContext.DbWHAdmins.FindAsync(id);
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ return await context.DbWHAdmins.FindAsync(id);
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task AUpdate(int id, WHAdmin item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- if (id != item.Id)
- return null;
+ try
+ {
+ if (id != item.Id)
+ return null;
- _dbContext.DbWHAdmins.Update(item);
- await _dbContext.SaveChangesAsync();
- return item;
- }
- finally
- {
- semSlim.Release();
+ context.DbWHAdmins.Update(item);
+ await context.SaveChangesAsync();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
}
diff --git a/WHMapper/Repositories/WHMaps/WHMapRepository.cs b/WHMapper/Repositories/WHMaps/WHMapRepository.cs
index 60262dd9..b815e290 100644
--- a/WHMapper/Repositories/WHMaps/WHMapRepository.cs
+++ b/WHMapper/Repositories/WHMaps/WHMapRepository.cs
@@ -8,101 +8,107 @@ namespace WHMapper.Repositories.WHMaps
{
public class WHMapRepository : ADefaultRepository, IWHMapRepository
{
- public WHMapRepository(WHMapperContext context) : base(context)
+ public WHMapRepository(IDbContextFactory context)
+ : base(context)
{
}
protected override async Task ACreate(WHMap item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- await _dbContext.DbWHMaps.AddAsync(item);
- await _dbContext.SaveChangesAsync();
+ try
+ {
+ await context.DbWHMaps.AddAsync(item);
+ await context.SaveChangesAsync();
- return item;
- }
- catch (Exception ex)
- {
- return null;
- }
- finally
- {
- semSlim.Release();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task ADeleteById(int id)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- var deleteRow = await _dbContext.DbWHMaps.Where(x => x.Id == id).ExecuteDeleteAsync();
- if (deleteRow > 0)
- return true;
- else
+ try
+ {
+ var deleteRow = await context.DbWHMaps.Where(x => x.Id == id).ExecuteDeleteAsync();
+ if (deleteRow > 0)
+ return true;
+ else
+ return false;
+ }
+ catch (Exception ex)
+ {
return false;
- }
- catch (Exception ex)
- {
- return false;
- }
- finally
- {
- semSlim.Release();
+ }
}
}
protected override async Task?> AGetAll()
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
+ try
+ {
+
+ if (context.DbWHMaps.Count() == 0)
+ return await context.DbWHMaps.ToListAsync();
+ else
+ return await context.DbWHMaps
+ .Include(x => x.WHSystems)
+ .Include(x => x.WHSystemLinks)
+ .OrderBy(x => x.Name).ToListAsync();
+ }
+ catch(Exception ex)
+ {
+ return null;
+ }
- if (_dbContext.DbWHMaps.Count() == 0)
- return await _dbContext.DbWHMaps.ToListAsync();
- else
- return await _dbContext.DbWHMaps
- .Include(x => x.WHSystems)
- .Include(x => x.WHSystemLinks)
- .OrderBy(x => x.Name).ToListAsync();
- }
- finally
- {
- semSlim.Release();
}
}
protected override async Task AGetById(int id)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- return await _dbContext.DbWHMaps.FindAsync(id);
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ return await context.DbWHMaps
+ .Include(x => x.WHSystems)
+ .Include(x => x.WHSystemLinks)
+ .OrderBy(x => x.Name).FirstOrDefaultAsync(x => x.Id==id);
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
-
}
protected override async Task AUpdate(int id, WHMap item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- if (id != item.Id)
- return null;
+ try
+ {
+ if (id != item.Id)
+ return null;
- _dbContext.DbWHMaps.Update(item);
- await _dbContext.SaveChangesAsync();
- return item;
- }
- finally
- {
- semSlim.Release();
+ context.DbWHMaps.Update(item);
+ await context.SaveChangesAsync();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
}
diff --git a/WHMapper/Repositories/WHSignatures/WHSignatureRepository.cs b/WHMapper/Repositories/WHSignatures/WHSignatureRepository.cs
index ae92ad5a..774055f5 100644
--- a/WHMapper/Repositories/WHSignatures/WHSignatureRepository.cs
+++ b/WHMapper/Repositories/WHSignatures/WHSignatureRepository.cs
@@ -10,198 +10,195 @@ namespace WHMapper.Repositories.WHSignatures
public class WHSignatureRepository : ADefaultRepository, IWHSignatureRepository
{
- public WHSignatureRepository(WHMapperContext context) : base(context)
+ public WHSignatureRepository(IDbContextFactory context)
+ : base(context)
{
}
protected override async Task ACreate(WHSignature item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- await _dbContext.DbWHSignatures.AddAsync(item);
- await _dbContext.SaveChangesAsync();
+ try
+ {
+ await context.DbWHSignatures.AddAsync(item);
+ await context.SaveChangesAsync();
- return item;
- }
- catch (Exception ex)
- {
- return null;
- }
- finally
- {
- semSlim.Release();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task ADeleteById(int id)
{
- await semSlim.WaitAsync();
- try
- {
- await _dbContext.DbWHSignatures.Where(x => x.Id == id).ExecuteDeleteAsync();
- return true;
- }
- catch (Exception ex)
+ using (var context = _contextFactory.CreateDbContext())
{
- return false;
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ await context.DbWHSignatures.Where(x => x.Id == id).ExecuteDeleteAsync();
+ return true;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
}
}
protected override async Task?> AGetAll()
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- if (_dbContext.DbWHSignatures.Count() == 0)
- return await _dbContext.DbWHSignatures.ToListAsync();
- else
- return await _dbContext.DbWHSignatures.OrderBy(x => x.Id)
- .ToListAsync();
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ if (context.DbWHSignatures.Count() == 0)
+ return await context.DbWHSignatures.ToListAsync();
+ else
+ return await context.DbWHSignatures.OrderBy(x => x.Id)
+ .ToListAsync();
+ }
+ catch(Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task AGetById(int id)
{
- await semSlim.WaitAsync();
- try
- {
- return await _dbContext.DbWHSignatures.FindAsync(id);
- }
- finally
+ using (var context = _contextFactory.CreateDbContext())
{
- semSlim.Release();
+ try
+ {
+ return await context.DbWHSignatures.FindAsync(id);
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task AUpdate(int id, WHSignature item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- if (id != item.Id)
- return null;
+ try
+ {
+ if (id != item.Id)
+ return null;
- _dbContext.DbWHSignatures.Update(item);
- await _dbContext.SaveChangesAsync();
- return item;
- }
- finally
- {
- semSlim.Release();
+ context.DbWHSignatures.Update(item);
+ await context.SaveChangesAsync();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
public async Task GetByName(string name)
{
- await semSlim.WaitAsync();
- try
- {
- return await _dbContext.DbWHSignatures.FirstOrDefaultAsync(x => x.Name == name);
- }
- finally
+ using (var context = _contextFactory.CreateDbContext())
{
- semSlim.Release();
+ try
+ {
+ return await context.DbWHSignatures.FirstOrDefaultAsync(x => x.Name == name);
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
public async Task> Update(IEnumerable whSignatures)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
-
- foreach (var sig in whSignatures)
+ try
{
- _dbContext.Entry(sig).State = EntityState.Modified;
- }
- await _dbContext.SaveChangesAsync();
+ foreach (var sig in whSignatures)
+ {
+ context.Entry(sig).State = EntityState.Modified;
+ }
- return whSignatures;
- }
- catch(Exception ex)
- {
- return null;
- }
- finally
- {
- semSlim.Release();
+ await context.SaveChangesAsync();
+
+ return whSignatures;
+ }
+ catch(Exception ex)
+ {
+ return null;
+ }
}
}
public async Task?> GetByWHId(int whid)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- if (_dbContext.DbWHSignatures.Count() == 0)
- return await _dbContext.DbWHSignatures.ToListAsync();
- else
- return await _dbContext.DbWHSignatures.Where(x => x.WHId == whid).OrderBy(x => x.Id)
- .ToListAsync();
+ try
+ {
+ if (context.DbWHSignatures.Count() == 0)
+ return await context.DbWHSignatures.ToListAsync();
+ else
+ return await context.DbWHSignatures.Where(x => x.WHId == whid).OrderBy(x => x.Id)
+ .ToListAsync();
- }
- catch (Exception ex)
- {
- return null;
- }
- finally
- {
- semSlim.Release();
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
public async Task DeleteByWHId(int whid)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- int rowDeleted = await _dbContext.DbWHSignatures.Where(x => x.WHId == whid).ExecuteDeleteAsync();
- if (rowDeleted > 0)
- return true;
- else
+ try
+ {
+ int rowDeleted = await context.DbWHSignatures.Where(x => x.WHId == whid).ExecuteDeleteAsync();
+ if (rowDeleted > 0)
+ return true;
+ else
+ return false;
+ }
+ catch (Exception ex)
+ {
return false;
- }
- catch (Exception ex)
- {
- return false;
- }
- finally
- {
- semSlim.Release();
+ }
}
}
public async Task> Create(IEnumerable whSignatures)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- var sigArray = whSignatures.ToArray();
- await _dbContext.DbWHSignatures.AddRangeAsync(sigArray);
- await _dbContext.SaveChangesAsync();
+ try
+ {
+ var sigArray = whSignatures.ToArray();
+ await context.DbWHSignatures.AddRangeAsync(sigArray);
+ await context.SaveChangesAsync();
- return whSignatures;
- }
- catch (Exception ex)
- {
- return null;
- }
- finally
- {
- semSlim.Release();
+ return whSignatures;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
}
diff --git a/WHMapper/Repositories/WHSystemLinks/WHSystemLinkRepository.cs b/WHMapper/Repositories/WHSystemLinks/WHSystemLinkRepository.cs
index ede33977..7e34aeae 100644
--- a/WHMapper/Repositories/WHSystemLinks/WHSystemLinkRepository.cs
+++ b/WHMapper/Repositories/WHSystemLinks/WHSystemLinkRepository.cs
@@ -8,92 +8,95 @@ namespace WHMapper.Repositories.WHSystemLinks
{
public class WHSystemLinkRepository : ADefaultRepository, IWHSystemLinkRepository
{
- public WHSystemLinkRepository(WHMapperContext context) : base(context)
+ public WHSystemLinkRepository(IDbContextFactory context)
+ : base(context)
{
}
protected override async Task ACreate(WHSystemLink item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- await _dbContext.DbWHSystemLinks.AddAsync(item);
- await _dbContext.SaveChangesAsync();
+ try
+ {
+ await context.DbWHSystemLinks.AddAsync(item);
+ await context.SaveChangesAsync();
- return item;
- }
- catch (Exception ex)
- {
- return null;
- }
- finally
- {
- semSlim.Release();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task ADeleteById(int id)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- int rowDeleted = await _dbContext.DbWHSystemLinks.Where(x => x.Id == id).ExecuteDeleteAsync();
- if (rowDeleted > 0)
- return true;
- else
+ try
+ {
+ int rowDeleted = await context.DbWHSystemLinks.Where(x => x.Id == id).ExecuteDeleteAsync();
+ if (rowDeleted > 0)
+ return true;
+ else
+ return false;
+ }
+ catch (Exception ex)
+ {
return false;
- }
- catch (Exception ex)
- {
- return false;
- }
- finally
- {
- semSlim.Release();
+ }
}
}
protected override async Task?> AGetAll()
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- return await _dbContext.DbWHSystemLinks.ToListAsync();
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ return await context.DbWHSystemLinks.ToListAsync();
+ }
+ catch(Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task AGetById(int id)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- return await _dbContext.DbWHSystemLinks.FindAsync(id);
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ return await context.DbWHSystemLinks.FindAsync(id);
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task AUpdate(int id, WHSystemLink item)
{
- await semSlim.WaitAsync();
- try
+ using (var context = _contextFactory.CreateDbContext())
{
- if (id != item.Id)
- return null;
+ try
+ {
+ if (id != item.Id)
+ return null;
- _dbContext.DbWHSystemLinks.Update(item);
- await _dbContext.SaveChangesAsync();
- return item;
- }
- finally
- {
- semSlim.Release();
+ context.DbWHSystemLinks.Update(item);
+ await context.SaveChangesAsync();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
}
diff --git a/WHMapper/Repositories/WHSystems/WHSystemRepository.cs b/WHMapper/Repositories/WHSystems/WHSystemRepository.cs
index e3de57e9..f2af5322 100644
--- a/WHMapper/Repositories/WHSystems/WHSystemRepository.cs
+++ b/WHMapper/Repositories/WHSystems/WHSystemRepository.cs
@@ -10,133 +10,121 @@ namespace WHMapper.Repositories.WHSystems
{
public class WHSystemRepository : ADefaultRepository, IWHSystemRepository
{
- public WHSystemRepository(WHMapperContext context) : base(context)
+ public WHSystemRepository(IDbContextFactory context)
+ : base(context)
{
}
protected override async Task ACreate(WHSystem item)
{
- await semSlim.WaitAsync();
- try
- {
- await _dbContext.DbWHSystems.AddAsync(item);
- await _dbContext.SaveChangesAsync();
- return item;
- }
- catch (Exception ex)
+ using (var context = _contextFactory.CreateDbContext())
{
-
- return null;
- }
- finally
- {
- semSlim.Release();
+ try
+ {
+ await context.DbWHSystems.AddAsync(item);
+ await context.SaveChangesAsync();
+
+ return item;
+ }
+ catch (Exception ex)
+ {
+
+ return null;
+ }
}
}
protected override async Task ADeleteById(int id)
{
- await semSlim.WaitAsync();
- try
- {
- await _dbContext.DbWHSystems.Where(x => x.Id == id).ExecuteDeleteAsync();
- return true;
- }
- catch(Exception ex)
- {
- return false;
- }
- finally
- {
- semSlim.Release();
+ using (var context = _contextFactory.CreateDbContext())
+ {
+ try
+ {
+ await context.DbWHSystems.Where(x => x.Id == id).ExecuteDeleteAsync();
+ return true;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
}
}
protected override async Task?> AGetAll()
{
- await semSlim.WaitAsync();
- try
- {
- if (_dbContext.DbWHSystems.Count() == 0)
- return await _dbContext.DbWHSystems.ToListAsync();
- else
- return await _dbContext.DbWHSystems.OrderBy(x => x.Name)
- .Include(x => x.WHSignatures)
- .ToListAsync();
- }
- catch (Exception ex)
- {
-
- return null;
- }
- finally
- {
- semSlim.Release();
+ using (var context = _contextFactory.CreateDbContext())
+ {
+ try
+ {
+ if (context.DbWHSystems.Count() == 0)
+ return await context.DbWHSystems.ToListAsync();
+ else
+ return await context.DbWHSystems.OrderBy(x => x.Name)
+ .Include(x => x.WHSignatures)
+ .ToListAsync();
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
protected override async Task AGetById(int id)
{
- await semSlim.WaitAsync();
- try
- {
- var res = await _dbContext.DbWHSystems
- .Include(x=>x.WHSignatures)
- .SingleOrDefaultAsync(x => x.Id == id);
-
- return res;
- }
- catch (Exception ex)
+ using (var context = _contextFactory.CreateDbContext())
{
+ try
+ {
+ var res = await context.DbWHSystems
+ .Include(x => x.WHSignatures)
+ .SingleOrDefaultAsync(x => x.Id == id);
- return null;
- }
- finally
- {
- semSlim.Release();
+ return res;
+ }
+ catch (Exception ex)
+ {
+
+ return null;
+ }
}
}
protected override async Task AUpdate(int id, WHSystem item)
{
- await semSlim.WaitAsync();
- try
- {
- if (id != item.Id)
- return null;
-
- _dbContext.DbWHSystems.Update(item);
- await _dbContext.SaveChangesAsync();
- return item;
- }
- catch (Exception ex)
+ using (var context = _contextFactory.CreateDbContext())
{
+ try
+ {
+ if (id != item.Id)
+ return null;
- return null;
- }
- finally
- {
- semSlim.Release();
+ context.DbWHSystems.Update(item);
+ await context.SaveChangesAsync();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
}
public async Task GetByName(string name)
{
- await semSlim.WaitAsync();
- try
- {
- return await _dbContext.DbWHSystems.Include(x => x.WHSignatures).FirstOrDefaultAsync(x => x.Name == name);
- }
- catch (Exception ex)
- {
+ using (var context = _contextFactory.CreateDbContext())
+ {
+ try
+ {
+ return await context.DbWHSystems.Include(x => x.WHSignatures).FirstOrDefaultAsync(x => x.Name == name);
+ }
+ catch (Exception ex)
+ {
- return null;
- }
- finally
- {
- semSlim.Release();
+ return null;
+ }
}
}
}
diff --git a/WHMapper/Services/SDE/ISDEServices.cs b/WHMapper/Services/SDE/ISDEServices.cs
index 765cd2b4..0f70fea0 100644
--- a/WHMapper/Services/SDE/ISDEServices.cs
+++ b/WHMapper/Services/SDE/ISDEServices.cs
@@ -5,7 +5,7 @@ namespace WHMapper.Services.SDE
{
public interface ISDEServices
{
- IEnumerable SearchSystem(string value);
+ Task> SearchSystem(string value);
}
}
diff --git a/WHMapper/Services/SDE/SDEServices.cs b/WHMapper/Services/SDE/SDEServices.cs
index 48641d12..2057a4a7 100644
--- a/WHMapper/Services/SDE/SDEServices.cs
+++ b/WHMapper/Services/SDE/SDEServices.cs
@@ -1,8 +1,10 @@
using System;
using System.IO.Compression;
+using WHMapper.Models.Db;
using WHMapper.Models.DTO.EveAPI.Universe;
using WHMapper.Models.DTO.SDE;
using WHMapper.Services.Anoik;
+using WHMapper.Services.EveAPI;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
@@ -10,6 +12,8 @@ namespace WHMapper.Services.SDE
{
public class SDEServices : ISDEServices
{
+ private readonly ParallelOptions _options;
+
private readonly ILogger _logger;
private const string SDE_ZIP_PATH = @"./Resources/SDE/sde.zip";
@@ -21,6 +25,7 @@ public class SDEServices : ISDEServices
public SDEServices(ILogger logger)
{
_logger = logger;
+ _options = new ParallelOptions { MaxDegreeOfParallelism = 4 };
if (!Directory.Exists(SDE_TARGET_DIRECTORY))
{
@@ -33,7 +38,7 @@ public SDEServices(ILogger logger)
}
- public IEnumerable? SearchSystem(string value)
+ public async Task> SearchSystem(string value)
{
if (Directory.Exists(SDE_TARGET_DIRECTORY) && !String.IsNullOrEmpty(value) && value.Length > 2)
{
@@ -44,7 +49,15 @@ public SDEServices(ILogger logger)
.WithNamingConvention(CamelCaseNamingConvention.Instance)
.Build();
- foreach (string directoryPath in directories)
+ /*
+ await Parallel.ForEachAsync(directories.Take(20), _options, async (allianceId, token) =>
+ {
+ //var alliance = await EveAPIServices.AllianceServices.GetAlliance(allianceId);
+ //_eveCharacterEntities.Add(new WHAccess(allianceId, alliance.Name, Models.Db.Enums.WHAccessEntity.Alliance));
+ });*/
+
+ //foreach (string directoryPath in directories)
+ await Parallel.ForEachAsync(directories.Take(20), _options, async (directoryPath, token) =>
{
var sdeFiles = Directory.GetFiles(directoryPath);
if (sdeFiles.Count() > 0 && sdeFiles.Any(x => x.Contains(SDE_DEFAULT_SOLARSYSTEM_STATIC_FILEMANE)))
@@ -63,8 +76,7 @@ public SDEServices(ILogger logger)
}
}
}
- }
-
+ });
return results;
}
diff --git a/WHMapper/Services/WHSignatures/IWHSignatureHelper.cs b/WHMapper/Services/WHSignatures/IWHSignatureHelper.cs
index 21ad7836..7522eb06 100644
--- a/WHMapper/Services/WHSignatures/IWHSignatureHelper.cs
+++ b/WHMapper/Services/WHSignatures/IWHSignatureHelper.cs
@@ -5,6 +5,8 @@ namespace WHMapper.Services.WHSignature
{
public interface IWHSignatureHelper
{
+ const string SCAN_VALIDATION_REGEX = "[a-zA-Z]{3}-[0-9]{3}\\s([a-zA-Z\\s]+)[0-9]*.[0-9]+%\\s[0-9]*.[0-9]+\\s(AU|km)";
+
Task ValidateScanResult(string? scanResult);
Task?> ParseScanResult(string scanUser,int currentSystemScannedId, string? scanResult);
Task ImportScanResult(string scanUser, int currentSystemScannedId, string? scanResult,bool lazyDeleted);
diff --git a/WHMapper/Services/WHSignatures/WHSignatureHelper.cs b/WHMapper/Services/WHSignatures/WHSignatureHelper.cs
index ae20436f..0ef34bcc 100644
--- a/WHMapper/Services/WHSignatures/WHSignatureHelper.cs
+++ b/WHMapper/Services/WHSignatures/WHSignatureHelper.cs
@@ -15,8 +15,6 @@ namespace WHMapper.Services.WHSignatures
{
public class WHSignatureHelper : IWHSignatureHelper
{
- private const string SCAN_VALIDATION_REGEX = "[a-zA-Z]{3}-[0-9]{3}\\s([a-zA-Z\\s]+)[0-9]*.[0-9]+%\\s[0-9]*.[0-9]+\\sAU";
-
private IWHSignatureRepository _dbWHSignatures;
public WHSignatureHelper(IWHSignatureRepository sigRepo)
@@ -30,7 +28,7 @@ public async Task ValidateScanResult(string? scanResult)
{
if (!string.IsNullOrEmpty(scanResult))
{
- Match match = Regex.Match(scanResult, SCAN_VALIDATION_REGEX, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(2));
+ Match match = Regex.Match(scanResult, IWHSignatureHelper.SCAN_VALIDATION_REGEX, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(2));
return match.Success;
}
return false;
diff --git a/WHMapper/WHMapper.csproj b/WHMapper/WHMapper.csproj
index 79465924..f9e73d75 100644
--- a/WHMapper/WHMapper.csproj
+++ b/WHMapper/WHMapper.csproj
@@ -8,6 +8,9 @@
6545e3a1-0941-41bf-a51b-1a58ca6ed175
+
+ 4
+
@@ -88,7 +91,7 @@
-
+
diff --git a/WHMapper/appsettings.Development.json b/WHMapper/appsettings.Development.json
deleted file mode 100644
index 9e53786e..00000000
--- a/WHMapper/appsettings.Development.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "DetailedErrors": true,
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- }
-}
-
diff --git a/WHMapper/appsettings.json b/WHMapper/appsettings.json
index 1e497dae..91511d89 100644
--- a/WHMapper/appsettings.json
+++ b/WHMapper/appsettings.json
@@ -11,13 +11,14 @@
"EveSSO": {
"Domain": "login.eveonline.com",
- "ClientId": "39eee319b2d14a4a9ba3e9eb1b1410b8",
- "Secret": "Qg5uFfjYcqhvrw6FdXhxTMHM9yxNBBb8N3BYGvCN",
+ "ClientId": "",
+ "Secret": "",
"DefaultScopes": [
"esi-location.read_location.v1",
"esi-location.read_ship_type.v1",
"esi-ui.open_window.v1",
- "esi-ui.write_waypoint.v1"
+ "esi-ui.write_waypoint.v1",
+ "esi-search.search_structures.v1"
]
},
"EveAPI": {
diff --git a/WHMapper/wwwroot/favicon.ico b/WHMapper/wwwroot/favicon.ico
index 63e859b476eff5055e0e557aaa151ca8223fbeef..3027c9960552e63dcb5f4251ba52b379c69590d4 100644
GIT binary patch
literal 28143
zcmW(+1yCGK6Wu#pg1bu~xVyUsNs!>K!6mpH9-QDV!Tqq{4#7QGaCZytKi_{_SGQZc
zRkzbK-TnIY8vp>k9shkm00ppU2LO0)=i#c#vhR?Ikl#+<$;(N7{_pO8Uqtw~A3f(1
zi~p`1oR!r<6F=S40l+RnUP@fuS4>YC4{E={YZ5mOjhn
zUw^89)R$ECjan5%ZL4%lc<2>#a}i};8*X95@POY7L!TZwE#SieOn%+*M+fpk6BQfo
z*Dr#1ZtHc9V<1SdZ#P?jT!s@k;3<mJ~6k
zs_3lg!l)mbu?{CW;dl+GmPFVx>T`a{B_CBkFQ*J;cr`5SZq#yOIu7z=OeMt
zw_8ljPLIe(^p2jHu-J?34c}woM`UkSgRZ@s5em~0K^V4vb)mODWhEF0NF4dXBVHe|pm%Ms)rxe^*sXn}NjH|7em
zEhFyFC1oE2HJ(5Ff-#0E1&_-fyQ18i12=t%Y$a+)Vt`DvPSpYk>NtOh#KqJOsvK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