forked from cerc-io/plugeth
dashboard: send current block to the dashboard client (#19762)
This adds all dashboard changes from the last couple months. We're about to remove the dashboard, but decided that we should get all the recent work in first in case anyone wants to pick up this project later on. * cmd, dashboard, eth, p2p: send peer info to the dashboard * dashboard: update npm packages, improve UI, rebase * dashboard, p2p: remove println, change doc * cmd, dashboard, eth, p2p: cleanup after review * dashboard: send current block to the dashboard client
This commit is contained in:
committed by
Felix Lange
parent
6f1a600f6c
commit
4ea9b62b5c
@@ -35,6 +35,7 @@ export type ChartEntry = {
|
||||
export type General = {
|
||||
version: ?string,
|
||||
commit: ?string,
|
||||
genesis: ?string,
|
||||
};
|
||||
|
||||
export type Home = {
|
||||
@@ -42,21 +43,29 @@ export type Home = {
|
||||
};
|
||||
|
||||
export type Chain = {
|
||||
/* TODO (kurkomisi) */
|
||||
currentBlock: Block,
|
||||
};
|
||||
|
||||
export type Block = {
|
||||
number: number,
|
||||
timestamp: number,
|
||||
}
|
||||
|
||||
export type TxPool = {
|
||||
/* TODO (kurkomisi) */
|
||||
};
|
||||
|
||||
export type Network = {
|
||||
peers: Peers,
|
||||
diff: Array<PeerEvent>
|
||||
peers: Peers,
|
||||
diff: Array<PeerEvent>,
|
||||
activePeerCount: number,
|
||||
};
|
||||
|
||||
export type PeerEvent = {
|
||||
ip: string,
|
||||
id: string,
|
||||
name: string,
|
||||
addr: string,
|
||||
enode: string,
|
||||
protocols: {[string]: Object},
|
||||
remove: string,
|
||||
location: GeoLocation,
|
||||
connected: Date,
|
||||
@@ -71,9 +80,9 @@ export type Peers = {
|
||||
};
|
||||
|
||||
export type PeerBundle = {
|
||||
location: GeoLocation,
|
||||
knownPeers: {[string]: KnownPeer},
|
||||
attempts: Array<UnknownPeer>,
|
||||
location: GeoLocation,
|
||||
knownPeers: {[string]: KnownPeer},
|
||||
attempts: number,
|
||||
};
|
||||
|
||||
export type KnownPeer = {
|
||||
@@ -81,14 +90,12 @@ export type KnownPeer = {
|
||||
disconnected: Array<Date>,
|
||||
ingress: Array<ChartEntries>,
|
||||
egress: Array<ChartEntries>,
|
||||
name: string,
|
||||
enode: string,
|
||||
protocols: {[string]: Object},
|
||||
active: boolean,
|
||||
};
|
||||
|
||||
export type UnknownPeer = {
|
||||
connected: Date,
|
||||
disconnected: Date,
|
||||
};
|
||||
|
||||
export type GeoLocation = {
|
||||
country: string,
|
||||
city: string,
|
||||
|
||||
Reference in New Issue
Block a user