Show "indexing in progress" in fee/reward charts during block indexing
This commit is contained in:
parent
a97675c538
commit
5ac9b5674e
@ -288,7 +288,6 @@ class BlocksRepository {
|
|||||||
LIMIT 10`;
|
LIMIT 10`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log(query, params);
|
|
||||||
const [rows] = await DB.query(query, params);
|
const [rows] = await DB.query(query, params);
|
||||||
|
|
||||||
const blocks: BlockExtended[] = [];
|
const blocks: BlockExtended[] = [];
|
||||||
|
@ -100,7 +100,21 @@ export class BlockFeesGraphComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prepareChartOptions(data) {
|
prepareChartOptions(data) {
|
||||||
|
let title: object;
|
||||||
|
if (data.blockFees.length === 0) {
|
||||||
|
title = {
|
||||||
|
textStyle: {
|
||||||
|
color: 'grey',
|
||||||
|
fontSize: 15
|
||||||
|
},
|
||||||
|
text: $localize`:@@23555386d8af1ff73f297e89dd4af3f4689fb9dd:Indexing blocks`,
|
||||||
|
left: 'center',
|
||||||
|
top: 'center'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
this.chartOptions = {
|
this.chartOptions = {
|
||||||
|
title: title,
|
||||||
color: [
|
color: [
|
||||||
new graphic.LinearGradient(0, 0, 0, 1, [
|
new graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{ offset: 0, color: '#FDD835' },
|
{ offset: 0, color: '#FDD835' },
|
||||||
@ -159,7 +173,7 @@ export class BlockFeesGraphComponent implements OnInit {
|
|||||||
hideOverlap: true,
|
hideOverlap: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: data.blockFees.length === 0 ? undefined : {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
name: 'Fees BTC',
|
name: 'Fees BTC',
|
||||||
@ -179,7 +193,7 @@ export class BlockFeesGraphComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
yAxis: [
|
yAxis: data.blockFees.length === 0 ? undefined : [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@ -210,7 +224,7 @@ export class BlockFeesGraphComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
series: [
|
series: data.blockFees.length === 0 ? undefined : [
|
||||||
{
|
{
|
||||||
legendHoverLink: false,
|
legendHoverLink: false,
|
||||||
zlevel: 0,
|
zlevel: 0,
|
||||||
@ -240,7 +254,7 @@ export class BlockFeesGraphComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
dataZoom: [{
|
dataZoom: data.blockFees.length === 0 ? undefined : [{
|
||||||
type: 'inside',
|
type: 'inside',
|
||||||
realtime: true,
|
realtime: true,
|
||||||
zoomLock: true,
|
zoomLock: true,
|
||||||
|
@ -98,9 +98,23 @@ export class BlockRewardsGraphComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prepareChartOptions(data) {
|
prepareChartOptions(data) {
|
||||||
|
let title: object;
|
||||||
|
if (data.blockRewards.length === 0) {
|
||||||
|
title = {
|
||||||
|
textStyle: {
|
||||||
|
color: 'grey',
|
||||||
|
fontSize: 15
|
||||||
|
},
|
||||||
|
text: $localize`:@@23555386d8af1ff73f297e89dd4af3f4689fb9dd:Indexing blocks`,
|
||||||
|
left: 'center',
|
||||||
|
top: 'center'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const scaleFactor = 0.1;
|
const scaleFactor = 0.1;
|
||||||
|
|
||||||
this.chartOptions = {
|
this.chartOptions = {
|
||||||
|
title: title,
|
||||||
animation: false,
|
animation: false,
|
||||||
color: [
|
color: [
|
||||||
new graphic.LinearGradient(0, 0, 0, 1, [
|
new graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
@ -159,7 +173,7 @@ export class BlockRewardsGraphComponent implements OnInit {
|
|||||||
hideOverlap: true,
|
hideOverlap: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: data.blockRewards.length === 0 ? undefined : {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
name: 'Rewards BTC',
|
name: 'Rewards BTC',
|
||||||
@ -179,7 +193,7 @@ export class BlockRewardsGraphComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
yAxis: [
|
yAxis: data.blockRewards.length === 0 ? undefined : [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@ -222,7 +236,7 @@ export class BlockRewardsGraphComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
series: [
|
series: data.blockRewards.length === 0 ? undefined : [
|
||||||
{
|
{
|
||||||
legendHoverLink: false,
|
legendHoverLink: false,
|
||||||
zlevel: 0,
|
zlevel: 0,
|
||||||
@ -251,7 +265,7 @@ export class BlockRewardsGraphComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
dataZoom: [{
|
dataZoom: data.blockRewards.length === 0 ? undefined : [{
|
||||||
type: 'inside',
|
type: 'inside',
|
||||||
realtime: true,
|
realtime: true,
|
||||||
zoomLock: true,
|
zoomLock: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user