HI Kalpa,
Yp it works fine with that query, but again there is an error with this
query,
var queryData = JSON.parse('{"SQL Statement" : "SELECT * FROM
`multiGraphTable2` where `hostName` = 'nameOftheHost' limit 10"}');
In the backend i get the following error.
js:
"/monitoring-tool/gadgets/_9c7f9a50-f167-46bc-9e60-2fedd19e6b6f/data-api.jag",
line 6: missing ) after argument list
js: var queryData = JSON.parse('{"SQL Statement" : "SELECT * FROM
`multiGraphTable2` where `hostName` = 'nameOftheHost"}');
js:
....................................................................................................................^
[2014-06-18 22:11:16,998] ERROR
{org.jaggeryjs.jaggery.core.manager.WebAppManager} -
org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax
errors.
(/monitoring-tool/gadgets/_9c7f9a50-f167-46bc-9e60-2fedd19e6b6f/data-api.jag#1)
org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax
errors.
(/monitoring-tool/gadgets/_9c7f9a50-f167-46bc-9e60-2fedd19e6b6f/data-api.jag#1)
On Wed, Jun 18, 2014 at 10:07 PM, Kalpa Welivitigoda <[email protected]>
wrote:
> Hi Sajini,
>
> Try,
>
> var queryData = JSON.parse('{"SQL Statement" : "SELECT * FROM
> `multiGraphTable2` limit 10"}');
>
>
> On Wed, Jun 18, 2014 at 9:25 PM, Sajini De Silva <[email protected]> wrote:
>
>> Hi Udara,
>>
>> I copied mysql connector lib and this is the error I got.
>>
>> "NetworkError: 500 Internal Server Error -
>> https://localhost:9443/monitoring-tool/gadgets/_9c7f9a50-f167-46bc-9e60-2fedd19e6b6f/data-api.jag
>> "
>>
>> Thank you.
>>
>>
>> On Wed, Jun 18, 2014 at 9:21 PM, Udara Rathnayake <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> Can you copy that error here?
>>> Hope you have relevant connector lib in Jaggery runtime.
>>>
>>>
>>> On Wed, Jun 18, 2014 at 8:57 PM, Sajini De Silva <[email protected]>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I created a new gadget using a data source which worked fine. After
>>>> creating the gadget I edited the sql query in data-api.jag like below.
>>>>
>>>> var queryData = JSON.parse('{"SELECT * FROM `multiGraphTable2` limit
>>>> 10"}');
>>>>
>>>> I run this query in mysql database and it gave me the correct results,
>>>> but when I edited the data-api.jag with this query the gadget doesn't load
>>>> and it gives an error in firebug.
>>>>
>>>> Any idea why this is happening?
>>>>
>>>> Thank you,
>>>> Sajini.
>>>>
>>>> --
>>>> Sajini De SIlva
>>>> Software Engineer; WSO2 Inc.; http://wso2.com ,
>>>> Email: [email protected]
>>>> Blog: http://sajinid.blogspot.com/
>>>> Git hub profile: https://github.com/sajinidesilva
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Udara Rathnayake*
>>> Software Engineer
>>> WSO2 Inc. : http://wso2.com
>>>
>>> Mobile : +94 772207239
>>> Twitter : http://twitter.com/udarakr
>>> Blog : http://udarakr.blogspot.com
>>>
>>>
>>
>>
>> --
>> Sajini De SIlva
>> Software Engineer; WSO2 Inc.; http://wso2.com ,
>> Email: [email protected]
>> Blog: http://sajinid.blogspot.com/
>> Git hub profile: https://github.com/sajinidesilva
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Best Regards,
>
> Kalpa Welivitigoda
> Software Engineer, WSO2 Inc. http://wso2.com
> Email: [email protected]
> Mobile: +94776509215
>
--
Sajini De SIlva
Software Engineer; WSO2 Inc.; http://wso2.com ,
Email: [email protected]
Blog: http://sajinid.blogspot.com/
Git hub profile: https://github.com/sajinidesilva
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev