Hi Suho and Ramindu,

Above fix is no needed as "else" block will be executed for realtime
providers (push mode)  [1].  There we call "draw" method of the chart which
draw the chart even without the data. Then only we register call back to
push. In that call back we don't redraw the chart we just update previously
drawn chart. If call draw() on callbacks there will be a chart refreshing
in the UI as it redraws.

Here he new provider is going to access DAS tables using query params which
is a pull mode operation [2]. There basically we draw the chart with pulled
data and then set interval to call draw method periodically. If its a such
operation in that particular provider getMode should be "PULL" as in the
batch provider [3] Also please refer the branch 2.0.x of carbon-dashboard which
is used cep and das packs instead of master branch.


[1]
https://github.com/wso2/carbon-dashboards/blob/2.0.x/apps/portal/templates/gadgets/gadget-generation-templates/js/gadget-core.js.hbs#L77

[2]
https://github.com/wso2/carbon-dashboards/blob/2.0.x/apps/portal/templates/gadgets/gadget-generation-templates/js/gadget-core.js.hbs#L72

[3]
https://github.com/wso2/carbon-analytics-common/blob/master/features/analytics-gadget-templates/org.wso2.carbon.analytics.gadget.batch.provider.template.feature/src/main/providers/batch/api.js#L126

Regards,

On Fri, Sep 2, 2016 at 12:16 PM, Sriskandarajah Suhothayan <s...@wso2.com>
wrote:

> @Tharick how its working in Real-time provider without this fix?
>
> Regards
> Suho
>
> On Fri, Sep 2, 2016 at 11:02 AM, Ramindu De Silva <ramin...@wso2.com>
> wrote:
>
>> Hi DS team,
>>
>> Could you please review and merger PR[1].
>> This was due to the new provider implemented to access DAS tables using
>> query params in the dashboard.
>> Since the "registerCallBackForPush" method calls for the "update" method
>> in the gadget, the gadget's view is not getting created using the schema
>> since there's no data . So I had to add extra parameter in-order to make
>> the gadget work.
>>
>> 1. https://github.com/wso2/carbon-dashboards/pull/368
>>
>> Best Regards,
>>
>> --
>> *Ramindu De Silva*
>> Software Engineer
>> WSO2 Inc.: http://wso2.com
>> lean.enterprise.middleware
>>
>> email: ramin...@wso2.com <sanj...@wso2.com>
>> mob: +94 772339350
>> mob: +94 719678895
>>
>
>
>
> --
>
> *S. Suhothayan*
> Associate Director / Architect & Team Lead of WSO2 Complex Event Processor
> *WSO2 Inc. *http://wso2.com
> * <http://wso2.com/>*
> lean . enterprise . middleware
>
>
> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
> http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter:
> http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in:
> http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
>



-- 

*Tharik Kanaka*

WSO2, Inc | lean . enterprise . middleware

Email: tha...@wso2.com | Web: www.wso2.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to