mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Report devices seen on last scan in ARP/SNMP status
The ARP and SNMP scanner status endpoints and front-end cards now expose the number of devices found by the most recent successful scan, following the existing mDNS device-count pattern. The count persists across the running/waiting transitions, and for SNMP a failed poll keeps the last good count rather than overwriting it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
38158a4ffc
commit
d15411a889
@@ -2,11 +2,15 @@ class ArpScannerStatus {
|
||||
final bool isRunning;
|
||||
final double? runningForSeconds;
|
||||
final double? nextRunInSeconds;
|
||||
final int? lastScanDevicesSeen;
|
||||
final double? lastScanSecondsAgo;
|
||||
|
||||
const ArpScannerStatus({
|
||||
required this.isRunning,
|
||||
this.runningForSeconds,
|
||||
this.nextRunInSeconds,
|
||||
this.lastScanDevicesSeen,
|
||||
this.lastScanSecondsAgo,
|
||||
});
|
||||
|
||||
factory ArpScannerStatus.fromJson(Map<String, dynamic> json) {
|
||||
@@ -14,6 +18,8 @@ class ArpScannerStatus {
|
||||
isRunning: json['is_running'] as bool,
|
||||
runningForSeconds: (json['running_for_seconds'] as num?)?.toDouble(),
|
||||
nextRunInSeconds: (json['next_run_in_seconds'] as num?)?.toDouble(),
|
||||
lastScanDevicesSeen: (json['last_scan_devices_seen'] as num?)?.toInt(),
|
||||
lastScanSecondsAgo: (json['last_scan_seconds_ago'] as num?)?.toDouble(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user