diff --git a/harness.sh b/harness.sh index 073f2bd1..e1254106 100755 --- a/harness.sh +++ b/harness.sh @@ -38,14 +38,14 @@ fi tmux new-session -d -s $SESSION ################################################# -# Setup the master node. +# Setup the dcrd node. ################################################# -tmux rename-window -t $SESSION 'master' +tmux rename-window -t $SESSION 'dcrd' echo "Writing config for testnet dcrd node" -mkdir -p "${NODES_ROOT}/master" -cat > "${NODES_ROOT}/master/dcrd.conf" < "${NODES_ROOT}/dcrd/dcrd.conf" < "${NODES_ROOT}/voting-wallet-${i}/dcrwallet.conf" < "${NODES_ROOT}/dcrwallet-${i}/dcrwallet.conf" < td.status-good{ + background-color: #C4ECCA; +} + + +.table-light > td.status-bad{ + background-color: #FEB8A5; +} \ No newline at end of file diff --git a/stakepooldclient/stakepooldclient.go b/stakepooldclient/stakepooldclient.go index e393cd7c..d30e82dd 100644 --- a/stakepooldclient/stakepooldclient.go +++ b/stakepooldclient/stakepooldclient.go @@ -607,7 +607,12 @@ func (s *StakepooldManager) ImportScript(script []byte) (heightImported int64, e // BackendStatus provides a summary of a single back-end server type BackendStatus struct { - RPCStatus string + Host string + RPCStatus string + *WalletStatus +} + +type WalletStatus struct { DaemonConnected bool VoteVersion uint32 Unlocked bool @@ -621,6 +626,7 @@ func (s *StakepooldManager) BackendStatus() []BackendStatus { stakepooldPageInfo := make([]BackendStatus, len(s.grpcConnections)) for i, conn := range s.grpcConnections { + stakepooldPageInfo[i].Host = conn.Target() stakepooldPageInfo[i].RPCStatus = "Unknown" state := conn.GetState() switch state { @@ -642,10 +648,12 @@ func (s *StakepooldManager) BackendStatus() []BackendStatus { if err != nil { log.Warnf("BackendStatus: WalletInfo RPC failed on stakepoold instance %s: %v", conn.Target(), err) } else { - stakepooldPageInfo[i].DaemonConnected = resp.DaemonConnected - stakepooldPageInfo[i].VoteVersion = resp.VoteVersion - stakepooldPageInfo[i].Unlocked = resp.Unlocked - stakepooldPageInfo[i].Voting = resp.Voting + stakepooldPageInfo[i].WalletStatus = &WalletStatus{ + DaemonConnected: resp.DaemonConnected, + VoteVersion: resp.VoteVersion, + Unlocked: resp.Unlocked, + Voting: resp.Voting, + } } } diff --git a/views/admin/status.html b/views/admin/status.html index 68e807a8..c6b495ed 100644 --- a/views/admin/status.html +++ b/views/admin/status.html @@ -17,23 +17,46 @@

- - + + - + - {{ range $i, $backend := .BackendStatus }} + {{ range .BackendStatus }} - - - - - - + + + + + {{ with .WalletStatus }} + + + + + + + + + + + + {{else}} + + + + {{end}} {{end}}
Back-end IDRPC StatusHostStakepoold RPC Status DaemonConnectedVoteVersion Unlocked VotingVoteVersion
{{$i}}{{ $backend.RPCStatus }}{{ $backend.DaemonConnected }}{{ $backend.VoteVersion }}{{ $backend.Unlocked }}{{ $backend.Voting }}{{ .Host }}{{ .RPCStatus }}{{ .DaemonConnected }}{{ .Unlocked }}{{ .Voting }}{{ .VoteVersion }}Cannot get wallet stats