mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
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>
26 lines
826 B
Dart
26 lines
826 B
Dart
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) {
|
|
return 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(),
|
|
);
|
|
}
|
|
}
|