diff --git a/server/controllers/BlockchainBlock.ts b/server/controllers/BlockchainBlock.ts index cd4fb7e..f37348e 100644 --- a/server/controllers/BlockchainBlock.ts +++ b/server/controllers/BlockchainBlock.ts @@ -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' diff --git a/server/controllers/BlockchainKernel.ts b/server/controllers/BlockchainKernel.ts index d36386d..b50a0d0 100644 --- a/server/controllers/BlockchainKernel.ts +++ b/server/controllers/BlockchainKernel.ts @@ -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, diff --git a/server/i18n/de.json b/server/i18n/de.json index 816b9d9..ba9d838 100644 --- a/server/i18n/de.json +++ b/server/i18n/de.json @@ -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" } } diff --git a/server/i18n/en.json b/server/i18n/en.json index 24961d5..84d39df 100644 --- a/server/i18n/en.json +++ b/server/i18n/en.json @@ -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" } } diff --git a/src/app/view/block-view/block-detail/block-detail.component.html b/src/app/view/block-view/block-detail/block-detail.component.html index d6434d9..064c87c 100644 --- a/src/app/view/block-view/block-detail/block-detail.component.html +++ b/src/app/view/block-view/block-detail/block-detail.component.html @@ -69,8 +69,8 @@
{{'home.DIFFICULTY' | translate}} +
{{(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}}
-
{{(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}}
@@ -233,7 +233,7 @@
{{'home.FEATURES' | translate}}
-
{{'home.LOCK' | translate}} {{'home.HEIGHT' | translate}}
+
{{'home.BLOCK' | translate}} {{'home.HEIGHT' | translate}}
{{'home.FEE' | translate}}
@@ -248,7 +248,7 @@
-
{{'home.LOCK' | translate}} {{'home.HEIGHT' | translate}}
{{ hashkernel.LockHeight }}
+
{{'home.BLOCK' | translate}} {{'home.HEIGHT' | translate}}
{{ hashkernel.LockHeight }}
{{'home.FEE' | translate}}
{{ hashkernel.Fee }} Epic
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 ad578bc..68cfdc3 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 @@ -11,7 +11,7 @@

{{this.chartType | translate}}

-
+
1 {{'home.WEEK' | translate}} @@ -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}}
-
+
{{'home.INPUT' | translate}} {{'home.EXPLORE' | 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 e4f02cc..9050016 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 @@ -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; } diff --git a/src/app/view/home/block-detail-list/block-detail-list.component.html b/src/app/view/home/block-detail-list/block-detail-list.component.html index 8a0df4d..21d0521 100644 --- a/src/app/view/home/block-detail-list/block-detail-list.component.html +++ b/src/app/view/home/block-detail-list/block-detail-list.component.html @@ -27,26 +27,35 @@
+

{{'home.BLOCKCHAIN_HEIGHT' | translate}}

{{ latestblockdetail.block_height | number }}

-

{{'home.BLOCKCHAIN_HEIGHT' | translate}}

+
+

{{'home.LATEST_BLOCK' | translate}}

{{latestblockdetail.letest_block_num}} {{latestblockdetail.letest_block_duration}}

-

{{'home.LATEST_BLOCK' | translate}}

+
-

Cuckaroo : {{latestblockdetail.targetdifficultycuckaroo | number}}, Cuckatoo : {{latestblockdetail.targetdifficultycuckatoo | number}}, ProgPow : {{latestblockdetail.targetdifficultyprogpow | number}}, RandomX : {{latestblockdetail.targetdifficultyrandomx | number}}

-

{{'home.LATEST_BLOCK1' | translate}}

+

{{'home.LATEST_BLOCK1' | translate}}

+
+

Cuckaroo : {{latestblockdetail.targetdifficultycuckaroo | number}}

+

Cuckatoo : {{latestblockdetail.targetdifficultycuckatoo | number}}

+

ProgPow : {{latestblockdetail.targetdifficultyprogpow | number}}

+

RandomX : {{latestblockdetail.targetdifficultyrandomx | number}}

+
+
+

{{'home.COIN_IN' | translate}}

{{latestblockdetail.coin_existence | number}} Epic

-

{{'home.COIN_IN' | translate}}

+
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 3ea6da9..828931d 100644 --- a/src/app/view/home/graph-list/graph-list.component.ts +++ b/src/app/view/home/graph-list/graph-list.component.ts @@ -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, diff --git a/src/app/view/home/latestblocks/latestblocks.component.html b/src/app/view/home/latestblocks/latestblocks.component.html index 2648d3b..c0796ea 100644 --- a/src/app/view/home/latestblocks/latestblocks.component.html +++ b/src/app/view/home/latestblocks/latestblocks.component.html @@ -81,7 +81,7 @@
-
Pow Algo
{{ hashvalue.powalgo }} +
PoW Algo
{{ hashvalue.powalgo }}
diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 7f134b5..e7d26a1 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -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;