APi query and graph layout change

This commit is contained in:
shunmugam 2019-09-16 15:56:13 +05:30
parent 77a19df3e4
commit 13e0beb6b6
2 changed files with 21 additions and 11 deletions

View File

@ -324,13 +324,23 @@ async function Details (height) {
async function GetBlocktime(height){
if(height){
// const BlockchainLatestBlockQuery3 = await getConnection(Global.network)
// .query(
// "SELECT coalesce(max(bb.alter), 0) as alter FROM (SELECT EXTRACT(EPOCH FROM (timestamp - LAG(timestamp) OVER (ORDER BY timestamp))) AS alter FROM blockchain_block where height="+height+" OR height="+(height-1)+") as bb",
// )
// .catch(err_msg => {
// return(err_msg);
// });
const BlockchainLatestBlockQuery3 = await getConnection(Global.network)
.query(
"SELECT coalesce(max(bb.alter), 0) as alter FROM (SELECT EXTRACT(EPOCH FROM (timestamp - LAG(timestamp) OVER (ORDER BY timestamp))) AS alter FROM blockchain_block where height="+height+" OR height="+(height-1)+") as bb",
"SELECT extract(epoch from timestamp at time zone '" +process.env.TIME_ZONE+ "') AS alter FROM blockchain_block where height="+height,
)
.catch(err_msg => {
return(err_msg);
});
return BlockchainLatestBlockQuery3;
}
}

View File

@ -779,7 +779,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -820,7 +820,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -872,7 +872,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -919,7 +919,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -969,7 +969,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -1022,7 +1022,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -1067,7 +1067,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -1153,7 +1153,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -1290,7 +1290,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},
@ -1345,7 +1345,7 @@ export class GraphListComponent implements OnInit {
},
margin: {
l: 50,
r: 50,
r: 10,
b: 50,
t: 50,
},