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

Errors in generating New Metrics Endpoints #186

Closed
quadrophobiac opened this issue Mar 28, 2017 · 3 comments
Closed

Errors in generating New Metrics Endpoints #186

quadrophobiac opened this issue Mar 28, 2017 · 3 comments

Comments

@quadrophobiac
Copy link
Collaborator

If you follow steps in the API docs https://bothan.io/api for your own heroku instance the following error should occur

curl -X POST -H "Content-Type: application/json" -d '{"time": "2016-04-12T10:00:00", "value": 500}' "https://$uname:$pwd@$appname.herokuapp.com/metrics/$endpoint"

The endpoint URL should look like this

no-json-date-range-snaffu

With these errors in console

initial-post-console-errors

If you manually adjust the date range so that one month is displayed in the graph you should see no change in the absent graph or the console errors

screen shot 2017-03-28 at 11 53 23
screen shot 2017-03-28 at 11 53 32

If you issue a second curl request with a sequential date (prior or subsequent) and a varied value, like so

curl -X POST -H "Content-Type: application/json" -d '{"time": "2016-04-13T10:00:00", "value": 300}' "https://$uname:$pwd@$appname.herokuapp.com/metrics/$endpoint"

The visualisation renders the most recent CURL

screen shot 2017-03-28 at 11 56 29

with the same pusher errors

screen shot 2017-03-28 at 11 57 08

The endpoint will render and store dates subsequent to the date entered in the second curl but not any dates prior

@quadrophobiac
Copy link
Collaborator Author

(please ignore different endpoints - basically started with bugreplicate but then needed to document the whole thing from start to finish)

@quadrophobiac
Copy link
Collaborator Author

quadrophobiac commented Mar 30, 2017

I think this is probably wholly down to the dates generated by default. The same endpoints I generated for above render just fine when creating a dashboard which uses Date Range Default

bug-update

Any refresh of the date range on metrics/{metric_name} updates the visusalisation and displays the JSON. I think this error is problematic in that up until this point nothing shows in the show JSON toggle - which could lead to presumptions of failed POST of data

@quadrophobiac
Copy link
Collaborator Author

After replicating have determined that the behaviour at heart of this issue (a blank visualisation area) is currently isolated to what is described within #253 so I am closing this ticket

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

No branches or pull requests

1 participant