dashboard

package
v0.4.0-alpha.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTemplateParams added in v0.3.0

type AuthTemplateParams struct {
	BaseTemplateParams
	Configuration map[string]interface{}
	LoginError    string
}

type BaseTemplateParams added in v0.1.0

type BaseTemplateParams struct {
	IsAuthenticated bool
	NavPages        []Tab
	Breadcrumbs     []Tab
	Path            string
	MyNetworkID     string
	Version         string
}

type BlobField added in v0.1.0

type BlobField struct {
	Key   []byte
	Value []byte
}

type ChainAccountTemplateParams added in v0.1.0

type ChainAccountTemplateParams struct {
	BaseTemplateParams

	ChainID isc.ChainID
	AgentID isc.AgentID

	Balances *isc.FungibleTokens
}

type ChainBlobTemplateParams added in v0.1.0

type ChainBlobTemplateParams struct {
	BaseTemplateParams

	ChainID isc.ChainID
	Hash    hashing.HashValue

	Blob []BlobField
}

type ChainBlockTemplateParams added in v0.2.0

type ChainBlockTemplateParams struct {
	BaseTemplateParams
	ChainID          isc.ChainID
	Index            uint32
	LatestBlockIndex uint32
	Block            *blocklog.BlockInfo
	Receipts         []*blocklog.RequestReceipt
	ResolvedErrors   []string
	Events           []string
}

type ChainContractTemplateParams added in v0.1.0

type ChainContractTemplateParams struct {
	BaseTemplateParams

	ChainID isc.ChainID
	Hname   isc.Hname

	ContractRecord *root.ContractRecord
	Log            []string
}

type ChainInfo added in v0.3.0

type ChainInfo struct {
	*governance.ChainInfo
	Contracts map[isc.Hname]*root.ContractRecord
}

type ChainListTemplateParams added in v0.1.0

type ChainListTemplateParams struct {
	BaseTemplateParams
	Chains []*ChainOverview
}

type ChainOverview added in v0.1.0

type ChainOverview struct {
	ChainID       isc.ChainID
	Active        bool
	ChainInfo     *ChainInfo
	CommitteeSize int
	Error         error
}

type ChainTemplateParams added in v0.1.0

type ChainTemplateParams struct {
	BaseTemplateParams

	ChainID isc.ChainID

	EVMChainID  uint16
	Record      *registry.ChainRecord
	LatestBlock *LatestBlock
	ChainInfo   *ChainInfo
	Accounts    []isc.AgentID
	TotalAssets *isc.FungibleTokens
	Blobs       map[hashing.HashValue]uint32
	Committee   *chain.CommitteeInfo
}

type ConfigTemplateParams added in v0.1.0

type ConfigTemplateParams struct {
	BaseTemplateParams
	Configuration map[string]interface{}
}

type Dashboard added in v0.2.0

type Dashboard struct {
	// contains filtered or unexported fields
}

func New

func New(log *logger.Logger, server *echo.Echo, waspServices WaspServicesInterface) *Dashboard

func (*Dashboard) BaseParams added in v0.2.0

func (d *Dashboard) BaseParams(c echo.Context, breadcrumbs ...Tab) BaseTemplateParams

func (*Dashboard) RenderAuthView added in v0.3.0

func (d *Dashboard) RenderAuthView(c echo.Context) error

type ErrorTemplateParams added in v0.2.0

type ErrorTemplateParams struct {
	BaseTemplateParams
	Code       int
	StatusText string
	Message    string
}

type LatestBlock added in v0.2.0

type LatestBlock struct {
	Index uint32
	Info  *blocklog.BlockInfo
}

type MetricsChainConsensusTemplateParams added in v0.2.4

type MetricsChainConsensusTemplateParams struct {
	BaseTemplateParams
	ChainID     string
	Status      chain.ConsensusWorkflowStatus
	PipeMetrics chain.ConsensusPipeMetrics
}

type MetricsChainNodeconnTemplateParams added in v0.2.4

type MetricsChainNodeconnTemplateParams struct {
	BaseTemplateParams
	ChainID string
	Metrics nodeconnmetrics.NodeConnectionMessagesMetrics
}

type MetricsChainTemplateParams added in v0.2.4

type MetricsChainTemplateParams struct {
	BaseTemplateParams
	ChainID string
}

type MetricsNodeconnTemplateParams added in v0.2.3

type MetricsNodeconnTemplateParams struct {
	BaseTemplateParams
	Metrics nodeconnmetrics.NodeConnectionMetrics
}

type MetricsTemplateParams added in v0.2.3

type MetricsTemplateParams struct {
	BaseTemplateParams
	Chains []*ChainOverview
}

