-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
class Recentactivity { | ||
final int id; | ||
final String app; | ||
final int cr; | ||
final int w; | ||
final int n; | ||
final int e; | ||
final int r; | ||
|
||
Recentactivity({ | ||
required this.id, | ||
required this.app, | ||
required this.cr, | ||
required this.w, | ||
required this.n, | ||
required this.e, | ||
required this.r, | ||
}); | ||
|
||
factory Recentactivity.fromJson(Map<String, dynamic> json) { | ||
return Recentactivity( | ||
id: json['id'], | ||
app: json['app'], | ||
cr: json['cr'], | ||
w: json['w'], | ||
n: json['n'], | ||
e: json['e'], | ||
r: json['r'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() => { | ||
'id': id, | ||
'app': app, | ||
'cr': cr, | ||
'w': w, | ||
'n': n, | ||
'e': e, | ||
'r': r, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
class ResourceUsage { | ||
int? cpuUsage; | ||
int? cloudUsage; | ||
int? memoryUsage; | ||
int? trafficUsage; | ||
|
||
int? cpuFiles; | ||
int? cloudFiles; | ||
int? memoryFiles; | ||
int? trafficFiles; | ||
|
||
String? cpuStorage; | ||
String? cloudStorage; | ||
String? memoryStorage; | ||
String? trafficStorage; | ||
|
||
ResourceUsage({ | ||
this.cpuUsage, | ||
this.cloudUsage, | ||
this.memoryUsage, | ||
this.trafficUsage, | ||
this.cpuFiles, | ||
this.cloudFiles, | ||
this.memoryFiles, | ||
this.trafficFiles, | ||
this.cpuStorage, | ||
this.cloudStorage, | ||
this.memoryStorage, | ||
this.trafficStorage, | ||
}); | ||
|
||
factory ResourceUsage.fromJson(Map<String, dynamic> json) { | ||
return ResourceUsage( | ||
cpuUsage: json['cpu_usage']?.toInt() ?? 0, | ||
cloudUsage: json['cloud_usage_percentage']?.toInt() ?? 0, | ||
memoryUsage: json['memory_usage_percentage']?.toInt() ?? 0, | ||
trafficUsage: json['traffic_usage']?.toInt() ?? 0, | ||
cpuFiles: json['cpu_files'] ?? 0, | ||
cloudFiles: json['cloud_files'] ?? 0, | ||
memoryFiles: json['memory_usage_used'] ?? 0, | ||
trafficFiles: json['traffic_files'] ?? 0, | ||
cpuStorage: json['cpu_storage'] ?? "0%", | ||
cloudStorage: json['cloud_usage_total'] ?? "0 MB", | ||
memoryStorage: json['memory_usage_total'] ?? "0 GB", | ||
trafficStorage: json['traffic_usage_total'] ?? "0 GB", | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() => { | ||
'cpuUsage': cpuUsage ?? 0, | ||
'cloudUsage': cloudUsage ?? 0, | ||
'memoryUsage': memoryUsage ?? 0, | ||
'trafficUsage': trafficUsage ?? 0, | ||
'cpuFiles': cpuFiles ?? 0, | ||
'cloudFiles': cloudFiles ?? 0, | ||
'memoryFiles': memoryFiles ?? 0, | ||
'trafficFiles': trafficFiles ?? 0, | ||
'cpuStorage': cpuStorage ?? "0%", | ||
'cloudStorage': cloudStorage ?? "0 MB", | ||
'memoryStorage': memoryStorage ?? "0 GB", | ||
'trafficStorage': trafficStorage ?? "0 GB", | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//if we gather them via backend too... | ||
class Userdata { | ||
String? username; | ||
String? lang; | ||
String? mode; | ||
|
||
Userdata({ | ||
this.username = "defaultUser", | ||
this.lang = "en", | ||
this.mode = "light", | ||
}); | ||
} |
Empty file.