Skip to content

Commit 1ec6190

Browse files
committed
cmd/mist: show peer names in peers window
1 parent 73f94f3 commit 1ec6190

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cmd/mist/assets/qml/main.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,8 @@ ApplicationWindow {
927927
model: peerModel
928928
TableViewColumn{width: 180; role: "addr" ; title: "Remote Address" }
929929
TableViewColumn{width: 280; role: "nodeID" ; title: "Node ID" }
930-
TableViewColumn{width: 180; role: "caps" ; title: "Capabilities" }
930+
TableViewColumn{width: 100; role: "name" ; title: "Name" }
931+
TableViewColumn{width: 40; role: "caps" ; title: "Capabilities" }
931932
}
932933
}
933934
}

cmd/mist/gui.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ NumGC: %d
466466
))
467467
}
468468

469-
type qmlpeer struct{ Addr, NodeID, Caps string }
469+
type qmlpeer struct{ Addr, NodeID, Name, Caps string }
470470

471471
type peersByID []*qmlpeer
472472

@@ -481,6 +481,7 @@ func (gui *Gui) setPeerInfo() {
481481
qpeers[i] = &qmlpeer{
482482
NodeID: p.ID().String(),
483483
Addr: p.RemoteAddr().String(),
484+
Name: p.Name(),
484485
Caps: fmt.Sprint(p.Caps()),
485486
}
486487
}

0 commit comments

Comments
 (0)