Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating data inside the widgets #45

Open
kedwards opened this issue Sep 17, 2019 · 3 comments
Open

Updating data inside the widgets #45

kedwards opened this issue Sep 17, 2019 · 3 comments

Comments

@kedwards
Copy link
Contributor

Is there any additional documentation for updating widget data. I have been using the json data source and querying a middle-ware API, the middle-ware is connecting to a WebSocket to get information when available.

I cannot seem to use the API to update the widget data, any help would be appreciated!

@baumandm
Copy link
Collaborator

I'm not sure if I understand your question entirely. If you create a Data Source with refresh configured and and a Widget using that Data Source, it should automatically update the Widget each time the Data Source loads new data.

This is a polling approach requiring the JSON Data Source to periodically re-query your API. There isn't a generic web socket Data Source available currently.

Does that help?

@kedwards
Copy link
Contributor Author

A little, let me rephrase:

I am using the JSON data source and cyclotron is querying and updating just fine.. but how can I update the widget with a push via the API

@baumandm
Copy link
Collaborator

Ah so that's not currently built-in. It would be feasible to create a new WebSocket Data Source or use the JavaScript Data Source to connect to an endpoint and listen for events, but I don't have any examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants