title: Scripted dashboard on grafana
body: <p>I'm using grafana to work with graphite data but when I try to parse it I get an error. It happens because the server does not give me a JSON.</p>
  
  <p>I'm trying to work with scripted dashboards an the script which I'm using is this: <a href="https://gist.github.com/anatolijd/73b1360c9780c0d161b1" rel="nofollow">https://gist.github.com/anatolijd/73b1360c9780c0d161b1</a></p>
  
  <p>On <code>function expand_filter_values</code> the line <code>var obj = JSON.parse(req.responseText);</code>, apparently the <code>response.text</code> is not a JSON object but an html with this content:</p>
  
  <pre><code>&lt; !-- Copyright 2008 Orbitz WorldWide
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
     http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. -- &gt;
  
  
  
  &lt; html&gt;&lt;br&gt;
      &lt; head&gt;&lt;br&gt;
      &lt; title&gt;Graphite Browser&lt; /title&gt;&lt;br&gt;
    &lt; /head&gt;
  
  
  &lt; frameset rows="60,*" frameborder="1" border="1"&gt;
    &lt; frame src="/browser/header/" name="Header" id='header' scrolling="no" noresize="true" /&gt;
  
    &lt; frame src="/composer/?query=myhost.xxx.%2A" name="content" id="composerFrame"/&gt;
  
    &lt; /frameset&gt;
  &lt; /html&gt;
  </code></pre>
  
  <p>Can you help me with it, please?</p>