Fixed session view
This commit is contained in:
@@ -11,6 +11,8 @@ public class SessionClientService
|
||||
public readonly Guid Uuid = Guid.NewGuid();
|
||||
public readonly DateTime CreateTimestamp = DateTime.UtcNow;
|
||||
public User? User { get; private set; }
|
||||
public string Ip { get; private set; } = "N/A";
|
||||
public string Device { get; private set; } = "N/A";
|
||||
|
||||
public readonly IdentityService IdentityService;
|
||||
public readonly AlertService AlertService;
|
||||
@@ -39,6 +41,8 @@ public class SessionClientService
|
||||
public async Task Start()
|
||||
{
|
||||
User = await IdentityService.Get();
|
||||
Ip = IdentityService.GetIp();
|
||||
Device = IdentityService.GetDevice();
|
||||
|
||||
if (User != null) // Track users last visit
|
||||
{
|
||||
|
||||
@@ -60,13 +60,13 @@
|
||||
</Column>
|
||||
<Column TableItem="SessionClientService" Title="@(SmartTranslateService.Translate("IP"))" Field="@(x => x.Uuid)" Sortable="false" Filterable="false" Width="10%">
|
||||
<Template>
|
||||
@(context.IdentityService.GetIp())
|
||||
@(context.Ip)
|
||||
</Template>
|
||||
</Column>
|
||||
<Column TableItem="SessionClientService" Title="@(SmartTranslateService.Translate("URL"))" Field="@(x => x.NavigationManager.Uri)" Sortable="true" Filterable="true" Width="10%"/>
|
||||
<Column TableItem="SessionClientService" Title="@(SmartTranslateService.Translate("Device"))" Field="@(x => x.Uuid)" Sortable="false" Filterable="false" Width="10%">
|
||||
<Template>
|
||||
@(context.IdentityService.GetDevice())
|
||||
@(context.Device)
|
||||
</Template>
|
||||
</Column>
|
||||
<Column TableItem="SessionClientService" Title="@(SmartTranslateService.Translate("Time"))" Field="@(x => x.CreateTimestamp)" Sortable="true" Filterable="true" Width="10%">
|
||||
|
||||
Reference in New Issue
Block a user