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

feat: node stats page #766

Merged
merged 16 commits into from
Aug 31, 2018
Merged

feat: node stats page #766

merged 16 commits into from
Aug 31, 2018

Conversation

olizilla
Copy link
Member

Adds a node stats bundle.

License: MIT
Signed-off-by: Oli Evans oli@tableflip.io

@hacdias
Copy link
Member

hacdias commented Aug 24, 2018

image

What about adding a copy button for the ID and Public Keys and some interesting graphs on the right side?

@olizilla
Copy link
Member Author

Yep, that sounds good.

I'm not convinced we need to show the public key in that box. Maybe there is an advanced info section that is collapsed, that has public key and the addresses the node is bound to in.

I think peer id, connected peer count, and the agent version, which we can just call "version" info is worth showing up top.

olizilla and others added 4 commits August 24, 2018 19:49
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member

hacdias commented Aug 24, 2018

Current state:

localhost_3000_

And it is responsive!

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member

hacdias commented Aug 27, 2018

@olizilla more screenshots:

image

image

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@olizilla
Copy link
Member Author

@hacdias this is looking good! Some thoughts

The only issue is the is there is no support in IE or Edge: https://caniuse.com/#search=details

I imagine there is a react component that polyfills the behaviour where it's not available. If not, that'd be a super helpful component to publish!

  • Reduce the padding around the graphs a little, particularly the right hand side of the bandwidth graph. They should have some padding, but we want to give as much space as possible to the info.

  • if you get onto the graphs there is a good example of a Donut style progress bar here: https://github.com/jxnblk/rebass/blob/master/src/Donut.js and the svg could be modified to do the horse-shoe shape.

  • (not related to this PR but) Add a title "unknown location" to the unknown flag on the bandwidth by peer graph.

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member

hacdias commented Aug 27, 2018

@olizilla couldn't find a component but I found a very simple plugin: https://github.com/rstacruz/details-polyfill

I will make a Reacty component though.

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member

hacdias commented Aug 27, 2018

@olizilla the tests started failing really randomly. Need to figure out why.

DO you agree with the three graphs on Invision?

  • Speed In
  • Speed Out
  • Storage

I can't see to which compare the speed to to fill the graphs.
The storage by default is 10 GB maximum which will create a graph where you have barely nothing filled.

@olizilla
Copy link
Member Author

@hacdias good point. Like a speedometer, we can pick a max value, and if it's over the "top speed" we can just show the bar as full. We could just say that the full is 100MB/s.

If we want it to be more visually exciting, then we could use a non-linear scale, that gives more space to lower numbers and bunches up higher numbers like http://www.speedtest.net/ does. I'm not sure we want to play those games though.

I do think it's a good thing to have the storage graph look empty if there is very little in your repo!

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member

hacdias commented Aug 30, 2018

@olizilla I'll open this to review. In the meanwhile, if anyone can discover why are the tests failing in the CI with No node found for selector: nav a[href="#/files/"], it would be nice. They pass on my machine.

It seems to have started after 2d41077, which doesn't appear to have nothing to do with navigation. Maybe it increased the rendering time?

image

@hacdias hacdias requested review from alanshaw, fsdiogo and lidel and removed request for alanshaw August 30, 2018 10:20
@hacdias hacdias changed the title [wip]: node stats page feat: node stats page Aug 30, 2018
@hacdias
Copy link
Member

hacdias commented Aug 30, 2018

A screenshot:

image

@olizilla
Copy link
Member Author

How about adding f7 lh-copy pa2 bg-light-gray to the two advanced blocks and removing monospace and adding blue to the details summary link?

screenshot 2018-08-30 13 02 46

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member

hacdias commented Aug 30, 2018

@olizilla done! 😉

@fsdiogo
Copy link
Contributor

fsdiogo commented Aug 30, 2018

The code looks good, although in some resolutions the responsiveness isn't the best, but we can deal with that in another PR!

screen shot 2018-08-30 at 14 22 34

@olizilla
Copy link
Member Author

I get duplicate react key errors, as it seems I have the same address twice in my list!

screenshot 2018-08-30 15 09 16

@hacdias this is clearly weird, but we should make the UI robust to that. Can you filter the list to contain only unique entries. I think they should be in monospace too, but they are showing up as sans-serif now. Same for the public key.

In another PR it'd be great to group them by ip4 and ip6, and pick out the ip address section in a different color, so users can quickly pick out what network interfaces their node is bound to.

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member

hacdias commented Aug 30, 2018

@olizilla just made some updates. If I recall correctly, you told me you were making some changes this afternoon? Did you commit them?

@hacdias hacdias merged commit 93948bd into revamp Aug 31, 2018
@hacdias hacdias deleted the node-stata branch August 31, 2018 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants