From d7d45146c82c61b4940f5c1e540422b5a33143ea Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 21 Mar 2023 17:33:14 +0900 Subject: [PATCH] Lightning indexing indicators refs #2647 --- .../nodes-channels-map.component.html | 3 +++ .../nodes-channels-map.component.scss | 7 +++++++ .../nodes-channels-map.component.ts | 3 +++ .../nodes-per-isp-chart.component.html | 6 +++++- .../nodes-per-isp-chart.component.scss | 12 +++++++++++- .../nodes-per-isp-chart.component.ts | 3 +++ 6 files changed, 32 insertions(+), 2 deletions(-) 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 b262f58fd..54868fbe6 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 @@ -18,5 +18,8 @@
+
+ Indexing in progress +
\ No newline at end of file diff --git a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.scss b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.scss index 09c029d66..ca51dc6a2 100644 --- a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.scss +++ b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.scss @@ -133,3 +133,10 @@ top: 450px; } } + +.indexing-message { + position: absolute; + width: 100%; + text-align: center; + margin-top: 100px; +} 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 71b5d3afd..05e35b6af 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 @@ -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; } diff --git a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html index a168c032a..356674f14 100644 --- a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html +++ b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html @@ -38,7 +38,7 @@ -
+
@@ -99,3 +99,7 @@
+ + +
Indexing in progress
+
diff --git a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.scss b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.scss index 08fb359a6..f1d39081d 100644 --- a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.scss +++ b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.scss @@ -167,4 +167,14 @@ padding-left: 105px; padding-right: 105px; } -} \ No newline at end of file +} + +.indexing-message { + font-size: 15px; + color: grey; + font-weight: bold; + width: 100%; + padding-top: 100px; + text-align: center; + height: 240px; +} diff --git a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts index 614704ed6..67f393bc2 100644 --- a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts +++ b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts @@ -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,