mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Add DHCP scanner to frontend status displays
Add a DHCP scanner card to the Status screen and a DHCP row to the consolidated Status card on the Home screen, mirroring the existing mDNS/SSDP implementations. Also label DHCP-discovered device events as "DHCP" instead of the raw "Dhcp". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
91eb0f17ba
commit
4e975598f9
@@ -0,0 +1,23 @@
|
||||
class DhcpScannerStatus {
|
||||
final bool isListening;
|
||||
final double? listeningForSeconds;
|
||||
final int devicesSeen;
|
||||
final double? lastDeviceSeenSecondsAgo;
|
||||
|
||||
const DhcpScannerStatus({
|
||||
required this.isListening,
|
||||
this.listeningForSeconds,
|
||||
required this.devicesSeen,
|
||||
this.lastDeviceSeenSecondsAgo,
|
||||
});
|
||||
|
||||
factory DhcpScannerStatus.fromJson(Map<String, dynamic> json) {
|
||||
return DhcpScannerStatus(
|
||||
isListening: json['is_listening'] as bool,
|
||||
listeningForSeconds: (json['listening_for_seconds'] as num?)?.toDouble(),
|
||||
devicesSeen: (json['devices_seen'] as num).toInt(),
|
||||
lastDeviceSeenSecondsAgo: (json['last_device_seen_seconds_ago'] as num?)
|
||||
?.toDouble(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user