Commit Graph

68 Commits

Author SHA1 Message Date
vera-liu 45efcb381c Added time filter to query search page (#1329)
* Added time filter to query search page

* Added start date

* Updated python endpoint test

* changed spec

* Added specs and tests

* Modified python/js tests and some function/file names
based on code review comments

* Resolved conflicts in DashboardSelect_spec and QuerySearch_spec

* Break python tests for separate functions, Move sql queries to setUp()

* Get around eslint error for spec

* Small changes based on comments
2016-10-28 14:12:53 -07:00
Maxime Beauchemin 5944643da6 [sqllab] add support for Jinja templating (#1426)
* [sqllab] add support for Jinja templating

* Adressing comments

* Presto macros

* Progress

* Addressing coments
2016-10-26 11:09:27 -07:00
Maxime Beauchemin c255e89219 [sqllab] show partition metadata for Presto (#1342) 2016-10-19 09:17:08 -07:00
Maxime Beauchemin ef2670ca32 Using inheritance scheme to organize db specific code (#1294)
* Using inheritance scheme to organize db specific code

* Addressing comments
2016-10-12 13:50:47 -07:00
Bogdan 73cd2ea3b1 Import / export of the dashboards. (#1197)
* Implement import / export dashboard functionality.

* Address comments from discussion.

* Add function descriptions.

* Minor fixes

* Fix tests for python 3.

* Export datasources.

* Implement tables import.

* Json.loads does not support trailing commas.

* Improve alter_dict func

* Resolve comments.

* Refactor tests

* Move params_dict and alter_params to the ImportMixin

* Fix flask menues.
2016-10-11 17:54:40 -07:00
Dennis O'Brien cd2ab42abc do not overwrite the stored password with the masked password (#1209)
* do not over-write the stored password with a masked password.
his addresses issue #1199

* added a test to validate that sending a password-masked sqlalchemy_uri does not over-write the stored sqlalchemy_uri

* requery the database object after the update.
use self.assertEqual for more informative error messages.
2016-10-11 16:49:40 -07:00
Juho Lamminmäki 1e6e144d24 Fixed viewing dashboards as anonymous (#1320) 2016-10-11 08:04:00 -07:00
Maxime Beauchemin f70d301f0d Refactor the explore view (#1252)
* Refactor the explore view

* Fixing the tests

* Addressing comments
2016-10-07 16:24:39 -07:00
Maxime Beauchemin 472679bb38 [security] allow for requesting access when denied on a dashboard view (#1192)
* Request access on dashboard view

* Fixing the unit tests

* Refactored much in the tests
2016-10-02 18:03:19 -07:00
Bogdan 9c83b900ae Bring DB in sync with the models.py (#1172)
* Bring DB in sync with the models.py

* Make sure that migrations run on multiple dbs
2016-09-28 13:55:06 -07:00
vera-liu 5f6ef84c4e Vliu query search (#1187)
* Query search page under SQL Lab tab

* Modifications based on comments

* Hash

* Added spec and endpoint test with modifications
based on second round comments

* Changed permission menu in https://github.com/airbnb/caravel/pull/1095/files
2016-09-23 17:41:24 -07:00
vera-liu 551c97112c Revert "Query Search Page" (#1186) 2016-09-23 16:28:21 -07:00
vera-liu d5c5c0d6ac Query Search Page (#1122)
* Query search page under SQL Lab tab

* Modifications based on comments

* Hash

* Added spec and endpoint test with modifications
based on second round comments

* Changed permission menu in https://github.com/airbnb/caravel/pull/1095/files
2016-09-23 16:13:18 -07:00
Maxime Beauchemin fc921d63a1 Simplifying source_registry (#1180) 2016-09-22 21:19:03 -07:00
Bogdan cbc70d3738 Implement permission request/approve flow. (#1095)
* Implement permission request/approve flow

* Address the comments.

* Refactor the code to support multiple datasources.

* Reformat the queries.
2016-09-22 09:53:14 -07:00
ShengyaoQian 5a0e06e7a2 Generalize switch between different datasources (#1078)
* Generalize switch between different datasources.

* Fix previous migration since slice model changed

* Fix warm up cache and other small stuff

* Adding modules and datasources through config

* Replace tabs w/ spaces

* Fix other style issues

* Change add method for SliceModelView to pick the first non-empty ds

* Remove tests on slice add redirect

* Change way of db migration

* Fix styling

* Fix create slice

* Small fixes

* Fix code climate check

* Adding notes on how to create new datasource in CONTRIBUTING.md

* Fix last merge

* A commit just to trigger travis build again

* Add migration to merge two heads

* Fix codeclimate

* Simplify source_registry

* Fix codeclimate

* Remove all getter methods
2016-09-21 09:52:05 -07:00
Dennis O'Brien ca66ba4893 Fix initialization of Database sqlalchemy_uri and password (#1137)
* move initialization of Database sqlalchemy_uri and password from DatabaseView.pre_add to utils.get_or_create_main_db.
Unit tests for mysql and postgres include username and password in the SQLALCHEMY_DATABASE_URI.

* modified test_testconn to work with sqlalchemy uri with a username and password.
2016-09-19 15:14:00 -07:00
Riccardo Magliocchetti afa1f0916b Make sql test connection work with saved Database instance (#694)
Fix #596
2016-09-17 12:32:41 -07:00
Bogdan a871ee7858 Clean up the druid sync api. (#1101) 2016-09-13 17:30:36 -07:00
vera-liu 1f761c61dd Single quote filter values with comma (#1084)
* Single quote filter values with comma

* refactor for codeclimate limite

* Added unit tests and tooltip
2016-09-12 13:41:05 -07:00
Maxime Beauchemin 1971bf653c Numerous improvements to SQL Lab (#1088)
* Improving the Visualize flow

* Fixed the timer

* CTAS

* Expiclit engine handling

* make tab full height, stretch for longer content (#1081)

* Better error handling for queries

* Hooked and fixed CSV export

* Linting

* Tying in the dttm in the viz flow

* Indicator showing when going offline

* Addressing comments, fixing the build

* Fixing unit tests
2016-09-11 07:39:07 -07:00
Bogdan c20ee0c129 Filter Druid Datasources by user permissions. (#1090) 2016-09-09 17:12:09 -07:00
Bogdan d454fb402b Add refresh druid datasources endpoint. (#1065) 2016-09-07 17:27:35 -07:00
Bogdan e783219a76 Add cache warmup endpoint (#1063)
* Refactor permissions in the views.py.

* Add get_viz to the slice.

* Add warm up cache endpoint.

* Resolve comments.
2016-09-06 13:58:09 -07:00
Chris Williams bae21194c1 Chris/remove redirect from slice id endpoint (#1044)
* call explore() directly from '/caravel/slice/id/' endpoint instead of redirecting to it.

* pass slice_id instead of slice_params in 'caravel/slice/id/' endpoint to avoid logging errors. add fix for MultiDict bug

* address max's comments

* remove the /slice/id/ endpoint in preference of /datasource_type/datasource_id/slice_id/

* pep8
2016-08-31 16:45:03 -07:00
Maxime Beauchemin 38b8db8051 SQL Lab - A multi-tab SQL editor (#514)
* Carapal react mockup

This is really just a mock up written in React to try different
components. It could become scaffolding to build a prototype, or not.

* Merging in Alanna's theme tweaks for SQL lab

* Tweak the display of the alert message in navbar

* Sketching the middleware refresh for Queries

* Adjustments

* Implement timer sync.

* CTAS

* Refactor the queries to be stored as a dict. (#994)

* Download csv endpoint. (#992)

* CSV download engdpoint.

* Use lower case booleans.

* Replcate loop with the object lookup by key.

* First changes for the sync

* Address comments

* Fix query deletions. Update only the queries from the store.

* Sync queries using tmp_id.

* simplify

* Fix the tests in the carapal. (#1023)

* Sync queries using tmp_id.

* Fix the unit tests

* Bux fixes. Pass 2.

* Tweakin' & linting

* Adding alpha label to the SQL LAb navbar entry

* Fixing the python unit tests
2016-08-29 21:55:31 -07:00
Chris Williams 2bfb9cc7dd pass the `standalone` request arg in the /caravel/slices/<slice_id>/ endpoint redirect (#876)
* pass the  request arg in the /caravel/slices/<slice_id>/ endpoint.

remove unused import.

* test that a single slice redirects rather than testing them all. update standalone redirect logic for Javascript 'false' instead of Python False
2016-08-10 23:11:53 -07:00
Bogdan d6bb8c6935 Add per database permissions for the SQL Lab. (#885) 2016-08-09 17:53:23 -07:00
Riccardo Magliocchetti e7ce38b486 Smarter redirect on slice creation (#691)
After ea8a7ec1ba creating a slice
started redirecting to druid datasource from sqlalchemy tables.
That's quite painful for sqlalchemy tables users.
Instead of hardcoding a choice just query the db, if we don't
have any druid datasource fallback to sqlalchemy tables.
Bonus points we remove hacky javascript and make the message
translatable.

While at it fix druid client test to not hardcode datasource id.
2016-08-01 23:06:19 -07:00
Maxime Beauchemin ee9141a31a New endpoint that receives SQL and returns data as JSON (#842)
* New endpoint that receives SQL and returns data as JSON

* Addressing comments
2016-07-29 22:39:33 -07:00
George Ke 04f3e3bc8f "Add Slices" modal on dashboard page (#678)
* Add slice modal

* use datatables, filter by slice creator

* tests & landscaping

* code review + react-bootstrap-table + modularity
2016-07-07 21:40:33 -07:00
Maxime Beauchemin 917bc984eb Make DruidDatasource.version_higher support funky version strings (#706) 2016-07-01 14:44:25 -07:00
kkalyan 30da408ace Druid Intervals Issues prevents metadata pull (#526)
* Druid Intervals Issues

* fetching druid version

* fixes

* space

* version fix

* landscape issues
2016-06-21 10:03:56 -07:00
x4base 13095eb550 Show right messages as soon as possible (#632)
* Flashed messaged should be flushed in every page

* Show error messages in AJAX style

* Introduce the decorator "api"

* Move toggleCheckbox() to the right place and trigger it in jQuery style
2016-06-21 09:42:54 -07:00
Chris Williams 668ede1133 expose /slice/<slice_id>/ endpoint to redirect to a slice's url (#633)
* expose /slice/<slice_id>/ endpoint to redirect to a slice's url

* remove residual print statement

* add unit test for caravel/slices/id endpoint
2016-06-20 09:18:03 -07:00
Maxime Beauchemin fa13b77cfa Adding postgres to the build matrix (#604) 2016-06-12 11:01:16 -07:00
Maxime Beauchemin c490138afe Fixing json issues (#602) 2016-06-11 20:39:25 -07:00
Maxime Beauchemin 55baab413a [hotfix] fixing the build (#594) 2016-06-09 22:58:20 -07:00
Maxime Beauchemin 2644dd1984 Adding a test for welcome page 2016-06-09 18:11:24 -07:00
Maxime Beauchemin 60ed3e4050 TOX / Travis build matrix (#593)
* Building on many dbs

* Fixing some translation related error msg
2016-06-09 18:05:58 -07:00
Maxime Beauchemin 3ee9a68c09 Only owners can update their objects (#507) 2016-06-02 19:17:34 -07:00
Maxime Beauchemin 57990bfd83 Implementing druid's regex filters (#501)
* Implementing druid's regex filters

* Debugging

* Debuggin'
2016-05-23 13:06:35 -07:00
Andrii Sydorchuk 8a406b18f5 Add PUBLIC_ROLE_LIKE_GAMMA config flag (#473) 2016-05-16 21:24:43 -07:00
andrewhn 6941f1de64 add unicode data to tests (#432)
* add unicode data to tests

* make tests pass on 2.7

* clean up data loading

- remove duplicate keys in slice_data
- reduce line length

* change manager option flag to -t, --load-test-data

* test --> load_test_data
2016-05-05 08:46:16 -07:00
Andrii Sydorchuk 0bedaed367 Make sure anonymous user with proper permissions can access data (#415)
* Make sure anonymous user with proper permissions can access data

* Review fixes: naming changes

* Review fixes: add more granular tests for public user dashboard access

* Review fixes: test that public user has access only to permitted data sets
2016-05-03 22:31:37 -07:00
Maxime Beauchemin 26d273643b Allowing for druid post aggregations (#418)
* Druid post aggregations

* Fixing tests
2016-05-02 10:00:39 -07:00
Maxime Beauchemin 0ca3f5ec80 Improving SQLA query generation (#421)
* Improving SQLA query generation

* Fixing debug
2016-05-02 10:00:28 -07:00
Maxime Beauchemin b634d03ac3 Show only Slices and Dashboards users have access to (#404)
* Introducing more security features

* Many to many owners for slices and dashboards
* Slices are filtered to only slices that the user has access to

* Adding unit tests
2016-04-26 16:44:51 -07:00
Maxime Beauchemin 7d90f26554 Fixing #388 (#391) 2016-04-21 21:10:09 -07:00
Maxime Beauchemin f1e10d8d25 One more Druid test (#387) 2016-04-21 08:17:15 -07:00