Hi,
> btw, in the doc [1] var client = new AnalyticsClient().init(); should be > changed to var client = new AnalyticsClient() it seems (no *init()* part). Seems like the issue was that the AnalyticsClient.prototype.init() method in carbon-analytics.js was never loaded. Hence AnalyticsClient().init() returned a method not found error. However, I was calling the carbon-analytics.js within another dashboard gadget. But the doc says: *"Currently due to a limitation, client applications should be deployed in the same domain as the Dashboard server. i.e - DAS_HOME/repository/deployment/server/webapp*" Can I know what is this limitation and whether this issue is related to the above limitation? Thanks, Supun On Mon, Dec 14, 2015 at 10:01 AM, Anjana Fernando <[email protected]> wrote: > [Adding Gimantha]. > > On Sun, Dec 13, 2015 at 1:01 PM, Supun Sethunga <[email protected]> wrote: > >> Hi, >> >> I was trying to do a drillDownSearch using [1]. This operation always >> returned *"{"status" : "failed", "message" : "drilldownSearch parameters >> are not provided"}"*. Further debugging, found out out that, this >> happens due to the "request" is not getting build at the >> https://localhost:9443/portal/controllers/apis/analytics.jag, hence >> contentAsString = stringify(content); always resolve to null, resulting the >> above error. >> >> I could overcome this by adding the following to the "analytics.jag" file >> [2]: >> >> *if(request.getMethod() == "POST") {* >> >> *log.debug(request.getContent());* >> >> *} * >> >> >> Further, I also had to change [3] to follow: >> >> contentAsString = content; >> >> >> It seemed like to me, the request was not getting built. Any idea what >> would be the reason for this? >> >> btw, in the doc [1] var client = new AnalyticsClient().init(); should >> be changed to var client = new AnalyticsClient() it seems (no *init()* >> part). >> >> [1] https://docs.wso2.com/display/DAS300/Analytics+JavaScript+(JS)+API >> [2] >> https://github.com/wso2/carbon-dashboards/blob/master/apps/portal/controllers/apis/analytics.jag >> [3] >> https://github.com/wso2/carbon-dashboards/blob/master/apps/portal/controllers/apis/analytics.jag#L151 >> >> Thanks, >> Supun >> -- >> *Supun Sethunga* >> Software Engineer >> WSO2, Inc. >> http://wso2.com/ >> lean | enterprise | middleware >> Mobile : +94 716546324 >> > > > > -- > *Anjana Fernando* > Senior Technical Lead > WSO2 Inc. | http://wso2.com > lean . enterprise . middleware > -- *Supun Sethunga* Software Engineer WSO2, Inc. http://wso2.com/ lean | enterprise | middleware Mobile : +94 716546324
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
