github.com/cheng762/platon-go@v1.8.17-0.20190529111256-7deff2d7be26/dashboard/assets/types/content.jsx (about)

     1  // @flow
     2  
     3  // Copyright 2017 The go-ethereum Authors
     4  // This file is part of the go-ethereum library.
     5  //
     6  // The go-ethereum library is free software: you can redistribute it and/or modify
     7  // it under the terms of the GNU Lesser General Public License as published by
     8  // the Free Software Foundation, either version 3 of the License, or
     9  // (at your option) any later version.
    10  //
    11  // The go-ethereum library is distributed in the hope that it will be useful,
    12  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    14  // GNU Lesser General Public License for more details.
    15  //
    16  // You should have received a copy of the GNU Lesser General Public License
    17  // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
    18  
    19  export type Content = {
    20  	general: General,
    21  	home:    Home,
    22  	chain:   Chain,
    23  	txpool:  TxPool,
    24  	network: Network,
    25  	system:  System,
    26  	logs:    Logs,
    27  };
    28  
    29  export type ChartEntries = Array<ChartEntry>;
    30  
    31  export type ChartEntry = {
    32  	time:  Date,
    33  	value: number,
    34  };
    35  
    36  export type General = {
    37  	version: ?string,
    38  	commit:  ?string,
    39  };
    40  
    41  export type Home = {
    42  	/* TODO (kurkomisi) */
    43  };
    44  
    45  export type Chain = {
    46  	/* TODO (kurkomisi) */
    47  };
    48  
    49  export type TxPool = {
    50  	/* TODO (kurkomisi) */
    51  };
    52  
    53  export type Network = {
    54  	/* TODO (kurkomisi) */
    55  };
    56  
    57  export type System = {
    58  	activeMemory:   ChartEntries,
    59  	virtualMemory:  ChartEntries,
    60  	networkIngress: ChartEntries,
    61  	networkEgress:  ChartEntries,
    62  	processCPU:     ChartEntries,
    63  	systemCPU:      ChartEntries,
    64  	diskRead:       ChartEntries,
    65  	diskWrite:      ChartEntries,
    66  };
    67  
    68  export type Record = {
    69  	t:   string,
    70  	lvl: Object,
    71  	msg: string,
    72  	ctx: Array<string>
    73  };
    74  
    75  export type Chunk = {
    76  	content: string,
    77  	name:    string,
    78  };
    79  
    80  export type Logs = {
    81  	chunks:        Array<Chunk>,
    82  	endTop:        boolean,
    83  	endBottom:     boolean,
    84  	topChanged:    number,
    85  	bottomChanged: number,
    86  };
    87  
    88  export type LogsMessage = {
    89  	source: ?LogFile,
    90  	chunk:  Array<Record>,
    91  };
    92  
    93  export type LogFile = {
    94  	name: string,
    95  	last: string,
    96  };