Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Qt] extend rpc console peers tab #6209

Merged
merged 3 commits into from Jun 12, 2015
Merged

[Qt] extend rpc console peers tab #6209

merged 3 commits into from Jun 12, 2015

Conversation

Diapolo
Copy link

@Diapolo Diapolo commented Jun 1, 2015

  • add node id, ping wait, whitelisted and common height
  • rephrase some labels to make them easier to understand for users

peers

@laanwj laanwj added the GUI label Jun 1, 2015
@laanwj
Copy link
Member

laanwj commented Jun 1, 2015

Post-0.11 utACK

@jonasschnelli
Copy link
Contributor

utACK
Will test soon.

</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="peerWhitelisted">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use yes/no here instead of a checkbox (more consistent with rest of the table)

@laanwj
Copy link
Member

laanwj commented Jun 1, 2015

I don't think it was introduced in this pull, but the Synced Headers, Synched Blocks and Ban Score rows blink furiously between actual values and Fetching.. all the time. I think we should display the last known value if the fetching fails.

@jonasschnelli
Copy link
Contributor

I would prefer the checkbox – but only – if you could also set the state. Together with banning options (#6158) it would be a adequate look and feel. On the other hand, checkboxes sometimes don't really imply a change before the users presses "save" or something similar.

@Diapolo
Copy link
Author

Diapolo commented Jun 1, 2015

@laanwj I changed to Yes/No and also we don't display Fetching... anymore. I also thought about making whitelisting an option but would prefer doing that via a context menu :).

@Diapolo
Copy link
Author

Diapolo commented Jun 1, 2015

@jonasschnelli If I find the time I'm going to further test your ban/unban pull and would like to add a context menu for it :).

@jonasschnelli
Copy link
Contributor

Style wise, the peers view should get an update:

  • The table doesn't auto-expand its cols/width.
  • Because now we have more lines in the text key/value table, the chance is very high that you run into the situations as the screen below shows (truncated text because of line height).

@Diapolo: i can try to create a commit on top of your PR to improve the general look and feel of the peers view if you don't care about this.

bildschirmfoto-2015-06-01-um-13 37 11

bildschirmfoto 2015-06-01 um 13 39 47

bildschirmfoto-2015-06-01-um-13 28 58

@jonasschnelli
Copy link
Contributor

@Diapolo: for banning/unbanning i think it would be more visible and more clear if the user could ban/unban over checkboxes or buttons at the peer details section (right part of the view) instead of a context menu. Context menus are not always comprehensible at first sight.

@Diapolo
Copy link
Author

Diapolo commented Jun 1, 2015

@jonasschnelli If my pull gets ACKs feel free to base a further UI polish on top, that's fine with me :). As for banning/unbanning, I think we should allow both options (click and via context menu).

@Diapolo
Copy link
Author

Diapolo commented Jun 1, 2015

Why is this failing the No Wallet build with:
"No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.

The build has been terminated"

@Diapolo
Copy link
Author

Diapolo commented Jun 1, 2015

@jonasschnelli Mind taking a look at commit 3, could be interresting as this just "kicks" a node via context menu :).

@luke-jr
Copy link
Member

luke-jr commented Jun 2, 2015

Concept ACK. I had to read the code to figure out what "Ping Wait" was, so maybe a tooltip explaining that it is the duration of a currently outstanding ping?

@Diapolo
Copy link
Author

Diapolo commented Jun 2, 2015

@luke-jr I'm fine with adding a tooltip for Ping Wait and yeah I also had to read the code to understand what it does ^^.

@laanwj
Copy link
Member

laanwj commented Jun 2, 2015

I agree that a checkbox makes sense if the user would be able to change the value. However I don't see the point to be able to change whitelisting status on a connected node. I wouldn't want to encourage people to manually whitelist peers until they disconnect/reconnect. It's micro-management.

