github.com/SmartMeshFoundation/Spectrum@v0.0.0-20220621030607-452a266fee1e/dashboard/assets/types/message.jsx (about)

     1  // @flow
     2  
     3  // Copyright 2017 The Spectrum Authors
     4  // This file is part of the Spectrum library.
     5  //
     6  // The Spectrum 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 Spectrum 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 Spectrum library. If not, see <http://www.gnu.org/licenses/>.
    18  
    19  export type Message = {
    20      home?: HomeMessage,
    21      chain?: ChainMessage,
    22      txpool?: TxPoolMessage,
    23      network?: NetworkMessage,
    24      system?: SystemMessage,
    25      logs?: LogsMessage,
    26  };
    27  
    28  export type HomeMessage = {
    29      memory?: Chart,
    30      traffic?: Chart,
    31  };
    32  
    33  export type Chart = {
    34      history?: Array<ChartEntry>,
    35      new?: ChartEntry,
    36  };
    37  
    38  export type ChartEntry = {
    39      time: Date,
    40      value: number,
    41  };
    42  
    43  export type ChainMessage = {
    44      /* TODO (kurkomisi) */
    45  };
    46  
    47  export type TxPoolMessage = {
    48      /* TODO (kurkomisi) */
    49  };
    50  
    51  export type NetworkMessage = {
    52      /* TODO (kurkomisi) */
    53  };
    54  
    55  export type SystemMessage = {
    56      /* TODO (kurkomisi) */
    57  };
    58  
    59  export type LogsMessage = {
    60      log: string,
    61  };