Skip to content

Commit

Permalink
Last fixes (#111)
Browse files Browse the repository at this point in the history
* 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/

* fix update wh name extension sync
  • Loading branch information
pfh59 authored Aug 5, 2023
1 parent c22154f commit ef7df4a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion WHMapper/Hubs/IWHMapperNotificationHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface IWHMapperNotificationHub
Task NotifyUsersPosition(IDictionary<string, string> connectedUsersPosition);
Task NotifyWormoleMoved(string userName, int mapId, int wormholeId,double posx,double posy);
Task NotifyLinkChanged(string username,int mapId, int linkId, bool eol, SystemLinkSize size, SystemLinkMassStatus mass);
Task NotifyWormholeNameExtensionChanged(string username, int mapId, int wormholeId);
Task NotifyWormholeNameExtensionChanged(string username, int mapId, int wormholeId,bool increment);
Task NotifyWormholeSignaturesChanged(string username, int mapId, int wormholeId);
Task NotifyWormholeLockChanged(string username, int mapId, int wormholeId, bool locked);
}
Expand Down
4 changes: 2 additions & 2 deletions WHMapper/Hubs/WHMapperNotificationHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ public async Task SendLinkChanged(int mapId, int linkId, bool eol, SystemLinkSiz
}
}

public async Task SendWormholeNameExtensionChanged(int mapId, int wowrmholeId)
public async Task SendWormholeNameExtensionChanged(int mapId, int wowrmholeId,bool increment)
{
string userName = CurrentUser();
if (!string.IsNullOrEmpty(userName))
{
await Clients.AllExcept(Context.ConnectionId).NotifyWormholeNameExtensionChanged(userName, mapId, wowrmholeId);
await Clients.AllExcept(Context.ConnectionId).NotifyWormholeNameExtensionChanged(userName, mapId, wowrmholeId,increment);
}

}
Expand Down
15 changes: 11 additions & 4 deletions WHMapper/Pages/Mapper/Overview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
}
});

_hubConnection.On<string, int, int>("NotifyWormholeNameExtensionChanged", async (user, mapId, wormholeId) =>
_hubConnection.On<string, int, int,bool>("NotifyWormholeNameExtensionChanged", async (user, mapId, wormholeId,increment) =>
{
try
{
Expand All @@ -415,7 +415,14 @@ await Parallel.ForEachAsync(usersPosition, async (item, cancellationToken) =>
_selectedWHMap = await DbWHMaps.GetById(mapId);
EveSystemNodeModel systemToIncrementNameExtenstion = (EveSystemNodeModel)Diagram?.Nodes?.FirstOrDefault(x => ((EveSystemNodeModel)x).IdWH == wormholeId);
if (systemToIncrementNameExtenstion != null)
{
if (increment)
systemToIncrementNameExtenstion.IncrementNameExtension();
else
systemToIncrementNameExtenstion.DecrementNameExtension();
systemToIncrementNameExtenstion.Refresh();
}
}
}
catch (Exception ex)
Expand Down Expand Up @@ -538,11 +545,11 @@ private async Task NotifyLinkChanged(int mapId,int linkId, bool eol, SystemLinkS
}
}

private async Task NotifyWormholeNameExtensionChanged(int mapId, int wormholeId)
private async Task NotifyWormholeNameExtensionChanged(int mapId, int wormholeId,bool increment)
{
if (_hubConnection is not null)
{
await _hubConnection.SendAsync("SendWormholeNameExtensionChanged", mapId, wormholeId);
await _hubConnection.SendAsync("SendWormholeNameExtensionChanged", mapId, wormholeId, increment);
}
}

Expand Down Expand Up @@ -1065,7 +1072,7 @@ private async Task<bool> IncrementOrDecrementNodeExtensionNameOnMap(WHMap map, E

if (wh != null)
{
await NotifyWormholeNameExtensionChanged(map.Id, wh.Id);
await NotifyWormholeNameExtensionChanged(map.Id, wh.Id, increment);
return true;
}
}
Expand Down

0 comments on commit ef7df4a

Please sign in to comment.