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

Fallback for chart failure #200

Merged
merged 1 commit into from
May 4, 2017

Conversation

quadrophobiac
Copy link
Collaborator

This will trigger any time a JSON object with count value 0 has been returned by API.
This is a very small patch but should cover edge cases where data for an endpoint has no values within the last 30 days. I reasoned this was the best solution to this because anything else would involve changing the logic of several methods in metrics_helpers.rb

datetime_path()
get_single_metric()
get_metric_range()

the latter two of these are likely to be refactored with the work entailed in #173. At present the date tab retrieves the earliest possible date for a metrics endpoint, so I think directing users to that tab and including some text where the plotly chart would usually render is a sufficient workaround.

This will trigger any time no JSON has been returned by API.
@quadrophobiac quadrophobiac requested a review from Floppy April 3, 2017 15:26
@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.196% when pulling 075de03 on patch-graceful-failure-for-plotly-graphs into 4641e34 on master.

@Floppy Floppy merged commit 47b81bf into master May 4, 2017
@Floppy Floppy deleted the patch-graceful-failure-for-plotly-graphs branch May 4, 2017 11:56
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