We were appending new QueryTaskTracker ids to query_task_trackers sorted set
but we were never removing them...
Also removed the migration to create index on org_id as it created by default
by Peewee for foreign keys.
- Paginate the queries API result.
- Split the API to /api/queries (all queries) and /api/queries/my which returns
a user's queries (or drafts).
- In the interface have explicit URLs for all queries (/queries), my queries (/queries/my)
and drafts (/queries/drafts).
This pull request implements UI for parameters and also allows to set the default value and type of a parameter.
(Closes#583)
Other changes in this pull request:
- Loading/error state for dashboard widgets.
- Refresh button on dashboard widgets (Closes#810).
- Maintain sync between query/dashboard URL and current parameters, and preserve them when navigating.
- Removed Pivot Table tab.
To avoid complications with how Google Auth works, when enabling organization
multi-tenancy on a single instance, each organization becomes a "sub folder"
instead of a sub-domain.
This is one huge change for the permissions system and related:
* (Backward incompatible:) Remove the table based permissions in favour of the new model.
* Manage permission to view or query datasources based on groups.
* Add the concept of Organization. It's irrelevant for most deployments, but allows for
multi-tenant support in re:dash.
* Replace ActivityLog with Event based rows (old data in activity_log table is retained).
* Enforce permissions on the server-side. There were some permissions that were only enforced
on the client side. This is no more. All permissions are enforced by the server.
* Added new permission: 'super-admin' to access the status and Flask-Admin interface.
* Make sure that html is never cached by the browser - this is to make sure that the browser
will always ask for the new Javascript/CSS resources (if such are available).