Graph layout fix and email text in api page

This commit is contained in:
shunmugam 2019-09-16 15:07:05 +05:30
parent 09c892df7e
commit 77a19df3e4
4 changed files with 35 additions and 22 deletions

View File

@ -75,7 +75,7 @@
</div> </div>
<div class="d-block d-sm-none text-center mt-3 mx-auto position-relative"> <div class="d-block d-sm-none text-center mt-3 mx-auto position-relative">
<span>You are viewing </span> <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="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option> -->
<option value="Testnet" disabled [selected]="'Testnet' == getNetwork()">MainNet</option> <option value="Testnet" disabled [selected]="'Testnet' == getNetwork()">MainNet</option>
<!-- <option disabled value="Mainnet">MainNet</option> --> <!-- <option disabled value="Mainnet">MainNet</option> -->

View File

@ -9,11 +9,11 @@
<h4 class="txt_primary">{{'api-view.real-time-simple-query' | translate}}</h4> <h4 class="txt_primary">{{'api-view.real-time-simple-query' | translate}}</h4>
<ul class="txt_secondary"> <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=circulating" >circulating</a></b>: {{'api-view.circulating' | translate}} </li>
<li><b><a target="_blank" href="https://explorer.epic.tech/api?q=getblockcount"> getblockcount </a></b>: {{'api-view.getblockcount' | 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="https://explorer.epic.tech/api?q=getdifficulty-randomx">getdifficulty-randomx</a></b>: {{'api-view.getdifficulty-randomx' | 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="https://explorer.epic.tech/api?q=getdifficulty-progpow">getdifficulty-progpow</a></b>: {{'api-view.getdifficulty-progpow' | 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="https://explorer.epic.tech/api?q=getdifficulty-cuckoo">getdifficulty-cuckoo</a></b>: {{'api-view.getdifficulty-cuckoo' | 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="https://explorer.epic.tech/api?q=totalcoins">totalcoins</a></b>: {{'api-view.totalcoins' | translate}}</li> <li><b><a target="_blank" href="./api?q=totalcoins">totalcoins</a></b>: {{'api-view.totalcoins' | translate}}</li>
</ul> </ul>
<h4 class="txt_primary">{{'api-view.Block-Queries' | translate}}</h4> <h4 class="txt_primary">{{'api-view.Block-Queries' | translate}}</h4>
@ -21,14 +21,14 @@
{{'api-view.block-query-text' | translate}} {{'api-view.block-query-text' | translate}}
</p> </p>
<ul class="txt_secondary"> <ul class="txt_secondary">
<li><b><a target="_blank" href="https://explorer.epic.tech/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=getblockhash&height=1" >getblockhash</a></b>: takes a <code>height</code> {{'api-view.getblockhash' | translate}}</li>
<li><b><a target="_blank" href="https://explorer.epic.tech/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=getblockheight&hash=3933f075332670a661d2271218969770c8396a2853777d5912c9ad4797e9c7e6" >getblockheight</a></b>: takes a <code>hash</code> {{'api-view.getblockheight' | translate}}</li>
<li><b><a target="_blank" href="https://explorer.epic.tech/api?q=getblocktime&height=2" >getblocktime</a></b>: takes a <code>height</code> {{'api-view.getblocktime' | 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> </ul>
</div> </div>
<div class="container"> <div class="container">
<h4 class="txt_primary">{{'api-view.Note' | translate}}</h4> <h4 class="txt_primary">{{'api-view.Note' | translate}}</h4>
<span> <span>
If you require another API, please request it by sending an email to <a href = "mailto:xxx@epic.tech?subject = API-Request&body = Message"> xxx@epic.tech </a></span> If you require another API, please request it by sending an email to <a href = {{angerstring}}> {{email}} </a></span>
</div> </div>
</div> </div>

View File

@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { environment } from "../../../environments/environment";
@Component({ @Component({
selector: 'app-api-view', selector: 'app-api-view',
@ -9,6 +10,9 @@ export class ApiViewComponent implements OnInit {
constructor() { } constructor() { }
public email:string = environment.EMAIL;
public angerstring:string ="mailto:"+ environment.EMAIL +"?subject = API-Request&body = Message";
ngOnInit() { ngOnInit() {
} }

View File

@ -613,17 +613,20 @@ export class GraphListComponent implements OnInit {
let position = 0.00; let position = 0.00;
let angle = 0; let angle = 0;
let domain_start = 0; let domain_start = 0;
let left_margin = 5;
if(window_width > 700) if(window_width > 700)
{ {
position = 0.10; position = 0.10;
angle = 0; angle = 0;
domain_start = 0.26; domain_start = 0.18;
left_margin = 5;
} }
else else
{ {
position = 0.00; position = 0.03;
angle = -45; angle = -45;
domain_start = 0.34; domain_start = 0.23;
left_margin = 25;
} }
// console.log('range rangerangerange',range); // console.log('range rangerangerange',range);
@ -689,8 +692,8 @@ export class GraphListComponent implements OnInit {
}, },
margin: { margin: {
l: 50, l: left_margin,
r: 50, r: 5,
b: 50, b: 50,
t: 50, t: 50,
}, },
@ -1356,17 +1359,23 @@ export class GraphListComponent implements OnInit {
let position = 0.00; let position = 0.00;
let angle = 0; let angle = 0;
let domain_start = 0; let domain_start = 0;
let left_margin = 5;
let tick_size = 11;
if(window_width > 700) if(window_width > 700)
{ {
position = 0.10; position = 0.10;
angle = 0; angle = 0;
domain_start = 0.22; domain_start = 0.18;
left_margin = 5;
tick_size = 12;
} }
else else
{ {
position = 0.00; position = 0.17;
angle = -45; angle = -45;
domain_start = 0.3; domain_start = 0.34;
left_margin = 5;
tick_size = 10;
} }
this.linearTotalGraphData = { this.linearTotalGraphData = {
data: data, data: data,
@ -1388,7 +1397,7 @@ export class GraphListComponent implements OnInit {
title: 'Cuckoo', title: 'Cuckoo',
fixedrange: true, fixedrange: true,
rangemode: 'nonnegative', rangemode: 'nonnegative',
// showgrid: true, // position: 0.33,
range: range1, range: range1,
tickangle: angle, tickangle: angle,
tickfont: { tickfont: {
@ -1407,7 +1416,7 @@ export class GraphListComponent implements OnInit {
position: position , position: position ,
tickangle: angle, tickangle: angle,
tickfont: { tickfont: {
size: 12 size: tick_size
} }
}, },
yaxis3: { yaxis3: {
@ -1427,8 +1436,8 @@ export class GraphListComponent implements OnInit {
}, },
margin: { margin: {
l: 50, l: left_margin,
r: 50, r: 5,
b: 50, b: 50,
t: 50, t: 50,
}, },