Split liquid, lightning & mainnet graphs
This commit is contained in:
		
							parent
							
								
									80bf2f9ebd
								
							
						
					
					
						commit
						db8ed5b705
					
				| @ -1,19 +1,10 @@ | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { Routes, RouterModule } from '@angular/router'; | ||||
| import { AppPreloadingStrategy } from './app.preloading-strategy' | ||||
| import { StartComponent } from './components/start/start.component'; | ||||
| import { BlockViewComponent } from './components/block-view/block-view.component'; | ||||
| import { MempoolBlockViewComponent } from './components/mempool-block-view/mempool-block-view.component'; | ||||
| import { ClockComponent } from './components/clock/clock.component'; | ||||
| import { AddressComponent } from './components/address/address.component'; | ||||
| import { StatusViewComponent } from './components/status-view/status-view.component'; | ||||
| import { PushTransactionComponent } from './components/push-transaction/push-transaction.component'; | ||||
| import { BlocksList } from './components/blocks-list/blocks-list.component'; | ||||
| import { AssetGroupComponent } from './components/assets/asset-group/asset-group.component'; | ||||
| import { AssetsFeaturedComponent } from './components/assets/assets-featured/assets-featured.component'; | ||||
| import { AssetsComponent } from './components/assets/assets.component'; | ||||
| import { AssetComponent } from './components/asset/asset.component'; | ||||
| import { AssetsNavComponent } from './components/assets/assets-nav/assets-nav.component'; | ||||
| 
 | ||||
| const browserWindow = window || {}; | ||||
| // @ts-ignore
 | ||||
