diff --git a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html index 8676b8a44..0e01d7b2d 100644 --- a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html +++ b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html @@ -65,7 +65,7 @@
-
+
diff --git a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts index 0283b2d00..6c2a1fbaf 100644 --- a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts +++ b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts @@ -55,7 +55,7 @@ export class BlockFeeRatesGraphComponent implements OnInit { private formBuilder: UntypedFormBuilder, private storageService: StorageService, private miningService: MiningService, - private stateService: StateService, + public stateService: StateService, private router: Router, private zone: NgZone, private route: ActivatedRoute, diff --git a/frontend/src/app/components/block-fees-graph/block-fees-graph.component.html b/frontend/src/app/components/block-fees-graph/block-fees-graph.component.html index 9734f8681..4fcbc3595 100644 --- a/frontend/src/app/components/block-fees-graph/block-fees-graph.component.html +++ b/frontend/src/app/components/block-fees-graph/block-fees-graph.component.html @@ -39,7 +39,7 @@
-
+
diff --git a/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts b/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts index fc71fb575..895a6f33f 100644 --- a/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts +++ b/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts @@ -12,6 +12,7 @@ import { MiningService } from '../../services/mining.service'; import { ActivatedRoute } from '@angular/router'; import { FiatShortenerPipe } from '../../shared/pipes/fiat-shortener.pipe'; import { FiatCurrencyPipe } from '../../shared/pipes/fiat-currency.pipe'; +import { StateService } from '../../services/state.service'; @Component({ selector: 'app-block-fees-graph', @@ -54,6 +55,7 @@ export class BlockFeesGraphComponent implements OnInit { private formBuilder: UntypedFormBuilder, private storageService: StorageService, private miningService: MiningService, + public stateService: StateService, private route: ActivatedRoute, private fiatShortenerPipe: FiatShortenerPipe, private fiatCurrencyPipe: FiatCurrencyPipe, diff --git a/frontend/src/app/components/block-health-graph/block-health-graph.component.html b/frontend/src/app/components/block-health-graph/block-health-graph.component.html index 84a75dd3c..cfbee79b6 100644 --- a/frontend/src/app/components/block-health-graph/block-health-graph.component.html +++ b/frontend/src/app/components/block-health-graph/block-health-graph.component.html @@ -48,7 +48,7 @@
-
+
diff --git a/frontend/src/app/components/block-health-graph/block-health-graph.component.ts b/frontend/src/app/components/block-health-graph/block-health-graph.component.ts index 4fea6f245..1e105d5e7 100644 --- a/frontend/src/app/components/block-health-graph/block-health-graph.component.ts +++ b/frontend/src/app/components/block-health-graph/block-health-graph.component.ts @@ -52,7 +52,7 @@ export class BlockHealthGraphComponent implements OnInit { private storageService: StorageService, private zone: NgZone, private route: ActivatedRoute, - private stateService: StateService, + public stateService: StateService, private router: Router, ) { this.radioGroupForm = this.formBuilder.group({ dateSpan: '1y' }); diff --git a/frontend/src/app/components/block-overview-graph/block-overview-graph.component.ts b/frontend/src/app/components/block-overview-graph/block-overview-graph.component.ts index 559e16279..522e819c5 100644 --- a/frontend/src/app/components/block-overview-graph/block-overview-graph.component.ts +++ b/frontend/src/app/components/block-overview-graph/block-overview-graph.component.ts @@ -83,7 +83,7 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On constructor( readonly ngZone: NgZone, readonly elRef: ElementRef, - private stateService: StateService, + public stateService: StateService, ) { this.webGlEnabled = detectWebGL(); this.vertexArray = new FastVertexArray(512, TxSprite.dataSize); diff --git a/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.html b/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.html index 7a99ac52e..10e6d304d 100644 --- a/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.html +++ b/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.html @@ -40,7 +40,7 @@
-
+
diff --git a/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts b/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts index 9c987fb57..fe8efa9c7 100644 --- a/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts +++ b/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts @@ -12,6 +12,7 @@ import { StorageService } from '../../services/storage.service'; import { ActivatedRoute } from '@angular/router'; import { FiatShortenerPipe } from '../../shared/pipes/fiat-shortener.pipe'; import { FiatCurrencyPipe } from '../../shared/pipes/fiat-currency.pipe'; +import { StateService } from '../../services/state.service'; @Component({ selector: 'app-block-rewards-graph', @@ -54,6 +55,7 @@ export class BlockRewardsGraphComponent implements OnInit { private formBuilder: UntypedFormBuilder, private miningService: MiningService, private storageService: StorageService, + public stateService: StateService, private route: ActivatedRoute, private fiatShortenerPipe: FiatShortenerPipe, private fiatCurrencyPipe: FiatCurrencyPipe, diff --git a/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.html b/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.html index 002bbc90d..c21a4bebb 100644 --- a/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.html +++ b/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.html @@ -47,7 +47,7 @@
-
+
diff --git a/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts b/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts index 5d01e48e9..76d6e8216 100644 --- a/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts +++ b/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts @@ -10,6 +10,7 @@ import { StorageService } from '../../services/storage.service'; import { MiningService } from '../../services/mining.service'; import { ActivatedRoute } from '@angular/router'; import { download, formatterXAxis } from '../../shared/graphs.utils'; +import { StateService } from '../../services/state.service'; @Component({ selector: 'app-block-sizes-weights-graph', @@ -52,6 +53,7 @@ export class BlockSizesWeightsGraphComponent implements OnInit { private formBuilder: UntypedFormBuilder, private storageService: StorageService, private miningService: MiningService, + public stateService: StateService, private route: ActivatedRoute, ) { } diff --git a/frontend/src/app/components/fee-distribution-graph/fee-distribution-graph.component.html b/frontend/src/app/components/fee-distribution-graph/fee-distribution-graph.component.html index afdc35e06..945113356 100644 --- a/frontend/src/app/components/fee-distribution-graph/fee-distribution-graph.component.html +++ b/frontend/src/app/components/fee-distribution-graph/fee-distribution-graph.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/frontend/src/app/components/fee-distribution-graph/fee-distribution-graph.component.ts b/frontend/src/app/components/fee-distribution-graph/fee-distribution-graph.component.ts index 178d87897..df78cf34d 100644 --- a/frontend/src/app/components/fee-distribution-graph/fee-distribution-graph.component.ts +++ b/frontend/src/app/components/fee-distribution-graph/fee-distribution-graph.component.ts @@ -36,7 +36,7 @@ export class FeeDistributionGraphComponent implements OnInit, OnChanges, OnDestr }; constructor( - private stateService: StateService, + public stateService: StateService, private vbytesPipe: VbytesPipe, ) { } 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 eba2746e0..4f0c76b88 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html @@ -57,7 +57,7 @@
-
+
diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts index 8ee7beea3..d23688e05 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -60,7 +60,7 @@ export class HashrateChartComponent implements OnInit { private storageService: StorageService, private miningService: MiningService, private route: ActivatedRoute, - private stateService: StateService + public stateService: StateService ) { } diff --git a/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.html b/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.html index b1588cbb5..e62cdd4eb 100644 --- a/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.html +++ b/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.html @@ -34,7 +34,7 @@
-
+
diff --git a/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts b/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts index 3f0e9258f..c69fce2d1 100644 --- a/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts +++ b/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts @@ -10,6 +10,7 @@ import { StorageService } from '../../services/storage.service'; import { MiningService } from '../../services/mining.service'; import { download } from '../../shared/graphs.utils'; import { ActivatedRoute } from '@angular/router'; +import { StateService } from '../../services/state.service'; interface Hashrate { timestamp: number; @@ -60,6 +61,7 @@ export class HashrateChartPoolsComponent implements OnInit { private cd: ChangeDetectorRef, private storageService: StorageService, private miningService: MiningService, + public stateService: StateService, private route: ActivatedRoute, ) { this.radioGroupForm = this.formBuilder.group({ dateSpan: '1y' }); diff --git a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.html b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.html index 6b59c557e..b3f736d34 100644 --- a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.html +++ b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.html @@ -1,6 +1,6 @@
-
+
\ No newline at end of file diff --git a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts index 703181eba..f25234854 100644 --- a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts +++ b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts @@ -48,7 +48,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges, On constructor( @Inject(LOCALE_ID) private locale: string, private storageService: StorageService, - private stateService: StateService, + public stateService: StateService, ) { } ngOnInit() { diff --git a/frontend/src/app/components/lbtc-pegs-graph/lbtc-pegs-graph.component.html b/frontend/src/app/components/lbtc-pegs-graph/lbtc-pegs-graph.component.html index 878869505..841d6b45c 100644 --- a/frontend/src/app/components/lbtc-pegs-graph/lbtc-pegs-graph.component.html +++ b/frontend/src/app/components/lbtc-pegs-graph/lbtc-pegs-graph.component.html @@ -1,4 +1,4 @@
-
+
\ No newline at end of file diff --git a/frontend/src/app/components/lbtc-pegs-graph/lbtc-pegs-graph.component.ts b/frontend/src/app/components/lbtc-pegs-graph/lbtc-pegs-graph.component.ts index 25c061550..bc3be513c 100644 --- a/frontend/src/app/components/lbtc-pegs-graph/lbtc-pegs-graph.component.ts +++ b/frontend/src/app/components/lbtc-pegs-graph/lbtc-pegs-graph.component.ts @@ -1,6 +1,7 @@ import { Component, Inject, LOCALE_ID, ChangeDetectionStrategy, Input, OnChanges, OnInit } from '@angular/core'; import { formatDate, formatNumber } from '@angular/common'; -import { EChartsOption } from '../../graphs/echarts'; +import { EChartsOption } from 'echarts'; +import { StateService } from '../../services/state.service'; @Component({ selector: 'app-lbtc-pegs-graph', @@ -32,6 +33,7 @@ export class LbtcPegsGraphComponent implements OnInit, OnChanges { }; constructor( + public stateService: StateService, @Inject(LOCALE_ID) private locale: string, ) { } diff --git a/frontend/src/app/components/mempool-graph/mempool-graph.component.html b/frontend/src/app/components/mempool-graph/mempool-graph.component.html index 1f3621bc3..12b720029 100644 --- a/frontend/src/app/components/mempool-graph/mempool-graph.component.html +++ b/frontend/src/app/components/mempool-graph/mempool-graph.component.html @@ -1,4 +1,4 @@
-
+
\ No newline at end of file diff --git a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts index 79c426fd6..cf4806fbe 100644 --- a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts +++ b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts @@ -59,7 +59,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges { private vbytesPipe: VbytesPipe, private wubytesPipe: WuBytesPipe, private amountShortenerPipe: AmountShortenerPipe, - private stateService: StateService, + public stateService: StateService, private storageService: StorageService, @Inject(LOCALE_ID) private locale: string, ) { } diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.html b/frontend/src/app/components/pool-ranking/pool-ranking.component.html index f5e21e66f..6753e5324 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.html +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.html @@ -80,7 +80,7 @@ (chartInit)="onChartInit($event)">
-
+
diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts index a6f43909a..11ee6e506 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -41,7 +41,7 @@ export class PoolRankingComponent implements OnInit { miningStatsObservable$: Observable; constructor( - private stateService: StateService, + public stateService: StateService, private storageService: StorageService, private formBuilder: UntypedFormBuilder, private miningService: MiningService, diff --git a/frontend/src/app/components/pool/pool.component.html b/frontend/src/app/components/pool/pool.component.html index ad84c77ce..8ecb68bc9 100644 --- a/frontend/src/app/components/pool/pool.component.html +++ b/frontend/src/app/components/pool/pool.component.html @@ -169,7 +169,7 @@
-
+
diff --git a/frontend/src/app/lightning/node-statistics-chart/node-statistics-chart.component.html b/frontend/src/app/lightning/node-statistics-chart/node-statistics-chart.component.html index 209958fde..5edeaa9fd 100644 --- a/frontend/src/app/lightning/node-statistics-chart/node-statistics-chart.component.html +++ b/frontend/src/app/lightning/node-statistics-chart/node-statistics-chart.component.html @@ -1,7 +1,7 @@
-
+
diff --git a/frontend/src/app/lightning/node-statistics-chart/node-statistics-chart.component.ts b/frontend/src/app/lightning/node-statistics-chart/node-statistics-chart.component.ts index a9308a887..f67c83367 100644 --- a/frontend/src/app/lightning/node-statistics-chart/node-statistics-chart.component.ts +++ b/frontend/src/app/lightning/node-statistics-chart/node-statistics-chart.component.ts @@ -8,6 +8,7 @@ import { StorageService } from '../../services/storage.service'; import { download } from '../../shared/graphs.utils'; import { LightningApiService } from '../lightning-api.service'; import { ActivatedRoute, ParamMap } from '@angular/router'; +import { StateService } from '../../services/state.service'; @Component({ selector: 'app-node-statistics-chart', @@ -48,6 +49,7 @@ export class NodeStatisticsChartComponent implements OnInit { @Inject(LOCALE_ID) public locale: string, private lightningApiService: LightningApiService, private storageService: StorageService, + public stateService: StateService, private activatedRoute: ActivatedRoute, ) { } diff --git a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.html b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.html index 50f84db30..bc4ea4b86 100644 --- a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.html +++ b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.html @@ -6,7 +6,8 @@
-
+ +
diff --git a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts index 296d60dec..aab62f2c4 100644 --- a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts +++ b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts @@ -45,7 +45,7 @@ export class NodesChannelsMap implements OnInit { constructor( private seoService: SeoService, private apiService: ApiService, - private stateService: StateService, + public stateService: StateService, private assetsService: AssetsService, private router: Router, private zone: NgZone, diff --git a/frontend/src/app/lightning/nodes-map/nodes-map.component.html b/frontend/src/app/lightning/nodes-map/nodes-map.component.html index 045ab7925..d6b793e25 100644 --- a/frontend/src/app/lightning/nodes-map/nodes-map.component.html +++ b/frontend/src/app/lightning/nodes-map/nodes-map.component.html @@ -12,5 +12,8 @@ (chartInit)="onChartInit($event)" (chartFinished)="onChartFinished($event)">
+
+
+
diff --git a/frontend/src/app/lightning/nodes-map/nodes-map.component.scss b/frontend/src/app/lightning/nodes-map/nodes-map.component.scss index a2f62e9c5..82362a257 100644 --- a/frontend/src/app/lightning/nodes-map/nodes-map.component.scss +++ b/frontend/src/app/lightning/nodes-map/nodes-map.component.scss @@ -63,3 +63,13 @@ .chart.widget { padding: 0px; } + +.loading-spinner { + position: absolute; + top: 50%; + left: calc(50% - 15px); + z-index: 100; + @media (max-width: 767.98px) { + top: 550px; + } +} diff --git a/frontend/src/app/lightning/nodes-map/nodes-map.component.ts b/frontend/src/app/lightning/nodes-map/nodes-map.component.ts index bb9e21c4b..054f1ab6f 100644 --- a/frontend/src/app/lightning/nodes-map/nodes-map.component.ts +++ b/frontend/src/app/lightning/nodes-map/nodes-map.component.ts @@ -26,6 +26,7 @@ export class NodesMap implements OnInit, OnChanges { inputNodes$: BehaviorSubject; nodes$: Observable; observable$: Observable; + isLoading: boolean = true; chartInstance = undefined; chartOptions: EChartsOption = {}; @@ -37,7 +38,7 @@ export class NodesMap implements OnInit, OnChanges { @Inject(LOCALE_ID) public locale: string, private seoService: SeoService, private apiService: ApiService, - private stateService: StateService, + public stateService: StateService, private assetsService: AssetsService, private router: Router, private zone: NgZone, @@ -226,6 +227,7 @@ export class NodesMap implements OnInit, OnChanges { }, ] }; + this.isLoading = false; } onChartInit(ec) { @@ -235,6 +237,10 @@ export class NodesMap implements OnInit, OnChanges { this.chartInstance = ec; + this.chartInstance.on('finished', () => { + this.isLoading = false; + }); + this.chartInstance.on('click', (e) => { if (e.data) { this.zone.run(() => { diff --git a/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.html b/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.html index cf02b60a8..7571beacf 100644 --- a/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.html +++ b/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.html @@ -36,7 +36,7 @@
-
+
diff --git a/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts b/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts index 82c74395b..a7f6da5c2 100644 --- a/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts +++ b/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts @@ -11,6 +11,7 @@ import { SeoService } from '../../services/seo.service'; import { LightningApiService } from '../lightning-api.service'; import { AmountShortenerPipe } from '../../shared/pipes/amount-shortener.pipe'; import { isMobile } from '../../shared/common.utils'; +import { StateService } from '../../services/state.service'; @Component({ selector: 'app-nodes-networks-chart', @@ -58,6 +59,7 @@ export class NodesNetworksChartComponent implements OnInit, OnChanges { private formBuilder: UntypedFormBuilder, private storageService: StorageService, private miningService: MiningService, + public stateService: StateService, private amountShortenerPipe: AmountShortenerPipe, ) { } diff --git a/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html b/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html index 5c285e3de..191a3dbb1 100644 --- a/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html +++ b/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html @@ -17,7 +17,7 @@
-
+
diff --git a/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts b/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts index e305d8959..5d80341fe 100644 --- a/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts +++ b/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts @@ -37,7 +37,7 @@ export class NodesPerCountryChartComponent implements OnInit { private seoService: SeoService, private amountShortenerPipe: AmountShortenerPipe, private zone: NgZone, - private stateService: StateService, + public stateService: StateService, private router: Router, ) { } diff --git a/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.ts b/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.ts index 4035b62d4..619ee01c0 100644 --- a/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.ts +++ b/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { BehaviorSubject, combineLatest, map, Observable, share, tap } from 'rxjs'; import { ApiService } from '../../services/api.service'; @@ -27,6 +27,7 @@ export class NodesPerCountry implements OnInit { constructor( private apiService: ApiService, private seoService: SeoService, + private cd: ChangeDetectorRef, private route: ActivatedRoute, ) { for (let i = 0; i < this.pageSize; ++i) { @@ -94,7 +95,10 @@ export class NodesPerCountry implements OnInit { ispCount: Object.keys(isps).length }; }), - tap(() => this.isLoading = false), + tap(() => { + this.isLoading = false + this.cd.markForCheck(); + }), share() );