From 6d3e777697d7a5d22c1ecd351ee690f36cdc423d Mon Sep 17 00:00:00 2001 From: SuriyaR Date: Wed, 7 Aug 2019 11:47:48 +0530 Subject: [PATCH] changes --- server/controllers/BlockchainBlock.ts | 7 ---- server/i18n/de.json | 1 + server/i18n/en.json | 1 + .../graph-detail/graph-detail.component.html | 23 ++++++++--- .../graph-detail/graph-detail.component.ts | 11 ++++-- .../home/graph-list/graph-list.component.html | 38 +++++++++---------- .../home/graph-list/graph-list.component.ts | 7 ++-- 7 files changed, 49 insertions(+), 39 deletions(-) diff --git a/server/controllers/BlockchainBlock.ts b/server/controllers/BlockchainBlock.ts index 6dc9c14..91d1842 100644 --- a/server/controllers/BlockchainBlock.ts +++ b/server/controllers/BlockchainBlock.ts @@ -1147,13 +1147,6 @@ export class BlockchainBlockController { .catch(err_msg => { next(err_msg); }); - console.log("SELECT a.hash, a.tarket_difficulty, a.date FROM(select 1 as hash, (total_difficulty_"+alog_type+" - LAG(total_difficulty_"+alog_type+") OVER (ORDER BY total_difficulty_"+alog_type+")) AS tarket_difficulty, \ - DATE_TRUNC('minute', timestamp at time zone '" + - process.env.TIME_ZONE + - "') as date \ - from blockchain_block where " + - timeIntervalQry + - " order by height) as a WHERE a.tarket_difficulty IS NOT NULL"); let date = [], //DifficultyCuckaroo = [], //DifficultyCuckatoo = [], diff --git a/server/i18n/de.json b/server/i18n/de.json index ba9d838..d98ee2e 100644 --- a/server/i18n/de.json +++ b/server/i18n/de.json @@ -34,6 +34,7 @@ "MINUTE" : "minute", "BLOCKS_PER_PAGE" : "Blöcke pro Seite", "TOTAL_DIFFICULTY" : "Gesamtschwierigkeit", + "TARGET_DIFFICULTY" : "Zielschwierigkeit", "TRANSACTIONS_BY_TIME" : "Transaktionen im Zeitverlauf", "BLOCKS" : "Blöcke", "BLOCK" : "Block", diff --git a/server/i18n/en.json b/server/i18n/en.json index 84d39df..fe05d36 100644 --- a/server/i18n/en.json +++ b/server/i18n/en.json @@ -34,6 +34,7 @@ "BLOCKS_PER_PAGE" : "Blocks per page", "MINUTE" : "minute", "TOTAL_DIFFICULTY" : "Total Difficulty", + "TARGET_DIFFICULTY" : "Target Difficulty", "TRANSACTIONS_BY_TIME" : "Transactions over time", "BLOCKS" : "Blocks", "BLOCK" : "Block", diff --git a/src/app/view/graph-view/graph-detail/graph-detail.component.html b/src/app/view/graph-view/graph-detail/graph-detail.component.html index 9daf040..43feb74 100644 --- a/src/app/view/graph-view/graph-detail/graph-detail.component.html +++ b/src/app/view/graph-view/graph-detail/graph-detail.component.html @@ -14,24 +14,35 @@
1 Day 1 {{'home.WEEK' | translate}} 15 {{'home.DAYS' | translate}} 30 {{'home.DAYS' | translate}} 60 {{'home.DAYS' | translate}} 3 {{'home.MONTHS' | translate}}
+
+ Cuckoo + ProgPow + RandomX +
{{'home.INPUT' | translate}} diff --git a/src/app/view/graph-view/graph-detail/graph-detail.component.ts b/src/app/view/graph-view/graph-detail/graph-detail.component.ts index 49dac50..95f9e6d 100644 --- a/src/app/view/graph-view/graph-detail/graph-detail.component.ts +++ b/src/app/view/graph-view/graph-detail/graph-detail.component.ts @@ -23,7 +23,10 @@ export class GraphDetailComponent implements OnInit { public chartType : any = []; public selectedItem: Number = 3; public selectedItem8: Number = 2; + public selectedItem12: Number = 1; + public Type: any = ''; + public GraphtInput: any; public GraphtOutput: any; public GraphtKernal: any; @@ -36,12 +39,11 @@ export class GraphDetailComponent implements OnInit { private comp: GraphListComponent, private titleService: Title, public translate: TransServiceService - ) { + ) {} + ngOnInit() { if(this.title=='Total Difficulty'){ this.selectedItem = 6; } - } - ngOnInit() { var self = this; var x = setInterval(function() { self.TimeArr = self.chartService.GetTimer() @@ -194,10 +196,11 @@ export class GraphDetailComponent implements OnInit { ) { // (p1, p2, p3, p4, p5) for (fromDate, ToDate, interval, fordifficult, forblocks) for difficult and nar chart // AND For heatmap and others - It will change + this.comp.Type = p4 != '' ? p4 : this.comp.Type == '' ? 'cuckatoo' : this.comp.Type; switch (this.chartType) { case 'total-difficulty': - this.comp.Difficultyreq(p1, p2, p3).then(res => { + this.comp.Difficultyreq(p1, p2, p3, p4).then(res => { this.hashdata = this.comp.linearGraphData; this.hashdata.layout.height = 500; this.title = 'Total Difficulty'; diff --git a/src/app/view/home/graph-list/graph-list.component.html b/src/app/view/home/graph-list/graph-list.component.html index a801199..8ab895e 100644 --- a/src/app/view/home/graph-list/graph-list.component.html +++ b/src/app/view/home/graph-list/graph-list.component.html @@ -2,7 +2,7 @@ diff --git a/src/app/view/home/graph-list/graph-list.component.ts b/src/app/view/home/graph-list/graph-list.component.ts index 8fd2067..ed6ea07 100644 --- a/src/app/view/home/graph-list/graph-list.component.ts +++ b/src/app/view/home/graph-list/graph-list.component.ts @@ -24,7 +24,7 @@ export class GraphListComponent implements OnInit { public transcationGraphData: any = []; public stackGraphData: any = []; public pieGraphData: any = []; - + public lg_last: any; public ag_last: any = ''; public dg_last: any = ''; @@ -56,7 +56,8 @@ export class GraphListComponent implements OnInit { public tDate: any; public tHour: any; public Type: any = ''; - + public difficultyRange: any = '1 day'; + viewchartvar: boolean; constructor(private chartService: ChartService, private http: HttpClient,public translate: TransServiceService, private router: Router, @@ -380,7 +381,7 @@ export class GraphListComponent implements OnInit { interval = '', type = '' ) { - this.Type = this.Type == '' ? type != '' ? type : 'cuckatoo' : this.Type; + this.Type = type != '' ? type : this.Type == '' ? 'cuckatoo' : this.Type; return new Promise((resolve, reject) => { let params = new HttpParams(); params = params.append('FromDate', fromDate);