mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-11 18:39:45 +00:00
fix
This commit is contained in:
parent
cd49f9fb45
commit
6726c87de7
|
@ -38,7 +38,7 @@ class HetznerMetricsCubit extends Cubit<HetznerMetricsState> {
|
|||
}
|
||||
|
||||
void load(Period period) async {
|
||||
var newState = await repository.getMetrics(state.period);
|
||||
var newState = await repository.getMetrics(period);
|
||||
timer = Timer(
|
||||
Duration(seconds: newState.stepInSeconds.toInt()),
|
||||
() => load(newState.period),
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'hetzner_metrics_cubit.dart';
|
|||
|
||||
class HetznerMetricsRepository {
|
||||
Future<HetznerMetricsLoaded> getMetrics(Period period) async {
|
||||
print(period);
|
||||
var end = DateTime.now();
|
||||
DateTime start;
|
||||
|
||||
|
@ -21,7 +22,7 @@ class HetznerMetricsRepository {
|
|||
break;
|
||||
}
|
||||
|
||||
var api = HetznerApi();
|
||||
var api = HetznerApi(hasLoger: true);
|
||||
|
||||
var results = await Future.wait([
|
||||
api.getMetrics(start, end, 'cpu'),
|
||||
|
|
Loading…
Reference in a new issue