Commit for add timezone in query
This commit is contained in:
parent
aeb3acdb84
commit
db18e33d82
@ -1668,8 +1668,14 @@ export class BlockchainBlockController {
|
||||
.utc()
|
||||
.format('YYYY-MM-DD');
|
||||
|
||||
var timeIntervalQry =
|
||||
'timestamp BETWEEN SYMMETRIC ' + fromdate + ' AND ' + todate;
|
||||
var timeIntervalQry =
|
||||
"timestamp at time zone '" +
|
||||
process.env.TIME_ZONE +
|
||||
"' BETWEEN SYMMETRIC '" +
|
||||
fromdate +
|
||||
"' AND '" +
|
||||
todate +
|
||||
"'";
|
||||
|
||||
var seriesquery = "'" + fromdate + "'::timestamp, '" + todate + "'";
|
||||
} else {
|
||||
@ -1777,8 +1783,14 @@ export class BlockchainBlockController {
|
||||
.utc()
|
||||
.format('YYYY-MM-DD');
|
||||
|
||||
var timeIntervalQry =
|
||||
'timestamp BETWEEN SYMMETRIC ' + fromdate + ' AND ' + todate;
|
||||
var timeIntervalQry =
|
||||
"timestamp at time zone '" +
|
||||
process.env.TIME_ZONE +
|
||||
"' BETWEEN SYMMETRIC '" +
|
||||
fromdate +
|
||||
"' AND '" +
|
||||
todate +
|
||||
"'";
|
||||
} else {
|
||||
var timeIntervalQry = "timestamp > current_date - interval '30 days'";
|
||||
}
|
||||
@ -1842,8 +1854,14 @@ export class BlockchainBlockController {
|
||||
.utc()
|
||||
.format('YYYY-MM-DD');
|
||||
|
||||
var timeIntervalQry =
|
||||
'timestamp BETWEEN SYMMETRIC ' + fromdate + ' AND ' + todate;
|
||||
var timeIntervalQry =
|
||||
"timestamp at time zone '" +
|
||||
process.env.TIME_ZONE +
|
||||
"' BETWEEN SYMMETRIC '" +
|
||||
fromdate +
|
||||
"' AND '" +
|
||||
todate +
|
||||
"'";
|
||||
} else {
|
||||
var timeIntervalQry = "timestamp > current_date - interval '30 days'";
|
||||
}
|
||||
|
@ -121,6 +121,14 @@
|
||||
ChartFromView('', '', '3 months', comp.Type); selectedItem = 5; comp.difficultyRange = '3 months';comp.TdifficultyRange = '3 months'
|
||||
" id="5" #item5 [ngClass]="{ active: selectedItem == item5.id, day3m_txt: true }">3
|
||||
{{'home.MONTHS' | translate}}</a>
|
||||
|
||||
|
||||
<a href="JavaScript:void(0);" *ngIf="this.title=='Total Difficulty' || this.title=='Target Difficulty'" (click)="
|
||||
ChartFromView('', '', 'all', comp.Type); selectedItem = 7; comp.difficultyRange = 'all';comp.TdifficultyRange = 'all'
|
||||
" id="7" #item7 [ngClass]="{ active: selectedItem == item7.id, txt_primary: true }">{{'home.All' | translate}}</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="day_filter" *ngIf="this.title=='Transactions over time'">
|
||||
|
@ -164,6 +164,13 @@
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
blockreq('', '', '3 months'); selectedItem3 = 5
|
||||
" id="5" #item35 [ngClass]="{ active: selectedItem3 == item35.id, day3m_txt: true }">3 {{'home.MONTHS' | translate}}</a>
|
||||
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
blockreq('', '', 'all',''); selectedItem3 = 7;
|
||||
" id="7" #item37 [ngClass]="{ active: selectedItem3 == item37.id, day3m_txt: true }">{{'home.All' | translate}}</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="explore_all text-right">
|
||||
<a routerLink="/chart/blocks"><span class="text-uppercase d-block">{{'home.EXPLORE_IT' | translate}} <i class="fa fa-long-arrow-right"></i></span></a>
|
||||
@ -210,6 +217,13 @@
|
||||
[ngClass]="{ active: selectedItem5 == item4.id, day60_txt: true }">60 {{'home.DAYS' | translate}}</a>
|
||||
<a href="JavaScript:void(0);" (click)="Growthreq('', '', '3 months'); selectedItem5 = 5" id="5" #item5
|
||||
[ngClass]="{ active: selectedItem5 == item5.id, day3m_txt: true }">3 {{'home.MONTHS' | translate}}</a>
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Growthreq('', '', 'all'); selectedItem5 = 7;
|
||||
" id="7" #item7 [ngClass]="{ active: selectedItem5 == item7.id, day3m_txt: true }">{{'home.All' | translate}}</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="explore_all text-right">
|
||||
<a routerLink="/chart/supply-growth"><span class="text-uppercase d-block">{{'home.EXPLORE_IT' | translate}} <i
|
||||
@ -258,6 +272,12 @@
|
||||
[ngClass]="{ active: selectedItem4 == item4.id, day60_txt: true }">60 {{'home.DAYS' | translate}}</a>
|
||||
<a href="JavaScript:void(0);" (click)="Transcationreq('', '', '3 months'); selectedItem4 = 5" id="5" #item5
|
||||
[ngClass]="{ active: selectedItem4 == item5.id, day3m_txt: true }">3 {{'home.MONTHS' | translate}}</a>
|
||||
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Transcationreq('', '', 'all'); selectedItem4 = 7;
|
||||
" id="7" #item7 [ngClass]="{ active: selectedItem4 == item7.id, day3m_txt: true }">{{'home.All' | translate}}</a>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="explore_all text-right">
|
||||
<a routerLink="/chart/transaction-fees"><span class="text-uppercase d-block">{{'home.EXPLORE_IT' | translate}} <i class="fa fa-long-arrow-right"></i></span></a>
|
||||
|
@ -362,9 +362,19 @@ export class GraphListComponent implements OnInit {
|
||||
Growthreq(fromDate = '', ToDate = '', interval = '') {
|
||||
return new Promise((resolve, reject) => {
|
||||
let params = new HttpParams();
|
||||
|
||||
this.growthGraphData = []
|
||||
if(interval == "all") {
|
||||
// this.Type=""
|
||||
fromDate = "2019-09-05 00:00:00"
|
||||
ToDate = moment(new Date()).format("YYYY-MM-DD 23:29:59")
|
||||
}
|
||||
|
||||
params = params.append('Interval', (interval == "all")?"":interval);
|
||||
|
||||
params = params.append('FromDate', fromDate);
|
||||
params = params.append('ToDate', ToDate);
|
||||
params = params.append('Interval', interval);
|
||||
// params = params.append('Interval', interval);
|
||||
this.chartService
|
||||
.apiGetRequest(params, '/blockchain_block/supplygrowth')
|
||||
.subscribe(
|
||||
@ -394,9 +404,19 @@ export class GraphListComponent implements OnInit {
|
||||
Transcationreq(fromDate = '', ToDate = '', interval = '') {
|
||||
return new Promise((resolve, reject) => {
|
||||
let params = new HttpParams();
|
||||
|
||||
|
||||
this.transcationGraphData = []
|
||||
if(interval == "all") {
|
||||
fromDate = "2019-09-03 00:00:00"
|
||||
ToDate = moment(new Date()).format("YYYY-MM-DD 23:29:59")
|
||||
}
|
||||
|
||||
params = params.append('Interval', (interval == "all")?"":interval);
|
||||
params = params.append('FromDate', fromDate);
|
||||
params = params.append('ToDate', ToDate);
|
||||
params = params.append('Interval', interval);
|
||||
|
||||
// params = params.append('Interval', interval);
|
||||
this.chartService
|
||||
.apiGetRequest(params, '/blockchain_kernel/transactionfee')
|
||||
.subscribe(
|
||||
@ -613,9 +633,17 @@ export class GraphListComponent implements OnInit {
|
||||
) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let params = new HttpParams();
|
||||
this.barGraphData = []
|
||||
if(interval == "all") {
|
||||
// this.Type=""
|
||||
fromDate = "2019-09-03 00:00:00"
|
||||
ToDate = moment(new Date()).format("YYYY-MM-DD 23:29:59")
|
||||
}
|
||||
|
||||
params = params.append('Interval', (interval == "all")?"":interval);
|
||||
params = params.append('FromDate', fromDate);
|
||||
params = params.append('ToDate', ToDate);
|
||||
params = params.append('Interval', interval);
|
||||
// params = params.append('Interval', interval);
|
||||
this.chartService
|
||||
.apiGetRequest(params, '/blockchain_block/blockcount')
|
||||
.subscribe(
|
||||
|
Loading…
Reference in New Issue
Block a user