conflict fix
This commit is contained in:
commit
26105deb7f
15
server.ts
15
server.ts
@ -32,7 +32,7 @@ import { Request, Response, NextFunction } from "express";
|
||||
import bodyParser from "body-parser";
|
||||
//import { logger } from "./server/utils";
|
||||
import swaggerJSDoc from "swagger-jsdoc";
|
||||
import { errorMiddleware } from "./server/middlewares";
|
||||
import { errorMiddleware, redisMiddleware } from "./server/middlewares";
|
||||
import {
|
||||
getRepository,
|
||||
In,
|
||||
@ -121,7 +121,7 @@ controllers.forEach(controller => {
|
||||
// Example Express Rest API endpoints
|
||||
import request from 'request-promise';
|
||||
|
||||
app.get("/api", async (req, res) => {
|
||||
app.get("/api", redisMiddleware('60'), async (req, res) => {
|
||||
try {
|
||||
let option = req.query.q;
|
||||
let blockDetails = await latestBlockDetails();
|
||||
@ -129,7 +129,9 @@ try {
|
||||
{
|
||||
let result; //500
|
||||
if(option == "circulating")
|
||||
result= blockDetails.coin_existence;
|
||||
result= blockDetails.coin_existence * 100000000;
|
||||
else if(option == "reward")
|
||||
result= blockDetails.currentReward * 100000000;
|
||||
else if(option == "getblockcount")
|
||||
result= blockDetails.block_height;
|
||||
else if(option == "getdifficulty-randomx")
|
||||
@ -139,7 +141,7 @@ try {
|
||||
else if(option == "getdifficulty-progpow")
|
||||
result = Number(blockDetails.TotalDifficultyProgpow);
|
||||
else if(option == "totalcoins")
|
||||
result = 21000000;
|
||||
result = 21000000 * 100000000;
|
||||
else if(option == "getblockhash")
|
||||
{
|
||||
let height = req.query.height;
|
||||
@ -235,7 +237,7 @@ try {
|
||||
else
|
||||
{
|
||||
//let result= 5;
|
||||
//window.redirect('/');
|
||||
res.redirect('/api-index');
|
||||
}
|
||||
|
||||
}
|
||||
@ -318,9 +320,8 @@ console.log(__dirname);
|
||||
console.log(`Node Express server listening on http://localhost:${PORT}`);
|
||||
});
|
||||
|
||||
cron.schedule('* * * * * *', () => {
|
||||
cron.schedule('*/30 * * * * *', () => {
|
||||
universalGetLatestBlockDetails('Testnet');
|
||||
universalGetLatestBlockDetails('Floonet');
|
||||
});
|
||||
var interval;
|
||||
const io = require("socket.io").listen(server);
|
||||
|
@ -63,7 +63,7 @@ export class BlockchainBlockController {
|
||||
if (fee == 0) {
|
||||
return this.epic(0);
|
||||
} else if (fee < 1000) {
|
||||
return (fee * 1000000) / 1000000000;
|
||||
return fee / 1000000;
|
||||
} else {
|
||||
return this.milliEpic(parseFloat(fee) / 1000);
|
||||
}
|
||||
@ -73,7 +73,7 @@ export class BlockchainBlockController {
|
||||
if (fee == 0) {
|
||||
return this.epic(0);
|
||||
} else if (fee < 1000) {
|
||||
return (fee * 1000) / 1000000000;
|
||||
return fee / 1000;
|
||||
} else {
|
||||
return this.epic(parseFloat(fee) / 1000);
|
||||
}
|
||||
@ -1012,6 +1012,7 @@ export class BlockchainBlockController {
|
||||
// MaxPages,
|
||||
PageSize,
|
||||
}: BlockchainBlockPaginationDto = request.query;
|
||||
|
||||
if (parseInt(CurrentPage) == NaN) {
|
||||
next(new IntegerValidationException('CurrentPage'));
|
||||
} else if (parseInt(PageSize) == NaN) {
|
||||
@ -1053,6 +1054,7 @@ export class BlockchainBlockController {
|
||||
'blockchain_block.TotalDifficultyProgpow',
|
||||
'blockchain_block.TotalDifficultyRandomx',
|
||||
'blockchain_block.previous_id',
|
||||
'EXTRACT(EPOCH FROM (blockchain_block.timestamp - LAG(blockchain_block.timestamp) OVER (ORDER BY blockchain_block.timestamp))) as timetaken',
|
||||
'blockchain_block.total_difficulty_cuckaroo - LAG(blockchain_block.total_difficulty_cuckaroo) OVER (ORDER BY blockchain_block.total_difficulty_cuckaroo) AS target_difficulty_cuckaroo',
|
||||
'blockchain_block.total_difficulty_cuckatoo - LAG(blockchain_block.total_difficulty_cuckatoo) OVER (ORDER BY blockchain_block.total_difficulty_cuckatoo) AS target_difficulty_cuckatoo',
|
||||
'blockchain_block.total_difficulty_progpow - LAG(blockchain_block.total_difficulty_progpow) OVER (ORDER BY blockchain_block.total_difficulty_progpow) AS target_difficulty_progpow',
|
||||
@ -1075,14 +1077,14 @@ export class BlockchainBlockController {
|
||||
.leftJoin('blockchain_block.BlockchainKernels', 'blockchain_kernel')
|
||||
.leftJoin('blockchain_block.BlockchainOutputs', 'blockchain_output')
|
||||
.skip(PaginationReponseData.startIndex)
|
||||
.take(PaginationReponseData.pageSize)
|
||||
.take(PaginationReponseData.pageSize+1)
|
||||
.orderBy('blockchain_block.Timestamp', 'DESC')
|
||||
.groupBy('blockchain_block.Hash')
|
||||
.getRawAndEntities();
|
||||
|
||||
//console.log(BlockchainBlockPaginationQuery.raw);
|
||||
|
||||
let BlockchainBlockResult = BlockchainBlockPaginationQuery.raw;
|
||||
BlockchainBlockResult.splice(-1,1);
|
||||
let lastElemt =
|
||||
BlockchainBlockResult[BlockchainBlockResult.length - 1];
|
||||
const BlockchainPreviousBlockFetchQuery = await getConnection(Global.network).getRepository(
|
||||
@ -1201,7 +1203,7 @@ export class BlockchainBlockController {
|
||||
var timeIntervalQry =
|
||||
"timestamp at time zone '" +
|
||||
process.env.TIME_ZONE +
|
||||
"' > current_date - interval '1 day'";
|
||||
"' > current_date - interval '1 week'";
|
||||
}
|
||||
const BlockQuery = await getConnection(Global.network)
|
||||
.query(
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as redis from 'redis';
|
||||
var REDIS_URL = process.env.REDIS_URL;
|
||||
export namespace Global {
|
||||
export var network: string = 'Floonet';
|
||||
export var network: string = 'Testnet';
|
||||
// connect to Redis
|
||||
export var client = redis.createClient(REDIS_URL);
|
||||
}
|
@ -14,6 +14,7 @@
|
||||
"avg-block-interval" : "Durchschnittliches Sperrintervall",
|
||||
"home": {
|
||||
"HEADER_TEXT": "Sie befinden sich in Beta",
|
||||
"TIMETAKEN": "Genomen tijd (sec)",
|
||||
"COUNTDOWN": "Mainnet-Countdown",
|
||||
"EXPLORE_IT": "Entdecke",
|
||||
"VIEWALL": "Alle Diagramme anzeigen",
|
||||
@ -83,5 +84,35 @@
|
||||
"ADDR" : "Adr",
|
||||
"DIRECTION" : "Richtung",
|
||||
"SPENT" : "Verbraucht"
|
||||
},
|
||||
"api-view": {
|
||||
"query-api" : "Abfrage-API",
|
||||
"query-api-line1" : "Die aufzurufende API-Funktion wird über den Parameter q angegeben.",
|
||||
"query-api-line2" : "Zum Beispiel können Sie die Gesamtmünzen des epischen Bargeldes mit fragen ",
|
||||
"circulating" : "Gibt die Anzahl der umlaufenden Münzen zurück",
|
||||
"getblockcount":"Gibt die aktuelle Blockhöhe als reine Textzeichenfolge zurück",
|
||||
"getdifficulty-randomx" : "Gibt die RandomX-Schwierigkeit als reine Textzeichenfolge zurück",
|
||||
"getdifficulty-progpow" : "Gibt die Schwierigkeit ProgPow als reine Textzeichenfolge zurück",
|
||||
"getdifficulty-cuckoo" : "returns the Cuckoo difficulty as a plain text string",
|
||||
"totalcoins" : "Gibt die Cuckoo-Schwierigkeit als reine Textzeichenfolge zurück",
|
||||
"Block-Queries": "Abfragen blockieren",
|
||||
"real-time-simple-query" : "Einfache Echtzeitabfragen",
|
||||
"block-query-text" : "Block-APIs berücksichtigen nur Blöcke in der 'Haupt'-Kette (wie in der Explorer-Brieftasche festgelegt).",
|
||||
"getblockhash" : "Nimmt einen Höhenparameter und gibt den entsprechenden Block-Hash zurück",
|
||||
"getblockheight" : "Nimmt einen Hash-Parameter und gibt die entsprechende Blockhöhe zurück.",
|
||||
"getblocktime" : "Nimmt einen Höhenparameter und gibt die unixtime des Blocks zurück.",
|
||||
"takes":"nimmt ein",
|
||||
"Note" : "Hinweis",
|
||||
"reward" : "Gibt die aktuelle Blockbelohnung zurück"
|
||||
},
|
||||
"commit-id-view": {
|
||||
"output-commit":"Output Commit",
|
||||
"created-at-block":"Erstellt am Block",
|
||||
"created-at":"Hergestellt in",
|
||||
"output-type" : "Ausgabetyp",
|
||||
"proof" : "Beweis",
|
||||
"proof-hash" : "Beweis-Hash",
|
||||
"merkle-proof" : "Merkle Beweis",
|
||||
"mmr-index" : "MMR Index"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"difficulty" : "Difficulty",
|
||||
"transactions-over-time" : "Transactions over time",
|
||||
"transactions-over-time" : "Transactions over Time",
|
||||
"blocks-by-algorithm" : "Blocks by Algorithm",
|
||||
"blocks" : "Blocks",
|
||||
"transaction-fees" : "Average Transaction Fee",
|
||||
@ -15,6 +15,7 @@
|
||||
"home": {
|
||||
"HEADER_TEXT": "You are on Beta",
|
||||
"COUNTDOWN": "Mainnet Countdown",
|
||||
"TIMETAKEN": "Time Taken (sec)",
|
||||
"EXPLORE_IT": "Explore",
|
||||
"VIEWALL": "View All Charts",
|
||||
"BLOCKCHAIN_HEIGHT": "Blockchain Height",
|
||||
@ -42,7 +43,7 @@
|
||||
"MINUTE" : "minute",
|
||||
"TOTAL_DIFFICULTY" : "Total Difficulty",
|
||||
"TARGET_DIFFICULTY" : "Target Difficulty",
|
||||
"TRANSACTIONS_BY_TIME" : "Transactions over time",
|
||||
"TRANSACTIONS_BY_TIME" : "Transactions over Time",
|
||||
"BLOCKS" : "Blocks",
|
||||
"BLOCKSINTERVAL" : "Block Interval",
|
||||
"SUPPLY_GROWTH_HOVER" : "Current Block Reward",
|
||||
@ -61,7 +62,7 @@
|
||||
"DAYS" : "days",
|
||||
"MONTHS" : "months",
|
||||
"WEEK" : "week",
|
||||
"SEARCH_TEXT" : "Search by hash, or block height or output commit id",
|
||||
"SEARCH_TEXT" : "Search by hash, or block height or output commit ID",
|
||||
"BLOCK_REWARD" : "Block Reward",
|
||||
"NOT_FOUND" : "Page Not Found",
|
||||
"NOT_FOUND1" : "Page you are looking for is not found",
|
||||
@ -83,5 +84,35 @@
|
||||
"ADDR" : "Addr",
|
||||
"DIRECTION" : "Direction",
|
||||
"SPENT" : "Spent"
|
||||
},
|
||||
"api-view": {
|
||||
"query-api" : "Query API",
|
||||
"query-api-line1" : "The API function to call is specified through the q parameter.",
|
||||
"query-api-line2" : "For instance you can ask the totalcoins of epic cash with ",
|
||||
"circulating" : "returns the number of circulating coins",
|
||||
"getblockcount":"returns the current block height as a plain text string",
|
||||
"getdifficulty-randomx" : "returns the RandomX difficulty as a plain text string",
|
||||
"getdifficulty-progpow" : "returns the ProgPow difficulty as a plain text string",
|
||||
"getdifficulty-cuckoo" : "returns the Cuckoo difficulty as a plain text string",
|
||||
"totalcoins" : "returns the outstanding number of coins",
|
||||
"Block-Queries": "Block Queries",
|
||||
"real-time-simple-query" : "Real-Time Simple Queries",
|
||||
"block-query-text" : "Block APIs only consider blocks in the 'main' chain (as determined by the explorer wallet).",
|
||||
"getblockhash" : " parameter and returns corresponding block hash.",
|
||||
"getblockheight" : " parameter and returns corresponding block height.",
|
||||
"getblocktime" : " parameter and returns unixtime of the block.",
|
||||
"takes" : "takes a",
|
||||
"Note" : "Note",
|
||||
"reward" : "returns current block reward"
|
||||
},
|
||||
"commit-id-view": {
|
||||
"output-commit":"Output Commit",
|
||||
"created-at-block":"Created at block",
|
||||
"created-at":"Created At",
|
||||
"output-type" : "Output Type",
|
||||
"proof" : "Proof",
|
||||
"proof-hash" : "Proof hash",
|
||||
"merkle-proof" : "Merkle Proof",
|
||||
"mmr-index" : "MMR Index"
|
||||
}
|
||||
}
|
||||
|
@ -316,6 +316,7 @@ export async function universalGetLatestBlockDetails(current_network) {
|
||||
'blockchain_block.TotalDifficultyProgpow',
|
||||
'blockchain_block.TotalDifficultyRandomx',
|
||||
'blockchain_block.previous_id',
|
||||
'EXTRACT(EPOCH FROM (blockchain_block.timestamp - LAG(blockchain_block.timestamp) OVER (ORDER BY blockchain_block.timestamp))) as timetaken',
|
||||
'blockchain_block.total_difficulty_cuckaroo - LAG(blockchain_block.total_difficulty_cuckaroo) OVER (ORDER BY blockchain_block.total_difficulty_cuckaroo) AS target_difficulty_cuckaroo',
|
||||
'blockchain_block.total_difficulty_cuckatoo - LAG(blockchain_block.total_difficulty_cuckatoo) OVER (ORDER BY blockchain_block.total_difficulty_cuckatoo) AS target_difficulty_cuckatoo',
|
||||
'blockchain_block.total_difficulty_progpow - LAG(blockchain_block.total_difficulty_progpow) OVER (ORDER BY blockchain_block.total_difficulty_progpow) AS target_difficulty_progpow',
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<!-- <div class="col-md-3 col-lg-4 text-right"> -->
|
||||
<div class="col-sm-6 text-right ftr_lng">
|
||||
<a routerLink="/api-view" class="text_underline mr-2" style="font-size: 1rem">API</a>
|
||||
<a routerLink="/api-index" class="text_underline mr-2" style="font-size: 1rem">API</a>
|
||||
<div class="dropdown ftr_dropdown pr-2 d-inline-block py-2">
|
||||
<span class="flag" [ngStyle]="{ 'background-image': 'url(assets/img/' + translate.getCurrentLang() + '.jpg)'}"></span>
|
||||
<!--<span class="flag" ngIf="translate.getCurrentLang() =='de'" style="background-image: url('assets/img/german.jpg')"></span>-->
|
||||
|
@ -1,9 +1,9 @@
|
||||
<header class="headerbg">
|
||||
<div class="home_tst_net mt-3 d-block d-sm-none position-relative">
|
||||
<a href="https://epic.tech/" target="_blank" class="text_underline mr-2">Epic Cash</a>
|
||||
<a routerLink="/api-view" class="text_underline mr-2">API</a>
|
||||
<a routerLink="/api-index" class="text_underline mr-2">API</a>
|
||||
<span>You are viewing </span>
|
||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-3 pl-1">
|
||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-4 pl-1">
|
||||
<!-- <option value="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option> -->
|
||||
<option value="Testnet" disabled [selected]="'Testnet' == getNetwork()">MainNet</option>
|
||||
<!-- <option disabled value="Mainnet">MainNet</option> -->
|
||||
@ -48,9 +48,9 @@
|
||||
</li> -->
|
||||
<li class="home_tst_net mr-3 d-none d-sm-inline-block position-relative">
|
||||
<a href="https://epic.tech/" target="_blank" class="text_underline mr-2">Epic Cash</a>
|
||||
<a routerLink="/api-view" class="text_underline mr-2">API</a>
|
||||
<a routerLink="/api-index" class="text_underline mr-2">API</a>
|
||||
<span>You are viewing </span>
|
||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-3 pl-1">
|
||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-4 pl-1">
|
||||
<!-- <option value="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option> -->
|
||||
<option value="Testnet" disabled [selected]="'Testnet' == getNetwork()">MainNet</option>
|
||||
<!-- <option disabled value="Mainnet">MainNet</option> -->
|
||||
|
@ -16,7 +16,7 @@
|
||||
<img src="/assets/img/ftrlogo_dark.png" height="30" class="dark_theme_display"></a>
|
||||
<div class=" d-none d-sm-inline-block mr-3 position-relative">
|
||||
<span>You are viewing </span>
|
||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-3 pl-1">
|
||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-4 pl-1">
|
||||
<!-- <option value="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option> -->
|
||||
<option value="Testnet" disabled [selected]="'Testnet' == getNetwork()">MainNet</option>
|
||||
<!-- <option disabled value="Mainnet">MainNet</option> -->
|
||||
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
<div class="d-block d-sm-none text-center mt-3 mx-auto position-relative">
|
||||
<span>You are viewing </span>
|
||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-3 pl-1">
|
||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-4 pl-1">
|
||||
<!-- <option value="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option> -->
|
||||
<option value="Testnet" disabled [selected]="'Testnet' == getNetwork()">MainNet</option>
|
||||
<!-- <option disabled value="Mainnet">MainNet</option> -->
|
||||
|
@ -1,29 +1,35 @@
|
||||
<div class="view_content py-4">
|
||||
<div class="container">
|
||||
<h3>Query API</h3>
|
||||
<h3 class="txt_primary">{{'api-view.query-api' | translate}}</h3>
|
||||
|
||||
<p>
|
||||
The API function to call is specified through the <code>q</code> parameter.<br>
|
||||
For instance you can ask the totalcoins of epic cash with "<i>https://explorer.epic.tech/api?q=totalcoins</i>".
|
||||
<p class="txt_secondary">
|
||||
{{'api-view.query-api-line1' | translate}} <code>q</code> parameter.<br>
|
||||
{{'api-view.query-api-line2' | translate}} "<i>https://explorer.epic.tech/api?q=totalcoins</i>".
|
||||
</p>
|
||||
<h4>Real-Time Simple Queries</h4>
|
||||
<ul>
|
||||
<li><b>circulating</b>: returns the number of circulating coins </li>
|
||||
<li><b>getblockcount</b>: returns the current block height as a plain text string</li>
|
||||
<li><b>getdifficulty-randomx</b>: returns the RandomX difficulty as a plain text string</li>
|
||||
<li><b>getdifficulty-progpow</b>: returns the ProgPow difficulty as a plain text string</li>
|
||||
<li><b>getdifficulty-cuckoo</b>: returns the Cuckoo difficulty as a plain text string</li>
|
||||
<li><b>totalcoins</b>: returns the outstanding number of coins</li>
|
||||
<h4 class="txt_primary">{{'api-view.real-time-simple-query' | translate}}</h4>
|
||||
<ul class="txt_secondary">
|
||||
<li><b><a target="_blank" href="./api?q=circulating" >circulating</a></b>: {{'api-view.circulating' | translate}} </li>
|
||||
<li><b><a target="_blank" href="./api?q=getblockcount"> getblockcount </a></b>: {{'api-view.getblockcount' | translate}}</li>
|
||||
<li><b><a target="_blank" href="./api?q=getdifficulty-randomx">getdifficulty-randomx</a></b>: {{'api-view.getdifficulty-randomx' | translate}}</li>
|
||||
<li><b><a target="_blank" href="./api?q=getdifficulty-progpow">getdifficulty-progpow</a></b>: {{'api-view.getdifficulty-progpow' | translate}}</li>
|
||||
<li><b><a target="_blank" href="./api?q=getdifficulty-cuckoo">getdifficulty-cuckoo</a></b>: {{'api-view.getdifficulty-cuckoo' | translate}}</li>
|
||||
<li><b><a target="_blank" href="./api?q=totalcoins">totalcoins</a></b>: {{'api-view.totalcoins' | translate}}</li>
|
||||
<li><b><a target="_blank" href="./api?q=reward">reward</a></b>: {{'api-view.reward' | translate}}</li>
|
||||
</ul>
|
||||
|
||||
<h4>Block Queries</h4>
|
||||
<p>
|
||||
Block APIs only consider blocks in the "main" chain (as determined by the explorer wallet).
|
||||
<h4 class="txt_primary">{{'api-view.Block-Queries' | translate}}</h4>
|
||||
<p class="txt_secondary">
|
||||
{{'api-view.block-query-text' | translate}}
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>getblockhash</b>: takes a <code>height</code> parameter and returns corresponding block hash.</li>
|
||||
<li><b>getblockheight</b>: takes a <code>hash</code> parameter and returns corresponding block height.</li>
|
||||
<li><b>getblocktime</b>: takes a <code>height</code> parameter and returns unixtime of the block.</li>
|
||||
<ul class="txt_secondary">
|
||||
<li><b><a target="_blank" href="./api?q=getblockhash&height=1" >getblockhash</a></b>: takes a <code>height</code> {{'api-view.getblockhash' | translate}}</li>
|
||||
<li><b><a target="_blank" href="./api?q=getblockheight&hash=3933f075332670a661d2271218969770c8396a2853777d5912c9ad4797e9c7e6" >getblockheight</a></b>: takes a <code>hash</code> {{'api-view.getblockheight' | translate}}</li>
|
||||
<li><b><a target="_blank" href="./api?q=getblocktime&height=2" >getblocktime</a></b>: takes a <code>height</code> {{'api-view.getblocktime' | translate}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="container">
|
||||
<h4 class="txt_primary">{{'api-view.Note' | translate}}</h4>
|
||||
<span>
|
||||
If you require another API, please request it by sending an email to <a href = {{angerstring}}> {{email}} </a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { environment } from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'app-api-view',
|
||||
@ -9,6 +10,9 @@ export class ApiViewComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
public email:string = environment.EMAIL;
|
||||
public angerstring:string ="mailto:"+ environment.EMAIL +"?subject = API-Request&body = Message";
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
@ -291,50 +291,50 @@
|
||||
<div *ngIf="hashdata.viewType == 'Commit'" >
|
||||
|
||||
<div class="container">
|
||||
<h3> Output Commit <span style="font-size:15px"></span></h3>
|
||||
<h3> {{'commit-id-view.output-commit' | translate}} <span style="font-size:15px"></span></h3>
|
||||
|
||||
<table class="table table-horizontal-bordered table-hover hashdata_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="d-none d-md-table-cell">Created at block </td>
|
||||
<td class="d-none d-md-table-cell">{{'commit-id-view.created-at-block' | translate}} </td>
|
||||
<td>
|
||||
<p class="d-md-none">Created at block</p>
|
||||
<p class="d-md-none">{{'commit-id-view.created-at-block' | translate}}</p>
|
||||
{{ hashdata.BlockchainBlockFetchQuery.Height }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="d-none d-md-table-cell">Created At </td>
|
||||
<td class="d-none d-md-table-cell">{{'commit-id-view.created-at' | translate}} </td>
|
||||
<td>
|
||||
<p class="d-md-none">Created At</p>
|
||||
<p class="d-md-none">{{'commit-id-view.created-at' | translate}}</p>
|
||||
{{ hashdata.BlockchainBlockFetchQuery.Timestamp }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="d-none d-md-table-cell">Output Type</td>
|
||||
<td class="d-none d-md-table-cell">{{'commit-id-view.output-type' | translate}}</td>
|
||||
<td>
|
||||
<p class="d-md-none">Output Type</p>
|
||||
<p class="d-md-none">{{'commit-id-view.output-type' | translate}}</p>
|
||||
{{ hashdata.BlockchainBlockOutputFetchQuery[0].OutputType }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="d-none d-md-table-cell">Proof</td>
|
||||
<td class="d-none d-md-table-cell">{{'commit-id-view.proof' | translate}}</td>
|
||||
<td>
|
||||
<p class="d-md-none">Proof</p>
|
||||
<p class="d-md-none">{{'commit-id-view.proof' | translate}}</p>
|
||||
{{ hashdata.BlockchainBlockOutputFetchQuery[0].Proof }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="d-none d-md-table-cell">Proof hash</td>
|
||||
<td class="d-none d-md-table-cell">{{'commit-id-view.proof-hash' | translate}}</td>
|
||||
<td>
|
||||
<p class="d-md-none">Proof hash</p>
|
||||
<p class="d-md-none">{{'commit-id-view.proof-hash' | translate}}</p>
|
||||
{{ hashdata.BlockchainBlockOutputFetchQuery[0].ProofHash }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="d-none d-md-table-cell">Merkle Proof</td>
|
||||
<td class="d-none d-md-table-cell">{{'commit-id-view.merkle-proof' | translate}}</td>
|
||||
<td class="text_break">
|
||||
<p class="d-md-none">Merkle Proof</p>
|
||||
<p class="d-md-none">{{'commit-id-view.merkle-proof' | translate}}</p>
|
||||
{{ hashdata.BlockchainBlockOutputFetchQuery[0].MerkleProof }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="d-none d-md-table-cell">MMR Index</td>
|
||||
<td class="d-none d-md-table-cell">{{'commit-id-view.mmr-index' | translate}}</td>
|
||||
<td>
|
||||
<p class="d-md-none">MMR Index</p>
|
||||
<p class="d-md-none">{{'commit-id-view.mmr-index' | translate}}</p>
|
||||
{{ hashdata.BlockchainBlockOutputFetchQuery[0].MmrIndex }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -22,7 +22,7 @@ export class GraphDetailComponent implements OnInit {
|
||||
public title: any;
|
||||
public chartType : any = [];
|
||||
public selectedItem: Number = 3;
|
||||
public selectedItem8: Number = 2;
|
||||
public selectedItem8: Number = 1;
|
||||
public selectedItem12: Number = 4;
|
||||
public Type: any = '';
|
||||
public selectedTarget: Number = 3;
|
||||
@ -63,8 +63,8 @@ export class GraphDetailComponent implements OnInit {
|
||||
this.hashdata = this.comp.linearTotalGraphData;
|
||||
console.log('this.comp.linearTotalGraphData',this.comp.linearTotalGraphData);
|
||||
this.hashdata.layout.height = 300;
|
||||
this.hashdata.layout.xaxis.domain = [0.1,0.9];
|
||||
this.hashdata.layout.yaxis2.position = 2.25;
|
||||
//this.hashdata.layout.xaxis.domain = [0.1,0.9];
|
||||
//this.hashdata.layout.yaxis2.position = 1.25;
|
||||
this.title = 'Total Difficulty';
|
||||
this.selectedItem = 6;
|
||||
this.titleService.setTitle(
|
||||
@ -77,12 +77,12 @@ export class GraphDetailComponent implements OnInit {
|
||||
// this.totalDifficultyreq();
|
||||
this.comp.Difficultyreq('target').then(res => {
|
||||
this.hashdata = this.comp.linearGraphData;
|
||||
console.log('this.comp.linearGraphData',this.comp.linearGraphData);
|
||||
this.hashdata.layout.height = 300;
|
||||
this.hashdata.layout.xaxis.domain = [0.1,0.9];
|
||||
this.hashdata.layout.yaxis2.position = 2.25;
|
||||
// console.log('this.comp.linearGraphData',this.comp.linearGraphData);
|
||||
// this.hashdata.layout.height = 300;
|
||||
// this.hashdata.layout.xaxis.domain = [0.1,0.9];
|
||||
// this.hashdata.layout.yaxis2.position = 2.25;
|
||||
this.title = 'Target Difficulty';
|
||||
this.selectedItem = 6;
|
||||
// this.selectedItem = 6;
|
||||
this.titleService.setTitle(
|
||||
this.route.snapshot.data.title + ' - ' + this.title,
|
||||
);
|
||||
@ -241,18 +241,21 @@ export class GraphDetailComponent implements OnInit {
|
||||
case 'target-difficulty':
|
||||
this.comp.Difficultyreq('target',p1, p2, p3, p4).then(res => {
|
||||
this.hashdata = this.comp.linearGraphData;
|
||||
this.hashdata.layout.height = 300;
|
||||
this.hashdata.layout.xaxis.domain = [0.1,0.9];
|
||||
this.hashdata.layout.yaxis2.position = 2.25;
|
||||
// this.hashdata.layout.height = 300;
|
||||
// this.hashdata.layout.xaxis.domain = [0.1,0.9];
|
||||
// this.hashdata.layout.yaxis2.position = 2.25;
|
||||
this.title = 'Target Difficulty';
|
||||
});
|
||||
break;
|
||||
case 'total-difficulty':
|
||||
this.comp.Difficultyreq('total',p1, p2, p3, p4).then(res => {
|
||||
this.hashdata = this.comp.linearTotalGraphData;
|
||||
this.hashdata.layout.height = 300;
|
||||
this.hashdata.layout.xaxis.domain = [0.1,0.9];
|
||||
this.hashdata.layout.yaxis2.position = 2.25;
|
||||
// this.hashdata.layout.height = 300;
|
||||
// this.hashdata.layout.xaxis.domain = [0.9, 0.9];
|
||||
// this.hashdata.layout.yaxis.automargin= true;
|
||||
// this.hashdata.layout.yaxis1.automargin= true;
|
||||
// this.hashdata.layout.yaxis2.automargin= true;
|
||||
// this.hashdata.layout.yaxis2.position = 0.0;
|
||||
this.title = 'Total Difficulty';
|
||||
});
|
||||
break;
|
||||
|
@ -17,6 +17,9 @@
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div"><h6 >Age</h6><span class="blck_value">{{ blockdetails.age }}</span></div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div"><h6 >Time Taken(Sec)</h6><span class="blck_value">{{ blockdetails.timetaken }}</span></div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div"><h6>Difficulty</h6><span class="blck_value">{{(blockdetails.PoWAlgo == 'Cuckoo') ? (blockdetails.target_difficulty_cuckatoo | number) : (blockdetails.PoWAlgo == 'RandomX') ? (blockdetails.target_difficulty_randomx | number) : (blockdetails.PoWAlgo == 'ProgPow') ? (blockdetails.target_difficulty_progpow | number) : 0}}</span></div>
|
||||
</div>
|
||||
|
@ -66,7 +66,7 @@ export class BlockDetailListComponent implements OnInit {
|
||||
if (res["status"] == 200) {
|
||||
// var hasharray = res.response;
|
||||
this.latestblockdetail = res.response;
|
||||
setInterval(() => this.incrementseconds(), 1000);
|
||||
// setInterval(() => this.incrementseconds(), 1000);
|
||||
this.latestblockdetail["blink"] = false;
|
||||
resolve();
|
||||
}
|
||||
|
@ -215,7 +215,7 @@
|
||||
<div class="box_shadow">
|
||||
<div class="blocks">
|
||||
<h2 class="chart_heading d-inline-block">{{'home.TRANSACTION_FEES' | translate}}</h2>
|
||||
<span class="txn_count" title="{{'home.TRANSACTION_FEE_HOVER' | translate}}" *ngIf="this.fg_last">{{this.fg_last |number}}</span>
|
||||
<span style="display:none;" class="txn_count" title="{{'home.TRANSACTION_FEE_HOVER' | translate}}" *ngIf="this.fg_last">{{this.fg_last |number}}</span>
|
||||
|
||||
<div class="chart_show">
|
||||
<epic-explorer-plotly *ngIf="transcationGraphData.data" [data]="transcationGraphData.data"
|
||||
|
@ -51,7 +51,7 @@ export class GraphListComponent implements OnInit {
|
||||
public selectedItem5: Number = 3;
|
||||
public selectedItem7: Number = 3;
|
||||
public selectedItem8: Number = 3;
|
||||
public selectedItem81: Number = 2;
|
||||
public selectedItem81: Number = 1;
|
||||
public selectedItem9: Number = 3;
|
||||
public selectedItem10: Number = 3;
|
||||
public selectedItem11: Number = 3;
|
||||
@ -271,7 +271,7 @@ export class GraphListComponent implements OnInit {
|
||||
this.tDate,
|
||||
this.tHour,
|
||||
this.tKernal,
|
||||
'Kernal',
|
||||
'Input',
|
||||
);
|
||||
resolve();
|
||||
}
|
||||
@ -608,6 +608,27 @@ export class GraphListComponent implements OnInit {
|
||||
}
|
||||
|
||||
difficultyChartFunc(DifficultychartDate, data, Type, range1, range2, range3, tickformat) {
|
||||
|
||||
let window_width = window.screen.width;
|
||||
let position = 0.00;
|
||||
let angle = 0;
|
||||
let domain_start = 0;
|
||||
let left_margin = 5;
|
||||
if(window_width > 700)
|
||||
{
|
||||
position = 0.10;
|
||||
angle = 0;
|
||||
domain_start = 0.18;
|
||||
left_margin = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
position = 0.03;
|
||||
angle = -45;
|
||||
domain_start = 0.23;
|
||||
left_margin = 25;
|
||||
}
|
||||
|
||||
// console.log('range rangerangerange',range);
|
||||
this.linearGraphData = {
|
||||
data: data,
|
||||
@ -621,17 +642,24 @@ export class GraphListComponent implements OnInit {
|
||||
xaxis: {
|
||||
tickangle: -45,
|
||||
tickformat: tickformat,
|
||||
fixedrange: true,
|
||||
// fixedrange: true,
|
||||
rangemode: 'nonnegative',
|
||||
domain: [0.2, 0.8]
|
||||
domain: [domain_start, 0.9],
|
||||
// showgrid: true
|
||||
tickfont: {
|
||||
size: 12
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
title: 'Cuckoo',
|
||||
fixedrange: true,
|
||||
rangemode: 'nonnegative',
|
||||
// showgrid: true,
|
||||
range: range1
|
||||
range: range1,
|
||||
tickangle: angle,
|
||||
tickfont: {
|
||||
size: 12
|
||||
}
|
||||
},
|
||||
yaxis2: {
|
||||
title: 'Progpow',
|
||||
@ -640,8 +668,12 @@ export class GraphListComponent implements OnInit {
|
||||
range: range3,
|
||||
overlaying: 'y',
|
||||
rangemode: 'nonnegative',
|
||||
side: 'left',
|
||||
position: 1.25
|
||||
// side: 'left',
|
||||
position: position,
|
||||
tickangle: angle,
|
||||
tickfont: {
|
||||
size: 12
|
||||
}
|
||||
},
|
||||
yaxis3: {
|
||||
title: 'RandomX',
|
||||
@ -651,12 +683,17 @@ export class GraphListComponent implements OnInit {
|
||||
anchor: 'x',
|
||||
overlaying: 'y',
|
||||
rangemode: 'nonnegative',
|
||||
side: 'right'
|
||||
side: 'right',
|
||||
position: 0.00 ,
|
||||
tickangle: angle,
|
||||
tickfont: {
|
||||
size: 12
|
||||
}
|
||||
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
l: left_margin,
|
||||
r: 5,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -742,7 +779,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -783,7 +820,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -835,7 +872,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -882,7 +919,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -916,16 +953,23 @@ export class GraphListComponent implements OnInit {
|
||||
rangemode: 'nonnegative',
|
||||
fixedrange: true,
|
||||
showgrid: true,
|
||||
tickfont: {
|
||||
size: 13
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
title: 'Tx Fee',
|
||||
rangemode: 'nonnegative',
|
||||
fixedrange: true,
|
||||
showgrid: true,
|
||||
// showgrid: true,
|
||||
tickangle: -45,
|
||||
tickfont: {
|
||||
size: 13
|
||||
}
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -978,7 +1022,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -1023,7 +1067,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -1109,7 +1153,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -1134,11 +1178,11 @@ export class GraphListComponent implements OnInit {
|
||||
[0.2222222222222222, "rgb(44,187,232)"],
|
||||
[0.3333333333333333, "rgb(97,211,254)"],
|
||||
[0.4444444444444444, "rgb(72,220,107)"],
|
||||
[0.5555555555555556, "rgb(255,72,102)"],
|
||||
[0.6666666666666666, "rgb(254,85,51)"],
|
||||
[0.7777777777777778, "rgb(255,166,0)"],
|
||||
[0.8888888888888888, "rgb(255,209,0)"],
|
||||
[1.0, "rgb(255,209,0)"]],
|
||||
[0.5555555555555556, "rgb(255,209,0)"],
|
||||
[0.6666666666666666, "rgb(255,166,0)"],
|
||||
[0.7777777777777778, "rgb(255,72,102)"],
|
||||
[0.8888888888888888, "rgb(254,85,51)"],
|
||||
[1.0, "rgb(254,85,51)"]],
|
||||
//colors : colorRamp(c("red", "green")),
|
||||
type: 'heatmap',
|
||||
visible: true,
|
||||
@ -1161,7 +1205,7 @@ export class GraphListComponent implements OnInit {
|
||||
tickangle: screen.width < 767 ? '-90' : 360,
|
||||
side: 'top',
|
||||
autotick: false,
|
||||
showgrid: true,
|
||||
showgrid: false,
|
||||
rangemode: 'nonnegative',
|
||||
fixedrange: true,
|
||||
autosize: true,
|
||||
@ -1171,7 +1215,7 @@ export class GraphListComponent implements OnInit {
|
||||
ticksuffix: ' ',
|
||||
tickformat: '%m-%d',
|
||||
autosize: true,
|
||||
showgrid: true,
|
||||
showgrid: false,
|
||||
autotick: false,
|
||||
rangemode: 'nonnegative',
|
||||
fixedrange: true,
|
||||
@ -1246,7 +1290,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -1301,7 +1345,7 @@ export class GraphListComponent implements OnInit {
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
r: 10,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
@ -1311,6 +1355,28 @@ export class GraphListComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
totaldifficultyChartFunc(DifficultychartDate, data, type, range1, range2, range3, tickformat) {
|
||||
let window_width = window.screen.width;
|
||||
let position = 0.00;
|
||||
let angle = 0;
|
||||
let domain_start = 0;
|
||||
let left_margin = 5;
|
||||
let tick_size = 11;
|
||||
if(window_width > 700)
|
||||
{
|
||||
position = 0.10;
|
||||
angle = 0;
|
||||
domain_start = 0.18;
|
||||
left_margin = 5;
|
||||
tick_size = 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
position = 0.17;
|
||||
angle = -45;
|
||||
domain_start = 0.34;
|
||||
left_margin = 5;
|
||||
tick_size = 10;
|
||||
}
|
||||
this.linearTotalGraphData = {
|
||||
data: data,
|
||||
layout: {
|
||||
@ -1321,28 +1387,37 @@ export class GraphListComponent implements OnInit {
|
||||
legend: {"orientation": "h",
|
||||
x: 0.1, y: -0.5,font :{ 'size': 10}},
|
||||
xaxis: {
|
||||
tickangle: -45,
|
||||
tickangle: -40,
|
||||
tickformat: tickformat,
|
||||
fixedrange: true,
|
||||
domain: [0.2, 0.8]
|
||||
// fixedrange: true,
|
||||
domain: [domain_start, 0.9]
|
||||
// showgrid: true
|
||||
},
|
||||
yaxis: {
|
||||
title: 'Cuckoo',
|
||||
fixedrange: true,
|
||||
rangemode: 'nonnegative',
|
||||
// showgrid: true,
|
||||
// position: 0.33,
|
||||
range: range1,
|
||||
tickangle: angle,
|
||||
tickfont: {
|
||||
size: 12
|
||||
}
|
||||
},
|
||||
yaxis2: {
|
||||
title: 'Progpow',
|
||||
fixedrange: true,
|
||||
// showgrid: true,
|
||||
range: range3,
|
||||
// overlaying: 'y',
|
||||
overlaying: 'y',
|
||||
rangemode: 'nonnegative',
|
||||
side: 'left',
|
||||
position: 1.25
|
||||
// side: 'right',
|
||||
position: position ,
|
||||
tickangle: angle,
|
||||
tickfont: {
|
||||
size: tick_size
|
||||
}
|
||||
},
|
||||
yaxis3: {
|
||||
title: 'RandomX',
|
||||
@ -1352,12 +1427,17 @@ export class GraphListComponent implements OnInit {
|
||||
rangemode: 'nonnegative',
|
||||
anchor: 'x',
|
||||
overlaying: 'y',
|
||||
side: 'right'
|
||||
side: 'right',
|
||||
position: 0.00 ,
|
||||
tickangle: angle,
|
||||
tickfont: {
|
||||
size: 12
|
||||
}
|
||||
|
||||
},
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
l: left_margin,
|
||||
r: 5,
|
||||
b: 50,
|
||||
t: 50,
|
||||
},
|
||||
|
@ -18,8 +18,13 @@
|
||||
<h5 class="mb-0">{{'home.AGE' | translate}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-4 tble_col">
|
||||
<div class="col-6 col-md-1 tble_col">
|
||||
<div class="block_div">
|
||||
<h5 class="mb-0">{{'home.TIMETAKEN' | translate}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-4 tble_col">
|
||||
<div class="block_div targ_div_hdng">
|
||||
<h5 class="mb-0">{{'home.TARGET_DIFFICULTY' | translate}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
@ -29,17 +34,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-5 col-sm-6 col-md-4 tble_col">
|
||||
<div class="block_div">
|
||||
<div class="block_div inp_div">
|
||||
<h5 class="mb-0">#{{'home.INPUTS' | translate}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-4 tble_col">
|
||||
<div class="block_div">
|
||||
<div class="block_div inp_div">
|
||||
<h5 class="mb-0">#{{'home.OUTPUTS' | translate}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-4 tble_col">
|
||||
<div class="block_div">
|
||||
<div class="block_div inp_div">
|
||||
<h5 class="mb-0">#{{'home.KERNELS' | translate}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
@ -52,7 +57,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 col-md-3 tble_col ">
|
||||
<div class="block_div"> <span *ngIf="item.id != clickValue"
|
||||
<div class="block_div mble_hght"> <span *ngIf="item.id != clickValue"
|
||||
(click)="onClickPlus(hashvalue.blockchain_block_height);" class="expnd_blck"><i
|
||||
class="fa fa-plus"></i></span>
|
||||
<span *ngIf="item.id == clickValue" (click)="onClickMinus(hashvalue.blockchain_block_height);"
|
||||
@ -74,9 +79,14 @@
|
||||
<h6>Age</h6><span class="blck_value">{{ hashvalue.age }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 tble_col">
|
||||
<div class="block_div">
|
||||
<h6>Time Taken</h6><span class="blck_value">{{ hashvalue.timetaken }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<!-- title="Cuckaroo : {{ hashvalue.target_difficulty_cuckaroo | number }}, Cuckatoo : {{ hashvalue.target_difficulty_cuckatoo | number }}, Progpow : {{ hashvalue.target_difficulty_progpow | number }}, Randomx : {{ hashvalue.target_difficulty_randomx | number }}" -->
|
||||
<div class="block_div">
|
||||
<div class="block_div targ_div">
|
||||
<h6>Difficulty</h6><span
|
||||
class="blck_value">{{(hashvalue.powalgo == 'Cuckoo') ? (hashvalue.target_difficulty_cuckatoo | number) : (hashvalue.powalgo == 'RandomX') ? (hashvalue.target_difficulty_randomx | number) : (hashvalue.powalgo == 'ProgPow') ? (hashvalue.target_difficulty_progpow | number) : 0}}</span>
|
||||
</div>
|
||||
@ -87,17 +97,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-sm-6 col-md-3 tble_col">
|
||||
<div class="block_div">
|
||||
<div class="block_div inp_div">
|
||||
<h6>#{{'home.INPUTS' | translate}}</h6><span class="blck_value">{{ hashvalue.input_count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div">
|
||||
<div class="block_div inp_div">
|
||||
<h6>#{{'home.OUTPUTS' | translate}}</h6><span class="blck_value">{{ hashvalue.output_count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div">
|
||||
<div class="block_div inp_div">
|
||||
<h6>#{{'home.KERNELS' | translate}}</h6><span class="blck_value">{{ hashvalue.kernal_count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -164,7 +174,7 @@
|
||||
|
||||
<div class="latest_table mt-3">
|
||||
<h2 class="mb-3 chart_heading px-0 d-inline-block">Peers
|
||||
<span *ngIf="peers && peers.length > 0" class="txn_count" >{{
|
||||
<span *ngIf="peers && peers.length > 0" class="txn_count txn_peers" >{{
|
||||
peers.length | number
|
||||
}}</span>
|
||||
</h2>
|
||||
@ -172,34 +182,34 @@
|
||||
|
||||
<div class="mobile_table peer_table">
|
||||
|
||||
<div class="">
|
||||
<div class=" tble_col">
|
||||
<div class="row peer_table_data">
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div">
|
||||
<h5 class="mb-0">Capabilities</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" tble_col">
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div text-left">
|
||||
<h5 class="mb-0">User Agent</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" tble_col">
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div">
|
||||
<h5 class="mb-0">Version</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tble_col">
|
||||
<div class="block_div">
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div addr_hdng">
|
||||
<h5 class="mb-0">Addr</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" tble_col">
|
||||
<div class="block_div text-left pl-4">
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div dir_div">
|
||||
<h5 class="mb-0">Direction</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tble_col">
|
||||
<div class="block_div">
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div peers_diff_hdng">
|
||||
<h5 class="mb-0">Total Difficulty</h5>
|
||||
</div>
|
||||
</div>
|
||||
@ -254,7 +264,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div">
|
||||
<div class="block_div agent_div">
|
||||
<h6>User Agent</h6>
|
||||
<span class="blck_value">{{ peer.user_agent }}</span>
|
||||
</div>
|
||||
@ -266,7 +276,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div">
|
||||
<div class="block_div addr_div">
|
||||
<h6>Addr</h6>
|
||||
<span class="blck_value">{{ peer.addr }}</span>
|
||||
</div>
|
||||
|
@ -122,6 +122,7 @@ export class LatestblocksComponent implements OnInit {
|
||||
//this.blockAppend['target_difficulty'] = 0;
|
||||
this.blockAppend['PoWAlgo'] = DifferentList.powalgo;
|
||||
this.blockAppend['input_count'] = DifferentList.input_count;
|
||||
this.blockAppend['timetaken'] = DifferentList.timetaken;
|
||||
this.blockAppend['output_count'] = DifferentList.output_count;
|
||||
this.blockAppend['kernal_count'] = DifferentList.kernal_count;
|
||||
this.blockAppend['hashstart'] = DifferentList.hashstart;
|
||||
|
@ -36,7 +36,7 @@ const siteRoutes: Routes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'api-view',
|
||||
path: 'api-index',
|
||||
component: ApiViewComponent
|
||||
}
|
||||
];
|
||||
|
@ -1,17 +1,25 @@
|
||||
@media(min-width: 992px){
|
||||
.block_div {min-width: 136px; text-align: center;padding: .75rem; }
|
||||
.peer_table .block_div{min-width: 148px; text-align: center;}
|
||||
.block_div {min-width: 110px; text-align: center;padding: .75rem; }
|
||||
/* .block_div.inp_div{min-width: 100px;} */
|
||||
.block_div.targ_div{min-width: 200px;}
|
||||
.block_div.targ_div_hdng{min-width: 180px; text-align: left;padding-left: 30px;}
|
||||
.block_div.addr_div{min-width: 150px;}
|
||||
.block_div.addr_hdng{min-width: 140px;}
|
||||
.block_div.peers_diff_hdng{min-width: 375px;}
|
||||
.peer_table .block_div{/*min-width: 148px;*/ text-align: center;}
|
||||
.mobile_table{border-bottom: 1px solid #dee2e6; padding: 0 15px;display: table; width: 100%;}
|
||||
.view_moble_tble{border-bottom: 1px solid #dee2e6;}
|
||||
.mobile_table .row{display: table;}
|
||||
.mobile_table .tble_col{padding: 0;display: table-cell; max-width: unset; flex: unset;}
|
||||
.mobile_table .row, .row.peer_table_data{display: table;}
|
||||
.mobile_table .tble_col, .peer_table_data .col-md-3{padding: 0;display: table-cell; max-width: unset; flex: unset; width: auto;}
|
||||
.mobile_table h6, .view_moble_tble h6, .peer_mobile_table h6{display: none;}
|
||||
.view_moble_tble .block_div{text-align: left;}
|
||||
.peer_table_data .col-md-3 { flex: 0 0 13%; max-width: 13%;}
|
||||
/* .peer_table_data .col-md-3 { flex: 0 0 13%; max-width: 13%;} */
|
||||
.peer_table{ margin-left: -20px; border-bottom: none}
|
||||
.peer_table .tble_col{display: inline-block;}
|
||||
/* .ver_col .block_div{min-width: 10px;max-width: 15px;} */
|
||||
.block_div.peers_diff{ min-width: 368px; }
|
||||
.block_div.agent_div{min-width: 115px;}
|
||||
.block_div.dir_div{min-width: 125px;}
|
||||
}
|
||||
|
||||
@media(max-width: 1199px){
|
||||
@ -25,9 +33,11 @@
|
||||
.detail_div .count span{font-size: 14px;}
|
||||
.chart_heading{font-size: 18px;}
|
||||
.day_filter a{font-size: 11px; margin: 0 4px;}
|
||||
.blck_value {font-size: 13px; }
|
||||
.block_div {min-width: 110px;}
|
||||
.peer_table .block_div {min-width: 145px;}
|
||||
.blck_value {font-size: 12px; }
|
||||
.block_div {min-width: 87px;}
|
||||
.peer_table_data .block_div {min-width: 105px;}
|
||||
.block_div.addr_hdng{min-width: 120px;}
|
||||
.hash{height: 8px; width: 3px;}
|
||||
.txn_peers{margin-top: 0px;}
|
||||
|
||||
}
|
||||
@ -52,8 +62,10 @@
|
||||
.mobile_table span.blck_value, .view_moble_tble span.blck_value, .peer_mobile_table span.blck_value{font-size: 13px;}
|
||||
.mobile_table span.blck_value::before, .view_moble_tble span.blck_value::before, .peer_mobile_table span.blck_value::before{content: ' - ';}
|
||||
.view_moble_tble{border-bottom: 1px solid #dee2e6;padding-bottom: 10px; margin-bottom: 10px;}
|
||||
.expnd_blck {font-size: 13px; margin-right: 5px; color: green;position: absolute; left: -15px; top: 5px; display: inline-block;}
|
||||
.expnd_blck {font-size: 13px; margin-right: 5px; color: green;position: absolute; left: -8px; top: 5px; display: inline-block;}
|
||||
.mble_hght{padding-left: 8px;}
|
||||
.peer_mobile_table .expnd_blck{left: -8px;}
|
||||
|
||||
}
|
||||
@media(max-width:767px){
|
||||
.day_filter a{margin: 0 4px; font-size: 11px;}
|
||||
@ -69,10 +81,12 @@
|
||||
.ytitle, .y2tick, .y3tick, .ytick, .y2title, .y3title, .xtitle, .xtick{font-size: 11px !important}
|
||||
.chart_section.mt-4{margin-top: 0px !important;}
|
||||
.logo_img{height: 50px;}
|
||||
.ngx-pagination li{display: none;}
|
||||
.ngx-pagination li.pagination-previous{display: inline-block;}
|
||||
.ngx-pagination li.pagination-next{display: inline-block;}
|
||||
.ngx-pagination li{display: none !important;}
|
||||
.ngx-pagination li.pagination-previous{display: inline-block !important;}
|
||||
.ngx-pagination li.pagination-next{display: inline-block !important;}
|
||||
.hashdata_table td{border: 1px solid #a6a6a6;}
|
||||
.body_bg.py-4{padding-top: 0px !important}
|
||||
.block_details.mb-5{margin-bottom: 0px !important}
|
||||
|
||||
}
|
||||
@media(max-width: 575px){
|
||||
|
@ -137,7 +137,7 @@ a:focus {
|
||||
color: #BF9B30;
|
||||
}
|
||||
.txt_secondary {
|
||||
color: #333333;
|
||||
color: #a6a6a6;
|
||||
}
|
||||
.gray_txt {
|
||||
color: #555555;
|
||||
@ -242,7 +242,7 @@ a:focus {
|
||||
color: #f3f4f2;
|
||||
padding: 4px 18px 2px;
|
||||
/* display: inline-block; */
|
||||
margin-left: 5px;
|
||||
margin-left: 10px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
float: right;
|
||||
@ -250,6 +250,7 @@ a:focus {
|
||||
border: 1px solid #BF9B30;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
.txn_peers{margin-top: 2px;}
|
||||
.blocks:hover .txn_count {
|
||||
background: #f3f4f2;
|
||||
color: #BF9B30;
|
||||
@ -391,7 +392,7 @@ a:focus {
|
||||
.zerolinelayer path {
|
||||
stroke: #a6a6a6 !important;
|
||||
}
|
||||
.text_break{white-space: normal; word-break: break-all;}
|
||||
.text_break{white-space: normal !important; word-break: break-all;}
|
||||
/************************************************Footer*****************************************/
|
||||
.footer_div {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.15);
|
||||
@ -480,8 +481,8 @@ a:focus {
|
||||
background: #dadada;
|
||||
}
|
||||
.expnd_blck{display: none;}
|
||||
.block_div h5{color: #555;font-size: 16px;}
|
||||
.blck_value{font-size: 15px;}
|
||||
.block_div h5{color: #555;font-size: 13px;}
|
||||
.blck_value{font-size: 12px;}
|
||||
.tab_hdng{
|
||||
display: block;
|
||||
position: relative;
|
||||
|
@ -10,7 +10,7 @@
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
-->
|
||||
</head>
|
||||
<body class="dark_theme">
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
<script>
|
||||
|
@ -43,7 +43,7 @@
|
||||
}
|
||||
.diff_span{
|
||||
width: 42px;
|
||||
overflow: hidden;
|
||||
/* overflow: hidden; */
|
||||
/* max-width: 52px; */
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
|
Loading…
Reference in New Issue
Block a user