django-sql-dashboard
django-sql-dashboard copied to clipboard
Auto-refreshing cells
Since a cell has a SQL query, and is tied to a server-side template, it wouldn't be too hard to provide a mechanism whereby the cell periodically polls the server to refresh itself.
I think I'd keep this off by default.
This could work by JavaScript adding a "refresh every 10s / 60s / 5m" UI widget to each cell - when selected, every x seconds a POST request is made back to the server with just the SQL for that cell (or maybe the cell reference if it's a saved dashboard - support this just for saved dashboards may be easier).
The backend knows how to return the rendered widget template for just this one item, which can then be innerHTML
updated on the page.