Finish server detail page

This commit is contained in:
LollipopKit
2021-10-28 19:04:52 +08:00
parent 10a745d25a
commit 53d8268220
11 changed files with 312 additions and 73 deletions

View File

@@ -4,34 +4,35 @@ class DiskInfo {
"mountPath": "",
"mountLocation": "",
"usedPercent": 0,
"used": "",=
"used": "",
"size": "",
"avail": ""
}
*/
String? mountPath;
String? mountLocation;
double? usedPercent;
String? used;
String? size;
String? avail;
late String mountPath;
late String mountLocation;
late int usedPercent;
late String used;
late String size;
late String avail;
DiskInfo({
DiskInfo(
this.mountPath,
this.mountLocation,
this.usedPercent,
this.used,
this.size,
this.avail,
});
);
DiskInfo.fromJson(Map<String, dynamic> json) {
mountPath = json["mountPath"]?.toString();
mountLocation = json["mountLocation"]?.toString();
usedPercent = double.parse(json["usedPercent"]);
used = json["used"]?.toString();
size = json["size"]?.toString();
avail = json["avail"]?.toString();
mountPath = json["mountPath"].toString();
mountLocation = json["mountLocation"].toString();
usedPercent = int.parse(json["usedPercent"]);
used = json["used"].toString();
size = json["size"].toString();
avail = json["avail"].toString();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};