Commit Graph

127 Commits

Author SHA1 Message Date
Arik Fraimovich
a34269cc7d Change: encrypt data source options. 🔓 (#2970)
* Change: encrypt data source options
* Implement migration
2019-02-17 13:54:19 +02:00
Arik Fraimovich
e8120c5f79 Use None as "not scheduled" default value of a query (#3277)
* Use null as the default scheduled value.

* Don't serialize None to json, so we can use SQL is not null predicate.

* Fix warning about unicode in tests

* Handling empty query.schedule in UI (#3283)

* Add migration to convert empty schedules to null and drop the not null contraint.
2019-01-18 11:30:45 +02:00
Jannis Leidel
44dff83046 Add "Active at" column to user list. (#3026)
* add last_active_at to users page

* Use our JSON encoder as the SQLAlchemy JSON serializer.

* Fixed some inconsistencies in the user query class methods.

* Minor cosmetic fixes.

* Add some make tasks for easier development.

* Add user detail sync system based on Redis backend.

There is a periodic Celery task that updates a new “details” JSONB column in the “user” table with the data from Redis.

Currently this is only used for tracking the date of last activity of a user but can be extended with other user information later.

Updates a few dependencies.

* Normalize a few Flask extension API names.

* Reduce implementation complexity of JSONEncoder.

* Use request_started signal to make sure we have a request context.

Otherwise loading the user based on the request won’t work.

* Fix test that checks if disabled users can login.

This correctly uses a URL path that includes the current organization and checks for the error message.

The previous test seems to have been a red herring.

* Minor cosmetic fixes.

* Remove needs_sync in favor of just deleting things.

* Misc review fixes.

* Ignore line length.

* Split redash.models import several modules.

* Move walrus UTC DateTimeField into redash.models.types.

* Restore distinctly loading dashboards.

* Simplify default values for user details.

* Define __repr__ methods generically.

* Consistently have underscore methods at the top of model methods.

* Fix tests.

* Split redash.models import several modules.

* Update to latest walrus and redis-py.

* Update kombu to 4.2.2 for redis-py 3.x compatibility.

* Remove redis-cli container after running Make task.

* Move buffer condition after datetime/time conditions.

* Update walrus to 0.7.1.

* Refactor some query APIs.

This uses the flask-sqlalchemy helpers consistently and makes more use of mixins.

* Post rebase fixes.

* Use correct kombu version

* Fix migration down revision
2019-01-07 10:30:42 +02:00
Marina Samuel
cdd2259d08 Closes #2396: Add finer-grained scheduling. (#2426)
* Closes #187: Add finer-grained scheduling - backend.

* Closes #2396 - Add finer-grained scheduling - frontend.

* Fix linting issues

* Rename ScheduleDialgo to .jsx
2019-01-06 10:59:50 +02:00
Jannis Leidel
c2429e92d2 Consistently use simplejson to loading and dumping JSON. (#2817)
* Consistently use simplejson to loading and dumping JSON.

This introduces the new functions redash.utils.json_dumps and redash.utils.json_loads and simplifies the custom encoder setup.

UUIDs are now handled by the default encoder, too.

Fixes #2807.

Use string comparison in parse_boolean instead of the (simple)json module.
2018-10-09 15:38:06 +02:00
cclauss
da6d456f6f CircleCI: Flake8 tests passing on Legacy Python and Python 3 (#2881) 2018-10-05 13:48:01 +03:00
Arik Fraimovich
5e35156d22 Handle duplicate favorite calls. 2018-07-11 16:35:48 +03:00
Arik Fraimovich
93dffa0c8a Merge with upstream 2018-06-06 15:28:15 +03:00
Arik Fraimovich
deceaa8888 Fix migrations order 2018-06-06 14:59:04 +03:00
Arik Fraimovich
3835a8286c Simpler data model for tags. 2018-06-06 14:43:23 +03:00
Arik Fraimovich
a4f61df3fb Fixed add dashboard tags migration 2018-06-06 14:43:23 +03:00
Arik Fraimovich
0d764caafe Proper tags models 2018-06-06 14:43:23 +03:00
Arik Fraimovich
9feb7773ce add org_id to favorites 2018-06-06 14:43:06 +03:00
Arik Fraimovich
aa756b2be6 Almost complete implementation of favorties backend 2018-06-06 14:41:13 +03:00
Levko Kravets
d40aa09bcf getredash/redash#2375 Admin should be able to disable a user 2018-05-28 14:04:08 +03:00
Arik Fraimovich
acc27f0579 Change migration to be safe to run along with other migrations 2018-05-14 22:02:10 +03:00
Arik Fraimovich
0060c8a54f Simpler data model for tags. 2018-05-10 18:58:58 +03:00
Arik Fraimovich
b1ffcbad79 Fixed add dashboard tags migration 2018-05-10 18:07:40 +03:00
Arik Fraimovich
08611c009c Proper tags models 2018-05-10 18:00:54 +03:00
Arik Fraimovich
28a08526e3 add org_id to favorites 2018-05-10 12:51:11 +03:00
Arik Fraimovich
66737f0dc0 Almost complete implementation of favorties backend 2018-05-09 21:42:50 +03:00
Arik Fraimovich
33b4c7c4c3 Move widget position logic migration to the backend and remove some unused code.
Closes #2218.
2018-02-01 14:40:40 +02:00
Jannis Leidel
9f6b4fbdf2 Add full text search for queries based on the Postgres tsvector type. 2018-01-08 22:46:53 +01:00
Katsuhiko YOSHIDA
62e5e38926 Rename profile image url column and method 2017-12-06 09:16:24 +09:00
Katsuhiko YOSHIDA
4a58b9e944 Add image url as a User field 2017-12-06 09:16:24 +09:00
cclauss
01e85f218a Modernize Python 2 code to get ready for Python 3 2017-10-04 02:06:53 +02:00
Allen Short
2407b115e4 Exponential backoff for failing queries 2017-02-22 10:29:08 -06:00
Arik Fraimovich
106c743647 Keep same logging format in ALembic 2016-12-08 15:36:08 +02:00
Arik Fraimovich
12cbfe1af4 Stamp database on first creation 2016-12-08 15:35:54 +02:00
Arik Fraimovich
3cce4d0ce4 Add warning script to migrations folder 2016-12-08 14:59:21 +02:00
Arik Fraimovich
923c463e4a Add migration for the is_draft column 2016-12-07 18:33:52 +02:00
Arik Fraimovich
70d545410d Add Flask-Migrate to the project
Also moved old migrations to old_migrations folder (before deleting them entirely).
2016-12-07 17:59:01 +02:00
Allen Short
65a6385380 Make draft status for queries and dashboards toggleable. 2016-11-02 12:31:33 -05:00
Arik Fraimovich
b748eb14f4 "Simplify" migration code 2016-10-24 12:35:52 +03:00
Waldemar Hummer
60a79cbe08 address code review comments 2016-10-24 12:33:29 +03:00
Waldemar Hummer
903ba0c1e0 add backend API and tests for managing access permissions. 2016-10-24 12:33:29 +03:00
Arik Fraimovich
4d47583a94 Fix: Redis memory leak.
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.
2016-10-08 10:59:52 +03:00
Arik Fraimovich
a8fa68a563 Change: remove deprecated settings 2016-10-05 17:15:46 +03:00
Arik Fraimovich
5096e4ed79 Change: paginate query page & add explicit urls.
- 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).
2016-10-05 14:14:26 +03:00
Arik Fraimovich
ba30577601 Rename 0025_add_notification_destination.py to 0025_add_query_snippets_table.py 2016-08-23 23:06:36 +03:00
Arik Fraimovich
10f5ecdb00 Add: query snippets feature 2016-08-22 23:58:00 +03:00
Arik Fraimovich
ae9e295d2f Fix #1165: don't use hard coded org/user. 2016-07-03 13:26:54 +03:00
Arik Fraimovich
c2e3637dce Feature: UI for query parameters
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.
2016-06-14 10:09:16 +03:00
Arik Fraimovich
ceaa00e448 Fix HipChat base URL 2016-06-08 16:09:06 +03:00
Arik Fraimovich
679b0a3125 Switch to HipChat V2. 2016-06-08 16:04:28 +03:00
Arik Fraimovich
aa837ed09b Update for new design 2016-05-07 22:20:06 +03:00
Arik Fraimovich
e069374232 Merge w/ latest master 2016-05-07 17:49:49 +03:00
Arik Fraimovich
dd836d909d Migration to make sure the default group has correct type 2016-03-27 10:29:26 +03:00
Arik Fraimovich
6cff6e833a Fix permissions migration 2016-03-27 10:26:09 +03:00
Alex DeBrie
601010e44e Remove email destination from AlertSubscription migration 2016-03-23 20:57:19 +00:00