Add Status screen with ARP scanner live status display

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>
This commit is contained in:
rzuasti
2026-05-28 18:16:04 -04:00
co-authored by Claude Sonnet 4.6
parent 020c7d2c49
commit dc8f47e66d
4 changed files with 211 additions and 3 deletions
+8
View File
@@ -4,6 +4,7 @@ import 'package:dio/dio.dart';
import 'package:encrypter/encrypter/xor.dart';
import 'package:flutter/foundation.dart';
import 'package:frontend/utils/pref_utils.dart';
import '../model/arp_scanner_status.dart';
import '../model/device.dart';
import '../model/device_event.dart';
import '../model/device_type.dart';
@@ -156,6 +157,13 @@ class BackendAPI {
.toList();
}
Future<ArpScannerStatus> getArpScannerStatus() async {
debugPrint('About to call GET /arp_scanner/status');
final response = await _dio.get('/arp_scanner/status');
debugPrint('Received: ${response.data}');
return ArpScannerStatus.fromJson(response.data as Map<String, dynamic>);
}
Future<List<Notification>> listNotifications(bool? isNew, int offset) async {
debugPrint('About to call /notifications');