mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Displays a scatter chart timeline of when the device was seen online, with a time range selector (Today → Last Year). Tooltips show event date/time, type, and highlight any IP or vendor changes relative to the current device data. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
741 B
Dart
29 lines
741 B
Dart
class DeviceEvent {
|
|
final int id;
|
|
final String macAddress;
|
|
final DateTime createdOn;
|
|
final String eventType;
|
|
final String ipv4Address;
|
|
final String vendor;
|
|
|
|
const DeviceEvent({
|
|
required this.id,
|
|
required this.macAddress,
|
|
required this.createdOn,
|
|
required this.eventType,
|
|
required this.ipv4Address,
|
|
required this.vendor,
|
|
});
|
|
|
|
factory DeviceEvent.fromJson(Map<String, dynamic> json) {
|
|
return DeviceEvent(
|
|
id: json['id'] as int,
|
|
macAddress: json['mac_address'] as String,
|
|
createdOn: DateTime.parse(json['created_on'] as String),
|
|
eventType: json['event_type'] as String,
|
|
ipv4Address: json['ipv4_address'] as String,
|
|
vendor: json['vendor'] as String,
|
|
);
|
|
}
|
|
}
|