mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
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>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e8df0a3980
commit
8e3eb96371
@@ -6,6 +6,7 @@ import '../utils/friendly_date_formatter.dart';
|
||||
import '../utils/oott_api.dart';
|
||||
import '../widgets/status_badge.dart';
|
||||
import 'device_actions.dart';
|
||||
import 'device_event_history.dart';
|
||||
|
||||
class DeviceDetail extends StatefulWidget {
|
||||
final String macAddress;
|
||||
@@ -105,6 +106,10 @@ class _DeviceDetailState extends State<DeviceDetail> {
|
||||
_DeviceHeader(device: device),
|
||||
const SizedBox(height: 24),
|
||||
_DeviceInfoCard(device: device),
|
||||
const SizedBox(height: 24),
|
||||
_SectionHeader(title: 'Event History'),
|
||||
const SizedBox(height: 12),
|
||||
DeviceEventHistory(device: device),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -112,6 +117,20 @@ class _DeviceDetailState extends State<DeviceDetail> {
|
||||
}
|
||||
}
|
||||
|
||||
class _SectionHeader extends StatelessWidget {
|
||||
final String title;
|
||||
|
||||
const _SectionHeader({required this.title});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _DeviceHeader extends StatelessWidget {
|
||||
final Device device;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user