Settings Tab (#42)

* Settings tab
This commit is contained in:
Maciej Hirsz
2018-09-21 18:07:14 +02:00
committed by GitHub
parent 07b5880e5f
commit ca0ab38bd2
11 changed files with 422 additions and 101 deletions
+15
View File
@@ -8,6 +8,20 @@ export namespace State {
blockDetails: Types.BlockDetails;
location: Maybe<Types.NodeLocation>;
}
export interface Settings {
validator: boolean;
implementation: boolean;
peers: boolean;
txs: boolean;
cpu: boolean;
mem: boolean;
blocknumber: boolean;
blockhash: boolean;
blocktime: boolean;
blockpropagation: boolean;
blocklasttime: boolean;
}
}
export interface State {
@@ -19,6 +33,7 @@ export interface State {
subscribed: Maybe<Types.ChainLabel>;
chains: Map<Types.ChainLabel, Types.NodeCount>;
nodes: Map<Types.NodeId, State.Node>;
settings: State.Settings;
}
export type Update = <K extends keyof State>(changes: Pick<State, K> | null) => Readonly<State>;