selfprivacy.org.app/lib/logic/cubit/hetzner_metrics/hetzner_metrics_state.dart

46 lines
1 KiB
Dart
Raw Normal View History

2021-04-10 03:04:23 +00:00
part of 'hetzner_metrics_cubit.dart';
abstract class HetznerMetricsState extends Equatable {
const HetznerMetricsState();
abstract final Period period;
}
class HetznerMetricsLoading extends HetznerMetricsState {
2022-05-24 18:55:39 +00:00
const HetznerMetricsLoading(this.period);
@override
2021-04-10 03:04:23 +00:00
final Period period;
@override
List<Object?> get props => [period];
}
class HetznerMetricsLoaded extends HetznerMetricsState {
2022-05-24 18:55:39 +00:00
const HetznerMetricsLoaded({
2021-04-10 03:04:23 +00:00
required this.period,
required this.start,
required this.end,
required this.stepInSeconds,
required this.cpu,
required this.ppsIn,
required this.ppsOut,
required this.bandwidthIn,
required this.bandwidthOut,
});
2022-05-24 18:55:39 +00:00
@override
2021-04-10 03:04:23 +00:00
final Period period;
final DateTime start;
final DateTime end;
final num stepInSeconds;
final List<TimeSeriesData> cpu;
final List<TimeSeriesData> ppsIn;
final List<TimeSeriesData> ppsOut;
final List<TimeSeriesData> bandwidthIn;
final List<TimeSeriesData> bandwidthOut;
@override
List<Object?> get props => [period, start, end];
}