Changes
This commit is contained in:
parent
9685d87d7e
commit
7c1be252f4
@ -1048,13 +1048,14 @@ export class BlockchainBlockController {
|
|||||||
DifficultyRandomx = [],
|
DifficultyRandomx = [],
|
||||||
blocks = [];
|
blocks = [];
|
||||||
TotalDifficultyNBlockQuery.forEach(e => {
|
TotalDifficultyNBlockQuery.forEach(e => {
|
||||||
|
//date.indexOf(moment(e.date).format('YYYY-MM-DD')) < 0 ?
|
||||||
|
date.push(moment(e.date).format('YYYY-MM-DD'));
|
||||||
DifficultyCuckaroo.push(parseInt(e.total_difficulty_cuckaroo));
|
DifficultyCuckaroo.push(parseInt(e.total_difficulty_cuckaroo));
|
||||||
DifficultyCuckatoo.push(parseInt(e.total_difficulty_cuckatoo));
|
DifficultyCuckatoo.push(parseInt(e.total_difficulty_cuckatoo));
|
||||||
DifficultyProgpow.push(parseInt(e.total_difficulty_progpow));
|
DifficultyProgpow.push(parseInt(e.total_difficulty_progpow));
|
||||||
DifficultyRandomx.push(parseInt(e.total_difficulty_randomx));
|
DifficultyRandomx.push(parseInt(e.total_difficulty_randomx));
|
||||||
});
|
});
|
||||||
BlockQuery.forEach(e => {
|
BlockQuery.forEach(e => {
|
||||||
date.indexOf(moment(e.date).format('YYYY-MM-DD')) < 0 ? date.push(moment(e.date).format('YYYY-MM-DD')) : ''
|
|
||||||
blocks.push(parseInt(e.blocks));
|
blocks.push(parseInt(e.blocks));
|
||||||
});
|
});
|
||||||
response.status(200).json({
|
response.status(200).json({
|
||||||
@ -1120,8 +1121,7 @@ export class BlockchainBlockController {
|
|||||||
"select 1 as hash, date(DATE_TRUNC('day', timestamp at time zone '" +
|
"select 1 as hash, date(DATE_TRUNC('day', timestamp at time zone '" +
|
||||||
process.env.TIME_ZONE +
|
process.env.TIME_ZONE +
|
||||||
"')) as date, Count( CASE WHEN proof = 'RandomX' THEN 1 ELSE NULL END) AS RandomX, \
|
"')) as date, Count( CASE WHEN proof = 'RandomX' THEN 1 ELSE NULL END) AS RandomX, \
|
||||||
Count( CASE WHEN proof = 'Cuckaroo' THEN 1 ELSE NULL END) AS Cuckaroo,\
|
Count( CASE WHEN proof = 'Cuckoo' THEN 1 ELSE NULL END) AS Cuckoo,\
|
||||||
Count( CASE WHEN proof = 'Cuckatoo' THEN 1 ELSE NULL END) AS Cuckatoo,\
|
|
||||||
Count( CASE WHEN proof = 'ProgPow' THEN 1 ELSE NULL END) AS ProgPow \
|
Count( CASE WHEN proof = 'ProgPow' THEN 1 ELSE NULL END) AS ProgPow \
|
||||||
from blockchain_block where " +
|
from blockchain_block where " +
|
||||||
timeIntervalQry +
|
timeIntervalQry +
|
||||||
@ -1134,15 +1134,13 @@ export class BlockchainBlockController {
|
|||||||
});
|
});
|
||||||
let date = [],
|
let date = [],
|
||||||
Blocks = [],
|
Blocks = [],
|
||||||
Cuckaroo = [],
|
Cuckoo = [],
|
||||||
Cuckatoo = [],
|
|
||||||
ProgPow = [],
|
ProgPow = [],
|
||||||
RandomX = [];
|
RandomX = [];
|
||||||
stackNBlockQuery.forEach(e => {
|
stackNBlockQuery.forEach(e => {
|
||||||
date.push(moment(e.date).format('YYYY-MM-DD'));
|
date.push(moment(e.date).format('YYYY-MM-DD'));
|
||||||
// Blocks.push({Cuckaroo: parseInt(e.cuckaroo), Cuckatoo : parseInt(e.cuckatoo), ProgPow : parseInt(e.progpow), RandomX : parseInt(e.randomx)})
|
// Blocks.push({Cuckaroo: parseInt(e.cuckaroo), Cuckatoo : parseInt(e.cuckatoo), ProgPow : parseInt(e.progpow), RandomX : parseInt(e.randomx)})
|
||||||
Cuckaroo.push(parseInt(e.cuckaroo));
|
Cuckoo.push(parseInt(e.cuckoo));
|
||||||
Cuckatoo.push(parseInt(e.cuckatoo));
|
|
||||||
ProgPow.push(parseInt(e.progpow));
|
ProgPow.push(parseInt(e.progpow));
|
||||||
RandomX.push(parseInt(e.randomx));
|
RandomX.push(parseInt(e.randomx));
|
||||||
});
|
});
|
||||||
@ -1152,8 +1150,7 @@ export class BlockchainBlockController {
|
|||||||
message: 'Stack Data fetched Successfully',
|
message: 'Stack Data fetched Successfully',
|
||||||
response: {
|
response: {
|
||||||
Date: date,
|
Date: date,
|
||||||
Cuckaroo:Cuckaroo,
|
Cuckoo:Cuckoo,
|
||||||
Cuckatoo:Cuckatoo,
|
|
||||||
ProgPow:ProgPow,
|
ProgPow:ProgPow,
|
||||||
RandomX:RandomX
|
RandomX:RandomX
|
||||||
},
|
},
|
||||||
@ -1205,10 +1202,9 @@ export class BlockchainBlockController {
|
|||||||
}
|
}
|
||||||
const stackNBlockQuery = await getConnection()
|
const stackNBlockQuery = await getConnection()
|
||||||
.query(
|
.query(
|
||||||
"SELECT hash,total_edge_bits, RandomX, Cuckaroo, Cuckatoo, ProgPow, Round(RandomX * 100.0 / total_edge_bits,2) AS RandomXper, Round(Cuckaroo * 100.0 / total_edge_bits,2) AS Cuckarooper, Round(Cuckatoo * 100.0 / total_edge_bits,2) AS Cuckatooper, Round(ProgPow * 100.0 / total_edge_bits,2) AS ProgPowper from (select 1 as hash, COUNT(edge_bits) AS total_edge_bits, \
|
"SELECT hash,total_edge_bits, RandomX, Cuckoo, ProgPow, Round(RandomX * 100.0 / total_edge_bits,2) AS RandomXper, Round(Cuckoo * 100.0 / total_edge_bits,2) AS Cuckooper, Round(ProgPow * 100.0 / total_edge_bits,2) AS ProgPowper from (select 1 as hash, COUNT(edge_bits) AS total_edge_bits, \
|
||||||
Count( CASE WHEN proof = 'RandomX' THEN 1 ELSE NULL END) AS RandomX,\
|
Count( CASE WHEN proof = 'RandomX' THEN 1 ELSE NULL END) AS RandomX,\
|
||||||
Count( CASE WHEN proof = 'Cuckaroo' THEN 1 ELSE NULL END) AS Cuckaroo,\
|
Count( CASE WHEN proof = 'Cuckoo' THEN 1 ELSE NULL END) AS Cuckoo,\
|
||||||
Count( CASE WHEN proof = 'Cuckatoo' THEN 1 ELSE NULL END) AS Cuckatoo,\
|
|
||||||
Count( CASE WHEN proof = 'ProgPow' THEN 1 ELSE NULL END) AS ProgPow \
|
Count( CASE WHEN proof = 'ProgPow' THEN 1 ELSE NULL END) AS ProgPow \
|
||||||
from blockchain_block where " +
|
from blockchain_block where " +
|
||||||
timeIntervalQry +
|
timeIntervalQry +
|
||||||
@ -1221,8 +1217,8 @@ export class BlockchainBlockController {
|
|||||||
value = [];
|
value = [];
|
||||||
|
|
||||||
stackNBlockQuery.forEach(e => {
|
stackNBlockQuery.forEach(e => {
|
||||||
label.push("Cuckaroo","Cuckatoo","ProgPow","RandomX");
|
label.push("Cuckoo","ProgPow","RandomX");
|
||||||
value.push(parseInt(e.cuckaroo),parseInt(e.cuckatoo),parseInt(e.progpow),parseInt(e.randomx));
|
value.push(parseInt(e.cuckoo),parseInt(e.progpow),parseInt(e.randomx));
|
||||||
});
|
});
|
||||||
response.status(200).json({
|
response.status(200).json({
|
||||||
status: 200,
|
status: 200,
|
||||||
@ -1685,15 +1681,14 @@ export class BlockchainBlockController {
|
|||||||
}
|
}
|
||||||
const BlockMineChartQuery = await getConnection()
|
const BlockMineChartQuery = await getConnection()
|
||||||
.query(
|
.query(
|
||||||
"SELECT hash, date , total_edge_bits, RandomX, Cuckaroo, Cuckatoo, ProgPow, Round(RandomX * 100.0 / total_edge_bits,2) AS RandomXper, Round(Cuckaroo * 100.0 / total_edge_bits,2) AS Cuckarooper, Round(Cuckatoo * 100.0 / total_edge_bits,2) AS Cuckatooper, Round(ProgPow * 100.0 / total_edge_bits,2) AS ProgPowper \
|
"SELECT hash, date , total_edge_bits, RandomX, Cuckoo, ProgPow, Round(RandomX * 100.0 / total_edge_bits,2) AS RandomXper, Round(Cuckoo * 100.0 / total_edge_bits,2) AS Cuckooper, Round(ProgPow * 100.0 / total_edge_bits,2) AS ProgPowper \
|
||||||
FROM (SELECT 1 as hash, \
|
FROM (SELECT 1 as hash, \
|
||||||
date(DATE_TRUNC('day', timestamp at time zone '" +
|
date(DATE_TRUNC('day', timestamp at time zone '" +
|
||||||
process.env.TIME_ZONE +
|
process.env.TIME_ZONE +
|
||||||
"')) as date, \
|
"')) as date, \
|
||||||
COUNT(edge_bits) AS total_edge_bits, \
|
COUNT(edge_bits) AS total_edge_bits, \
|
||||||
Count( CASE WHEN proof = 'RandomX' THEN 1 ELSE NULL END) AS RandomX, \
|
Count( CASE WHEN proof = 'RandomX' THEN 1 ELSE NULL END) AS RandomX, \
|
||||||
Count( CASE WHEN proof = 'Cuckaroo' THEN 1 ELSE NULL END) AS Cuckaroo,\
|
Count( CASE WHEN proof = 'Cuckoo' THEN 1 ELSE NULL END) AS Cuckoo,\
|
||||||
Count( CASE WHEN proof = 'Cuckatoo' THEN 1 ELSE NULL END) AS Cuckatoo,\
|
|
||||||
Count( CASE WHEN proof = 'ProgPow' THEN 1 ELSE NULL END) AS ProgPow \
|
Count( CASE WHEN proof = 'ProgPow' THEN 1 ELSE NULL END) AS ProgPow \
|
||||||
FROM blockchain_block \
|
FROM blockchain_block \
|
||||||
where " +
|
where " +
|
||||||
@ -1707,23 +1702,19 @@ export class BlockchainBlockController {
|
|||||||
});
|
});
|
||||||
let date = [],
|
let date = [],
|
||||||
RandomXper = [],
|
RandomXper = [],
|
||||||
Cuckarooper = [],
|
Cuckooper = [],
|
||||||
Cuckatooper = [],
|
|
||||||
ProgPowper = [],
|
ProgPowper = [],
|
||||||
RandomX = [],
|
RandomX = [],
|
||||||
Cuckatoo = [],
|
Cuckoo = [],
|
||||||
Cuckaroo = [],
|
|
||||||
ProgPow = [];
|
ProgPow = [];
|
||||||
|
|
||||||
BlockMineChartQuery.forEach(e => {
|
BlockMineChartQuery.forEach(e => {
|
||||||
date.push(moment(e.date).format('YYYY-MM-DD'));
|
date.push(moment(e.date).format('YYYY-MM-DD'));
|
||||||
RandomXper.push(parseFloat(e.randomxper));
|
RandomXper.push(parseFloat(e.randomxper));
|
||||||
Cuckarooper.push(parseFloat(e.cuckarooper));
|
Cuckooper.push(parseFloat(e.cuckarooper));
|
||||||
Cuckatooper.push(parseFloat(e.cuckatooper));
|
|
||||||
ProgPowper.push(parseFloat(e.progpowper));
|
ProgPowper.push(parseFloat(e.progpowper));
|
||||||
RandomX.push(parseInt(e.randomx));
|
RandomX.push(parseInt(e.randomx));
|
||||||
Cuckatoo.push(parseInt(e.cuckatoo));
|
Cuckoo.push(parseInt(e.cuckatoo));
|
||||||
Cuckaroo.push(parseInt(e.cuckaroo));
|
|
||||||
ProgPow.push(parseInt(e.progpow));
|
ProgPow.push(parseInt(e.progpow));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1734,13 +1725,11 @@ export class BlockchainBlockController {
|
|||||||
response: {
|
response: {
|
||||||
date,
|
date,
|
||||||
RandomXper,
|
RandomXper,
|
||||||
Cuckarooper,
|
Cuckooper,
|
||||||
Cuckatooper,
|
|
||||||
ProgPowper,
|
ProgPowper,
|
||||||
RandomX,
|
RandomX,
|
||||||
Cuckatoo,
|
Cuckoo,
|
||||||
Cuckaroo,
|
ProgPow
|
||||||
ProgPow,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
"BLOCKS" : "Blocks",
|
"BLOCKS" : "Blocks",
|
||||||
"BLOCK" : "Block",
|
"BLOCK" : "Block",
|
||||||
"BLOCKS_MINED" : "Blocks Mined",
|
"BLOCKS_MINED" : "Blocks Mined",
|
||||||
"TRANSACTION_FEES" : "Transcation Fees",
|
"TRANSACTION_FEES" : "Transaction Fees",
|
||||||
"SUPPLY_GROWTH" : "Supply Growth",
|
"SUPPLY_GROWTH" : "Supply Growth",
|
||||||
"HASHRATE_GROWTH_CHART" : "HashRate Growth Chart",
|
"HASHRATE_GROWTH_CHART" : "HashRate Growth Chart",
|
||||||
"BLOCK_INTERVAL" : "Block Interval",
|
"BLOCK_INTERVAL" : "Block Interval",
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<div class="d-inline-block align-middle ml-2">
|
<div class="d-inline-block align-middle ml-2">
|
||||||
<span class="">{{'home.DIFFICULTY' | translate}}</span>
|
<span class="">{{'home.DIFFICULTY' | translate}}</span>
|
||||||
</div>
|
</div>
|
||||||
<h6 class="view_txt">{{(hashdata.BlockchainBlockFetchQuery.Proof == 'Cuckoo') ? ((hashvalue.target_difficulty_cuckatoo + hashvalue.target_difficulty_cuckaroo) | number) : (hashdata.BlockchainBlockFetchQuery.Proof == 'RandomX') ? (hashvalue.target_difficulty_randomx | number) : (hashdata.BlockchainBlockFetchQuery.Proof == 'ProgPow') ? (hashvalue.target_difficulty_progpow | number) : 0}}</h6>
|
<h6 class="view_txt">{{(hashdata.BlockchainBlockFetchQuery.Proof == 'Cuckoo') ? ((hashdata.BlockchainBlockFetchQuery.target_difficulty_cuckatoo + hashdata.BlockchainBlockFetchQuery.target_difficulty_cuckaroo) | number) : (hashdata.BlockchainBlockFetchQuery.Proof == 'RandomX') ? (hashdata.BlockchainBlockFetchQuery.target_difficulty_randomx | number) : (hashdata.BlockchainBlockFetchQuery.Proof == 'ProgPow') ? (hashdata.BlockchainBlockFetchQuery.target_difficulty_progpow | number) : 0}}</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 col-md-4 mt-4 pt-2">
|
<div class="col-sm-6 col-md-4 mt-4 pt-2">
|
||||||
<div class="d-inline-block align-middle">
|
<div class="d-inline-block align-middle">
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
<div class="box_shadow">
|
<div class="box_shadow">
|
||||||
<div class="blocks">
|
<div class="blocks">
|
||||||
<h2 class="chart_heading d-inline-block">{{'home.TOTAL_DIFFICULTY' | translate}}</h2>
|
<h2 class="chart_heading d-inline-block">{{'home.TOTAL_DIFFICULTY' | translate}}</h2>
|
||||||
<span class="txn_count" *ngIf="this.lg_last">{{
|
<!-- <span class="txn_count" *ngIf="this.lg_last.length > 0"><span *ngFor="let l of lg_last">{{
|
||||||
this.lg_last | number
|
this.l | number</span>
|
||||||
}}</span>
|
}}</span> -->
|
||||||
<div class="chart_show">
|
<div class="chart_show">
|
||||||
<epic-explorer-plotly *ngIf="linearGraphData.data" [data]="linearGraphData.data" [layout]="linearGraphData.layout">
|
<epic-explorer-plotly *ngIf="linearGraphData.data" [data]="linearGraphData.data" [layout]="linearGraphData.layout">
|
||||||
</epic-explorer-plotly>
|
</epic-explorer-plotly>
|
||||||
|
@ -25,7 +25,7 @@ export class GraphListComponent implements OnInit {
|
|||||||
public stackGraphData: any = [];
|
public stackGraphData: any = [];
|
||||||
public pieGraphData: any = [];
|
public pieGraphData: any = [];
|
||||||
|
|
||||||
public lg_last: any = '';
|
public lg_last: any;
|
||||||
public ag_last: any = '';
|
public ag_last: any = '';
|
||||||
public dg_last: any = '';
|
public dg_last: any = '';
|
||||||
public brg_last: any = '';
|
public brg_last: any = '';
|
||||||
@ -146,16 +146,14 @@ export class GraphListComponent implements OnInit {
|
|||||||
res => {
|
res => {
|
||||||
if (res['status'] == 200) {
|
if (res['status'] == 200) {
|
||||||
let sDate = res.response.Date;
|
let sDate = res.response.Date;
|
||||||
let Cuckaroo = res.response.Cuckaroo;
|
let Cuckoo = res.response.Cuckoo;
|
||||||
let Cuckatoo = res.response.Cuckatoo;
|
|
||||||
let ProgPow = res.response.ProgPow;
|
let ProgPow = res.response.ProgPow;
|
||||||
let RandomX = res.response.RandomX;
|
let RandomX = res.response.RandomX;
|
||||||
this.sg_last =
|
this.sg_last =
|
||||||
RandomX[RandomX.length - 1];
|
RandomX[RandomX.length - 1];
|
||||||
this.stackchartFunc(
|
this.stackchartFunc(
|
||||||
sDate,
|
sDate,
|
||||||
Cuckaroo,
|
Cuckoo,
|
||||||
Cuckatoo,
|
|
||||||
ProgPow,
|
ProgPow,
|
||||||
RandomX
|
RandomX
|
||||||
);
|
);
|
||||||
@ -276,25 +274,21 @@ export class GraphListComponent implements OnInit {
|
|||||||
if (res['status'] == 200) {
|
if (res['status'] == 200) {
|
||||||
let mDate = res.response.date;
|
let mDate = res.response.date;
|
||||||
let ProgPow = res.response.ProgPow;
|
let ProgPow = res.response.ProgPow;
|
||||||
let Cuckaroo = res.response.Cuckaroo;
|
let Cuckoo = res.response.Cuckoo;
|
||||||
let Cuckatoo = res.response.Cuckatoo;
|
|
||||||
let RandomX = res.response.RandomX;
|
let RandomX = res.response.RandomX;
|
||||||
|
|
||||||
let ProgPowper = res.response.ProgPowper;
|
let ProgPowper = res.response.ProgPowper;
|
||||||
let Cuckarooper = res.response.Cuckarooper;
|
let Cuckooper = res.response.Cuckooper;
|
||||||
let Cuckatooper = res.response.Cuckatooper;
|
|
||||||
let RandomXper = res.response.RandomXper;
|
let RandomXper = res.response.RandomXper;
|
||||||
|
|
||||||
this.dg_last = RandomXper[RandomXper.length - 1];
|
this.dg_last = RandomXper[RandomXper.length - 1];
|
||||||
this.blockminedFunc(
|
this.blockminedFunc(
|
||||||
mDate,
|
mDate,
|
||||||
ProgPow,
|
ProgPow,
|
||||||
Cuckaroo,
|
Cuckoo,
|
||||||
Cuckatoo,
|
|
||||||
RandomX,
|
RandomX,
|
||||||
ProgPowper,
|
ProgPowper,
|
||||||
Cuckarooper,
|
Cuckooper,
|
||||||
Cuckatooper,
|
|
||||||
RandomXper,
|
RandomXper,
|
||||||
);
|
);
|
||||||
resolve();
|
resolve();
|
||||||
@ -399,7 +393,7 @@ export class GraphListComponent implements OnInit {
|
|||||||
let DifficultyProgpow = res.response.DifficultyProgpow;
|
let DifficultyProgpow = res.response.DifficultyProgpow;
|
||||||
let DifficultyRandomx = res.response.DifficultyRandomx;
|
let DifficultyRandomx = res.response.DifficultyRandomx;
|
||||||
this.lg_last =
|
this.lg_last =
|
||||||
DifficultyCuckaroo[DifficultyCuckaroo.length - 1];
|
[DifficultyCuckaroo[DifficultyCuckaroo.length - 1],DifficultyCuckatoo[DifficultyCuckatoo.length - 1],DifficultyProgpow[DifficultyProgpow.length - 1],DifficultyRandomx[DifficultyRandomx.length - 1]];
|
||||||
this.difficultyChartFunc(
|
this.difficultyChartFunc(
|
||||||
DifficultychartDate,
|
DifficultychartDate,
|
||||||
DifficultyCuckaroo,
|
DifficultyCuckaroo,
|
||||||
@ -487,31 +481,31 @@ export class GraphListComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
stackchartFunc(sDate, Cuckaroo, Cuckatoo, ProgPow, RandomX) {
|
stackchartFunc(sDate, Cuckoo, ProgPow, RandomX) {
|
||||||
this.stackGraphData = {
|
this.stackGraphData = {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
x: sDate,
|
x: sDate,
|
||||||
y: Cuckaroo,
|
y: Cuckoo,
|
||||||
name: '',
|
name: '',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
text: Cuckaroo,
|
text: Cuckoo,
|
||||||
hovertemplate: '%{x}<br> Cuckatoo : %{text:,}',
|
hovertemplate: '%{x}<br> Cuckoo : %{text:,}',
|
||||||
marker: {
|
marker: {
|
||||||
color: '#77817C',
|
color: '#77817C',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
x: sDate,
|
// x: sDate,
|
||||||
y: Cuckatoo,
|
// y: Cuckatoo,
|
||||||
name: '',
|
// name: '',
|
||||||
type: 'bar',
|
// type: 'bar',
|
||||||
text: Cuckatoo,
|
// text: Cuckatoo,
|
||||||
hovertemplate: '%{x}<br> Cuckaroo : %{text:,}',
|
// hovertemplate: '%{x}<br> Cuckaroo : %{text:,}',
|
||||||
marker: {
|
// marker: {
|
||||||
color: '#54CFDC',
|
// color: '#54CFDC',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
x: sDate,
|
x: sDate,
|
||||||
y: ProgPow,
|
y: ProgPow,
|
||||||
@ -540,15 +534,23 @@ export class GraphListComponent implements OnInit {
|
|||||||
hovermode: 'closest',
|
hovermode: 'closest',
|
||||||
//width: 350,
|
//width: 350,
|
||||||
height: 250,
|
height: 250,
|
||||||
autosize: false,
|
autosize: true,
|
||||||
showlegend: false,
|
showlegend: false,
|
||||||
barmode: 'relative',
|
barmode: 'relative',
|
||||||
xaxis: {
|
xaxis: {
|
||||||
|
showgrid: true,
|
||||||
|
zeroline: false,
|
||||||
tickangle: -45,
|
tickangle: -45,
|
||||||
tickformat: '%m-%d',
|
tickformat: '%m-%d',
|
||||||
|
rangemode: 'nonnegative',
|
||||||
|
fixedrange: true,
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
|
showline: false,
|
||||||
title: 'Block',
|
title: 'Block',
|
||||||
|
rangemode: 'nonnegative',
|
||||||
|
fixedrange: true,
|
||||||
|
showgrid: true,
|
||||||
},
|
},
|
||||||
margin: {
|
margin: {
|
||||||
l: 50,
|
l: 50,
|
||||||
@ -757,14 +759,14 @@ export class GraphListComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
blockminedFunc(mDate,ProgPow, Cuckaroo, Cuckatoo, RandomX, ProgPowper, Cuckarooper, Cuckatooper, RandomXper) {
|
blockminedFunc(mDate,ProgPow, Cuckoo, RandomX, ProgPowper, Cuckooper, RandomXper) {
|
||||||
this.doubleareaGraphData = {
|
this.doubleareaGraphData = {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
x: mDate,
|
x: mDate,
|
||||||
y: Cuckarooper,
|
y: Cuckooper,
|
||||||
text: Cuckaroo,
|
text: Cuckoo,
|
||||||
hovertemplate: 'Cuckaroo :%{y} % ( %{text:,} )',
|
hovertemplate: 'Cuckoo :%{y} % ( %{text:,} )',
|
||||||
name: '',
|
name: '',
|
||||||
fill: 'tozeroy',
|
fill: 'tozeroy',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@ -772,18 +774,18 @@ export class GraphListComponent implements OnInit {
|
|||||||
color: '#f5ca19',
|
color: '#f5ca19',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
x: mDate,
|
// x: mDate,
|
||||||
y: Cuckatooper,
|
// y: Cuckatooper,
|
||||||
text: Cuckatoo,
|
// text: Cuckatoo,
|
||||||
hovertemplate: 'Cuckatoo :%{y} % ( %{text:,} )',
|
// hovertemplate: 'Cuckatoo :%{y} % ( %{text:,} )',
|
||||||
name: '',
|
// name: '',
|
||||||
fill: 'tozeroy',
|
// fill: 'tozeroy',
|
||||||
type: 'line',
|
// type: 'line',
|
||||||
line: {
|
// line: {
|
||||||
color: '#f5c1a9',
|
// color: '#f5c1a9',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
x: mDate,
|
x: mDate,
|
||||||
y: RandomXper,
|
y: RandomXper,
|
||||||
@ -861,31 +863,36 @@ export class GraphListComponent implements OnInit {
|
|||||||
hovermode: 'closest',
|
hovermode: 'closest',
|
||||||
height: 250,
|
height: 250,
|
||||||
//width: 365,
|
//width: 365,
|
||||||
autosize: false,
|
autosize: true,
|
||||||
annotations: [],
|
annotations: [],
|
||||||
font: {
|
font: {
|
||||||
size: 8.5,
|
size: 8.5,
|
||||||
},
|
},
|
||||||
xaxis: {
|
xaxis: {
|
||||||
ticks: '',
|
ticks: '',
|
||||||
tickangle: 360,
|
tickangle: screen.width < 767 ? '-90' : 360,
|
||||||
side: 'top',
|
side: 'top',
|
||||||
autotick: false,
|
autotick: false,
|
||||||
showgrid: true,
|
showgrid: true,
|
||||||
|
rangemode: 'nonnegative',
|
||||||
|
fixedrange: true,
|
||||||
|
autosize: true,
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
ticks: '',
|
ticks: '',
|
||||||
ticksuffix: ' ',
|
ticksuffix: ' ',
|
||||||
tickformat: '%m-%d',
|
tickformat: '%m-%d',
|
||||||
autosize: false,
|
autosize: true,
|
||||||
showgrid: true,
|
showgrid: true,
|
||||||
autotick: false,
|
autotick: false,
|
||||||
|
rangemode: 'nonnegative',
|
||||||
|
fixedrange: true,
|
||||||
},
|
},
|
||||||
margin: {
|
margin: {
|
||||||
l: 30,
|
l: 30,
|
||||||
r: 30,
|
r: 0,
|
||||||
b: 60,
|
b: 50,
|
||||||
t: 60,
|
t: 50,
|
||||||
},
|
},
|
||||||
showlegend: false,
|
showlegend: false,
|
||||||
},
|
},
|
||||||
@ -928,17 +935,22 @@ export class GraphListComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
layout: {
|
layout: {
|
||||||
autosize: false,
|
autosize: true,
|
||||||
// width: 350,
|
// width: 350,
|
||||||
height: 250,
|
height: 250,
|
||||||
xaxis: {
|
xaxis: {
|
||||||
showgrid: false,
|
showgrid: true,
|
||||||
zeroline: false,
|
zeroline: false,
|
||||||
tickformat: '%m-%d',
|
tickformat: '%m-%d',
|
||||||
|
rangemode: 'nonnegative',
|
||||||
|
fixedrange: true,
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
showline: false,
|
showline: false,
|
||||||
title: 'Transactions',
|
title: 'Transactions',
|
||||||
|
rangemode: 'nonnegative',
|
||||||
|
fixedrange: true,
|
||||||
|
showgrid: true,
|
||||||
},
|
},
|
||||||
margin: {
|
margin: {
|
||||||
l: 50,
|
l: 50,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { HttpClient, HttpParams, HttpErrorResponse } from '@angular/common/http';
|
import { HttpClient, HttpParams, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
||||||
import { ChartService } from '../../../shared/services/chart.service';
|
import { ChartService } from '../../../shared/services/chart.service';
|
||||||
import { FormGroup, FormControl } from '@angular/forms';
|
import { FormGroup, FormControl } from '@angular/forms';
|
||||||
import { TransServiceService } from '../../../shared/services/trans-service.service';
|
import { TransServiceService } from '../../../shared/services/trans-service.service';
|
||||||
@ -44,16 +44,19 @@ export class LatestblocksComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getpeersList() {
|
public getpeersList() {
|
||||||
|
const httpOptions = {
|
||||||
|
headers: new HttpHeaders({
|
||||||
|
'Access-Control-Allow-Origin':'*'
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
console.log('EEE');
|
console.log('EEE');
|
||||||
this.http
|
this.http
|
||||||
.get('http://5.9.174.122:3413/v1/peers/connected')
|
.get('http://5.9.174.122:3413/v1/peers/connected',httpOptions)
|
||||||
.pipe(
|
.subscribe((res) => {
|
||||||
map(res => {
|
|
||||||
console.log('reeeee',res);
|
console.log('reeeee',res);
|
||||||
}),
|
});
|
||||||
catchError((error: HttpErrorResponse): any => throwError(error)),
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user