fake-simple-json-datasource
fake-simple-json-datasource copied to clipboard
Table No Response
Hi, I'm using grafana 4.6.3, SimpleJson V1.3.5 as datasource.
I changed the query from timeserie to table. I'm Getting response like below snapshot by using this fake simple json datasource.
error obtained using table as query.
Command response:
Have you tried applying https://github.com/bergquist/fake-simple-json-datasource/pull/3 ?
i am using simplejson 1(.3.5) , could the implementation steps of fake json data source be shared. in case you have have used other json based api,pl share the working. at my end , it seems json request is not parsed.In grafan's query parser,url tag is modified and its appended with query and it is not letting parsing of the requested json.
pl note datasource connection to simplejson is tested successful
Still same issue occurs. How columns would be passed from grafana?
same issue
the code is outdated try this change to the table
variable.
change this:
var table = {
"columns":[
{"text":"Time","type":"time"},
{"text":"Country","type":"string"},
{"text":"Number","type":"number"}
],
"rows":[
[1234567,"SE",123],
[1234567,"DE",231],
[1234567,"US",321],
[120,"IT",123123123],
],
"type":"table"
}
then modify a bit what follow, just to make thing work:
// for (var i = 0;i < table.values.length; i++) {
for (var i = 0;i < table.rows.length; i++) {
var anon = table.rows[i];
anon[0] = (now - decreaser);
decreaser += 1000000
}
i try to patch it now.