Commit Graph

2894 Commits

Author SHA1 Message Date
Maxime Beauchemin 59cabe7d8f
[explore] set control default for *showminmax = false (#4766)
Let's make the defaults less crowded on the axes by not showing the min
and max values on the axes (bounds)
2018-04-06 15:46:38 -07:00
DAOReady 92230b8535 Add context to templates / respect slice timeout (#4673)
* added context to templates to be able to use filters in SQL

* respect slice timeout in favor of others

* added trailing comma
2018-04-05 09:58:11 -07:00
John Bodley df4ff05441
[druid] Excluding refreshing verbose name (#4761) 2018-04-04 17:16:53 -07:00
Maxime Beauchemin 68999b1407
[deck_multi] fixing issues with deck_multi (#4754)
* [deck_multi] fixing issues with deck_multi

* removing eslint comment
2018-04-04 16:52:14 -07:00
Maxime Beauchemin adda30bf66
Set longer CSRF token duration (one week) (#4741)
Default is one hour (3600), also this entry makes the setting a bit more
discoverable
http://flask-wtf.readthedocs.io/en/stable/config.html?highlight=csrf
2018-04-04 15:55:32 -07:00
Maxime Beauchemin 3b7e0a951a
[sql lab] preserve schema through visualize flow (#4742)
* [sql lab] preserve schema through visualize flow

https://github.com/apache/incubator-superset/pull/4696 got tangled
into refactoring views out of views/core.py and onto views/sql_lab.py

This is the same PR without the refactoring.

* Fix lint
2018-04-04 13:38:37 -07:00
fabianmenges 9a79d33e0d [BUGFIX]: JavaScripts max int is 2^53 - 1, longs are bigger (#4005)
* [BUGFIX]: Java scripts max int is 2^53 - 1 longs are bigger and frequently used as IDs this is a hacky fix.

* Keep tuple as tuple
2018-04-04 00:36:23 -07:00
Prashant 7a497e2f6b [sql_lab]Disabled run query button if sql query editor is empty (#4728)
* Disabled run query button if sql query editor is empty

* Removing unnecessary white space

* Fix failing test for sql props

* Adding sql variable into propTypes and defaultProps
2018-04-03 14:58:23 -07:00
Maxime Beauchemin f6fe11f76e
[bugfix] convert metrics to numeric in dataframe (#4726)
* [bugfix] convert metrics to numeric in dataframe

It appears sometimes the dbapi driver and pandas's read_sql fail at
returning the proper numeric types for metrics and they show up as
`object` in the dataframe. This results in "No numeric types to
aggregate" errors when trying to perform aggregations or pivoting in
pandas.

This PR looks for metrics in dataframes that are typed as "object"
and uses pandas' to_numeric to convert.

* Fix tests

* Remove all iteritems
2018-04-02 21:48:14 -07:00
Kuisong Tong aa4173dc81 Pass timezone to Druid Query granularity (#4648)
superset appends DRUID_TZ info to intervals but not to granularity which causes one day's data return as 2 days. This fix is also pass DRUID_TZ to granularity.
2018-04-02 21:38:46 -07:00
Jeffrey Wang 8be0bde683 [BugFix] Allowing limit ordering by post-aggregation metrics (#4646)
* Allowing limit ordering by post-aggregation metrics

* don't overwrite og dictionaries

* update tests

* python3 compat

* code review comments, add tests, implement it in groupby as well

* python 3 compat for unittest

* more self

* Throw exception when get aggregations is called with postaggs

* Treat adhoc metrics as another aggregation
2018-04-02 21:37:00 -07:00
John Bodley 68bfcefb27 [flask-appbuilder] Bumping version to 1.10.0 (#4603) 2018-04-02 21:35:10 -07:00
Maxime Beauchemin 969ff0ce39
Fix deep equality logic (#4730)
* Fix deepequality logic

Zeroed-in on this while a Deck Scatter Plot chart was prompting for
refresh on-load.

I'm pretty sure using JSON.stringify as a proxy for deep equality is
wrong.

Not sure how to handle yarn.lock changes here. The changes on yarn.lock
are the result of "only" running `yarn add deep-equal`

* Adressing comments
2018-04-02 20:54:57 -07:00
Beto Dealmeida ab7ba20009 Expose metrics to JS (#4654) 2018-04-02 17:48:56 -07:00
Gabe Lyons 1ef856e57a including auto generated avg metrics in druid (#4718) 2018-04-02 16:08:25 -07:00
Gabe Lyons e0f541f486 easier tab closing in sqllab (#4738) 2018-04-02 14:59:08 -07:00
Maxime Beauchemin 11c9e67ebb
[explore] don't prompt to 'Run Query' on viewport change (#4729) 2018-04-02 13:35:51 -07:00
Maxime Beauchemin 221b35f36d
Add '.1%' to number format options (#4720) 2018-04-01 21:13:07 -07:00
Maxime Beauchemin 069d61c53f
[sqllab] fix data grid's instant search function (#4717)
* [sqllab] fix data grid's instant search function

It looks like any non-string type would break the search feature.
of `FilterableTable`

* Addressing comments
2018-03-30 10:22:10 -07:00
John Bodley b3442a7b53
[cli] Deprecating gunicorn/flower dependencies (#4451) 2018-03-30 09:28:16 -07:00
timifasubaa e25535c693 Remove redundant has_access definition in superset (#4689)
* update has_access to has_method_access

* move has_access to sm and rename to has_method_access
2018-03-29 17:54:11 -07:00
John Bodley d49a0e7958 [sqllab] Using app context for Celery task (#4669) 2018-03-29 16:11:23 -07:00
Maxime Beauchemin 29678680ee
Use 3 letters month prefix in default date format (#4693) 2018-03-29 14:41:22 -07:00
Maxime Beauchemin ed9a56b4ab
[sql lab] ctrl-r hotkey should run latest SQL (#4719)
Turns out the SQL would only be committed to the redux store `onBlur`
event to avoid the laggy typing. The delay come from the localStorage
binding that add enough millisecs of delay to feel odd while typing.

I now store the most recent SQL in the local and use that instead.
2018-03-29 14:32:03 -07:00
Maxime Beauchemin 9ee78d16d4
Add missing perms to sql_lab role (#4714)
The SQL Lab related role that is created programmatically is missing
permissions that make SQL Lab functional.
2018-03-29 14:24:11 -07:00
Alagappan f952ec2f06 Remove trailing '/' from Mailing list link in README file (#4709) 2018-03-29 11:12:36 -07:00
Gabe Lyons 68dec24542 [Explore] Streamlined metric definitions for SQLA and Druid (#4663)
* adding streamlined metric editing

* addressing lint issues on new metrics control

* enabling druid
2018-03-28 17:41:29 -07:00
Beto Dealmeida 7e1b6b7363 Rename no_reload (#4703) 2018-03-28 14:44:01 -07:00
michellethomas 485b0c275e Fixing label issue when columnType is null (#4700) 2018-03-27 17:54:24 -07:00
Joe Bordes d8d860facc i18n(es_es) (#4687) 2018-03-27 17:48:42 -07:00
timifasubaa 8dd052de4b [security] Refactor security code into SupersetSecurityManager (#4565)
* move access permissions methods to security manager

* consolidate all security methods into SupersetSecurityManager

* update security method calls

* update calls from tests

* move get_or_create_main_db to utils

* raise if supersetsecuritymanager is not extended

* rename sm to security_manager
2018-03-27 16:46:02 -07:00
Maxime Beauchemin f510956da2
Hotkeys in SQL Lab (#4680)
* Hotkeys

* Making it work in AceEditor

* Addressing comments
2018-03-27 15:54:54 -07:00
Maxime Beauchemin deb211154d
Docs on how to package a release + CHANGELOG for 0.24.0 (#4697)
* Docs on how to package a release + CHANGELOG for 0.24.0

* Addressing comments

* Add pypi perm info
2018-03-27 15:48:57 -07:00
John Bodley f9d85bd2e1
[druid] Updating refresh logic (#4655) 2018-03-26 18:35:43 -07:00
michellethomas 52b925fee8 Fix bug with sorting columns in group by using time shift (#4683) 2018-03-26 10:55:43 -07:00
Maxime Beauchemin 336a1064d6
CRUD hints around SQL expressions (#4645)
* CRUD hints around SQL expressions

* Addressing comment
2018-03-26 09:44:37 -07:00
Ville Brofeldt 4ec82582c6 Preprocess SQL Lab query prior to checking syntax (#4686)
Syntax checking doesn't work if jinja templates haven't been prerendered.
Also remove unreachable return statement. Fixes #4288.
2018-03-26 09:42:33 -07:00
Maxime Beauchemin 097a37a1a1
Fix up the Lyft color scheme (#4684)
Previous color scheme had too few colors, some with light tones
and wasn't hooked up to the array.
2018-03-26 09:33:45 -07:00
Hugh A. Miles II 9abc5c724f Add lyftColor to the game 💯 (#4682)
* add lyftColor to the game 💯

* fix json
2018-03-23 18:02:29 -07:00
timifasubaa 00cab7e107 add yarn lock info to contributing.md (#4679) 2018-03-23 15:31:47 -07:00
Riccardo Magliocchetti 76394d3f8f forms: make csv import parse dates accepts a list of columns (#4639)
Instead of a boolean which has way less chances to work. While
at it add a proper label for the "con" field.

Fixes #4637
2018-03-23 14:16:02 -07:00
timifasubaa f11cde9eb8 add yarn.lock (#4674) 2018-03-23 14:14:00 -07:00
Maxime Beauchemin b24a6fd4b5
Fix setup.py, comma makes download_url a tuple (#4676) 2018-03-23 11:21:19 -07:00
EvelynTurner 73f7f817d3 [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data (#4630)
* Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC

* [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data

* [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data

* Fixed indentation
2018-03-22 23:10:40 -07:00
Alexander T d427f6a322 Update messages.po (#4670) 2018-03-22 17:47:15 -07:00
yanyu b9965230df fix: epoch_s and epoch_ms to date time (#4664) 2018-03-22 08:13:38 -07:00
Beto Dealmeida ec069676fd Better default for MAPBOX_API_KEY (#4660) 2018-03-21 17:13:09 -07:00
Jeffrey Wang 33aa976e3d Cache the query string (#4633)
* Cache the query string

* misc linter
2018-03-21 13:13:36 -07:00
Maxime Beauchemin fc47729233
[sql lab] search to use fist&last name instead of username (#4628)
In our environment username are not readable coming out of oauth, so
we'd rather use first&last when available.
2018-03-19 22:16:17 -07:00
Maxime Beauchemin 1435840e38
Set filter_select_enabled default to True for Druid (#4608) 2018-03-19 22:15:43 -07:00