(I'm not against whitelist editing in the UI in itself, but not in this way, it should be more similar to the command line options)

void RPCConsole::disconnectSelectedNode()
{
QString strNode = GUIUtil::getEntryData(ui->peerWidget, 0, PeerTableModel::Address);
while (CNode *bannedNode = FindNode(strNode.toStdString())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a loop?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For no reason I guess ^^... will update.

@laanwj
Copy link
Member

laanwj commented Jun 2, 2015

Scope drift alert: let's focus here on improving the peers table, features such as kicking/banning from the peers list should be a separate feature pull.

@Diapolo
Copy link
Author

Diapolo commented Jun 2, 2015

@laanwj I just found that kicking feature sooo cool and easy I wanted to show it :). But right, I'll open a new pull for it. Did you test/review it?

Edit: Feature now in a seperate pull: #6217

@jonasschnelli
Copy link
Contributor

Looks good!
Tested ACK.

Nit: One thing which might be worth a short discussion:
Because now there are 17 rows of key/value information this would fix the min window height to be slightly above 600px. This would break the peers window on 800x600 screens (which is okay for me, but you never know what kind of screens are used in node only wallet disabled environments).

I think a easy addition would be to deselect a selected peer if the user switches away from peers to console or net graph, etc. (or if he closes the console/debug window).
This would re-allow the user to change the height of the window below 600px.

@Diapolo
Copy link
Author

Diapolo commented Jun 3, 2015

I think a easy addition would be to deselect a selected peer if the user switches away from peers to console or net graph, etc. (or if he closes the console/debug window).
This would re-allow the user to change the height of the window below 600px.

@jonasschnelli Im not sure, how would that change redude the screens size?

@jonasschnelli
Copy link
Contributor

@Diapolo: it wouldn't resize the screen automatically, but, it would allow to reduce the height/size below 600px. If you don't deselect the row, the 17row key/value will constraint the height above 600px.

@Diapolo
Copy link
Author

Diapolo commented Jun 6, 2015

@jonasschnelli See commit 3, this adds your suggestion. Switching away from peers tab clears the selection.

Philip Kaufmann added 3 commits June 11, 2015 08:38
- add node id, ping wait, whitelisted and common height
- rephrase some labels to make them easier to understand for users
@Diapolo
Copy link
Author

Diapolo commented Jun 12, 2015

@laanwj @jonasschnelli Maybe some final ACKs :)?

@laanwj
Copy link
Member

laanwj commented Jun 12, 2015

ACK. Works for me.

@laanwj laanwj merged commit e059726 into bitcoin:master Jun 12, 2015
laanwj added a commit that referenced this pull request Jun 12, 2015
e059726 [Qt] deselect peer when switching away from peers tab in RPC console (Philip Kaufmann)
7211ada [Qt] replace Boost foreach with Qt version peertablemodel.cpp (Philip Kaufmann)
1b0db7b [Qt] extend rpc console peers tab (Philip Kaufmann)
@Diapolo Diapolo deleted the Qt_peers branch June 15, 2015 05:53
laanwj added a commit that referenced this pull request Jan 16, 2019
3537c83 Do not deselect peer when switching away from tab (Hennadii Stepanov)
b0037c5 Improve Peers tab layout (Hennadii Stepanov)

Pull request description:

  This is an alternative to #14798.

  The "Peers" tab of the "Debug" window improved to address comments #6209 (comment) (by @jonasschnelli) and #14798 (comment) (by @promag).

  This allows to keep the peer selection while navigating to other places and effectively reverts e059726.

  Screenshots with this PR:
  ![screenshot from 2019-01-09 22-01-36](https://user-images.githubusercontent.com/32963518/50927352-2e6fb700-1460-11e9-9173-582348210492.png)
  ![screenshot from 2019-01-09 22-02-11](https://user-images.githubusercontent.com/32963518/50927354-329bd480-1460-11e9-9926-d0eb0f026a35.png)
  ![screenshot from 2019-01-09 22-02-37](https://user-images.githubusercontent.com/32963518/50927358-3596c500-1460-11e9-864d-c8704451f3d9.png)

Tree-SHA512: 3d086007f6d72930bc2fc3c395175adda0f1a7722de3842bc246ee4f3bfc5ebda4b9a626fb68a7ee8663a88d0842deb37c0c460ad84cc58e22f138acf8bc71ea
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Nov 28, 2020
Summary:
3537c8345c788a527bb4e1d00683ca7f8ee5fb1a Do not deselect peer when switching away from tab (Hennadii Stepanov)
b0037c51909dc55e279baa81f063c169c9735105 Improve Peers tab layout (Hennadii Stepanov)

Pull request description:

  This is an alternative to #14798.

  The "Peers" tab of the "Debug" window improved to address comments bitcoin/bitcoin#6209 (comment) (by @jonasschnelli) and bitcoin/bitcoin#14798 (comment) (by @promag).

  This allows to keep the peer selection while navigating to other places and effectively reverts e059726.

  Screenshots with this PR:
  ![screenshot from 2019-01-09 22-01-36](https://user-images.githubusercontent.com/32963518/50927352-2e6fb700-1460-11e9-9173-582348210492.png)
  ![screenshot from 2019-01-09 22-02-11](https://user-images.githubusercontent.com/32963518/50927354-329bd480-1460-11e9-9926-d0eb0f026a35.png)
  ![screenshot from 2019-01-09 22-02-37](https://user-images.githubusercontent.com/32963518/50927358-3596c500-1460-11e9-864d-c8704451f3d9.png)

---

Backport of Core [[bitcoin/bitcoin#15136 | PR15136]]

Test Plan:
  ninja all
  ./qt/bitcoin-qt -testnet

check out the Peers tab for correctness

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D8547
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Aug 21, 2021
3537c83 Do not deselect peer when switching away from tab (Hennadii Stepanov)
b0037c5 Improve Peers tab layout (Hennadii Stepanov)

Pull request description:

  This is an alternative to bitcoin#14798.

  The "Peers" tab of the "Debug" window improved to address comments bitcoin#6209 (comment) (by @jonasschnelli) and bitcoin#14798 (comment) (by @promag).

  This allows to keep the peer selection while navigating to other places and effectively reverts e059726.

  Screenshots with this PR:
  ![screenshot from 2019-01-09 22-01-36](https://user-images.githubusercontent.com/32963518/50927352-2e6fb700-1460-11e9-9173-582348210492.png)
  ![screenshot from 2019-01-09 22-02-11](https://user-images.githubusercontent.com/32963518/50927354-329bd480-1460-11e9-9926-d0eb0f026a35.png)
  ![screenshot from 2019-01-09 22-02-37](https://user-images.githubusercontent.com/32963518/50927358-3596c500-1460-11e9-864d-c8704451f3d9.png)

Tree-SHA512: 3d086007f6d72930bc2fc3c395175adda0f1a7722de3842bc246ee4f3bfc5ebda4b9a626fb68a7ee8663a88d0842deb37c0c460ad84cc58e22f138acf8bc71ea
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants