Files
oott/frontend/lib/model/device_event.dart
T
rzuastiandClaude Sonnet 4.6 8e3eb96371 Add device event history chart to device details page
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>
2026-05-28 10:05:49 -04:00

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,
);
}
}