[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
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to