fake-simple-json-datasource icon indicating copy to clipboard operation
fake-simple-json-datasource copied to clipboard

Table No Response

Open mohanraj1939 opened this issue 6 years ago • 5 comments

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.

table

error obtained using table as query.

table error

Command response: table cmd

mohanraj1939 avatar Dec 27 '17 10:12 mohanraj1939

Have you tried applying https://github.com/bergquist/fake-simple-json-datasource/pull/3 ?

eddy-geek avatar Jan 09 '18 16:01 eddy-geek

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

yadavs1310 avatar Feb 21 '18 06:02 yadavs1310

Still same issue occurs. How columns would be passed from grafana?

nishant-tm avatar Sep 14 '18 06:09 nishant-tm

same issue

vovanb avatar Mar 19 '19 21:03 vovanb

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.

nmingotti avatar Aug 28 '19 22:08 nmingotti