Artifact analyzer now pauses on power-loss (#22974)

* Artifact analyzer now pauses on power-loss

Instead of just cancelling the current scan, the artifact analyzer
will now pause in case of power-loss.

Scanning will automatically resume when power returns.

* Improve artifact scanning pausing

This builds upon the latest improvements in artifact scanning
regarding UI update.
This commit is contained in:
Guillaume E
2023-12-30 18:49:24 +01:00
committed by GitHub
parent 3d955677c5
commit 4fe93cf456
5 changed files with 89 additions and 9 deletions

View File

@@ -46,14 +46,18 @@ public sealed class AnalysisConsoleScanUpdateState : BoundUserInterfaceState
public bool Scanning;
public bool Paused;
public TimeSpan? StartTime;
public TimeSpan? AccumulatedRunTime;
public TimeSpan? TotalTime;
public int PointAmount;
public AnalysisConsoleScanUpdateState(NetEntity? artifact, bool analyzerConnected, bool serverConnected, bool canScan, bool canPrint,
FormattedMessage? scanReport, bool scanning, TimeSpan? startTime, TimeSpan? totalTime, int pointAmount)
FormattedMessage? scanReport, bool scanning, bool paused, TimeSpan? startTime, TimeSpan? accumulatedRunTime, TimeSpan? totalTime, int pointAmount)
{
Artifact = artifact;
AnalyzerConnected = analyzerConnected;
@@ -64,7 +68,10 @@ public sealed class AnalysisConsoleScanUpdateState : BoundUserInterfaceState
ScanReport = scanReport;
Scanning = scanning;
Paused = paused;
StartTime = startTime;
AccumulatedRunTime = accumulatedRunTime;
TotalTime = totalTime;
PointAmount = pointAmount;