2022-11-12 17:29:06 +00:00
|
|
|
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];
|
|
|
|
}
|
|
|
|
|
2024-07-30 04:13:56 +00:00
|
|
|
enum MetricsDataSource {
|
|
|
|
server,
|
|
|
|
legacy,
|
|
|
|
}
|
|
|
|
|
2022-11-12 17:29:06 +00:00
|
|
|
class MetricsLoaded extends MetricsState {
|
|
|
|
const MetricsLoaded({
|
|
|
|
required this.period,
|
|
|
|
required this.metrics,
|
2024-07-30 04:13:56 +00:00
|
|
|
required this.source,
|
|
|
|
this.memoryMetrics,
|
|
|
|
this.diskMetrics,
|
2022-11-12 17:29:06 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
@override
|
|
|
|
final Period period;
|
|
|
|
|
|
|
|
final ServerMetrics metrics;
|
2024-07-30 04:13:56 +00:00
|
|
|
final MemoryMetrics? memoryMetrics;
|
|
|
|
final DiskMetrics? diskMetrics;
|
|
|
|
final MetricsDataSource source;
|
2022-11-12 17:29:06 +00:00
|
|
|
|
|
|
|
@override
|
2024-07-30 04:13:56 +00:00
|
|
|
List<Object?> get props =>
|
|
|
|
[period, metrics, memoryMetrics, diskMetrics, source];
|
2022-11-12 17:29:06 +00:00
|
|
|
}
|
2024-07-30 01:15:17 +00:00
|
|
|
|
|
|
|
class MetricsUnsupported extends MetricsState {
|
|
|
|
const MetricsUnsupported(this.period);
|
|
|
|
@override
|
|
|
|
final Period period;
|
|
|
|
|
|
|
|
@override
|
|
|
|
List<Object?> get props => [period];
|
|
|
|
}
|