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

Change data fetch for OFC2 widgets #997

Closed
robocoder opened this issue Sep 29, 2009 · 6 comments
Closed

Change data fetch for OFC2 widgets #997

robocoder opened this issue Sep 29, 2009 · 6 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@robocoder
Copy link
Contributor

Currently, we pass a URL (data parameter) to the OFC2 charts pointing to a data feed.

Proposal:

  • use AJAX to retrieve the data and then pass the data to the Flash object via its load() method

Benefits:

  • increase browser responsiveness when changing date or site; some users report the browser stalls while loading data
  • better handle an invalid session, e.g., where user no longer logged in; see Piwik UI fails miserably when reloading after logged out #975
  • decouples data feed retrieval from the flash object; potentially allows for non-flash, client-side charts to re-use the ofc data feed
  • could be extended to make a single request to the server for all the data feeds on that page
@mattab
Copy link
Member

mattab commented Sep 29, 2009

I would even suggest that, instead of using an ajax request, we could directly load the graph JSON data in the HTML calling the flash, and set this data to the graph object. This means that, to show the graph, you would just need one http request to request widget+graph data, + one request to fetch the SWF file if not already in cache.

@robocoder
Copy link
Contributor Author

In [1541], refs #997 - set content-type to application/json for OFC data feed

@robocoder
Copy link
Contributor Author

ToDo:

  • fix Widgetize (needs the data URL for embedding OBJECTs)
  • replace sendHttpRequest() with ... ???

@robocoder
Copy link
Contributor Author

Attachment: updated patch
997.patch

@robocoder
Copy link
Contributor Author

In [1543]:

related changes:

  • data-file (Flash parameter) renamed to x-data-file; this is used by Widgetize to provide the code to embed Flash OBJECTs
  • add translation strings for Flash detection
  • move some translation strings to JavaScript and enhance getJavascriptTranslations() to always generate 'General' translation strings

@robocoder
Copy link
Contributor Author

In [1575], refs #997 - reorder params slightly

In [1574], refs #997 - add config option; allow users to revert to previous behavior

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants