Merge pull request #2120 from mempool/nymkappa/bugfix/fix-as-isp-naming-convention

Fix naming convention "as" => "isp"
This commit is contained in:
wiz 2022-07-17 16:47:13 -05:00 committed by GitHub
commit 75f1b52a2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 13 deletions

View File

@ -94,7 +94,7 @@ class NodesApi {
} }
} }
public async $getNodesAsShare() { public async $getNodesISP() {
try { 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 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 FROM nodes

View File

@ -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/isp/:isp', this.$getNodesPerISP)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/search/:search', this.$searchNode) .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/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/statistics', this.$getHistoricalNodeStats)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/:public_key', this.$getNode) .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 { try {
const nodesPerAs = await nodesApi.$getNodesAsShare(); const nodesPerAs = await nodesApi.$getNodesISP();
res.header('Pragma', 'public'); res.header('Pragma', 'public');
res.header('Cache-control', 'public'); res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 600).toUTCString()); res.setHeader('Expires', new Date(Date.now() + 1000 * 600).toUTCString());

View File

@ -20,7 +20,7 @@ import { TelevisionComponent } from '../components/television/television.compone
import { DashboardComponent } from '../dashboard/dashboard.component'; import { DashboardComponent } from '../dashboard/dashboard.component';
import { NodesNetworksChartComponent } from '../lightning/nodes-networks-chart/nodes-networks-chart.component'; import { NodesNetworksChartComponent } from '../lightning/nodes-networks-chart/nodes-networks-chart.component';
import { LightningStatisticsChartComponent } from '../lightning/statistics-chart/lightning-statistics-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 || {}; const browserWindow = window || {};
// @ts-ignore // @ts-ignore
@ -102,7 +102,7 @@ const routes: Routes = [
}, },
{ {
path: 'lightning/nodes-per-isp', path: 'lightning/nodes-per-isp',
component: NodesPerAsChartComponent, component: NodesPerISPChartComponent,
}, },
{ {
path: '', path: '',

View File

@ -18,7 +18,7 @@ import { NodeStatisticsChartComponent } from './node-statistics-chart/node-stati
import { GraphsModule } from '../graphs/graphs.module'; import { GraphsModule } from '../graphs/graphs.module';
import { NodesNetworksChartComponent } from './nodes-networks-chart/nodes-networks-chart.component'; import { NodesNetworksChartComponent } from './nodes-networks-chart/nodes-networks-chart.component';
import { ChannelsStatisticsComponent } from './channels-statistics/channels-statistics.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 { NodesPerCountry } from './nodes-per-country/nodes-per-country.component';
import { NodesPerISP } from './nodes-per-isp/nodes-per-isp.component'; import { NodesPerISP } from './nodes-per-isp/nodes-per-isp.component';
@NgModule({ @NgModule({
@ -36,7 +36,7 @@ import { NodesPerISP } from './nodes-per-isp/nodes-per-isp.component';
LightningStatisticsChartComponent, LightningStatisticsChartComponent,
NodesNetworksChartComponent, NodesNetworksChartComponent,
ChannelsStatisticsComponent, ChannelsStatisticsComponent,
NodesPerAsChartComponent, NodesPerISPChartComponent,
NodesPerCountry, NodesPerCountry,
NodesPerISP, NodesPerISP,
], ],

View File

@ -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'; import { RelativeUrlPipe } from 'src/app/shared/pipes/relative-url/relative-url.pipe';
@Component({ @Component({
selector: 'app-nodes-per-as-chart', selector: 'app-nodes-per-isp-chart',
templateUrl: './nodes-per-as-chart.component.html', templateUrl: './nodes-per-isp-chart.component.html',
styleUrls: ['./nodes-per-as-chart.component.scss'], styleUrls: ['./nodes-per-isp-chart.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class NodesPerAsChartComponent implements OnInit { export class NodesPerISPChartComponent implements OnInit {
miningWindowPreference: string; miningWindowPreference: string;
isLoading = true; isLoading = true;

View File

@ -252,7 +252,7 @@ export class ApiService {
} }
getNodesPerAs(): Observable<any> { getNodesPerAs(): Observable<any> {
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/lightning/nodes/asShare'); return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/lightning/nodes/isp');
} }
getNodeForCountry$(country: string): Observable<any> { getNodeForCountry$(country: string): Observable<any> {