Remade frontend dashboard as flutter dashboard, still WIP

This commit is contained in:
Nate Anderson
2025-06-13 09:20:42 -06:00
parent 8ea06b12f7
commit b373a93f0e
207 changed files with 9869 additions and 46 deletions
+41
View File
@@ -0,0 +1,41 @@
import 'package:json_annotation/json_annotation.dart';
part 'system_log.g.dart';
@JsonSerializable()
class SystemLogResponse {
final List<String> logs;
SystemLogResponse({
required this.logs,
});
factory SystemLogResponse.fromJson(Map<String, dynamic> json) =>
_$SystemLogResponseFromJson(json);
Map<String, dynamic> toJson() => _$SystemLogResponseToJson(this);
}
enum LogLevel {
@JsonValue('debug')
debug,
@JsonValue('info')
info,
@JsonValue('warn')
warn,
@JsonValue('error')
error;
String get name {
switch (this) {
case LogLevel.debug:
return 'debug';
case LogLevel.info:
return 'info';
case LogLevel.warn:
return 'warn';
case LogLevel.error:
return 'error';
}
}
}