mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
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:
co-authored by
Claude Sonnet 4.6
parent
020c7d2c49
commit
dc8f47e66d
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user