gui: display network in peer details

This commit is contained in:
Jon Atack
2020-12-24 11:05:10 +01:00
parent 9136953073
commit e262a19b0b
2 changed files with 81 additions and 54 deletions

View File

@ -1100,14 +1100,17 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="label_21"> <widget class="QLabel" name="peerNetworkLabel">
<property name="toolTip">
<string>The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS.</string>
</property>
<property name="text"> <property name="text">
<string>Version</string> <string>Network</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QLabel" name="peerVersion"> <widget class="QLabel" name="peerNetwork">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1123,14 +1126,14 @@
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="label_28"> <widget class="QLabel" name="label_21">
<property name="text"> <property name="text">
<string>User Agent</string> <string>Version</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QLabel" name="peerSubversion"> <widget class="QLabel" name="peerVersion">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1146,14 +1149,14 @@
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_28">
<property name="text"> <property name="text">
<string>Services</string> <string>User Agent</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="4" column="1">
<widget class="QLabel" name="peerServices"> <widget class="QLabel" name="peerSubversion">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1169,14 +1172,14 @@
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="5" column="0">
<widget class="QLabel" name="label_29"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>Starting Block</string> <string>Services</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="1"> <item row="5" column="1">
<widget class="QLabel" name="peerHeight"> <widget class="QLabel" name="peerServices">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1192,14 +1195,14 @@
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="6" column="0">
<widget class="QLabel" name="label_27"> <widget class="QLabel" name="label_29">
<property name="text"> <property name="text">
<string>Synced Headers</string> <string>Starting Block</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="6" column="1">
<widget class="QLabel" name="peerSyncHeight"> <widget class="QLabel" name="peerHeight">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1215,14 +1218,14 @@
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="7" column="0">
<widget class="QLabel" name="label_25"> <widget class="QLabel" name="label_27">
<property name="text"> <property name="text">
<string>Synced Blocks</string> <string>Synced Headers</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="7" column="1">
<widget class="QLabel" name="peerCommonHeight"> <widget class="QLabel" name="peerSyncHeight">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1238,14 +1241,14 @@
</widget> </widget>
</item> </item>
<item row="8" column="0"> <item row="8" column="0">
<widget class="QLabel" name="label_22"> <widget class="QLabel" name="label_25">
<property name="text"> <property name="text">
<string>Connection Time</string> <string>Synced Blocks</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="1"> <item row="8" column="1">
<widget class="QLabel" name="peerConnTime"> <widget class="QLabel" name="peerCommonHeight">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1261,14 +1264,14 @@
</widget> </widget>
</item> </item>
<item row="9" column="0"> <item row="9" column="0">
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_22">
<property name="text"> <property name="text">
<string>Last Send</string> <string>Connection Time</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1"> <item row="9" column="1">
<widget class="QLabel" name="peerLastSend"> <widget class="QLabel" name="peerConnTime">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1284,14 +1287,14 @@
</widget> </widget>
</item> </item>
<item row="10" column="0"> <item row="10" column="0">
<widget class="QLabel" name="label_19"> <widget class="QLabel" name="label_15">
<property name="text"> <property name="text">
<string>Last Receive</string> <string>Last Send</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1"> <item row="10" column="1">
<widget class="QLabel" name="peerLastRecv"> <widget class="QLabel" name="peerLastSend">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1307,14 +1310,14 @@
</widget> </widget>
</item> </item>
<item row="11" column="0"> <item row="11" column="0">
<widget class="QLabel" name="label_18"> <widget class="QLabel" name="label_19">
<property name="text"> <property name="text">
<string>Sent</string> <string>Last Receive</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="1"> <item row="11" column="1">
<widget class="QLabel" name="peerBytesSent"> <widget class="QLabel" name="peerLastRecv">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1330,14 +1333,14 @@
</widget> </widget>
</item> </item>
<item row="12" column="0"> <item row="12" column="0">
<widget class="QLabel" name="label_20"> <widget class="QLabel" name="label_18">
<property name="text"> <property name="text">
<string>Received</string> <string>Sent</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="1"> <item row="12" column="1">
<widget class="QLabel" name="peerBytesRecv"> <widget class="QLabel" name="peerBytesSent">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1353,14 +1356,14 @@
</widget> </widget>
</item> </item>
<item row="13" column="0"> <item row="13" column="0">
<widget class="QLabel" name="label_26"> <widget class="QLabel" name="label_20">
<property name="text"> <property name="text">
<string>Ping Time</string> <string>Received</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="1"> <item row="13" column="1">
<widget class="QLabel" name="peerPingTime"> <widget class="QLabel" name="peerBytesRecv">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1376,17 +1379,14 @@
</widget> </widget>
</item> </item>
<item row="14" column="0"> <item row="14" column="0">
<widget class="QLabel" name="peerPingWaitLabel"> <widget class="QLabel" name="label_26">
<property name="toolTip">
<string>The duration of a currently outstanding ping.</string>
</property>
<property name="text"> <property name="text">
<string>Ping Wait</string> <string>Ping Time</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="14" column="1"> <item row="14" column="1">
<widget class="QLabel" name="peerPingWait"> <widget class="QLabel" name="peerPingTime">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1402,14 +1402,17 @@
</widget> </widget>
</item> </item>
<item row="15" column="0"> <item row="15" column="0">
<widget class="QLabel" name="peerMinPingLabel"> <widget class="QLabel" name="peerPingWaitLabel">
<property name="toolTip">
<string>The duration of a currently outstanding ping.</string>
</property>
<property name="text"> <property name="text">
<string>Min Ping</string> <string>Ping Wait</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="1"> <item row="15" column="1">
<widget class="QLabel" name="peerMinPing"> <widget class="QLabel" name="peerPingWait">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1425,14 +1428,14 @@
</widget> </widget>
</item> </item>
<item row="16" column="0"> <item row="16" column="0">
<widget class="QLabel" name="label_timeoffset"> <widget class="QLabel" name="peerMinPingLabel">
<property name="text"> <property name="text">
<string>Time Offset</string> <string>Min Ping</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="16" column="1"> <item row="16" column="1">
<widget class="QLabel" name="timeoffset"> <widget class="QLabel" name="peerMinPing">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1448,17 +1451,14 @@
</widget> </widget>
</item> </item>
<item row="17" column="0"> <item row="17" column="0">
<widget class="QLabel" name="peerMappedASLabel"> <widget class="QLabel" name="label_timeoffset">
<property name="toolTip">
<string>The mapped Autonomous System used for diversifying peer selection.</string>
</property>
<property name="text"> <property name="text">
<string>Mapped AS</string> <string>Time Offset</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="17" column="1"> <item row="17" column="1">
<widget class="QLabel" name="peerMappedAS"> <widget class="QLabel" name="timeoffset">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -1474,6 +1474,32 @@
</widget> </widget>
</item> </item>
<item row="18" column="0"> <item row="18" column="0">
<widget class="QLabel" name="peerMappedASLabel">
<property name="toolTip">
<string>The mapped Autonomous System used for diversifying peer selection.</string>
</property>
<property name="text">
<string>Mapped AS</string>
</property>
</widget>
</item>
<item row="18" column="1">
<widget class="QLabel" name="peerMappedAS">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>N/A</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="19" column="0">
<spacer name="verticalSpacer_3"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>

View File

@ -1109,6 +1109,7 @@ void RPCConsole::updateDetailWidget()
ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion)); ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion));
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer)); ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound")); ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound"));
ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
if (stats->nodeStats.m_permissionFlags == PF_NONE) { if (stats->nodeStats.m_permissionFlags == PF_NONE) {
ui->peerPermissions->setText(tr("N/A")); ui->peerPermissions->setText(tr("N/A"));
} else { } else {