Changes
This commit is contained in:
parent
4768f06abd
commit
e0812fc24c
@ -23,7 +23,23 @@ import {
|
|||||||
import { Paginate } from '../utils';
|
import { Paginate } from '../utils';
|
||||||
|
|
||||||
var moment = require('moment');
|
var moment = require('moment');
|
||||||
|
moment.updateLocale('en', {
|
||||||
|
relativeTime: {
|
||||||
|
future: "in %s",
|
||||||
|
past: "%s ago",
|
||||||
|
s: "seconds",
|
||||||
|
m: "1 minute",
|
||||||
|
mm: "%d minutes",
|
||||||
|
h: "1 hour",
|
||||||
|
hh: "%d hours",
|
||||||
|
d: "1 day",
|
||||||
|
dd: "%d days",
|
||||||
|
M: "1 month",
|
||||||
|
MM: "%d months",
|
||||||
|
y: "1 year",
|
||||||
|
yy: "%d years"
|
||||||
|
}
|
||||||
|
});
|
||||||
export class BlockchainBlockController {
|
export class BlockchainBlockController {
|
||||||
public path = '/blockchain_block';
|
public path = '/blockchain_block';
|
||||||
public router = express.Router();
|
public router = express.Router();
|
||||||
|
@ -1,5 +1,22 @@
|
|||||||
import { getConnection } from "typeorm";
|
import { getConnection } from "typeorm";
|
||||||
const moment = require("moment");
|
var moment = require("moment");
|
||||||
|
moment.updateLocale('en', {
|
||||||
|
relativeTime: {
|
||||||
|
future: "in %s",
|
||||||
|
past: "%s ago",
|
||||||
|
s: "seconds",
|
||||||
|
m: "1 minute",
|
||||||
|
mm: "%d minutes",
|
||||||
|
h: "1 hour",
|
||||||
|
hh: "%d hours",
|
||||||
|
d: "1 day",
|
||||||
|
dd: "%d days",
|
||||||
|
M: "1 month",
|
||||||
|
MM: "%d months",
|
||||||
|
y: "1 year",
|
||||||
|
yy: "%d years"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
export async function universalGetLatestBlockDetails(socket) {
|
export async function universalGetLatestBlockDetails(socket) {
|
||||||
|
|
||||||
|
@ -469,12 +469,12 @@ export class GraphListComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
x: DifficultychartDate,
|
x: DifficultychartDate,
|
||||||
y: TargetDifficulty,
|
y: TargetDifficulty,
|
||||||
text: TargetDifficulty,
|
text: DifficultychartDate,
|
||||||
mode: 'lines+markers',
|
mode: 'lines+markers',
|
||||||
type: 'scatter',
|
type: 'scatter',
|
||||||
name: '',
|
name: '',
|
||||||
line: { color: '#ac3333' },
|
line: { color: '#ac3333' },
|
||||||
hovertemplate: '%{x}<br> Difficulty : %{text:,}',
|
hovertemplate: '%{text}<br> Difficulty : %{y:,}',
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// x: DifficultychartDate,
|
// x: DifficultychartDate,
|
||||||
@ -740,7 +740,6 @@ export class GraphListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
growthFunc(gDate, gReward, gaddedreward) {
|
growthFunc(gDate, gReward, gaddedreward) {
|
||||||
console.log('gDate gReward gaddedreward',gDate, gReward, gaddedreward)
|
|
||||||
this.growthGraphData = {
|
this.growthGraphData = {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
@ -776,7 +775,8 @@ export class GraphListComponent implements OnInit {
|
|||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
showgrid: true,
|
showgrid: true,
|
||||||
tickformat :".0f"
|
tickformat :".0f",
|
||||||
|
tickprefix: ' '
|
||||||
},
|
},
|
||||||
margin: {
|
margin: {
|
||||||
l: 50,
|
l: 50,
|
||||||
@ -1096,12 +1096,12 @@ export class GraphListComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
x: DifficultychartDate,
|
x: DifficultychartDate,
|
||||||
y: TargetDifficulty,
|
y: TargetDifficulty,
|
||||||
text: TargetDifficulty,
|
text: DifficultychartDate,
|
||||||
mode: 'lines+markers',
|
mode: 'lines+markers',
|
||||||
type: 'scatter',
|
type: 'scatter',
|
||||||
name: '',
|
name: '',
|
||||||
line: { color: '#ac3333' },
|
line: { color: '#ac3333' },
|
||||||
hovertemplate: '%{x}<br> Difficulty : %{text:,}',
|
hovertemplate: '%{text}<br> Difficulty : %{y:,}',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
layout: {
|
layout: {
|
||||||
|
Loading…
Reference in New Issue
Block a user