| @ -26,7 +17,7 @@ let routes: Routes = [ | ||||
|       { | ||||
|         path: '', | ||||
|         pathMatch: 'full', | ||||
|         loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule), | ||||
|         loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule), | ||||
|         data: { preload: true }, | ||||
|       }, | ||||
|       { | ||||
| @ -41,7 +32,7 @@ let routes: Routes = [ | ||||
|       }, | ||||
|       { | ||||
|         path: '', | ||||
|         loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|         loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule), | ||||
|       }, | ||||
|       { | ||||
|         path: '**', | ||||
| @ -60,7 +51,7 @@ let routes: Routes = [ | ||||
|       { | ||||
|         path: '', | ||||
|         pathMatch: 'full', | ||||
|         loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|         loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule), | ||||
|       }, | ||||
|       { | ||||
|         path: '', | ||||
| @ -74,7 +65,7 @@ let routes: Routes = [ | ||||
|       }, | ||||
|       { | ||||
|         path: '', | ||||
|         loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|         loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule), | ||||
|       }, | ||||
|       { | ||||
|         path: '**', | ||||
| @ -85,7 +76,7 @@ let routes: Routes = [ | ||||
|   { | ||||
|     path: '', | ||||
|     pathMatch: 'full', | ||||
|     loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|     loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule), | ||||
|   }, | ||||
|   { | ||||
|     path: '', | ||||
| @ -136,7 +127,7 @@ let routes: Routes = [ | ||||
|   }, | ||||
|   { | ||||
|     path: '', | ||||
|     loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|     loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule), | ||||
|   }, | ||||
|   { | ||||
|     path: '**', | ||||
| @ -159,7 +150,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { | ||||
|         { | ||||
|           path: '', | ||||
|           pathMatch: 'full', | ||||
|           loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|           loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule), | ||||
|         }, | ||||
|         { | ||||
|           path: '', | ||||
| @ -172,7 +163,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { | ||||
|         }, | ||||
|         { | ||||
|           path: '', | ||||
|           loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|           loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule), | ||||
|         }, | ||||
|         { | ||||
|           path: '**', | ||||
| @ -183,7 +174,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { | ||||
|     { | ||||
|       path: '', | ||||
|       pathMatch: 'full', | ||||
|       loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|       loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule), | ||||
|     }, | ||||
|     { | ||||
|       path: '', | ||||
| @ -209,7 +200,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { | ||||
|     }, | ||||
|     { | ||||
|       path: '', | ||||
|       loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|       loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule), | ||||
|     }, | ||||
|     { | ||||
|       path: '**', | ||||
|  | ||||
							
								
								
									
										36
									
								
								frontend/src/app/bitcoin-graphs.module.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								frontend/src/app/bitcoin-graphs.module.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { CommonModule } from '@angular/common'; | ||||
| import { Routes, RouterModule } from '@angular/router'; | ||||
| import { MasterPageComponent } from './components/master-page/master-page.component'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|   { | ||||
|     path: '', | ||||
|     component: MasterPageComponent, | ||||
|     loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule) | ||||
|   } | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|   imports: [ | ||||
|     RouterModule.forChild(routes) | ||||
|   ], | ||||
|   exports: [ | ||||
|     RouterModule | ||||
|   ] | ||||
| }) | ||||
| export class BitcoinGraphsRoutingModule { } | ||||
| 
 | ||||
| @NgModule({ | ||||
|   imports: [ | ||||
|     CommonModule, | ||||
|     BitcoinGraphsRoutingModule, | ||||
|   ], | ||||
| }) | ||||
| export class BitcoinGraphsModule { } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -8,8 +8,6 @@ import { BlockSizesWeightsGraphComponent } from '../components/block-sizes-weigh | ||||
| import { GraphsComponent } from '../components/graphs/graphs.component'; | ||||
| import { HashrateChartComponent } from '../components/hashrate-chart/hashrate-chart.component'; | ||||
| import { HashrateChartPoolsComponent } from '../components/hashrates-chart-pools/hashrate-chart-pools.component'; | ||||
| import { LiquidMasterPageComponent } from '../components/liquid-master-page/liquid-master-page.component'; | ||||
| import { MasterPageComponent } from '../components/master-page/master-page.component'; | ||||
| import { MempoolBlockComponent } from '../components/mempool-block/mempool-block.component'; | ||||
| import { MiningDashboardComponent } from '../components/mining-dashboard/mining-dashboard.component'; | ||||
| import { PoolRankingComponent } from '../components/pool-ranking/pool-ranking.component'; | ||||
| @ -18,22 +16,10 @@ import { StartComponent } from '../components/start/start.component'; | ||||
| import { StatisticsComponent } from '../components/statistics/statistics.component'; | ||||
| import { TelevisionComponent } from '../components/television/television.component'; | ||||
| import { DashboardComponent } from '../dashboard/dashboard.component'; | ||||
| import { NodesNetworksChartComponent } from '../lightning/nodes-networks-chart/nodes-networks-chart.component'; | ||||
| import { LightningStatisticsChartComponent } from '../lightning/statistics-chart/lightning-statistics-chart.component'; | ||||
| import { NodesPerISPChartComponent } from '../lightning/nodes-per-isp-chart/nodes-per-isp-chart.component'; | ||||
| import { NodesPerCountryChartComponent } from '../lightning/nodes-per-country-chart/nodes-per-country-chart.component'; | ||||
| import { NodesMap } from '../lightning/nodes-map/nodes-map.component'; | ||||
| import { NodesChannelsMap } from '../lightning/nodes-channels-map/nodes-channels-map.component'; | ||||
| 
 | ||||
| const browserWindow = window || {}; | ||||
| // @ts-ignore
 | ||||
| const browserWindowEnv = browserWindow.__env || {}; | ||||
| const isLiquid = browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|   { | ||||
|     path: '', | ||||
|     component: isLiquid ? LiquidMasterPageComponent : MasterPageComponent, | ||||
|     children: [ | ||||
|       { | ||||
|         path: 'mining/pool/:slug', | ||||
| @ -108,34 +94,9 @@ const routes: Routes = [ | ||||
|             component: BlockSizesWeightsGraphComponent, | ||||
|           }, | ||||
|           { | ||||
|             path: 'lightning/nodes-networks', | ||||
|             path: 'lightning', | ||||
|             data: { networks: ['bitcoin'] }, | ||||
|             component: NodesNetworksChartComponent, | ||||
|           }, | ||||
|           { | ||||
|             path: 'lightning/capacity', | ||||
|             data: { networks: ['bitcoin'] }, | ||||
|             component: LightningStatisticsChartComponent, | ||||
|           }, | ||||
|           { | ||||
|             path: 'lightning/nodes-per-isp', | ||||
|             data: { networks: ['bitcoin'] }, | ||||
|             component: NodesPerISPChartComponent, | ||||
|           }, | ||||
|           { | ||||
|             path: 'lightning/nodes-per-country', | ||||
|             data: { networks: ['bitcoin'] }, | ||||
|             component: NodesPerCountryChartComponent, | ||||
|           }, | ||||
|           { | ||||
|             path: 'lightning/nodes-map', | ||||
|             data: { networks: ['bitcoin'] }, | ||||
|             component: NodesMap, | ||||
|           }, | ||||
|           { | ||||
|             path: 'lightning/nodes-channels-map', | ||||
|             data: { networks: ['bitcoin'] }, | ||||
|             component: NodesChannelsMap, | ||||
|             loadChildren: () => import ('./lightning-graphs.module').then(m => m.LightningGraphsModule) | ||||
|           }, | ||||
|           { | ||||
|             path: '', | ||||
|  | ||||
							
								
								
									
										58
									
								
								frontend/src/app/graphs/lightning-graphs.module.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								frontend/src/app/graphs/lightning-graphs.module.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,58 @@ | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { SharedModule } from '../shared/shared.module'; | ||||
| import { CommonModule } from '@angular/common'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { NodesNetworksChartComponent } from '../lightning/nodes-networks-chart/nodes-networks-chart.component'; | ||||
| import { LightningStatisticsChartComponent } from '../lightning/statistics-chart/lightning-statistics-chart.component'; | ||||
| import { NodesPerISPChartComponent } from '../lightning/nodes-per-isp-chart/nodes-per-isp-chart.component'; | ||||
| import { NodesPerCountryChartComponent } from '../lightning/nodes-per-country-chart/nodes-per-country-chart.component'; | ||||
| import { NodesMap } from '../lightning/nodes-map/nodes-map.component'; | ||||
| import { NodesChannelsMap } from '../lightning/nodes-channels-map/nodes-channels-map.component'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|   { | ||||
|     path: 'nodes-networks', | ||||
|     data: { networks: ['bitcoin'] }, | ||||
|     component: NodesNetworksChartComponent, | ||||
|   }, | ||||
|   { | ||||
|     path: 'capacity', | ||||
|     data: { networks: ['bitcoin'] }, | ||||
|     component: LightningStatisticsChartComponent, | ||||
|   }, | ||||
|   { | ||||
|     path: 'nodes-per-isp', | ||||
|     data: { networks: ['bitcoin'] }, | ||||
|     component: NodesPerISPChartComponent, | ||||
|   }, | ||||
|   { | ||||
|     path: 'nodes-per-country', | ||||
|     data: { networks: ['bitcoin'] }, | ||||
|     component: NodesPerCountryChartComponent, | ||||
|   }, | ||||
|   { | ||||
|     path: 'nodes-map', | ||||
|     data: { networks: ['bitcoin'] }, | ||||
|     component: NodesMap, | ||||
|   }, | ||||
|   { | ||||
|     path: 'nodes-channels-map', | ||||
|     data: { networks: ['bitcoin'] }, | ||||
|     component: NodesChannelsMap, | ||||
|   }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|   imports: [RouterModule.forChild(routes)], | ||||
|   exports: [RouterModule], | ||||
| }) | ||||
| export class LightningGraphsRoutingModule { } | ||||
| 
 | ||||
| @NgModule({ | ||||
|   imports: [ | ||||
|     CommonModule, | ||||
|     SharedModule, | ||||
|     LightningGraphsRoutingModule, | ||||
|   ], | ||||
| }) | ||||
| export class LightningGraphsModule { } | ||||
							
								
								
									
										36
									
								
								frontend/src/app/liquid/liquid-graphs.module.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								frontend/src/app/liquid/liquid-graphs.module.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { CommonModule } from '@angular/common'; | ||||
| import { Routes, RouterModule } from '@angular/router'; | ||||
| import { LiquidMasterPageComponent } from '../components/liquid-master-page/liquid-master-page.component'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|   { | ||||
|     path: '', | ||||
|     component: LiquidMasterPageComponent, | ||||
|     loadChildren: () => import('../graphs/graphs.module').then(m => m.GraphsModule) | ||||
|   } | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|   imports: [ | ||||
|     RouterModule.forChild(routes) | ||||
|   ], | ||||
|   exports: [ | ||||
|     RouterModule | ||||
|   ] | ||||
| }) | ||||
| export class LiquidGraphsRoutingModule { } | ||||
| 
 | ||||
| @NgModule({ | ||||
|   imports: [ | ||||
|     CommonModule, | ||||
|     LiquidGraphsRoutingModule, | ||||
|   ], | ||||
| }) | ||||
| export class LiquidGraphsModule { } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -16,6 +16,7 @@ const browserWindowEnv = browserWindow.__env || {}; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|   { | ||||
|     path: '', | ||||
|     component: MasterPageComponent, | ||||
|     children: [ | ||||
|       { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user