mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Shows ARP scanner state (running/waiting/error) with a colored indicator and time that ticks locally every second, refreshing from the API every 5s. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
540 B
Dart
20 lines
540 B
Dart
class ArpScannerStatus {
|
|
final bool isRunning;
|
|
final double? runningForSeconds;
|
|
final double? nextRunInSeconds;
|
|
|
|
const ArpScannerStatus({
|
|
required this.isRunning,
|
|
this.runningForSeconds,
|
|
this.nextRunInSeconds,
|
|
});
|
|
|
|
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(),
|
|
);
|
|
}
|
|
}
|