Files
oott/frontend/lib/model/snmp_scanner_status.dart
T
rzuastiandClaude Opus 4.8 d15411a889 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>
2026-06-02 08:45:45 -04:00

26 lines
830 B
Dart

class SnmpScannerStatus {
final bool isRunning;
final double? runningForSeconds;
final double? nextRunInSeconds;
final int? lastScanDevicesSeen;
final double? lastScanSecondsAgo;
const SnmpScannerStatus({
required this.isRunning,
this.runningForSeconds,
this.nextRunInSeconds,
this.lastScanDevicesSeen,
this.lastScanSecondsAgo,
});
factory SnmpScannerStatus.fromJson(Map<String, dynamic> json) {
return SnmpScannerStatus(
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(),
);
}
}