mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-14 12:43:16 +00:00
53 lines
1,014 B
Dart
53 lines
1,014 B
Dart
part of 'metrics_cubit.dart';
|
|
|
|
abstract class MetricsState extends Equatable {
|
|
const MetricsState();
|
|
|
|
abstract final Period period;
|
|
}
|
|
|
|
class MetricsLoading extends MetricsState {
|
|
const MetricsLoading(this.period);
|
|
@override
|
|
final Period period;
|
|
|
|
@override
|
|
List<Object?> get props => [period];
|
|
}
|
|
|
|
enum MetricsDataSource {
|
|
server,
|
|
legacy,
|
|
}
|
|
|
|
class MetricsLoaded extends MetricsState {
|
|
const MetricsLoaded({
|
|
required this.period,
|
|
required this.metrics,
|
|
required this.source,
|
|
this.memoryMetrics,
|
|
this.diskMetrics,
|
|
});
|
|
|
|
@override
|
|
final Period period;
|
|
|
|
final ServerMetrics metrics;
|
|
final MemoryMetrics? memoryMetrics;
|
|
final DiskMetrics? diskMetrics;
|
|
final MetricsDataSource source;
|
|
|
|
@override
|
|
List<Object?> get props =>
|
|
[period, metrics, memoryMetrics, diskMetrics, source];
|
|
}
|
|
|
|
class MetricsUnsupported extends MetricsState {
|
|
const MetricsUnsupported(this.period);
|
|
@override
|
|
final Period period;
|
|
|
|
@override
|
|
List<Object?> get props => [period];
|
|
}
|