type Peer added in v0.2.0

type Peer struct {
	NumUsers int
	NetID    string
	IsAlive  bool
}

type PeeringStats added in v0.2.0

type PeeringStats struct {
	Peers        []Peer
	TrustedPeers []TrustedPeer
}

type PeeringTemplateParams added in v0.1.0

type PeeringTemplateParams struct {
	BaseTemplateParams
	*PeeringStats
}

type Tab added in v0.1.0

type Tab struct {
	Path       string
	Title      string
	Href       string
	Breadcrumb bool
}

type TrustedPeer added in v0.2.0

type TrustedPeer struct {
	NetID  string
	PubKey cryptolib.PublicKey
}

type WaspServices added in v0.2.0

type WaspServices struct {
	// contains filtered or unexported fields
}

func NewWaspServices

func NewWaspServices(
	waspVersion string,
	webAPIBindAddress string,
	exploreAddressURL string,
	config *configuration.Configuration,
	chains *chains.Chains,
	chainRecordRegistryProvider registry.ChainRecordRegistryProvider,
	networkProvider peering.NetworkProvider,
	trustedNetworkManager peering.TrustedNetworkManager,
) *WaspServices

func (*WaspServices) CallView added in v0.2.0

func (w *WaspServices) CallView(chainID isc.ChainID, scName, funName string, params dict.Dict) (dict.Dict, error)

func (*WaspServices) ChainRecords

func (w *WaspServices) ChainRecords() ([]*registry.ChainRecord, error)

func (*WaspServices) ConfigDump added in v0.2.0

func (w *WaspServices) ConfigDump() map[string]interface{}

func (*WaspServices) ExploreAddressBaseURL added in v0.2.0

func (w *WaspServices) ExploreAddressBaseURL() string

func (*WaspServices) GetChainCommitteeInfo added in v0.2.0

func (w *WaspServices) GetChainCommitteeInfo(chainID isc.ChainID) (*chain.CommitteeInfo, error)

func (*WaspServices) GetChainConsensusPipeMetrics added in v0.2.5

func (w *WaspServices) GetChainConsensusPipeMetrics(chainID isc.ChainID) (chain.ConsensusPipeMetrics, error)

func (*WaspServices) GetChainConsensusWorkflowStatus added in v0.2.4

func (w *WaspServices) GetChainConsensusWorkflowStatus(chainID isc.ChainID) (chain.ConsensusWorkflowStatus, error)

func (*WaspServices) GetChainNodeConnectionMetrics added in v0.2.3

func (w *WaspServices) GetChainNodeConnectionMetrics(chainID isc.ChainID) (nodeconnmetrics.NodeConnectionMessagesMetrics, error)

func (*WaspServices) GetChainRecord added in v0.2.0

func (w *WaspServices) GetChainRecord(chainID isc.ChainID) (*registry.ChainRecord, error)

func (*WaspServices) GetNodeConnectionMetrics added in v0.2.3

func (w *WaspServices) GetNodeConnectionMetrics() (nodeconnmetrics.NodeConnectionMetrics, error)

func (*WaspServices) MyNetworkID added in v0.2.0

func (w *WaspServices) MyNetworkID() string

func (*WaspServices) PeeringStats added in v0.2.0

func (w *WaspServices) PeeringStats() (*PeeringStats, error)

func (*WaspServices) WaspVersion

func (w *WaspServices) WaspVersion() string

func (*WaspServices) WebAPIPort added in v0.3.0

func (w *WaspServices) WebAPIPort() string

type WaspServicesInterface

type WaspServicesInterface interface {
	WaspVersion() string
	ConfigDump() map[string]interface{}
	ExploreAddressBaseURL() string
	WebAPIPort() string
	PeeringStats() (*PeeringStats, error)
	MyNetworkID() string
	ChainRecords() ([]*registry.ChainRecord, error)
	GetChainRecord(chainID isc.ChainID) (*registry.ChainRecord, error)
	GetChainCommitteeInfo(chainID isc.ChainID) (*chain.CommitteeInfo, error)
	CallView(chainID isc.ChainID, scName, fname string, params dict.Dict) (dict.Dict, error)
	GetChainNodeConnectionMetrics(isc.ChainID) (nodeconnmetrics.NodeConnectionMessagesMetrics, error)
	GetNodeConnectionMetrics() (nodeconnmetrics.NodeConnectionMetrics, error)
	GetChainConsensusWorkflowStatus(isc.ChainID) (chain.ConsensusWorkflowStatus, error)
	GetChainConsensusPipeMetrics(isc.ChainID) (chain.ConsensusPipeMetrics, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL