mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
@@ -47,3 +47,26 @@ List<Disk> parseDisk(String raw) {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// Issue 88
|
||||
///
|
||||
/// Due to performance issues,
|
||||
/// if there is no `Disk.loc == '/' || Disk.loc == '/sysroot'`,
|
||||
/// return the first [Disk] of [disks].
|
||||
///
|
||||
/// If we find out the biggest [Disk] of [disks],
|
||||
/// the fps may lower than 60.
|
||||
Disk? findRootDisk(List<Disk> disks) {
|
||||
if (disks.isEmpty) return null;
|
||||
final roots = disks.where((element) => element.loc == '/');
|
||||
if (roots.isEmpty) {
|
||||
final sysRoots = disks.where((element) => element.loc == '/sysroot');
|
||||
if (sysRoots.isEmpty) {
|
||||
return disks.first;
|
||||
} else {
|
||||
return sysRoots.first;
|
||||
}
|
||||
} else {
|
||||
return roots.first;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +123,7 @@ class DockerProvider extends BusyProvider {
|
||||
(element) => element.contains(item.containerId),
|
||||
orElse: () => '',
|
||||
);
|
||||
if (statsLine.isEmpty) continue;
|
||||
item.parseStats(statsLine);
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 406;
|
||||
static const int build = 412;
|
||||
static const String engine = "3.10.6";
|
||||
static const String buildAt = "2023-08-02 23:34:08.619104";
|
||||
static const int modifications = 2;
|
||||
static const String buildAt = "2023-08-04 22:48:00.585855";
|
||||
static const int modifications = 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user