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

Update stats periodically after a node is started #14178

Closed
bbondy opened this issue Feb 16, 2021 · 1 comment · Fixed by brave/brave-core#7974
Closed

Update stats periodically after a node is started #14178

bbondy opened this issue Feb 16, 2021 · 1 comment · Fixed by brave/brave-core#7974

Comments

@bbondy
Copy link
Member

bbondy commented Feb 16, 2021

Continuing off of the work in:
brave/brave-core#7948

After a node is started, the stats won't refresh until you reload the page.
If the current page is open and it is active, we should refresh the stats periodically, maybe every 1s.
I think this would be done in componentDidMount with a setInterval and clearInterval when the page is closing.

@stephendonner
Copy link

Verified FIXED in 1.22.34 on macOS Big Sure (11.2.1) with

Brave 1.22.34 Chromium: 89.0.4389.48 (Official Build) nightly (x86_64)
Revision 0fe3c4589a6cf5ce719d167834dfa9cd8978937a-refs/branch-heads/4389@{#873}
OS macOS Version 11.2.1 (Build 20D74)

Steps:

  1. open brave://ipfs, click Install and start

Screen Shot 2021-02-18 at 2 13 18 PM

  1. verified stats about connected peers should be updated in runtime without reloading the page
  2. clicked stop button, confirmed stats dropped to zero (as well as Addresses and Node info) and weren't updated until node relaunch, by clicking start
  3. clicked restart button, confirmed stats dropped to zero (and Addresses and Node info were nulled out, then re-populated upon node restart

refresh-ipfs-stats

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants