diff --git a/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts b/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts index 40f0e2b90..417a72902 100644 --- a/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts +++ b/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts @@ -32,7 +32,7 @@ export class AccelerationFeesGraphComponent implements OnInit, OnChanges, OnDest @Input() height: number = 300; @Input() right: number | string = 45; @Input() left: number | string = 75; - @Input() period: '3d' | '1w' | '1m' = '1w'; + @Input() period: '24h' | '3d' | '1w' | '1m' | 'all' = '1w'; @Input() accelerations$: Observable; miningWindowPreference: string; @@ -48,7 +48,7 @@ export class AccelerationFeesGraphComponent implements OnInit, OnChanges, OnDest isLoading = true; formatNumber = formatNumber; timespan = ''; - periodSubject$: Subject<'3d' | '1w' | '1m'> = new Subject(); + periodSubject$: Subject<'24h' | '3d' | '1w' | '1m' | 'all'> = new Subject(); chartInstance: any = undefined; daysAvailable: number = 0; @@ -78,7 +78,7 @@ export class AccelerationFeesGraphComponent implements OnInit, OnChanges, OnDest this.radioGroupForm.controls.dateSpan.setValue(this.miningWindowPreference); this.route.fragment.subscribe((fragment) => { - if (['24h', '3d', '1w', '1m', '3m'].indexOf(fragment) > -1) { + if (['24h', '3d', '1w', '1m', '3m', 'all'].indexOf(fragment) > -1) { this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: false }); } }); diff --git a/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.ts b/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.ts index 3cf5f9044..392f1392b 100644 --- a/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.ts +++ b/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.ts @@ -16,7 +16,7 @@ export type AccelerationStats = { changeDetection: ChangeDetectionStrategy.OnPush, }) export class AccelerationStatsComponent implements OnInit, OnChanges { - @Input() timespan: '3d' | '1w' | '1m' = '1w'; + @Input() timespan: '24h' | '3d' | '1w' | '1m' | 'all' = '1w'; accelerationStats$: Observable; blocksInPeriod: number = 7 * 144; @@ -35,6 +35,9 @@ export class AccelerationStatsComponent implements OnInit, OnChanges { updateStats(): void { this.accelerationStats$ = this.servicesApiService.getAccelerationStats$({ timeframe: this.timespan }); switch (this.timespan) { + case '24h': + this.blocksInPeriod = 144; + break; case '3d': this.blocksInPeriod = 3 * 144; break; @@ -44,6 +47,9 @@ export class AccelerationStatsComponent implements OnInit, OnChanges { case '1m': this.blocksInPeriod = 30 * 144; break; + case 'all': + this.blocksInPeriod = Infinity; + break; } } } diff --git a/frontend/src/app/components/acceleration/accelerator-dashboard/accelerator-dashboard.component.html b/frontend/src/app/components/acceleration/accelerator-dashboard/accelerator-dashboard.component.html index 94ddf5f98..9095a8129 100644 --- a/frontend/src/app/components/acceleration/accelerator-dashboard/accelerator-dashboard.component.html +++ b/frontend/src/app/components/acceleration/accelerator-dashboard/accelerator-dashboard.component.html @@ -23,12 +23,18 @@
Acceleration stats  @switch (timespan) { + @case ('24h') { + (1 day) + } @case ('1w') { (1 week) } @case ('1m') { (1 month) } + @case ('all') { + (all time) + } }
@@ -36,11 +42,17 @@
+ 24h + | 1w | 1m + | + all
diff --git a/frontend/src/app/components/acceleration/accelerator-dashboard/accelerator-dashboard.component.ts b/frontend/src/app/components/acceleration/accelerator-dashboard/accelerator-dashboard.component.ts index c003fe5ca..67ab61366 100644 --- a/frontend/src/app/components/acceleration/accelerator-dashboard/accelerator-dashboard.component.ts +++ b/frontend/src/app/components/acceleration/accelerator-dashboard/accelerator-dashboard.component.ts @@ -37,7 +37,7 @@ export class AcceleratorDashboardComponent implements OnInit, OnDestroy { webGlEnabled = true; seen: Set = new Set(); firstLoad = true; - timespan: '3d' | '1w' | '1m' = '1w'; + timespan: '24h' | '3d' | '1w' | '1m' | 'all' = '1w'; accelerationDeltaSubscription: Subscription;