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

fix: work even when bandwidth metrics are disabled #1024

Merged
merged 4 commits into from
Apr 29, 2019

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Apr 28, 2019

Fixes #1009 and ipfs/ipfs-desktop#893 by showing a message to the user when they have the bandwidth metrics disabled.

Also, removes some duplicated code. We had two bundles doing basically the same thing (fetching bandwidth stats).

Screenshot 2019-04-28 at 12 28 46

License: MIT
Signed-off-by: Henrique Dias hacdias@gmail.com

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias hacdias requested review from olizilla and fsdiogo April 28, 2019 10:22
@ghost ghost assigned hacdias Apr 28, 2019
@ghost ghost added the status/in-progress In progress label Apr 28, 2019
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias hacdias changed the title refactor: remove duplicated code fix: work even when bandwidth metrics are disabled Apr 28, 2019
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
Copy link
Member

@olizilla olizilla left a comment

Choose a reason for hiding this comment

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

This is rad, thanks for taking the time to simplify the code while fixing this.

Minor, but it's would be helpful to remind the user that they need to restart the node for the change to take effect.

}
},
"bandwidthStats": "Bandwidth Stats",
"bandwidthStatsDisabled": "You have the bandwidth metrics disabled. You can enable them by typing the command bellow or changing the key <1>Swarm.DisableBandwidthMetrics</1> to <3>false</3> on <5>Settings</5>."
Copy link
Member

Choose a reason for hiding this comment

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

Needs a note about "then restart the IPFS daemon to apply the change."

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@olizilla olizilla merged commit d99403c into master Apr 29, 2019
@olizilla olizilla deleted the refactor/reduce-duplicated branch April 29, 2019 09:59
@ghost ghost removed the status/in-progress In progress label Apr 29, 2019
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.

/api/v0/stats/bw returns 500 when bandwidth reporter is disabled
2 participants