mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 06:47:52 +01:00
Merge pull request #3492 from mempool/simon/lightning-indexing-status
Lightning indexing indicators
This commit is contained in:
commit
1015cbfa94
6 changed files with 32 additions and 2 deletions
|
@ -18,5 +18,8 @@
|
|||
<div class="text-center loading-spinner" [class]="style" *ngIf="isLoading && !disableSpinner">
|
||||
<div class="spinner-border text-light"></div>
|
||||
</div>
|
||||
<div *ngIf="showIndexingInProgress" class="indexing-message">
|
||||
<span class="badge badge-pill badge-warning" i18n="lightning.indexing-in-progress">Indexing in progress</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
|
@ -133,3 +133,10 @@
|
|||
top: 450px;
|
||||
}
|
||||
}
|
||||
|
||||
.indexing-message {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 100px;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ export class NodesChannelsMap implements OnInit {
|
|||
channelCurve = 0;
|
||||
nodeSize = 4;
|
||||
isLoading = false;
|
||||
showIndexingInProgress = false;
|
||||
|
||||
chartInstance = undefined;
|
||||
chartOptions: EChartsOption = {};
|
||||
|
@ -206,6 +207,8 @@ export class NodesChannelsMap implements OnInit {
|
|||
let title: object;
|
||||
if (channels.length === 0 && !this.placeholder) {
|
||||
this.chartOptions = null;
|
||||
this.showIndexingInProgress = true;
|
||||
this.isLoading = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</small>
|
||||
</div>
|
||||
|
||||
<div [class]="!widget ? 'bottom-padding' : 'pb-0'" class="container pb-lg-0">
|
||||
<div *ngIf="!indexingInProgress else indexing" [class]="!widget ? 'bottom-padding' : 'pb-0'" class="container pb-lg-0">
|
||||
<div [class]="widget ? 'chart-widget' : 'chart'" echarts [initOpts]="chartInitOptions" [options]="chartOptions"
|
||||
(chartInit)="onChartInit($event)">
|
||||
</div>
|
||||
|
@ -99,3 +99,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #indexing>
|
||||
<div class="indexing-message" i18n="lightning.indexing-in-progress">Indexing in progress</div>
|
||||
</ng-template>
|
||||
|
|
|
@ -168,3 +168,13 @@
|
|||
padding-right: 105px;
|
||||
}
|
||||
}
|
||||
|
||||
.indexing-message {
|
||||
font-size: 15px;
|
||||
color: grey;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
padding-top: 100px;
|
||||
text-align: center;
|
||||
height: 240px;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ export class NodesPerISPChartComponent implements OnInit {
|
|||
sortBy = 'capacity';
|
||||
showUnknown = false;
|
||||
chartInstance = undefined;
|
||||
indexingInProgress = false;
|
||||
|
||||
@HostBinding('attr.dir') dir = 'ltr';
|
||||
|
||||
|
@ -88,6 +89,8 @@ export class NodesPerISPChartComponent implements OnInit {
|
|||
|
||||
this.prepareChartOptions(data.ispRanking);
|
||||
|
||||
this.indexingInProgress = !data.ispRanking.length;
|
||||
|
||||
return {
|
||||
taggedISP: data.ispRanking.length,
|
||||
clearnetCapacity: data.clearnetCapacity,
|
||||
|
|
Loading…
Add table
Reference in a new issue