From 6dbc621fefef88e6a7cdc44780dbf072c48d7282 Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Fri, 11 Mar 2022 11:25:17 -0500
Subject: [PATCH 1/7] Capitalize js package labels in docs
---
.../src/app/components/docs/code-template.component.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/src/app/components/docs/code-template.component.html b/frontend/src/app/components/docs/code-template.component.html
index a3b8c4791..a1ea10f3f 100644
--- a/frontend/src/app/components/docs/code-template.component.html
+++ b/frontend/src/app/components/docs/code-template.component.html
@@ -12,7 +12,7 @@
@@ -22,8 +22,8 @@
From 77a99a97ccd5e8a12a7e47161817887536fcda96 Mon Sep 17 00:00:00 2001
From: nymkappa
Date: Mon, 14 Mar 2022 18:06:54 +0100
Subject: [PATCH 2/7] Move all charts into /graphs page - Fix mining charts
layouts
---
frontend/src/app/app-routing.module.ts | 138 +++++++++++++++---
frontend/src/app/app.module.ts | 2 +
.../components/graphs/graphs.component.html | 25 ++++
.../components/graphs/graphs.component.scss | 9 ++
.../app/components/graphs/graphs.component.ts | 14 ++
.../hashrate-chart.component.html | 1 +
.../hashrate-chart.component.scss | 42 +++++-
.../hashrate-chart.component.ts | 8 +-
.../hashrate-chart-pools.component.html | 3 +-
.../hashrate-chart-pools.component.scss | 46 +++++-
.../hashrate-chart-pools.component.ts | 32 +++-
.../master-page/master-page.component.html | 2 +-
.../mining-dashboard.component.html | 23 +--
.../mining-dashboard.component.scss | 4 +
.../mining-dashboard.component.ts | 3 +-
.../pool-ranking/pool-ranking.component.html | 88 ++++++-----
.../pool-ranking/pool-ranking.component.scss | 53 +++++--
.../pool-ranking/pool-ranking.component.ts | 21 +--
.../statistics/statistics.component.scss | 8 +
19 files changed, 399 insertions(+), 123 deletions(-)
create mode 100644 frontend/src/app/components/graphs/graphs.component.html
create mode 100644 frontend/src/app/components/graphs/graphs.component.scss
create mode 100644 frontend/src/app/components/graphs/graphs.component.ts
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 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/app/components/graphs/graphs.component.scss b/frontend/src/app/components/graphs/graphs.component.scss
new file mode 100644
index 000000000..c4ca483bd
--- /dev/null
+++ b/frontend/src/app/components/graphs/graphs.component.scss
@@ -0,0 +1,9 @@
+.menu {
+ flex-grow: 1;
+ max-width: 600px;
+}
+
+.menu-li {
+ flex-grow: 1;
+ text-align: center;
+}
diff --git a/frontend/src/app/components/graphs/graphs.component.ts b/frontend/src/app/components/graphs/graphs.component.ts
new file mode 100644
index 000000000..61fa65196
--- /dev/null
+++ b/frontend/src/app/components/graphs/graphs.component.ts
@@ -0,0 +1,14 @@
+import { Component, OnInit } from "@angular/core";
+
+@Component({
+ selector: 'app-graphs',
+ templateUrl: './graphs.component.html',
+ styleUrls: ['./graphs.component.scss'],
+})
+export class GraphsComponent implements OnInit {
+ constructor() { }
+
+ ngOnInit(): void {
+
+ }
+}
diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html
index 2ca0e8376..e4bbfa298 100644
--- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html
+++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html
@@ -1,6 +1,7 @@