Cannot read property 'graphs' of undefined #13

Closed
auxbuss opened this Issue May 29, 2012 · 1 comment

Comments

Projects
None yet
2 participants

auxbuss commented May 29, 2012

I'm getting started with graphene and trying to use the autodiscover example.

The docs aren't clear to a noob, so I may have set things up incorrectly. Docs say:

var g = new Graphene;
g.discover('http://my.graphite.host.com',
  'dev-pollers',
  function(i, url){ return "#dashboard"; },
  function(description){
    g.build(description);
    console.log(description);
  }
);

/* You should specify graphite host, dashboard name,
a parent specifier which is responsible to spit out the next graph parent,
and a result callback. */

So, I've replaced 'http://my.graphite.host.com with my grapite subdomain, replaced dev-pollers with a saved dashboard name, and left the callback and return "#dashboard" as they are.

When I run what I have, the page connects with my server, then spits out a javascript error:

Uncaught TypeError: Cannot read property 'graphs' of undefined index.js:11
  Graphene.discover index.js:11
  f.Callbacks.n jquery-1.7.1.min.js:2
  f.Callbacks.o.fireWith jquery-1.7.1.min.js:2
  w jquery-1.7.1.min.js:4
  f.support.ajax.f.ajaxTransport.send.d

Can you help? Thanks.

Owner

jondot commented Jun 24, 2012

Hi!
I think I answered by email, but looks like I missed this issue!

In any case I think I know what your problem is - you should rename 'dev-pollers' to what your dashboard is called in your own Graphite "old" dash UI.

Let me know if this helps you out

Thanks!

jondot closed this Aug 31, 2012

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