opt.: display total disk space on server tab

This commit is contained in:
lollipopkit
2024-03-06 15:31:54 +08:00
parent 4e6ea086e3
commit fc00b4b961
5 changed files with 46 additions and 58 deletions

View File

@@ -44,7 +44,7 @@ class NetSpeed extends TimeSeq<NetSpeedPart> {
/// Issue #295
/// Non-virtual network device prefix
static const List<String> realIfacePrefixs = ['eth', 'wlan', 'en', 'ww', 'wl'];
static const realIfacePrefixs = ['eth', 'wlan', 'en', 'ww', 'wl'];
/// Cached non-virtual network device prefix
final realIfaces = <String>[];
@@ -166,7 +166,8 @@ class NetSpeed extends TimeSeq<NetSpeedPart> {
for (final item in split.sublist(2)) {
try {
final data = item.trim().split(':');
final device = data.first;
final device = data.firstOrNull;
if (device == null) continue;
final bytes = data.last.trim().split(' ');
bytes.removeWhere((element) => element == '');
final bytesIn = BigInt.parse(bytes.first);