This commit is contained in:
Prema 2019-08-02 16:21:19 +05:30
commit 987c132f7b
11 changed files with 114 additions and 40 deletions

View File

@ -734,7 +734,7 @@ export class BlockchainBlockController {
BlockchainBlockFetchQuery['Timestamp'] = moment
.utc(BlockchainBlockFetchQuery['Timestamp'])
.utc()
.format('YYYY-MM-DD,HH:MM:SS UTC');
.format('YYYY-MM-DD, HH:MM:SS UTC');
BlockchainBlockFetchQuery['hashstart'] = BlockchainBlockFetchQuery[
'Hash'

View File

@ -16,6 +16,7 @@ import {
TransactionFeeDto,
} from '../dtos';
import { Paginate } from '../utils';
const https = require('https');
var moment = require('moment');
@ -134,6 +135,29 @@ export class BlockchainKernelController {
this.Translator,
);
/**
* @swagger
* /epic_explorer/v1/getpeers:
* get:
* tags:
* - name: Translator | Translator CONTROLLER
* summary: create a translator
* description: create a translator
* consumes:
* - application/json
* produces:
* - application/json
* parameters:
* - name: lang
* responses:
* 200:
* description: Transaction fee chart fetched successfully
*/
this.router.get(
`${this.path}/getpeers`,
this.getPeers,
);
/**
* @swagger
* /epic_explorer/v1/blockchain_kernel/transactionheatmap:
@ -476,6 +500,24 @@ export class BlockchainKernelController {
}
};
private getPeers = async (
request: Request,
response: Response,
next: NextFunction,
) => {
try {
https.get('http://5.9.174.122:3413/v1/peers/connected', (resp) => {
console.log('resp resp respresp',resp);
let data = '';
// A chunk of data has been recieved.
});
} catch (error) {
next(new InternalServerErrorException(error));
}
};
private TransactionFee = async (
request: Request,
response: Response,

View File

@ -1,17 +1,17 @@
{
"total-difficulty" : "Gesamtschwierigkeit",
"transactions-by-time" : "Transkationen nach Zeit",
"transactions-by-time" : "Transaktionen im Zeitverlauf",
"blocks" : "Blöcke",
"transaction-fees" : "Transkationsgebühren",
"supply-growth" : "Angebotswachstum",
"blocks-mined" : "Blöcke abgebaut",
"hashrate-growth-chart" : "HashRate-Wachstumstabelle",
"block-interval" : "Sperrintervall",
"transactions-vs-date" : "Transaktionen gegen Datum",
"transactions-vs-date" : "Transaktionen nach Datum",
"home": {
"HEADER_TEXT": "Sie befinden sich in Beta",
"COUNTDOWN": "Mainnet-Countdown",
"EXPLORE_IT": "Entdecke es",
"EXPLORE_IT": "Entdecke",
"VIEWALL": "Alle Diagramme anzeigen",
"BLOCKCHAIN_HEIGHT": "Blockchain Höhe",
"LATEST_BLOCK": "Letzter Block",
@ -22,19 +22,19 @@
"AGE": "Alter",
"FEE": "Gebühr",
"DIFFICULTY" : "Schwierigkeit",
"POW_ALGO" : "Pow Algo",
"POW_ALGO" : "PoW Algo",
"INPUTS" : "Eingänge",
"INPUT" : "Eingang",
"OUTPUTS" : "Ausgänge",
"OUTPUT" : "Ausgabe",
"KERNELS" : "Kernel",
"EPIC" : "Epos",
"EPIC" : "Epic",
"EXPLORE" : "Erkunden",
"AGO" : "vor",
"MINUTE" : "minute",
"BLOCKS_PER_PAGE" : "Blöcke pro Seite",
"TOTAL_DIFFICULTY" : "Gesamtschwierigkeit",
"TRANSACTIONS_BY_TIME" : "Transkationen nach Zeit",
"TRANSACTIONS_BY_TIME" : "Transaktionen im Zeitverlauf",
"BLOCKS" : "Blöcke",
"BLOCK" : "Block",
"BLOCKS_MINED" : "Blöcke abgebaut",
@ -52,7 +52,7 @@
"NOT_FOUND1" : "Die von Ihnen gesuchte Seite wurde nicht gefunden",
"NOT_FOUND2" : "Gehe zum Explorer",
"COMMIT" : "verpflichten",
"ALGORITHM" : "Pow-Algorithmus",
"ALGORITHM" : "PoW Algorithmus",
"TYPE" : "Art",
"SPEND" : "Verbringen",
"FEATURES" : "Eigenschaften",
@ -61,6 +61,13 @@
"SEARCH_RESULT1" : "Ihr Suchbegriff",
"SEARCH_RESULT2" : "ist zu kurz",
"SEARCH_RESULT3" : "Bitte geben Sie mindestens sechs Zeichen ein, wenn Sie nach Hash suchen",
"total-difficulty" : "Gesamtschwierigkeit"
"total-difficulty" : "Gesamtschwierigkeit",
"PEERS" : "Gleichaltrigen",
"CAPABILITIES" : "Fähigkeiten",
"USER_AGENT" : "User Agent",
"VERSION" : "Ausführung",
"ADDR" : "Adr",
"DIRECTION" : "Richtung",
"SPENT" : "Verbraucht"
}
}

View File

@ -1,17 +1,17 @@
{
"total-difficulty" : "Total Difficulty",
"transactions-by-time" : "Transactions By Time",
"transactions-by-time" : "Transactions over time",
"blocks" : "Blocks",
"transaction-fees" : "Transaction Fees",
"supply-growth" : "Supply Growth",
"blocks-mined" : "Blocks Mined",
"hashrate-growth-chart" : "HashRate Growth Chart",
"block-interval" : "Block Interval",
"transactions-vs-date" : "Transactions Vs Date",
"transactions-vs-date" : "Transactions by Date",
"home": {
"HEADER_TEXT": "You are on Beta",
"COUNTDOWN": "Mainnet Countdown",
"EXPLORE_IT": "Explore it",
"EXPLORE_IT": "Explore",
"VIEWALL": "View All Charts",
"BLOCKCHAIN_HEIGHT": "Blockchain Height",
"LATEST_BLOCK": "Latest Blocks",
@ -22,7 +22,7 @@
"AGE": "Age",
"FEE": "Fee",
"DIFFICULTY" : "Difficulty",
"POW_ALGO" : "Pow Algo",
"POW_ALGO" : "PoW Algo",
"INPUTS" : "Inputs",
"INPUT" : "Input",
"OUTPUTS" : "Outputs",
@ -34,7 +34,7 @@
"BLOCKS_PER_PAGE" : "Blocks per page",
"MINUTE" : "minute",
"TOTAL_DIFFICULTY" : "Total Difficulty",
"TRANSACTIONS_BY_TIME" : "Transactions By Time",
"TRANSACTIONS_BY_TIME" : "Transactions over time",
"BLOCKS" : "Blocks",
"BLOCK" : "Block",
"BLOCKS_MINED" : "Blocks Mined",
@ -42,7 +42,7 @@
"SUPPLY_GROWTH" : "Supply Growth",
"HASHRATE_GROWTH_CHART" : "HashRate Growth Chart",
"BLOCK_INTERVAL" : "Block Interval",
"TRANSACTIONS_VS_DATE" : "Transactions Vs Date",
"TRANSACTIONS_VS_DATE" : "Transactions by Date",
"DAYS" : "days",
"MONTHS" : "months",
"WEEK" : "week",
@ -51,7 +51,7 @@
"NOT_FOUND" : "Page Not Found",
"NOT_FOUND1" : "Page you are looking for is not found",
"NOT_FOUND2" : "Go to Explorer",
"ALGORITHM" : "Pow Algorithm",
"ALGORITHM" : "PoW Algorithm",
"COMMIT" : "commit",
"TYPE" : "Type",
"SPEND" : "Spend",
@ -66,6 +66,7 @@
"USER_AGENT" : "User Agent",
"VERSION" : "Version",
"ADDR" : "Addr",
"DIRECTION" : "Direction"
"DIRECTION" : "Direction",
"SPENT" : "Spent"
}
}

View File

@ -69,9 +69,9 @@
</div>
<div class="d-inline-block align-middle ml-2">
<span class="">{{'home.DIFFICULTY' | translate}}</span>
</div>
<h6 class="view_txt">{{(hashdata.BlockchainBlockFetchQuery.Proof == 'Cuckoo') ? ((hashdata.BlockchainBlockFetchQuery.TotalDifficultyCuckatoo + hashdata.BlockchainBlockFetchQuery.TotalDifficultyCuckaroo) | number) : (hashdata.BlockchainBlockFetchQuery.Proof == 'RandomX') ? (hashdata.BlockchainBlockFetchQuery.TotalDifficultyRandomx | number) : (hashdata.BlockchainBlockFetchQuery.Proof == 'ProgPow') ? (hashdata.BlockchainBlockFetchQuery.TotalDifficultyProgpow | number) : 0}}</h6>
</div>
</div>
<div class="col-sm-6 col-md-4 mt-4 pt-2">
<div class="d-inline-block align-middle">
<img src="assets/img/block_reward.png" height="60" />
@ -233,7 +233,7 @@
<div class="block_div"><h5 class="mb-0">{{'home.FEATURES' | translate}}</h5></div>
</div>
<div class="col-lg-4 ">
<div class="block_div"><h5 class="mb-0">{{'home.LOCK' | translate}} {{'home.HEIGHT' | translate}}</h5></div>
<div class="block_div"><h5 class="mb-0">{{'home.BLOCK' | translate}} {{'home.HEIGHT' | translate}}</h5></div>
</div>
<div class="col-lg-4 ">
<div class="block_div"><h5 class="mb-0">{{'home.FEE' | translate}}</h5></div>
@ -248,7 +248,7 @@
</div>
<div class="col-12 col-sm-4 col-md-4 col-lg-4">
<div class="block_div"><h6>{{'home.LOCK' | translate}} {{'home.HEIGHT' | translate}}</h6><span class="blck_value">{{ hashkernel.LockHeight }}</span></div>
<div class="block_div"><h6>{{'home.BLOCK' | translate}} {{'home.HEIGHT' | translate}}</h6><span class="blck_value">{{ hashkernel.LockHeight }}</span></div>
</div>
<div class="col-12 col-sm-4 col-md-4 col-lg-4">
<div class="block_div"><h6>{{'home.FEE' | translate}}</h6><span class="blck_value">{{ hashkernel.Fee }} Epic</span></div>

View File

@ -11,7 +11,7 @@
<h2 class="chart_heading text-uppercase d-inline-block">{{this.chartType | translate}}</h2>
<epic-explorer-plotly *ngIf="hashdata.data" [data]="hashdata.data" [layout]="hashdata.layout">
</epic-explorer-plotly>
<div class="day_filter" *ngIf="this.title!='Transactions by time'">
<div class="day_filter" *ngIf="this.title!='Transactions over time'">
<a href="JavaScript:void(0);" (click)="
ChartFromView('', '', '1 week', true, false); selectedItem = 1
" id="1" #item1 [ngClass]="{ active: selectedItem == item1.id, txt_primay: true }">1 {{'home.WEEK' | translate}}</a>
@ -28,7 +28,7 @@
ChartFromView('', '', '3 months', true, false); selectedItem = 5
" id="5" #item5 [ngClass]="{ active: selectedItem == item5.id, day3m_txt: true }">3 {{'home.MONTHS' | translate}}</a>
</div>
<div class="day_filter" *ngIf="this.title=='Transactions by time'">
<div class="day_filter" *ngIf="this.title=='Transactions over time'">
<a href="JavaScript:void(0);" (click)="ChartFromView(GraphtDate, GraphtHour, GraphtInput,'Input'); selectedItem8 = 1" id="1" #item1
[ngClass]="{ active: selectedItem8 == item1.id, txt_primay: true }">{{'home.INPUT' | translate}}</a>
<a href="JavaScript:void(0);" (click)="ChartFromView(GraphtDate, GraphtHour, GraphtKernal,'Kernal'); selectedItem8 = 2" id="2" #item2
@ -58,14 +58,14 @@
<h2 class="chart_heading mb-2 d-inline-block">{{'home.EXPLORE' | translate}}</h2>
<ul class="list-unstyled pl-3">
<li class="mb-1" *ngIf="this.title!='Total Difficulty'"><a routerLink="/chart/total-difficulty">{{'home.TOTAL_DIFFICULTY' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Transactions by time'"><a routerLink="/chart/transactions-by-time">{{'home.TRANSACTIONS_BY_TIME' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Transactions over time'"><a routerLink="/chart/transactions-by-time">{{'home.TRANSACTIONS_BY_TIME' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Blocks'"><a routerLink="/chart/blocks">{{'home.BLOCKS' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Blocks Mined'"><a routerLink="/chart/blocks-mined">{{'home.BLOCKS_MINED' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Transaction Fees'"><a routerLink="/chart/transaction-fees">{{'home.TRANSACTION_FEES' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Supply Growth'"><a routerLink="/chart/supply-growth">{{'home.SUPPLY_GROWTH' | translate}}</a></li>
<!-- <li class="mb-1" *ngIf="this.title!='HashRate Growth Chart'"><a routerLink="/chart/hashrate-growth-chart">{{'home.HASHRATE_GROWTH_CHART' | translate}}</a></li> -->
<li class="mb-1" *ngIf="this.title!='Transactions by time'"><a routerLink="/chart/block-interval">{{'home.BLOCK_INTERVAL' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Transactions Vs Date'"><a routerLink="/chart/transactions-vs-date">{{'home.TRANSACTIONS_VS_DATE' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Transactions over time'"><a routerLink="/chart/block-interval">{{'home.BLOCK_INTERVAL' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Transactions by Date'"><a routerLink="/chart/transactions-vs-date">{{'home.TRANSACTIONS_VS_DATE' | translate}}</a></li>
<li class="mb-1" *ngIf="this.title!='Stackbar Chart'"><a routerLink="/chart/stackchart">Stackbar Chart</a></li>
<!-- <li class="mb-1" *ngIf="this.title!='Pie Chart'"><a routerLink="/chart/piechart">Pie Chart</a></li> -->
</ul>

View File

@ -65,7 +65,7 @@ export class GraphDetailComponent implements OnInit {
this.hashdata.layout.height = 500;
// this.hashdata.layout.width =
// window.innerWidth - (window.innerWidth / 2.8);
this.title = 'Transactions by time';
this.title = 'Transactions over time';
this.GraphtDate = this.comp.tDate;
this.GraphtHour = this.comp.tHour;
this.GraphtInput = this.comp.tInput;
@ -172,7 +172,7 @@ export class GraphDetailComponent implements OnInit {
// this.hashdata.layout.width =
// window.innerWidth - window.innerWidth / 2.8;
//console.log(this.hashdata.layout.width);
this.title = 'Transactions Vs Date';
this.title = 'Transactions by Date';
this.titleService.setTitle(
this.route.snapshot.data.title + ' - ' + this.title,
);
@ -206,7 +206,7 @@ export class GraphDetailComponent implements OnInit {
this.hashdata.layout.height = 500;
// this.hashdata.layout.width =
// window.innerWidth - window.innerWidth / 2.8;
this.title = 'Transactions by time';
this.title = 'Transactions over time';
});
break;
case 'blocks':
@ -279,7 +279,7 @@ export class GraphDetailComponent implements OnInit {
this.hashdata.layout.height = 500;
// this.hashdata.layout.width =
// window.innerWidth - window.innerWidth / 2.8;
this.title = 'Transactions Vs Date';
this.title = 'Transactions by Date';
});
break;
}

View File

@ -27,26 +27,35 @@
<div class="row" *ngIf="latestblockdetail">
<div class="col-md-3">
<div class="text-center detail_div" [ngStyle]="{'min-height.px': minHeight}">
<p class="count mb-0">{{ latestblockdetail.block_height | number }}</p>
<p class="mb-0 desc">{{'home.BLOCKCHAIN_HEIGHT' | translate}}</p>
<p class="count mb-0">{{ latestblockdetail.block_height | number }}</p>
</div>
</div>
<div class="col-md-3">
<div class="text-center detail_div" [ngStyle]="{'min-height.px': minHeight}">
<p class="count mb-0">{{latestblockdetail.letest_block_num}} <span class="">{{latestblockdetail.letest_block_duration}}</span></p>
<p class="mb-0 desc">{{'home.LATEST_BLOCK' | translate}}</p>
<p class="count mb-0">{{latestblockdetail.letest_block_num}} <span class="">{{latestblockdetail.letest_block_duration}}</span></p>
</div>
</div>
<div class="col-md-3">
<div class="text-center detail_div" #minhgt>
<p class="difficulty_datas">Cuckaroo : {{latestblockdetail.targetdifficultycuckaroo | number}}, Cuckatoo : {{latestblockdetail.targetdifficultycuckatoo | number}}, ProgPow : {{latestblockdetail.targetdifficultyprogpow | number}}, RandomX : {{latestblockdetail.targetdifficultyrandomx | number}}</p>
<p class="mb-0 desc">{{'home.LATEST_BLOCK1' | translate}}</p>
<p class="mb-2 desc">{{'home.LATEST_BLOCK1' | translate}}</p>
<div class=" text-left d-inline-block">
<p class="difficulty_datas">Cuckaroo : {{latestblockdetail.targetdifficultycuckaroo | number}}</p>
<p class="difficulty_datas">Cuckatoo : {{latestblockdetail.targetdifficultycuckatoo | number}}</p>
<p class="difficulty_datas">ProgPow : {{latestblockdetail.targetdifficultyprogpow | number}}</p>
<p class="difficulty_datas">RandomX : {{latestblockdetail.targetdifficultyrandomx | number}}</p>
</div>
</div>
</div>
<div class="col-md-3">
<div class="text-center detail_div" [ngStyle]="{'min-height.px': minHeight}">
<p class="count mb-0">{{latestblockdetail.coin_existence | number}} <span class="">Epic</span></p>
<p class="mb-0 desc">{{'home.COIN_IN' | translate}}</p>
<p class="count mb-0">{{latestblockdetail.coin_existence | number}} <span class="">Epic</span></p>
</div>
</div>
</div>

View File

@ -332,6 +332,7 @@ export class GraphListComponent implements OnInit {
.apiGetRequest(params, '/blockchain_block/supplygrowth')
.subscribe(
res => {
res = {"status":200,"timestamp":1564734317476,"message":"period of blocks generation per second fetched Successfully","response":{"date":["2019-08-01"],"total_reward_per_day":[4600],"addedreward":[4600]}}
if (res['status'] == 200) {
let gDate = res.response.date;
let gReward = res.response.total_reward_per_day;
@ -548,7 +549,7 @@ export class GraphListComponent implements OnInit {
},
yaxis: {
showline: false,
title: 'Block',
title: 'Blocks',
rangemode: 'nonnegative',
fixedrange: true,
showgrid: true,
@ -586,7 +587,7 @@ export class GraphListComponent implements OnInit {
tickformat: '%m-%d',
},
yaxis: {
title: 'Block',
title: 'Blocks',
},
margin: {
l: 50,
@ -626,7 +627,7 @@ export class GraphListComponent implements OnInit {
tickformat: '%m-%d',
},
yaxis: {
title: 'Block',
title: 'Blocks',
},
margin: {
l: 50,
@ -658,9 +659,15 @@ export class GraphListComponent implements OnInit {
xaxis: {
tickangle: -45,
tickformat: '%m-%d',
rangemode: 'nonnegative',
fixedrange: true,
showgrid: true,
},
yaxis: {
title: 'Tx Fee',
rangemode: 'nonnegative',
fixedrange: true,
showgrid: true,
},
margin: {
l: 50,
@ -700,9 +707,16 @@ export class GraphListComponent implements OnInit {
linewidth: 2,
tickformat: '%m-%d',
tickangle: -45,
rangemode: 'nonnegative',
fixedrange: true,
showgrid: true
},
yaxis: {
title: 'Total Reward Supply',
rangemode: 'nonnegative',
fixedrange: true,
showgrid: true,
tickformat :".0f"
},
margin: {
l: 50,
@ -744,7 +758,7 @@ export class GraphListComponent implements OnInit {
showgrid: true,
},
yaxis: {
title: 'Block / sec',
title: 'Blocks / sec',
rangemode: 'nonnegative',
fixedrange: true,
showgrid: true,

View File

@ -81,7 +81,7 @@
</div>
<div class="col-6 col-sm-6 col-md-3 tble_col">
<div class="block_div">
<h6 class="mb-0">Pow Algo</h6><span class="blck_value">{{ hashvalue.powalgo }}</span>
<h6 class="mb-0">PoW Algo</h6><span class="blck_value">{{ hashvalue.powalgo }}</span>
</div>
</div>
<div class="col-6 col-sm-6 col-md-3 tble_col">

View File

@ -235,6 +235,7 @@ a:focus {
margin-left: 5px;
position: relative;
z-index: 1;
float: right;
}
.day_filter {
background-color: #f9f9f7;
@ -626,7 +627,7 @@ margin-right: 10px;
margin-top: -4px;
}
.langbut:focus{outline: none;}
.detail_div .difficulty_datas{font-size: 14px !important; color: #0091ff}
.detail_div .difficulty_datas{font-size: 14px !important; color: #0091ff; margin-bottom: 0px;}
.net_dropdwn{
min-width: 5rem;
padding: 0;