Commit Graph

116 Commits

Author SHA1 Message Date
vera-liu 6732f01cb7 Enable freeform-select with fetched column values for filter values (#1697)
* Enable freeform-select with fetched column values for filter values
 - db migration to add filter_select_enabled
 - add freeform-multi option for Selectfield
 - modify formatFilter() function on query to accomodate filter-select

* Fix js tests

* Fix codeclimate issue

* Changes based on comments

* Add test for filter endpoint

* Extract out renderFilterFormField function from render

* Fix landscape issues
2016-12-16 14:23:48 -08:00
Bogdan 92aa1a6124 Permissions refactoring, optimizations and unit testing. (#1798)
* Refactor and speed up superset init

* Add unit tests.

* Test fixes.

* More test updates.

* Fix read only perms

* Address comments.
2016-12-15 08:38:34 -05:00
vera-liu e1e20b8757 Sort searched queries by recency (#1735)
* Sort searched queries by recency

* Fixed sqllab tests

* Add one more tr to QueryTable spec for pagination

* Change desc to asc as we reverse queries in component
2016-12-14 10:14:54 -08:00
Maxime Beauchemin e099088012 [hotfix] fixing the build 2016-12-13 16:05:05 -08:00
Alanna Scott 34e107e7d3 [explore-v2] add config option for explore v2 beta users, and send through v2 path (#1671)
* add config option for explore v2 beta users, and send through v2 path

* fix long lines

* use role rather than user ids in config

* add test

* simplify role check

* remove extra  line

* use different test user for v2 tests
2016-12-12 16:42:38 -08:00
vera-liu 9f7486f402 remove extra call to get_viz in explorev2 (#1812)
* Not working errors

* Remove update_explore endpoint, only update explore endpoints in reducer on query

* Change scroll to auto and make container reponse to height:

* Remove update_explore endpoint

* Remove can_update_explore perm
2016-12-12 10:58:07 -08:00
Bogdan 3597fdb7f8 Filter table list based on the user permissions. (#1769)
* Filter table list based on the user permissions.

* Fix tests
2016-12-06 02:18:16 -05:00
Bogdan 69702e3a19 Create users if not found. (#1753)
* Create users if not found.

* Do not fail is user is a duplicate.

* Make endpoint faster.
2016-12-05 20:03:40 -05:00
Bogdan 9d4c3d83d0 Update role based on usernames not emails. (#1749) 2016-12-02 16:30:21 -05:00
Maxime Beauchemin 324205f77a [sqllab] bugfix where a query has the same alias twice as output (#1734) 2016-12-01 19:53:23 -08:00
Maxime Beauchemin 7eef46e941 Adding links pointing to the new user profile page (#1704)
* Adding links pointing to the new user profile page

* Raising coverage

* Fixing tests
2016-12-01 15:21:18 -08:00
Benjamin Yolken 50da4f8c07 Support running superset via pex (#1713)
* Support running superset via pex

* [superset] Update default port in superset/bin/superset

* Fix codeclimate line length issues

* Fix another line length issue, in config.py

* Add trivial utils test to increase test coverage

* Clean up runserver handling
2016-12-01 15:18:55 -08:00
Bogdan e822d5a1b7 Make edit / add / delete perms available to all users. (#1722)
* Make edit / add / delete perms available to all users.

* Add tests and restrict from editing the datasources.
2016-11-30 17:05:09 -05:00
Bogdan dc98c6739f Implement table name extraction. (#1598)
* Implement table name extraction tests.

* Address comments.

* Fix tests and reimplement the token processing.

* Exclude aliases.

* Clean up print statements and code.

* Reverse select test.

* Fix failing test.

* Test JOINs

* refactore as a class

* Check for permissions in SQL Lab.

* Implement permissions check for the datasources in sql_lab

* Address comments.
2016-11-29 15:43:36 -05:00
the-dcruz 84e8f741ae Add 'Save As' feature for dashboards (#1669)
* Add 'Save As' feature for dashboards

* Address code review comments
2016-11-28 08:34:14 -08:00
vera-liu 39ce4aa049 Added filter in ControlPanelsContainer for explore V2 (#1647)
* Added filter in ControlPanelsContainer

* Move function for getting url params object to utils

* Fixed python test

* Move Filter to separate component

* Added specs and made changes based on comments

* Moved specs to right folder
2016-11-23 09:51:19 -08:00
Bogdan c90dd4902f Programatically sync the role with user list. (#1619) 2016-11-21 13:06:43 -05:00
Maxime Beauchemin 7e1852ee88 User profile pages (favorites, created content, recent activity, security & access) (#1615)
* Super

* User profile page

* Fixing python style

* Python unit tests

* Touchups and js tests

* Addressing comments
2016-11-19 21:23:44 -08:00
Bogdan 1624e7de7d Add all_tables endpoint to allow airpal / superset perm sync. (#1614) 2016-11-18 20:14:26 -05:00
vera-liu d5ef937b31 Fixed bugs with viz in exploreV2 (#1609)
* Fixed bugs with viz in exploreV2

Done:
 - fix typo in pie viz
 - add metrics/groupby to dist_bar viz
 - fix typo in heatmap viz
 - add big_number_total to viz
 - fixed problem with fetching columns for datasource
 - add sqlaTimeSeries to viz
 - change row_limit and limit from number to strings so that we
 don't need to parse integers in bootstrap data

* Fix python tests

* Added order_bars checkbox for dist_bar viz
2016-11-17 12:31:36 -08:00
Maxime Beauchemin bce02e3f51 [security] improving the security scheme (#1587)
* [security] improving the security scheme

* Addressing comments

* improving docs

* Creating security module to organize things

* Moving CLI to its own module

* perms

* Materializung perms

* progrss

* Addressing comments, linting
2016-11-17 11:58:33 -08:00
vera-liu 83d08b8b8f Get query button working in explorev2 (#1581)
* Get query buttonw working in explorev2

 - Create new endpoint for updating explore viz
 - Send over new form_data when query button is pressed

* Added endpoint test

* Changes based on comments

* Added docstring for endpoint, and query spec

* Remove white space around docstring
2016-11-16 13:21:53 -08:00
Maxime Beauchemin 15b67b2c6c [WiP] rename project from Caravel to Superset (#1576)
* Change in files

* Renamin files and folders

* cleaning up a single piece of lint

* Removing boat picture from docs

* add superset word mark

* Update rename note in docs

* Fixing images

* Pinning datatables

* Fixing issues with mapbox-gl

* Forgot to rename one file

* Linting

* v0.13.0

* adding pyyaml to dev-reqs
2016-11-09 23:08:22 -08:00
Alanna Scott 51c0470f0b [explore v2] populate dynamic select field options (#1543)
* pass field options in viz json

* move field options to fetch_datasource_metadata

* on control panels container mount, fetch datasource meta data and set dynamic field choices

* render options for select fields

* use component class rather than sic

* fix linting

* fix whitespace

* delete unused var

* only render fields once datasource meta has returned

* fix typo

* add datasources and fix column formatting

* fix tests

* never used function

* fix tests

* add test for fetch_datasource_metadata

* remove unneeded props
2016-11-08 15:55:49 -08:00
Maxime Beauchemin e4bd1884d3 [druid] adding support for dimensionspecs (#1545)
More about it here:
http://druid.io/docs/latest/querying/dimensionspecs.html

fixes https://github.com/airbnb/caravel/issues/1086
2016-11-07 17:05:41 -08:00
Maxime Beauchemin 1d7d5469a9 [hotfix] remove failing Druid test 2016-11-04 09:47:02 -07:00
Bogdan ae46561648 Support week_ending_saturday for Druid. (#1491)
* Support week_ending_saturday for Druid.

* Use period granularity

* Use ISO 8601 for period definitions.

* Fix tests

* More flexibility for the freeform choices.
2016-11-02 18:45:10 -07:00
Maxime Beauchemin 1700a807e9 [sqllab] templating refactor (#1504)
* Add support for jinja templates in WHERE/HAVING clauses

* Generalizing

* bugfix
2016-11-02 13:22:07 -07:00
Maxime Beauchemin 1b124bfb87 [druid] optimize Druid queries where possible (#1517)
* [druid] optimize Druid queries where possible

Trying to use timeseries, topn where possible, falling back on 2-phases
groupby only where needed

* Fixing py3 bug
2016-11-02 11:25:33 -07:00
vera-liu a13bed2db6 Moved sqllab tests from core_tests to sqllab_tests (#1502)
* Moved sqllab tests from core_tests to sqllab_tests

* Minor changes based on comments
2016-11-01 20:48:31 -07:00
Maxime Beauchemin 61509bbd44 [sqllab] surfacing more table metadata (indices, pk, fks) (#1485)
* Expose more table/column metadata

* [sqllab] expose more table metadata

* more tests
2016-10-31 23:52:37 -07:00
Ron Baker 518fbf562c Minor Fixes (#1484)
* Fix typo accomodate

* Fix typo calender

* Fix typo dimentions
2016-10-30 16:55:56 -07:00
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
Bogdan 7c5933732b Filter immune slices array stores strings. (#1402) 2016-10-25 11:08:08 -07:00
Maxime Beauchemin 63161b11c3 [sqllab] proper, quoted, select * on the server side (#1404)
* [sqllab] proper, quoted, select * on the server side

* fixing tests
2016-10-21 16:55:37 -07:00
Bogdan 4f886d65ec Fix None view_menues in permissions. (#1409) 2016-10-21 16:09:51 -07:00
Bogdan 5c3966a32d Override the role with perms for given datasources. (#1399)
* Override the role with perms for give datasources.

* Address comments.
2016-10-20 15:30:09 -07:00
Bogdan c198535292 Change slice ids in the position json during dashboard import. (#1380)
* Change slice ids in the position json during dashboard import.

* Update slice ids in the dashboard json metadata.
2016-10-20 09:17:51 -07:00
Maxime Beauchemin c255e89219 [sqllab] show partition metadata for Presto (#1342) 2016-10-19 09:17:08 -07:00
Bogdan f0f8478922 Revert "Override the role with perms for give datasources." (#1345) 2016-10-13 19:21:21 -07:00
Bogdan 40e7057bce Override the role with perms for give datasources. (#1335)
* Override the role with perms for give datasources.

* Address comments.
2016-10-13 18:18:03 -07:00
Bogdan 11a8e3591d Some dashboard import/export fixes. (#1340) 2016-10-13 14:36:39 -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
vera-liu aa5bbe6149 Fixed error of inserializable json for druid test (#1213)
* Fixed error of inserializable json for druid test

* Fixed indentation
2016-09-29 09:12:43 -07:00