diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 1ef7e5fe0..4541a0a25 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -31,6 +31,7 @@ import { MiningDashboardComponent } from './components/mining-dashboard/mining-d import { HashrateChartComponent } from './components/hashrate-chart/hashrate-chart.component'; import { HashrateChartPoolsComponent } from './components/hashrates-chart-pools/hashrate-chart-pools.component'; import { MiningStartComponent } from './components/mining-start/mining-start.component'; +import { GraphsComponent } from './components/graphs/graphs.component'; import { BlocksList } from './components/blocks-list/blocks-list.component'; let routes: Routes = [ @@ -80,18 +81,6 @@ let routes: Routes = [ path: 'blocks', component: BlocksList, }, - { - path: 'hashrate', - component: HashrateChartComponent, - }, - { - path: 'hashrate/pools', - component: HashrateChartPoolsComponent, - }, - { - path: 'pools', - component: PoolRankingComponent, - }, { path: 'pool', children: [ @@ -105,7 +94,30 @@ let routes: Routes = [ }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ], }, { path: 'about', @@ -224,7 +236,30 @@ let routes: Routes = [ }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ] }, { path: 'address/:id', @@ -337,7 +372,30 @@ let routes: Routes = [ }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ] }, { path: 'address/:id', @@ -439,7 +497,30 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ] }, { path: 'address/:id', @@ -548,7 +629,30 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ] }, { path: 'address/:id', diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 3affdc7ba..99917815c 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -75,6 +75,7 @@ import { HashrateChartPoolsComponent } from './components/hashrates-chart-pools/ import { MiningStartComponent } from './components/mining-start/mining-start.component'; import { AmountShortenerPipe } from './shared/pipes/amount-shortener.pipe'; import { ShortenStringPipe } from './shared/pipes/shorten-string-pipe/shorten-string.pipe'; +import { GraphsComponent } from './components/graphs/graphs.component'; import { DifficultyAdjustmentsTable } from './components/difficulty-adjustments-table/difficulty-adjustments-table.components'; import { BlocksList } from './components/blocks-list/blocks-list.component'; @@ -133,6 +134,7 @@ import { BlocksList } from './components/blocks-list/blocks-list.component'; HashrateChartPoolsComponent, MiningStartComponent, AmountShortenerPipe, + GraphsComponent, DifficultyAdjustmentsTable, BlocksList, ], diff --git a/frontend/src/app/components/graphs/graphs.component.html b/frontend/src/app/components/graphs/graphs.component.html new file mode 100644 index 000000000..3a5b3ec73 --- /dev/null +++ b/frontend/src/app/components/graphs/graphs.component.html @@ -0,0 +1,25 @@ +
+ +