From d7f0dc4c050631686a1ace59b6e8fe4b5f393029 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Sun, 17 Jul 2022 11:46:36 +0200 Subject: [PATCH] Fix naming convention "as" => "isp" --- backend/src/api/explorer/nodes.api.ts | 2 +- backend/src/api/explorer/nodes.routes.ts | 6 +++--- frontend/src/app/graphs/graphs.routing.module.ts | 4 ++-- frontend/src/app/lightning/lightning.module.ts | 4 ++-- .../nodes-per-isp-chart.component.html} | 0 .../nodes-per-isp-chart.component.scss} | 0 .../nodes-per-isp-chart.component.ts} | 8 ++++---- frontend/src/app/services/api.service.ts | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) rename frontend/src/app/lightning/{nodes-per-as-chart/nodes-per-as-chart.component.html => nodes-per-isp-chart/nodes-per-isp-chart.component.html} (100%) rename frontend/src/app/lightning/{nodes-per-as-chart/nodes-per-as-chart.component.scss => nodes-per-isp-chart/nodes-per-isp-chart.component.scss} (100%) rename frontend/src/app/lightning/{nodes-per-as-chart/nodes-per-as-chart.component.ts => nodes-per-isp-chart/nodes-per-isp-chart.component.ts} (96%) diff --git a/backend/src/api/explorer/nodes.api.ts b/backend/src/api/explorer/nodes.api.ts index 5f75e31b8..e6ed68115 100644 --- a/backend/src/api/explorer/nodes.api.ts +++ b/backend/src/api/explorer/nodes.api.ts @@ -94,7 +94,7 @@ class NodesApi { } } - public async $getNodesAsShare() { + public async $getNodesISP() { try { let query = `SELECT nodes.as_number as ispId, geo_names.names as names, COUNT(DISTINCT nodes.public_key) as nodesCount, SUM(capacity) as capacity FROM nodes diff --git a/backend/src/api/explorer/nodes.routes.ts b/backend/src/api/explorer/nodes.routes.ts index 4d82ed725..9840ddbeb 100644 --- a/backend/src/api/explorer/nodes.routes.ts +++ b/backend/src/api/explorer/nodes.routes.ts @@ -12,7 +12,7 @@ class NodesRoutes { .get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/isp/:isp', this.$getNodesPerISP) .get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/search/:search', this.$searchNode) .get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/top', this.$getTopNodes) - .get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/asShare', this.$getNodesAsShare) + .get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/isp', this.$getNodesISP) .get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/:public_key/statistics', this.$getHistoricalNodeStats) .get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/:public_key', this.$getNode) ; @@ -62,9 +62,9 @@ class NodesRoutes { } } - private async $getNodesAsShare(req: Request, res: Response) { + private async $getNodesISP(req: Request, res: Response) { try { - const nodesPerAs = await nodesApi.$getNodesAsShare(); + const nodesPerAs = await nodesApi.$getNodesISP(); res.header('Pragma', 'public'); res.header('Cache-control', 'public'); res.setHeader('Expires', new Date(Date.now() + 1000 * 600).toUTCString()); diff --git a/frontend/src/app/graphs/graphs.routing.module.ts b/frontend/src/app/graphs/graphs.routing.module.ts index 1cff68b8a..20d7b6024 100644 --- a/frontend/src/app/graphs/graphs.routing.module.ts +++ b/frontend/src/app/graphs/graphs.routing.module.ts @@ -20,7 +20,7 @@ import { TelevisionComponent } from '../components/television/television.compone 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 { NodesPerAsChartComponent } from '../lightning/nodes-per-as-chart/nodes-per-as-chart.component'; +import { NodesPerISPChartComponent } from '../lightning/nodes-per-isp-chart/nodes-per-isp-chart.component'; const browserWindow = window || {}; // @ts-ignore @@ -102,7 +102,7 @@ const routes: Routes = [ }, { path: 'lightning/nodes-per-isp', - component: NodesPerAsChartComponent, + component: NodesPerISPChartComponent, }, { path: '', diff --git a/frontend/src/app/lightning/lightning.module.ts b/frontend/src/app/lightning/lightning.module.ts index f417839d4..b5fc0da14 100644 --- a/frontend/src/app/lightning/lightning.module.ts +++ b/frontend/src/app/lightning/lightning.module.ts @@ -18,7 +18,7 @@ import { NodeStatisticsChartComponent } from './node-statistics-chart/node-stati import { GraphsModule } from '../graphs/graphs.module'; import { NodesNetworksChartComponent } from './nodes-networks-chart/nodes-networks-chart.component'; import { ChannelsStatisticsComponent } from './channels-statistics/channels-statistics.component'; -import { NodesPerAsChartComponent } from '../lightning/nodes-per-as-chart/nodes-per-as-chart.component'; +import { NodesPerISPChartComponent } from './nodes-per-isp-chart/nodes-per-isp-chart.component'; import { NodesPerCountry } from './nodes-per-country/nodes-per-country.component'; import { NodesPerISP } from './nodes-per-isp/nodes-per-isp.component'; @NgModule({ @@ -36,7 +36,7 @@ import { NodesPerISP } from './nodes-per-isp/nodes-per-isp.component'; LightningStatisticsChartComponent, NodesNetworksChartComponent, ChannelsStatisticsComponent, - NodesPerAsChartComponent, + NodesPerISPChartComponent, NodesPerCountry, NodesPerISP, ], diff --git a/frontend/src/app/lightning/nodes-per-as-chart/nodes-per-as-chart.component.html b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html similarity index 100% rename from frontend/src/app/lightning/nodes-per-as-chart/nodes-per-as-chart.component.html rename to frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html diff --git a/frontend/src/app/lightning/nodes-per-as-chart/nodes-per-as-chart.component.scss b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.scss similarity index 100% rename from frontend/src/app/lightning/nodes-per-as-chart/nodes-per-as-chart.component.scss rename to frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.scss diff --git a/frontend/src/app/lightning/nodes-per-as-chart/nodes-per-as-chart.component.ts b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts similarity index 96% rename from frontend/src/app/lightning/nodes-per-as-chart/nodes-per-as-chart.component.ts rename to frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts index cf6c0568a..ec98f8e8f 100644 --- a/frontend/src/app/lightning/nodes-per-as-chart/nodes-per-as-chart.component.ts +++ b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts @@ -11,12 +11,12 @@ import { AmountShortenerPipe } from 'src/app/shared/pipes/amount-shortener.pipe' import { RelativeUrlPipe } from 'src/app/shared/pipes/relative-url/relative-url.pipe'; @Component({ - selector: 'app-nodes-per-as-chart', - templateUrl: './nodes-per-as-chart.component.html', - styleUrls: ['./nodes-per-as-chart.component.scss'], + selector: 'app-nodes-per-isp-chart', + templateUrl: './nodes-per-isp-chart.component.html', + styleUrls: ['./nodes-per-isp-chart.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class NodesPerAsChartComponent implements OnInit { +export class NodesPerISPChartComponent implements OnInit { miningWindowPreference: string; isLoading = true; diff --git a/frontend/src/app/services/api.service.ts b/frontend/src/app/services/api.service.ts index 7d0ef30c3..0f68b071b 100644 --- a/frontend/src/app/services/api.service.ts +++ b/frontend/src/app/services/api.service.ts @@ -252,7 +252,7 @@ export class ApiService { } getNodesPerAs(): Observable { - return this.httpClient.get(this.apiBaseUrl + this.apiBasePath + '/api/v1/lightning/nodes/asShare'); + return this.httpClient.get(this.apiBaseUrl + this.apiBasePath + '/api/v1/lightning/nodes/isp'); } getNodeForCountry$(country: string): Observable {