Make AdminLogsSystem an IoC manager (#8492)
* Make log not entity system * Fixes
This commit is contained in:
@@ -16,12 +16,12 @@ namespace Content.Server.Administration.Logs;
|
||||
|
||||
public sealed class AdminLogsEui : BaseEui
|
||||
{
|
||||
[Dependency] private readonly IAdminLogManager _adminLogs = default!;
|
||||
[Dependency] private readonly IAdminManager _adminManager = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _configuration = default!;
|
||||
|
||||
private readonly ISawmill _sawmill;
|
||||
private readonly AdminLogSystem _logSystem;
|
||||
|
||||
private int _clientBatchSize;
|
||||
private bool _isLoading = true;
|
||||
@@ -33,12 +33,10 @@ public sealed class AdminLogsEui : BaseEui
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
_sawmill = _logManager.GetSawmill(AdminLogSystem.SawmillId);
|
||||
_sawmill = _logManager.GetSawmill(AdminLogManager.SawmillId);
|
||||
|
||||
_configuration.OnValueChanged(CCVars.AdminLogsClientBatchSize, ClientBatchSizeChanged, true);
|
||||
|
||||
_logSystem = EntitySystem.Get<AdminLogSystem>();
|
||||
|
||||
_filter = new LogFilter
|
||||
{
|
||||
CancellationToken = _logSendCancellation.Token,
|
||||
@@ -146,7 +144,7 @@ public sealed class AdminLogsEui : BaseEui
|
||||
|
||||
await Task.Run(async () =>
|
||||
{
|
||||
logs = await _logSystem.All(_filter);
|
||||
logs = await _adminLogs.All(_filter);
|
||||
}, _filter.CancellationToken);
|
||||
|
||||
if (logs.Count > 0)
|
||||
@@ -186,7 +184,7 @@ public sealed class AdminLogsEui : BaseEui
|
||||
_isLoading = true;
|
||||
StateDirty();
|
||||
|
||||
var round = await Task.Run(() => _logSystem.Round(roundId));
|
||||
var round = await Task.Run(() => _adminLogs.Round(roundId));
|
||||
var players = round.Players
|
||||
.ToDictionary(player => player.UserId, player => player.LastSeenUserName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user