prometheus-junkyard / promdash

Prometheus Dashboard Builder
http://prometheus.io/
Apache License 2.0
271 stars 48 forks source link

Error when creating a new graph #474

Closed nicholascapo closed 8 years ago

nicholascapo commented 8 years ago

Followed the instructions in the Readme for using the docker container. Promdash now runs behind NGINX.

Everything seems to work, except when adding a new dashboard. On entering the newly created dashboard, the following error appears in the Chrome console: I am then unable to add a new expression.

I am not sure how to check what version this is.

TypeError: Cannot read property 'name' of undefined
    at n.$scope.queryDashboard (application-820eee587fa3bd511e5983482d86fbc7.js:2804)
    at application-820eee587fa3bd511e5983482d86fbc7.js:2799
    at application-820eee587fa3bd511e5983482d86fbc7.js:1864
    at n.$eval (application-820eee587fa3bd511e5983482d86fbc7.js:1878)
    at n.$digest (application-820eee587fa3bd511e5983482d86fbc7.js:1875)
    at n.$apply (application-820eee587fa3bd511e5983482d86fbc7.js:1878)
    at application-820eee587fa3bd511e5983482d86fbc7.js:1891
    at e (application-820eee587fa3bd511e5983482d86fbc7.js:1788)
    at application-820eee587fa3bd511e5983482d86fbc7.js:1790

errorcreatingdashboard

stuartnelson3 commented 8 years ago

I'll look at this when I get a chance (i.e. soon, on vacation atm), but I have a hunch...

Do you have any directories created? image

If not, try creating a directory, and see if this removes the problem.

the stack trace says something is wrong in queryDashboard, here, and I'm guessing there's no directory so this method explodes: https://github.com/prometheus/promdash/blob/857f3f7a80b64bbd5f89180f32bbfe014567cbd2/app/assets/javascripts/angular/controllers/dashboard_ctrl.js.erb#L339-L342

https://github.com/prometheus/promdash/blob/857f3f7a80b64bbd5f89180f32bbfe014567cbd2/app/assets/javascripts/angular/controllers/dashboard_ctrl.js.erb#L323-L326

nicholascapo commented 8 years ago

Actually my first attempt was in a directory. I think I tried it again without a directory later, but I don't remember for sure.

I can retest and confirm tomorrow.

Enjoy your vacation.

Nicholas

On Tue, Jan 12, 2016, 15:49 stuart nelson notifications@github.com wrote:

I'll look at this when I get a chance (i.e. soon, on vacation atm), but I have a hunch...

Do you have any directories created? [image: image] https://cloud.githubusercontent.com/assets/1398104/12277909/5daf2b26-b97e-11e5-9abb-34a5bfadf05a.png

If not, try creating a directory, and see if this removes the problem.

the stack trace says something is wrong in queryDashboard, here, and I'm guessing there's no directory so this method explodes:

https://github.com/prometheus/promdash/blob/857f3f7a80b64bbd5f89180f32bbfe014567cbd2/app/assets/javascripts/angular/controllers/dashboard_ctrl.js.erb#L339-L342

https://github.com/prometheus/promdash/blob/857f3f7a80b64bbd5f89180f32bbfe014567cbd2/app/assets/javascripts/angular/controllers/dashboard_ctrl.js.erb#L323-L326

— Reply to this email directly or view it on GitHub https://github.com/prometheus/promdash/issues/474#issuecomment-171069026 .

nicholascapo commented 8 years ago

The error occurs as soon as the page in the above screenshot loads. It happens with or without a directory.