Tweaks and latency added to peeroverview

This commit is contained in:
Maran 2014-06-03 10:42:36 +02:00
parent a6f4eef1da
commit 9e411d785b

View File

@ -637,7 +637,7 @@ ApplicationWindow {
function addPeer(peer) { function addPeer(peer) {
// We could just append the whole peer object but it cries if you try to alter them // We could just append the whole peer object but it cries if you try to alter them
peerModel.append({ip: peer.ip, port: peer.port, lastResponse:timeAgo(peer.lastSend), version: peer.version}) peerModel.append({ip: peer.ip, port: peer.port, lastResponse:timeAgo(peer.lastSend), latency: peer.latency, version: peer.version})
} }
function resetPeers(){ function resetPeers(){
@ -666,7 +666,7 @@ ApplicationWindow {
Window { Window {
id: peerWindow id: peerWindow
height: 200 height: 200
width: 500 width: 700
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
property var peerModel: ListModel { property var peerModel: ListModel {
@ -676,10 +676,11 @@ ApplicationWindow {
anchors.fill: parent anchors.fill: parent
id: peerTable id: peerTable
model: peerModel model: peerModel
TableViewColumn{width: 120; role: "ip" ; title: "IP" } TableViewColumn{width: 100; role: "ip" ; title: "IP" }
TableViewColumn{width: 60; role: "port" ; title: "Port" } TableViewColumn{width: 60; role: "port" ; title: "Port" }
TableViewColumn{width: 120; role: "lastResponse"; title: "Last event" } TableViewColumn{width: 140; role: "lastResponse"; title: "Last event" }
TableViewColumn{width: 180; role: "version" ; title: "Version" } TableViewColumn{width: 100; role: "latency"; title: "Latency" }
TableViewColumn{width: 260; role: "version" ; title: "Version" }
} }
} }
} }