Compare commits

..

116 Commits

Author SHA1 Message Date
Maxime Beauchemin
c08f4eaee1 0.29.0rc3 2018-11-10 12:39:44 -08:00
Maxime Beauchemin
1d74f308ee Merge branch 'master' into 0.29 2018-11-10 12:39:02 -08:00
Krist Wongsuphasawat
3ffb48c492 [reviewable] Organize d3 utilities usage (#6287)
* update package.json

* extract changes from another PR

* add d3 prefix

* two more places

* update lockfile
2018-11-09 11:42:54 -08:00
Chris Williams
8bf9a5b9a3 [dashboard] fix save/save-as flow (#6350)
* [dashboard] fix save/save-as flow

* [bugfix][dashboard] consistent response type for save/save-as
2018-11-09 11:15:42 -08:00
Krist Wongsuphasawat
5a3773223d change to camelcase (#6354) 2018-11-09 11:06:30 -08:00
Brayan Arrieta
04865f0280 Update docker-entrypoint.sh (#6346)
Previously in the issue #6289 change the port for docker, but the port must be changed also in the entrypoint for docker
2018-11-08 23:08:05 -08:00
Chris Williams
62dcce890c [bugfix] don't parse save dashboard response (#6349)
* [bugfix] don't parse save dashboard response

* [dashboard] remove bracket in error message
2018-11-08 19:27:22 -08:00
Krist Wongsuphasawat
3d7752600b [reviewable] [refactor] Split visTypes into one file for each visualization type (#6290)
* extract two files

* pass linting

* rename variables

* rename file

* fix lint

* Rename controlPanelConfigs.js to controlPanels/index.js

* use specific imports
2018-11-08 12:50:39 -08:00
Maxime Beauchemin
60cb608839 0.29.0rc2 2018-11-08 09:39:24 -08:00
Maxime Beauchemin
4934605043 Make stacktraces available in many more cases (#6299)
* Wrap <LoadableRenderer /> with <ErrorBoundary />

It appears that since the introduction of <SuperChart />, errors in the
visualization javascript (which are somewhat common and expected,
especially as we'll support plugins) were not handled and the whole
page would throw and go missing.

Here I'm introducing a new <ErrorBoundary /> component that elegantly
wraps other
components and handles errors. It's inspired by:
https://reactjs.org/docs/error-boundaries.html

The default behavior of the component is to simply surface the error
as an <Alert bsStyle="danger" /> and exposes the React stacktrace
when clicking on the error.

It's also possible to use component and pass an onError handler and not
show the default message.

This also fixes some minor bugs in TimeTable.

* Addressing comments

* Getting more stack traces

* Adressing comments
2018-11-08 09:38:10 -08:00
Antonin Kral
1fcfda4fdc Add Showmax among users (#6308)
Would like to add Showmax as a user of Superset.
2018-11-08 08:13:16 -08:00
Maxime Beauchemin
2607d0a6a0 [fix warning] Warning: Failed prop type: Invalid prop bsSize of value md (#6293) 2018-11-07 23:12:32 -08:00
Irfan Faizullabhoy
70327ca42c Docker Demo, Port Change (#6289)
If you follow the documentation, the current docker instructions return an error when trying to connect via localhost. This seems to be due to the fact that it's running on port 8080, but forwarding port 8088. I suppose the cleaner solution is to do this, as opposed to changing both the compose file and the instructions... Hope this helps!!
2018-11-07 21:28:04 -08:00
Grace Guo
ede5c710ed [annotation] Only allow override whole time_range (#6286) 2018-11-07 19:26:06 -08:00
timifasubaa
77845ab081 add logging to csv upload (#6297) 2018-11-07 18:40:07 -08:00
Christine Chambers
8c0551ed46 [SIP-5] Open a new /api/v1/query endpoint that takes query_obj (#6220)
* [SIP-5] Open a new /api/v1/query endpoint that takes query_obj

- Introduce a new handle_superset_exception decorator to avoid repeating the logic for catching SupersetExceptions
- Create a query_obj_backfill method that takes form_data and constructs a query_obj that will be constructed in the client in the future. Use the backfill in explore_json.
- Create a new /api/v1/query endpoint that takes query_obj only and returns the payload data. Note the query_obj is constructed in the client. The endpoint currently only handles query_obj for table view viz (we'll be adding support to new viz types as we go).
- Unit test to verify the new endpoint for table view

* fix tests and lint errors

* - Move the new query endpoint into its own api.py view.
- Create QueryObject and QueryContext class to encapsulate query_object to be built from the client and additional info (e.g. datasource) needed to get the data payload for a given query
- Remove the query_obj_backfill as we'll start building the first query_object on the client so it no longer makes sense to have a short-lived backfill for the matter of days.

* Fixing lint and test errors

* Fixing additional lint error from the previous rebase.

* fixing additional lint error

* addressing additional pr comments

* Make /query accept a list of queries in the query_context object.

* fixing a lint error

* - Move time_shift based calculation and since, until check into util
- Add typing info for get_since_until
- Add new unit tests to verify time_shift calculation and the since until check
2018-11-07 17:23:52 -08:00
Maxime Beauchemin
4ce475f287 Wrap <LoadableRenderer /> with <ErrorBoundary /> (#6294)
* Wrap <LoadableRenderer /> with <ErrorBoundary />

It appears that since the introduction of <SuperChart />, errors in the
visualization javascript (which are somewhat common and expected,
especially as we'll support plugins) were not handled and the whole
page would throw and go missing.

Here I'm introducing a new <ErrorBoundary /> component that elegantly
wraps other
components and handles errors. It's inspired by:
https://reactjs.org/docs/error-boundaries.html

The default behavior of the component is to simply surface the error
as an <Alert bsStyle="danger" /> and exposes the React stacktrace
when clicking on the error.

It's also possible to use component and pass an onError handler and not
show the default message.

This also fixes some minor bugs in TimeTable.

* Addressing comments
2018-11-07 17:11:52 -08:00
Beto Dealmeida
a57603adb4 Geoviz state management fix (#6260)
* Fix deckgl getPoints

* Fix CSS

* Fix zoom

* Fix CategoricalDeckGLContainer

* Fix cypress
2018-11-07 16:51:22 -08:00
Jeffrey Wang
0584e3629f Add separate limit setting for SqlLab (#4941)
* Add separate limit setting for SqlLab

Use separate param for wrap sql

Get query limit from config

unit tests for limit control rendering in sql editor

py unit test

pg tests

Add max rows limit

Remove concept of infinity, always require defined limits

consistency

Assert on validation errors instead of tooltip

fix unit tests

attempt persist state

pr comments and linting

* load configs in via common param

* default to 1k
2018-11-07 15:57:44 -08:00
Maxime Beauchemin
aed774e18b [bugfix] handle Loading spinner properly (#6292)
Addressing post-merge comments in
https://github.com/apache/incubator-superset/pull/6283
2018-11-07 13:04:17 -08:00
Grace Guo
69e8df404d sql lab localStorage config (#6257) 2018-11-06 23:12:32 -08:00
Maxime Beauchemin
1a4199af7a [bugfix] deckgl scatter CategoricalDeckGLContainer (#6288) 2018-11-06 17:13:55 -08:00
michellethomas
cd05d44340 Avoid clearing metric when saving from datasource editor (#6277) 2018-11-06 13:23:55 -08:00
Maxime Beauchemin
a1d867cf2f [dashboard] fix spinners disapear too early (#6283)
Recently I noticed that loading spinners on dashboards would disappear
too early.
2018-11-06 08:51:36 -08:00
Maxime Beauchemin
c653ab1e9b Fix Infinity css warning (#6280) 2018-11-05 22:39:42 -08:00
Krist Wongsuphasawat
124c55c117 rename @superset-ui/core to @superset-ui/connection (#6274) 2018-11-05 18:28:38 -08:00
michellethomas
c7f8abc6c5 Adding backwards compatable check to add ago to since if it doesn't exist (#6269) 2018-11-05 16:30:04 -08:00
Chris Williams
7fe8e8aff2 [superset-client] getClientErrorObject for everyone (#6276) 2018-11-05 14:26:22 -08:00
Krist Wongsuphasawat
7373be7163 Add chart names translation (#6273)
* add translation for chart names

* add translation for all chart names

* add missing translation
2018-11-05 12:47:32 -08:00
Jeffrey Wang
a1e408a299 Fix typo in druid granularity (#6229) 2018-11-05 11:47:18 -08:00
Maxime Beauchemin
08cdb09714 [explore] raise attention to row_limit being reached (#6252)
* [explore] raise attention to row_limit being reached

* fix test
2018-11-05 08:31:44 -08:00
达斯特兰斯
fb13218472 Dockerfile change because error: E: The method driver /usr/lib/apt/methods/https… (#6258)
* change because error: E: The method driver /usr/lib/apt/methods/https could not be found.
 要提交的变更:
	修改:     contrib/docker/Dockerfile

* 	修改:     contrib/docker/Dockerfile
2018-11-02 18:10:45 -07:00
Joe Bordes
c041b6673e i18n(es) (#6270) 2018-11-02 18:00:49 -07:00
Joe Bordes
8dbc20b60a I18n es002 (#6208)
* i18n(es) gtranslator formatting

* i18n(es)

* i18n(es) changes suggested by gettext lint tools
2018-11-02 08:23:34 -07:00
mlboy
3115eec892 Externally Visible Server (#6264)
* Externally Visible Server

Usually, app in docker need to be tested in host

* Update docker-entrypoint.sh
2018-11-02 08:21:57 -07:00
Krist Wongsuphasawat
da24b0e0d7 Remove label and showOnExplore. Specific import validators (#6261) 2018-11-01 14:08:15 -07:00
Grace Guo
7d8e3219fc [Fix] merge since,until request parameter with time_range (#6251) 2018-11-01 12:40:56 -07:00
Krist Wongsuphasawat
02f0616025 Make VizTypeControl use metadata from plugin (#6235)
* Render vis type item using information from registry

* adjust style

* fix unit test

* Remove large thumbnails

* Update addSlice
2018-11-01 11:39:24 -07:00
Beto Dealmeida
d1cbb0d000 Update CONTRIBUTING.md (#6259) 2018-11-01 11:19:35 -07:00
michellethomas
2fd18eede7 Setting line chart row_limit to 50000 (#6244)
Setting default row_limit to 50K for line chart
2018-11-01 11:01:13 -07:00
michellethomas
d34217ef97 Dashboard filter box default (#6236)
* Setting default FilterBox date filter to No Filter

* Adding test for FilterBox
2018-11-01 09:43:04 -07:00
Junda Yang
59109f62b4 revert the change in config.py (#6255) 2018-10-31 17:56:59 -07:00
Maxime Beauchemin
e46ab4db52 Bump Flask, bleach and sync pip-compile (#6239)
* sync pip-compile

* Support Flask >= 1.0.0

* pylint

* Trying something else to fix pylint
2018-10-31 16:58:50 -07:00
Maxime Beauchemin
7b3095d6ff Fix examples charts/dashboards and refactor (#5881)
* Fix examples charts/dashboards and refactor

* pylinting

* Fix pylint

* Lint the refactor

* Rebased
2018-10-31 15:29:04 -07:00
Rakshit Kumar
9710369d52 Fixed grammatical errors. (#6246)
* Fixed grammatical errors.

* Update druid.rst
2018-10-31 13:32:25 -07:00
Rakshit Kumar
bfec5916ed Fixed grammatical errors. (#6245) 2018-10-31 13:31:48 -07:00
Rakshit Kumar
6d0069230c Fixed grammatical errors (#6247) 2018-10-31 13:31:35 -07:00
Rakshit Kumar
bc8c8a2168 Fixed typos and grammatical errors (#6248) 2018-10-31 13:31:11 -07:00
Rakshit Kumar
db93dca947 fixed grammatical errors and typos (#6249) 2018-10-31 13:30:15 -07:00
Rakshit Kumar
0a701d6115 Corrected name of an area and fixed major grammatical errors (#6250) 2018-10-31 13:29:36 -07:00
Junda Yang
c552c125d7 Move metadata cache one layer up (#6153)
* Update wording

* nit update for api endpoint url

* move metadata cache one layer up

* refactor cache

* fix flake8 and DatabaseTablesAsync

* nit

* remove logging for cache

* only fetch for all tables that allows cross schema fetch

* default allow_multi_schema_metadata_fetch to False

* address comments

* remove unused defaultdict

* flake 8
2018-10-31 13:23:26 -07:00
Maxime Beauchemin
af38d254f0 [bugfix] cannot add options to FilterBox (#6231)
* [bugfix] cannot add options to FilterBox

* addressing comments
2018-10-30 21:59:57 -07:00
Maxime Beauchemin
2ad8e2ee2b [sql lab] improve placeholder strings for query search form (#6228) 2018-10-30 21:29:43 -07:00
mlboy
2d4a1ab68a fix misstake (#6237) 2018-10-30 21:28:50 -07:00
John Bodley
1190ebb1a8 [datasource] Ensure SQL Lab link opens in a new tab (#6195) 2018-10-30 17:06:27 -07:00
Krist Wongsuphasawat
1473e2cced Integrate translation module @superset-ui/translation (#6222)
* add translation modules

* Update package.json

* Update instructions in CONTRIBUTING

* Remove old files

* Add new entry point "translation"

* Change imports

* move setupTranslation code

* remove translation from entry

* Update python template

* Refactor utils into smaller, independent files

* Define preamble

* working state

* combine toggleCheckbox with setupApp

* move code block out of document.ready

* move setupClient to preamble

* fix unit tests

* update package version

* delete deletion code
2018-10-30 14:51:44 -07:00
michellethomas
1c4b3e999b Fix time range filter dropdown (#6223)
* Fix date filter control dropdown default state

* Keep track of selected tab
2018-10-30 14:22:40 -07:00
Grace Guo
1fbdd24820 [fix] typo until (#6233) 2018-10-30 14:22:03 -07:00
达斯特兰斯
e1a3a680f4 fix bug : docker build error with no permission with this floder (#6226)
要提交的变更:
	修改:     contrib/docker/Dockerfile
2018-10-30 10:29:38 -07:00
Maxime Beauchemin
0f6b39a6f7 A few setup.py improvements, removing future lib (#6219) 2018-10-29 21:22:25 -07:00
Grace Guo
7d6a4291e1 [fix][Annotation] Fix override since/until for annotation (#6221) 2018-10-29 15:43:01 -07:00
Sumedh Sakdeo
71d6ff40d0 partition and clustering bigquery keys (#6212)
* partition and clustering bigquery keys

* flake8
2018-10-29 11:23:21 -07:00
Maxime Beauchemin
acb44165b4 [deck] allow an array of dynamic of aggregations (#6198)
* [deck] allow an array of dynamic of aggregations

* Adding quantiles

* lint & tests
2018-10-29 11:08:22 -07:00
Maxime Beauchemin
7db11d95b0 [setup.py] allow for range on boto library (#6071) 2018-10-29 11:05:35 -07:00
Maxime Beauchemin
81fc3dfbee [build] fix pip install issues on OSX High Sierra (#6201)
* [build] fix pip install issues on OSX High Sierra

I think requirements.txt was out-of-sync as well.

Also had to:
export
  LDFLAGS="-L/usr/local/opt/openssl/lib"
export
  CPPFLAGS="-I/usr/local/opt/openssl/include"
export
  PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

* Fix click
2018-10-29 10:33:51 -07:00
Maxime Beauchemin
5403f31007 [explore] Include "Autocomplete Query Predicate" field to Table Editor (#6171)
* Improvements around filters

* Adding simple test
2018-10-29 10:33:03 -07:00
Joe Bordes
d6908eef49 i18n(App) syntax errors detected by Grammarly while translating (#6209) 2018-10-29 09:42:42 -07:00
superkd37
735499cb53 Update ISSUE_TEMPLATE.md (#6210) 2018-10-29 09:41:32 -07:00
Grace Guo
87161a6d5d [fix] hide annotation layer (#6204) 2018-10-26 17:12:30 -07:00
Grace Guo
dcf048c52e [fix] should set chartUpdateEndTime when chart fetch failed or stopped (#6205) 2018-10-26 15:00:03 -07:00
Krist Wongsuphasawat
5c02e3199b Implement SuperChart and enable the chart plugins (#6154)
* setup plugin and add SuperChart

* Integrate SuperChart into Chart.jsx

* Add vizType as class name

* Remove .slice_container

* add snakeCase to sanitize class name

* Remove old code to load charts

* Fix supportedAnnotationTypes

* Update AnnotationTypes, remove unnecessary imports and dependency from VIZ_TYPES

* remove index.js and update unit test

* resolve tree map issue

* fix issue with annotation types

* fix proptypes

* add )

* address a few comments

* create bound functions

* bound more functions

* add reselect

* use reselect for chartprops

* improve performance with reselect

* remove unused props

* Remove getFilters() and update table test

* Remove unused code

* Delete adaptors

* switch to react-loadable

* Rewrite with reloadable

* Add timeout back

* remove loading

* update table unit test

* remove pastDelay
2018-10-26 11:38:30 -07:00
Max Goodridge
9580103c22 Fix typo in load-examples command (#6193) 2018-10-25 20:47:43 -07:00
Nocturne
d57614f8ad Update docker-init.sh (#6167)
Fix typo of
```bash
superset load-examples
```
2018-10-25 20:20:05 -07:00
John Bodley
71db0736be [external-metadata] Fix unknown column types (#6196) 2018-10-25 18:56:24 -07:00
Junda Yang
a0479d57b2 fix sql lab permission issue (#6194) 2018-10-25 16:35:43 -07:00
John Bodley
bfbd83bdab [datasource-editor] Correcting tooltip (#6191) 2018-10-25 14:29:39 -07:00
Grace Guo
9c5fc42fee add error details into log (#6169) 2018-10-25 13:52:47 -07:00
Mike Rötgers
e21e6a7600 add get_data method to IFrameViz (#6185) 2018-10-25 12:03:33 -07:00
Chris Williams
e7e8e9d00d [dashboard][bugfix][save as] re-direct to copied dashboard upon saveas (#6189)
* [dashboard][bugfix][save as] re-direct to copied dashboard upon saveas

* [dashboard][save modal] safer destructuring

* [dashboard][save as] simplify Promise resolution

* [dashboard] simply fetch slices error
2018-10-25 11:44:05 -07:00
Krist Wongsuphasawat
ef8429cbf5 pass width and height (#6183) 2018-10-25 09:59:25 -07:00
Chris Williams
90809f6d39 [sqllab] more robust copy to clipboard (#6180)
* [sqllab] implement more robust share query button

* [sqllab] fix Hotkeys react warnings

* [CopyToClipboard] don't bind in render functions

* [explorer] fix short url button position

* [sqllab] remove share query item in tab dropdown menu

* [sqllab] reference new ShareSqlLabQuery component

* [sqllab][share query robustness] clean up

* [sqllab] fix tests

* [sqllab][share query] add unit tests
2018-10-24 19:41:32 -07:00
Beto Dealmeida
f1089c40a4 Improvements to the polygon spatial viz (#6178)
* WIP

* WIP

* WIP

* WIP

* Fix color bucketing

* Fixed colors

* Fix no num categories selected

* Colors working

* Fix no metric selected

* Visual cues for selection

* Add unit tests

* Remove jest from deps

* Rename category to bucket

* Small fixes

* Fix lint

* Fix unit tests

* Remove duplicate hexToRGB

* Fix import

* Change order of arguments in getBuckets

* Refactor function signature
2018-10-24 18:40:57 -07:00
Grace Guo
ca5be1c1e2 [fix] should allow force refresh when having charts under tab (#6181) 2018-10-24 15:34:36 -07:00
Maxime Beauchemin
9cb2dceeb5 Update CHANGELOG from 0.26 to 0.28.1 (#6139) 2018-10-24 14:38:11 -07:00
Chris Williams
60796da38c [superset-client][bugfix] fix stop query (#6179) 2018-10-24 14:03:43 -07:00
Grace Guo
6ec9e1a4e9 [Ready][Dashboard] disable force refresh when chart is still loading (#6034)
* [Dashboard] disable force refresh when chart is still loading

- disable force refresh for chart, when chart is still loading
- disable force refresh for dashboard, when any one of chart is loading

* remove css change (introduced by mistake)

* add integration tests for disable/enable force refresh
2018-10-24 10:21:23 -07:00
Abid Famasya
47b1a081ab Add TrustMedis to the userlist (#6117) 2018-10-23 22:49:51 -07:00
Christine Chambers
5f1eaa49f2 [SIP-9] Introduce TypeScript (#6120)
* [SIP-9] Introduce TypeScript

- Introduce TypeScript and co to both source and tests
- Define alias for src directory in both webpack config and jest config so we can avoid using long relative paths like ../../src in both source and tests
- Type check feature flags system to prevent typos of flag names
- Change the feature flags system and the flags on window instead of populating them through the state tree. When introducing the first SCOPED_FILTER feature flag, it became too difficult to pipe the flags through the state initializers and layers of components and containers (the resulting code is hard to read and has a handful of methods taking an additional feature flag map parameter). Given that feature flags don't change throughout the life time of the app, it is better to leave them on window for easy access than piping them through the global state tree, which is meant to store the state of the app which changes frequently.
- Add a barebone filter panel that only shows when the SCOPED_FILTER feature flag is on

* Remove unnecessary dev-dependency on gl

* - Adding linting for TypeScript files via tslint.
- Fixing linting for Javascript files importing Typscript files
- Also fix linting for Javascript files that now leverage the webpack alias for the src directory

- up Typescript and type def versions

* Rename src directory's webpack alias from @ to src to be more explicit.
2018-10-23 22:33:51 -07:00
Maxime Beauchemin
9e6b171ee9 Bump FAB to 1.12.1 (#6138) 2018-10-23 15:02:29 -07:00
Krist Wongsuphasawat
9595adb452 [bugfix] Fix language switch (#6166)
* Extract SupersetClient setup into a separate file and fix translation link

* sort'
2018-10-23 09:11:34 -07:00
Chris Williams
d8d50a168d [superset-client] use getClientErrorObject for client error handling (#6163)
* [superset-client] use getClientErrorObject for client error handling

* fix getClientErrorObject json parsing

* fix getClientErrorObject test typos

* kick build
2018-10-22 22:42:56 -07:00
Chris Williams
8573fdec12 [superset-client][logger] replace ajax with SupersetClient (#6133)
* [superset-client][logger] replace ajax with SupersetClient

* [superset-client][logger] don't parse log response
2018-10-22 22:42:23 -07:00
timifasubaa
fc3b68e234 [Sqllab] Add offline state to sqllab (#6013)
* add timeout and refresh for failed backend

* show offline state instead of refreshing

* add southpane tests
2018-10-22 18:36:07 -07:00
Krist Wongsuphasawat
b9257b2a09 [Refactor] Extend color scheme management to sequential schemes (#6150)
* refactor color scheme

* Update data structure

* Update color scheme files

* wip

* convert all sequential schemes

* Update how color schemes are managed. Extend it for sequential schemes

* extract color setup into separate file

* Update imports

* update imports

* Add new functions to Registry

* Update ColorSchemeManager to extends Registry and update unit tests

* Add test for Registry

* Rename ColorSchemeManager to ColorSchemeRegistry

* Fix unit tests

* Update API

* Fix imports

* Add label field

* Fix reference to colors

* update SequentialScheme contructor

* Fix controls

* rename manager to registry

* Split sequential schemes into multiple files

* update sequential color labels

* add values and valuesAsPromise()

* use .values()
2018-10-22 16:17:14 -07:00
Chris Williams
a71e6eb0a3 [superset-client] replace misc ajax calls (#6135)
* [superset-client][misc] replace ajax calls in DashboardTable, TableLoader, utils, common

* [superset-client][misc] replace ajax calls in AsyncSelect, HeaderActions, Deck.gl

* [superset-client][misc] fix tests

* [superset-client] remove unneeded functional setState calls

* [superset-client] make welcome a redux app for toasts

* [superset-client] make Profile a redux app for toasts

* [superset-client] TableLoader don't pass toast props to dom nodes

* tweak deckgl Multi syntax
2018-10-19 11:41:42 -07:00
Chris Williams
96228adda9 [superset-client][datasource editor] replace ajax with SupersetClient (#6134)
* [superset-client][datasource editor] replace ajax with SupersetClient

* [superset-client][datasource control] replace ajax with SupersetClient

* [superset-client][datasource editor] remove unused funcs in DatasourceControl

* [superset-client][data source control] lint, remove toasts

* [superset-client] fix DatasourceControl_spec

* [superset-client] remove unneeded functional setState calls
2018-10-19 11:41:11 -07:00
Krist Wongsuphasawat
546d150b91 Define chart presets (#6144)
* define chart presets

* remove dual line
2018-10-19 11:40:21 -07:00
Chris Williams
bc3a2efa0e [superset-client] pass csrfToken as configuration (#6148) 2018-10-18 20:11:43 -07:00
Krist Wongsuphasawat
fc3422eaeb add build query as part of plugin (#6146) 2018-10-18 18:39:34 -07:00
Krist Wongsuphasawat
bc4dfad6c8 fix bar chart value overlap with legend (#6145) 2018-10-18 18:00:42 -07:00
Krist Wongsuphasawat
04e5e87114 remove reactable from Hotkeys.jsx (#6143) 2018-10-18 18:00:03 -07:00
Krist Wongsuphasawat
9d01af201e Add annotation information to ChartMetadata (#6136)
* add annotations information to ChartMetadata

* rename fields
2018-10-18 17:59:30 -07:00
Krist Wongsuphasawat
d662e36442 [Ready] Define ChartProps data structure (#6125)
* rename basicChartInput to chartProps

* replace BasicChartInput with ChartProps class

* Add transformProps to deck.gl plugins

* Add space

* delete BasicChartInput

* add width and height as part of ChartProps and update transformProps

* remove width and height

* remove adaptors from deck.gl components

* remove deck.gl creataAdaptor
2018-10-18 15:44:21 -07:00
Krist Wongsuphasawat
4e2341a131 downgrade reactable and remove fastdom (#6142)
* downgrade reactable and remove fastdom

* remove caret
2018-10-18 14:09:01 -07:00
michellethomas
7d0a17aef5 Turning off flaky link tests (#6141) 2018-10-18 12:02:59 -07:00
Krist Wongsuphasawat
0aa6d90429 Remove isNumeric util function and use Number.isFinite instead (#6106)
* remove isNumeric util function and use lodash isFinite instead

* use native Number.isFinite
2018-10-18 11:24:43 -07:00
Krist Wongsuphasawat
58be31af3f change viewport dimension (#6123) 2018-10-18 11:22:43 -07:00
Chris Williams
e163dfe744 [SIP-4] replace SQL Lab ajax calls with SupersetClient (#5896)
* [superset-client] replace sqllab ajax calls with SupersetClient

* [superset-client][sqllab] replace more misc ajax calls

* [superset-client][tests] call setupSupersetClient() in test shim

* [superset-client] replace more sqllab ajax calls and fix tests

* [superset-client][tests] remove commented lines

* [sqllab][superset-client] fix eslint and tests, add better error handling tests.

* [superset-client] fix tests from rebase

* [cypress][sqllab][superset-client] fix

* [superset-client] use Promises not callbacks in getShortUrl calls

* [superset-client][short-url] don't stringify POST

* [superset-client][short-url][cypress] add data-test attribute for more reliable test

* [cypress] remove .only() call
2018-10-18 10:40:30 -07:00
Krist Wongsuphasawat
273991fd4e Use @vx/responsive to provide Chart width on Explore page (#6104)
* use parent size to compute width

* simplify this.width() and this.height()

* remove unnecessary jquery

* fix indent and import

* adjust headerheight from 100 to 80

* fix test
2018-10-16 22:18:35 -07:00
Maxime Beauchemin
bbfd69a138 [utils.py] gathering/refactoring into a "utils/" folder (#6095)
* [utils] gathering/refactoring into a "utils/" folder

Moving current utils.py into utils/core.py and moving other *util*
modules under this new "utils/" as well.

Following steps include eroding at "utils/core.py" and breaking it down
into smaller modules.

* Improve tests

* Make loading examples in scope for tests

* Remove test class attrs examples_loaded and requires_examples
2018-10-16 17:59:34 -07:00
Chris Williams
af0ffa44ab [SIP-4] replace explorer ajax calls with SupersetClient (#5869)
* [superset-client] initialize SupersetClient in app setup

* [core] replace explore ajax calls with SupersetClient

* [core] fix SupersetClient explore tests

* [core] remove _packages mistake directory

* remove unused files

* add yarn.lock

* always render modal

* [superset-client][jest] fix SaveModal_spec

* [lint] remove unnecessary AbortController global

* yarn.lock
2018-10-16 14:54:31 -07:00
Krist Wongsuphasawat
dcfbae1ab9 [SIP-5&6] Refactor line_multi (#6058)
* Rewrite line_multi

* move dir

* add chartplugin for line_multi

* rename var
2018-10-16 14:54:01 -07:00
Chris Williams
462c58ee67 [SIP-4] replace dashboard ajax calls with SupersetClient (#5854)
* [core] replace dashboard ajax calls with SupersetClient

* [core] fix SupersetClient dashboard tests

* [dashboard][superset-client] don't error by parsing save dashboard response as json
2018-10-16 13:42:22 -07:00
Junda Yang
177bed3bb6 allow cache and force refresh on table list (#6078)
* allow cache and force refresh on table list

* wording

* flake8

* javascript test

* address comments

* nit
2018-10-16 13:14:45 -07:00
michellethomas
7d49255926 This control test is flaky and affecting travis runs, turning it off for now (#6121) 2018-10-16 12:20:07 -07:00
Beto Dealmeida
b4a1983303 Fixes to the CategoricalDeckGLContainer and filter box (#6038)
* WIP

* WIP

* Fix time grain

* Fix autoformatting

* Fix more autoformatting

* Fix even more autoformatting

* Fix manual move of play slider

* Fix state management

* Revert change

* Fix screengrid

* Remove autozoom on render

* Remove unneeded code

* Zoom when mounted

* Fix lint
2018-10-16 12:08:37 -07:00
592 changed files with 16559 additions and 11356 deletions

2
.flaskenv Normal file
View File

@@ -0,0 +1,2 @@
FLASK_APP=superset:app
FLASK_ENV=development

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@
*.pyc
*.sqllite
*.swp
.cache-loader
.coverage
.DS_Store
.eggs

View File

@@ -99,7 +99,7 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
[BASIC]
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_,d,e,v,o,l,x,ts
good-names=i,j,k,ex,Run,_,d,e,v,o,l,x,ts,f
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata,d,fd
@@ -232,7 +232,7 @@ logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
notes=FIXME,XXX
[SIMILARITIES]

View File

@@ -1,5 +1,417 @@
## Change Log
### 0.28.1 (2018/10/18 17:48 +00:00)
- Bump FAB to 1.18.1
### 0.28.0 (2018/10/17 ??:?? +00:00)
- [#5896](https://github.com/apache/incubator-superset/pull/5896) [SIP-4] replace SQL Lab ajax calls with `SupersetClient` (#5896) (@williaster)
- [#6104](https://github.com/apache/incubator-superset/pull/6104) Use @vx/responsive to provide Chart width on Explore page (#6104) (@kristw)
- [#6095](https://github.com/apache/incubator-superset/pull/6095) [utils.py] gathering/refactoring into a "utils/" folder (#6095) (@mistercrunch)
- [#5869](https://github.com/apache/incubator-superset/pull/5869) [SIP-4] replace explorer ajax calls with `SupersetClient` (#5869) (@williaster)
- [#6058](https://github.com/apache/incubator-superset/pull/6058) [SIP-5&6] Refactor line_multi (#6058) (@kristw)
- [#5854](https://github.com/apache/incubator-superset/pull/5854) [SIP-4] replace dashboard ajax calls with `SupersetClient` (#5854) (@williaster)
- [#6078](https://github.com/apache/incubator-superset/pull/6078) allow cache and force refresh on table list (#6078) (@youngyjd)
- [#6121](https://github.com/apache/incubator-superset/pull/6121) This control test is flaky and affecting travis runs, turning it off for now (#6121) (@michellethomas)
- [#6038](https://github.com/apache/incubator-superset/pull/6038) Fixes to the CategoricalDeckGLContainer and filter box (#6038) (@betodealmeida)
- [#6113](https://github.com/apache/incubator-superset/pull/6113) send username in sync request (#6113) (@youngyjd)
- [#5875](https://github.com/apache/incubator-superset/pull/5875) [SIP-4] replace chart ajax calls with `SupersetClient` (#5875) (@williaster)
- [#6079](https://github.com/apache/incubator-superset/pull/6079) [refactor] Migrate from Mocha+Chai to Jest (#6079) (@xtinec)
- [#6096](https://github.com/apache/incubator-superset/pull/6096) remove utf8 declaration (#6096) (@timifasubaa)
- [#6102](https://github.com/apache/incubator-superset/pull/6102) fix dependency issue #6086 (#6102) (@aflyhorse)
- [#6103](https://github.com/apache/incubator-superset/pull/6103) Rename onTooltip to setTooltip (#6103) (@kristw)
- [#6105](https://github.com/apache/incubator-superset/pull/6105) make BigNumber PureComponent (#6105) (@kristw)
- [#6097](https://github.com/apache/incubator-superset/pull/6097) Fix link formating in README.md (#6097) (@ad-m)
- [#6088](https://github.com/apache/incubator-superset/pull/6088) move countries directory under CountryMap (#6088) (@kristw)
- [#6065](https://github.com/apache/incubator-superset/pull/6065) remove future (#6065) (@timifasubaa)
- [#6091](https://github.com/apache/incubator-superset/pull/6091) remove six dependency (#6091) (@timifasubaa)
- [#6090](https://github.com/apache/incubator-superset/pull/6090) Add ChartPlugin and metadata for deck.gl vis (#6090) (@kristw)
- [#6085](https://github.com/apache/incubator-superset/pull/6085) Add ChartPlugin and metadata for nvd3 and BigNumber vis (#6085) (@kristw)
- [#6089](https://github.com/apache/incubator-superset/pull/6089) [cypress][sqllab] increase timeout for sqllab results (#6089) (@williaster)
- [#6039](https://github.com/apache/incubator-superset/pull/6039) [SIP-5] Remove references to slice from all deck.gl components. (#6039) (@kristw)
- [#6072](https://github.com/apache/incubator-superset/pull/6072) Create chart plugins and metadata (#6072) (@kristw)
- [#6063](https://github.com/apache/incubator-superset/pull/6063) remove future imports from db migrations (#6063) (@timifasubaa)
- [#6069](https://github.com/apache/incubator-superset/pull/6069) Cypress tests for controls and explore links (#6069) (@michellethomas)
- [#6074](https://github.com/apache/incubator-superset/pull/6074) Rename color constants and move util function into separate file (#6074) (@kristw)
- [#5998](https://github.com/apache/incubator-superset/pull/5998) Fix the horizon title only show the first key (#5998) (@Narcissus7)
- [#6050](https://github.com/apache/incubator-superset/pull/6050) remove future imports (#6050) (@timifasubaa)
- [#6073](https://github.com/apache/incubator-superset/pull/6073) Fix top groups with user defined metrics (#6073) (@betodealmeida)
- [#5974](https://github.com/apache/incubator-superset/pull/5974) [cypress] add SQL lab tests (#5974) (@williaster)
- [#6061](https://github.com/apache/incubator-superset/pull/6061) feat: import/export dashboards via cli (#6061) (@arpit-agarwal)
- [#6054](https://github.com/apache/incubator-superset/pull/6054) [setup] Using pip-tools to create requirements.txt (#6054) (@john-bodley)
- [#6062](https://github.com/apache/incubator-superset/pull/6062) Add increment back arrow to time player (#6062) (@betodealmeida)
- [#6028](https://github.com/apache/incubator-superset/pull/6028) Add data structures for chart plugin system (#6028) (@kristw)
- [#6002](https://github.com/apache/incubator-superset/pull/6002) [cypress] add integration tests for dashboard (#6002) (@graceguo-supercat)
- [#6037](https://github.com/apache/incubator-superset/pull/6037) [Dashboard] Fix margin issue in dashboard modal (#6037) (@graceguo-supercat)
- [#6004](https://github.com/apache/incubator-superset/pull/6004) check db extra and metadata params preemptively (#6004) (@youngyjd)
- [#5933](https://github.com/apache/incubator-superset/pull/5933) Allow user to force refresh metadata (#5933) (@youngyjd)
- [#6051](https://github.com/apache/incubator-superset/pull/6051) [select-star] Adding optional schema to view (#6051) (@john-bodley)
- [#6030](https://github.com/apache/incubator-superset/pull/6030) Upgrade flask-appbuilder to latest. (#6030) (@jmcarp)
- [#6056](https://github.com/apache/incubator-superset/pull/6056) Revert old precision formatters (#6056) (@theikkila)
- [#6043](https://github.com/apache/incubator-superset/pull/6043) Search queries when enter is pressed (#6043) (@betodealmeida)
- [#6047](https://github.com/apache/incubator-superset/pull/6047) fix for annotation layer bug (#6047) (@yuguang)
- [#6049](https://github.com/apache/incubator-superset/pull/6049) remove redundant mysql (#6049) (@timifasubaa)
- [#6023](https://github.com/apache/incubator-superset/pull/6023) [tablemodelview] Fixing JSON api/read serializable issue (#6023) (@john-bodley)
- [#5985](https://github.com/apache/incubator-superset/pull/5985) Deprecate support for Python 3_6 (#5985) (@mistercrunch)
- [#6031](https://github.com/apache/incubator-superset/pull/6031) refer to default color scheme in colorpickercontrol instead of pointing to specific scheme (#6031) (@kristw)
- [#6027](https://github.com/apache/incubator-superset/pull/6027) Sorting tables by "modified" is broken (#6027) (@betodealmeida)
- [#6016](https://github.com/apache/incubator-superset/pull/6016) [ci] Update ci config to reduce javascript test time and some of cypress. (#6016) (@kristw)
- [#6029](https://github.com/apache/incubator-superset/pull/6029) use world map only bundle (#6029) (@kristw)
- [#5997](https://github.com/apache/incubator-superset/pull/5997) [SIP-6] Migrate visualizations to new directory structure (part 2) (#5997) (@kristw)
- [#6035](https://github.com/apache/incubator-superset/pull/6035) Revert #5991 (#6035) (@graceguo-supercat)
- [#6033](https://github.com/apache/incubator-superset/pull/6033) log query fetch time (#6033) (@timifasubaa)
- [#5566](https://github.com/apache/incubator-superset/pull/5566) [bugfix] Fix Tableviz metrics column disorder (#5566) (@yamyamyuo)
- [#5924](https://github.com/apache/incubator-superset/pull/5924) [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number, bubble, box_plot, treemap (#5924) (@kristw)
- [#6006](https://github.com/apache/incubator-superset/pull/6006) [SIP-6] Migrate visualizations to new directory structure (part 3 - nvd3) (#6006) (@kristw)
- [#6019](https://github.com/apache/incubator-superset/pull/6019) [cypress] Combine multiple tests under visualizations into single test to save running time (#6019) (@kristw)
- [#5991](https://github.com/apache/incubator-superset/pull/5991) feat: import/export dashboards via cli (#5991) (@arpit-agarwal)
- [#5960](https://github.com/apache/incubator-superset/pull/5960) [feat] Feature flag system via config (#5960) (@xtinec)
- [#6005](https://github.com/apache/incubator-superset/pull/6005) Removing the key from cypress build and removing parallel flag (#6005) (@michellethomas)
- [#6008](https://github.com/apache/incubator-superset/pull/6008) disable dashboard test (#6008) (@kristw)
- [#5995](https://github.com/apache/incubator-superset/pull/5995) wait and verify one-by-one (#5995) (@kristw)
- [#5949](https://github.com/apache/incubator-superset/pull/5949) [SIP-6] Migrate visualizations to new directory structure. (#5949) (@kristw)
- [#5983](https://github.com/apache/incubator-superset/pull/5983) Update webpack bundle configuration (#5983) (@kristw)
- [#5957](https://github.com/apache/incubator-superset/pull/5957) [cypress] Update dashboard test to remove 10s timeout (#5957) (@kristw)
- [#5959](https://github.com/apache/incubator-superset/pull/5959) Explicit set markdown version to >= 3.0 (#5959) (@manhtai)
- [#5946](https://github.com/apache/incubator-superset/pull/5946) Remove lodash.throttle and replace underscore calls with lodash (#5946) (@kristw)
- [#5975](https://github.com/apache/incubator-superset/pull/5975) Pinning a version of click to fix travis (#5975) (@michellethomas)
- [#5970](https://github.com/apache/incubator-superset/pull/5970) Add fordeal to superset user list (#5970) (@Renkai)
- [#5967](https://github.com/apache/incubator-superset/pull/5967) Constrain the max version of markdown (#5967) (@victornoel)
- [#5937](https://github.com/apache/incubator-superset/pull/5937) Deprecate getColorFromSchem (#5937) (@kristw)
- [#5906](https://github.com/apache/incubator-superset/pull/5906) fix sqllab querysearch typeahead permission error (#5906) (@youngyjd)
- [#5934](https://github.com/apache/incubator-superset/pull/5934) ensure npm run build is in production mode (#5934) (@kristw)
- [#5952](https://github.com/apache/incubator-superset/pull/5952) [deck_polyline] show metric in geohash (#5952) (@mistercrunch)
- [#5948](https://github.com/apache/incubator-superset/pull/5948) [deck_polygon] implement null locations flag (#5948) (@mistercrunch)
- [#5931](https://github.com/apache/incubator-superset/pull/5931) [bugfix] metrics issue in 'Periodicity Pivot' (#5931) (@mistercrunch)
- [#5770](https://github.com/apache/incubator-superset/pull/5770) [explore] add "View samples" modal to action buttons (#5770) (@mistercrunch)
- [#5923](https://github.com/apache/incubator-superset/pull/5923) [docs] iterating to get to ASF compliance on project site (#5923) (@mistercrunch)
- [#5945](https://github.com/apache/incubator-superset/pull/5945) [eslint] add no-only-tests (#5945) (@williaster)
- [#5926](https://github.com/apache/incubator-superset/pull/5926) Adding configuration to cypress to enable dashboard (#5926) (@michellethomas)
- [#5787](https://github.com/apache/incubator-superset/pull/5787) Add schema level access control on csv upload (#5787) (@youngyjd)
- [#5848](https://github.com/apache/incubator-superset/pull/5848) fix sqlab progress bar and status inconsistency (#5848) (@youngyjd)
- [#5943](https://github.com/apache/incubator-superset/pull/5943) remove .only (#5943) (@kristw)
- [#5940](https://github.com/apache/incubator-superset/pull/5940) fix csv upload bugs (#5940) (@timifasubaa)
- [#5938](https://github.com/apache/incubator-superset/pull/5938) use es6 import (#5938) (@kristw)
- [#5790](https://github.com/apache/incubator-superset/pull/5790) Some linting (#5790) (@mistercrunch)
- [#5932](https://github.com/apache/incubator-superset/pull/5932) Allow removing legend (#5932) (@betodealmeida)
- [#5866](https://github.com/apache/incubator-superset/pull/5866) Fix regression around low row limit for CSV exports (#5866) (@mistercrunch)
- [#5911](https://github.com/apache/incubator-superset/pull/5911) Clean up CONTRIBUTING.md: (#5911) (@alekstorm)
- [#5893](https://github.com/apache/incubator-superset/pull/5893) [SIP-6] Add reactify function and convert world map to new directory structure. (#5893) (@kristw)
- [#5778](https://github.com/apache/incubator-superset/pull/5778) [explore flow] handling duplicated column aliases (#5778) (@mistercrunch)
- [#5905](https://github.com/apache/incubator-superset/pull/5905) [bugfix] ignore history.pushState errors (#5905) (@mistercrunch)
- [#5890](https://github.com/apache/incubator-superset/pull/5890) [bugfix] De-dup script tags. #5883 (#5890) (@kristw)
- [#5901](https://github.com/apache/incubator-superset/pull/5901) Table and dist bar tests (#5901) (@michellethomas)
- [#5921](https://github.com/apache/incubator-superset/pull/5921) [contributing.md] swap cypress command order (#5921) (@williaster)
- [#5902](https://github.com/apache/incubator-superset/pull/5902) [refactor] Remove dependency on personal fork of supercluster from mapbox visualizations (#5902) (@xtinec)
- [#5917](https://github.com/apache/incubator-superset/pull/5917) [bugfix] Fix percent metric display and check for string columns in table (#5917) (@kristw)
- [#5868](https://github.com/apache/incubator-superset/pull/5868) Remove unused functions and jquery dependency (#5868) (@kristw)
- [#5891](https://github.com/apache/incubator-superset/pull/5891) [bugfix] Fix color scheme picker (#5891) (@kristw)
- [#5918](https://github.com/apache/incubator-superset/pull/5918) Fixing linting error in macro_tests (#5918) (@xtinec)
- [#5907](https://github.com/apache/incubator-superset/pull/5907) Remove jquery usage to highlight sql lab menu (#5907) (@kristw)
- [#5547](https://github.com/apache/incubator-superset/pull/5547) Adds a new macro to allow getting filter values easily (#5547) (@mjsilva)
- [#5838](https://github.com/apache/incubator-superset/pull/5838) [SIP-5] Refactor nvd3 (#5838) (@kristw)
- [#5903](https://github.com/apache/incubator-superset/pull/5903) [react16] fix React type checking (#5903) (@mistercrunch)
- [#5900](https://github.com/apache/incubator-superset/pull/5900) Add cypress artifacts directory (videos/screenshots) to gitignore and sort items in gitignore (#5900) (@kristw)
- [#5811](https://github.com/apache/incubator-superset/pull/5811) [treemap] add row_limit control (#5811) (@mistercrunch)
- [#5851](https://github.com/apache/incubator-superset/pull/5851) remove duplicated utils (#5851) (@youngyjd)
- [#5879](https://github.com/apache/incubator-superset/pull/5879) [lint] turn no-undef back on, set browser, cypress, and mocha env's (#5879) (@williaster)
- [#5775](https://github.com/apache/incubator-superset/pull/5775) [SIP-5] Refactor Time Series Table (#5775) (@kristw)
- [#5885](https://github.com/apache/incubator-superset/pull/5885) Addded documentation for Teradata DB (#5885) (@livinm)
- [#5870](https://github.com/apache/incubator-superset/pull/5870) Enable Teradata (#5870) (@livinm)
- [#5877](https://github.com/apache/incubator-superset/pull/5877) [bug fix] Fixed adhoc metric is not working for WordCloud (#5877) (@conglei)
- [#5865](https://github.com/apache/incubator-superset/pull/5865) fixed modal close issue (#5865) (@conglei)
- [#5861](https://github.com/apache/incubator-superset/pull/5861) [SIP-6] removed get_data for BigNumber (#5861) (@conglei)
### 0.28.0rc6 (2018/09/13 00:37 +00:00)
- [#5880](https://github.com/apache/incubator-superset/pull/5880) Fix CSS theme flickering on FAB pages (#5880) (@mistercrunch)
- [#5878](https://github.com/apache/incubator-superset/pull/5878) remove getColorFromScheme in favor of CategoricalColorNamespace.getScale() for histogram (#5878) (@kristw)
- [#5709](https://github.com/apache/incubator-superset/pull/5709) fix: Pivot table not sorting formatted numeric column properly (#5709) (@arpit-agarwal)
- [#5815](https://github.com/apache/incubator-superset/pull/5815) Improve categorical color management (#5815) (@kristw)
- [#5874](https://github.com/apache/incubator-superset/pull/5874) [tests] fix sqllab/TableElement_spec (#5874) (@williaster)
- [#5863](https://github.com/apache/incubator-superset/pull/5863) [time table] fix sorting on missing values (#5863) (@mistercrunch)
- [#5748](https://github.com/apache/incubator-superset/pull/5748) [Docs] Running DB migration (#5748) (@hughhhh)
- [#5867](https://github.com/apache/incubator-superset/pull/5867) correctly compute slice width in dashboard (#5867) (@kristw)
- [#5864](https://github.com/apache/incubator-superset/pull/5864) Moving get_main_db out of tests and into superset utils (#5864) (@michellethomas)
- [#5862](https://github.com/apache/incubator-superset/pull/5862) fix sqllab logging (#5862) (@timifasubaa)
- [#5860](https://github.com/apache/incubator-superset/pull/5860) fix Object.assign try to write to read-only option.style (#5860) (@kristw)
- [#5859](https://github.com/apache/incubator-superset/pull/5859) make access request open new tab (#5859) (@timifasubaa)
- [#5858](https://github.com/apache/incubator-superset/pull/5858) [bugfix] mapbox pan on filter (#5858) (@xtinec)
- [#5846](https://github.com/apache/incubator-superset/pull/5846) Adding line and big number total integration tests (#5846) (@michellethomas)
- [#5855](https://github.com/apache/incubator-superset/pull/5855) [dev] fix redux devtools (#5855) (@williaster)
- [#5850](https://github.com/apache/incubator-superset/pull/5850) update dashboard sidepane title (#5850) (@graceguo-supercat)
- [#5736](https://github.com/apache/incubator-superset/pull/5736) [sqllab]More granular sqllab logging (#5736) (@timifasubaa)
- [#5849](https://github.com/apache/incubator-superset/pull/5849) [bugfix] fix rows not showing on welcome page (retry) (#5849) (@kristw)
- [#5853](https://github.com/apache/incubator-superset/pull/5853) [bugfix] 'No numeric types to aggregate' in NVD3 chart (#5853) (@mistercrunch)
- [#5829](https://github.com/apache/incubator-superset/pull/5829) [sql lab] handle large ints, prevent overflow (#5829) (@mistercrunch)
- [#5359](https://github.com/apache/incubator-superset/pull/5359) Upgrade to React==16.4.1 & Enzyme==3.3.0 (#5359) (@mistercrunch)
- [#5844](https://github.com/apache/incubator-superset/pull/5844) add timing to stats logger (#5844) (@timifasubaa)
- [#5785](https://github.com/apache/incubator-superset/pull/5785) Handle "ambiguous durations" (#5785) (@betodealmeida)
- [#5819](https://github.com/apache/incubator-superset/pull/5819) Update time filter to use `react-datetime` (#5819) (@betodealmeida)
- [#5841](https://github.com/apache/incubator-superset/pull/5841) Enable hot module replacement for React via react-hot-loader (#5841) (@kristw)
- [#5834](https://github.com/apache/incubator-superset/pull/5834) [docs] suggest using python3.6 in installation docs (#5834) (@mistercrunch)
- [#5828](https://github.com/apache/incubator-superset/pull/5828) Fix cache for multiple time comparisons (#5828) (@betodealmeida)
- [#5830](https://github.com/apache/incubator-superset/pull/5830) Get 'Test Connection' button to take 'engine_params' into account (#5830) (@mistercrunch)
- [#5840](https://github.com/apache/incubator-superset/pull/5840) Adding instructions on how to run Cypress in Contributing.md (#5840) (@michellethomas)
- [#5839](https://github.com/apache/incubator-superset/pull/5839) [bugfix] Fix bignumber overflow in dashboard (#5839) (@kristw)
- [#5762](https://github.com/apache/incubator-superset/pull/5762) [SIP-5] Refactor Paired t-test (#5762) (@kristw)
- [#5789](https://github.com/apache/incubator-superset/pull/5789) [SIP-5] Refactor filterbox (#5789) (@kristw)
- [#5693](https://github.com/apache/incubator-superset/pull/5693) Adding simple Cypress tests (#5693) (@michellethomas)
- [#5771](https://github.com/apache/incubator-superset/pull/5771) [dashboard] Add alert on user delete root level tab (#5771) (@graceguo-supercat)
- [#5730](https://github.com/apache/incubator-superset/pull/5730) [sql_json] allow not specifying client_id (#5730) (@mistercrunch)
- [#5818](https://github.com/apache/incubator-superset/pull/5818) Update Readme that support Apache Kylin (#5818) (@zhaoyongjie)
- [#5823](https://github.com/apache/incubator-superset/pull/5823) Adding 'Resources' section to the docs (#5823) (@mistercrunch)
- [#5826](https://github.com/apache/incubator-superset/pull/5826) fix bug with react-syntax-highlighter import (#5826) (@kristw)
- [#5705](https://github.com/apache/incubator-superset/pull/5705) [SIP-5] Refactor pivot table (#5705) (@kristw)
- [#5825](https://github.com/apache/incubator-superset/pull/5825) [SIP-5] Remove unused function #easy-review (#5825) (@kristw)
- [#5761](https://github.com/apache/incubator-superset/pull/5761) [SIP-5] Refactor parallel coordinates (#5761) (@kristw)
- [#5783](https://github.com/apache/incubator-superset/pull/5783) [SIP-5] Refactor MapBox (#5783) (@kristw)
- [#5758](https://github.com/apache/incubator-superset/pull/5758) [SIP-5] Refactor and improve histogram (#5758) (@kristw)
- [#5760](https://github.com/apache/incubator-superset/pull/5760) [SIP-5] Refactor calendar chart (#5760) (@kristw)
- [#5813](https://github.com/apache/incubator-superset/pull/5813) Enable CSS Hot Module Replacement and optimize css output for production (#5813) (@kristw)
- [#5814](https://github.com/apache/incubator-superset/pull/5814) bug: don't show query overlay when panning mapbox maps (#5814) (@xtinec)
- [#5812](https://github.com/apache/incubator-superset/pull/5812) [celery] setting default (#5812) (@john-bodley)
- [#5786](https://github.com/apache/incubator-superset/pull/5786) Configure webpack-dev-server (#5786) (@kristw)
- [#5796](https://github.com/apache/incubator-superset/pull/5796) make some text in [druid,CRUD,datasource] localizable (#5796) (@hitdemo)
- [#5686](https://github.com/apache/incubator-superset/pull/5686) Force quoted column aliases for Oracle-like databases (#5686) (@villebro)
- [#5707](https://github.com/apache/incubator-superset/pull/5707) [SIP-5] Refactor table (#5707) (@kristw)
- [#5745](https://github.com/apache/incubator-superset/pull/5745) Update annotation model to have JSON Metadata field (#5745) (@hughhhh)
- [#5782](https://github.com/apache/incubator-superset/pull/5782) update thumbnail (#5782) (@hughhhh)
- [#5721](https://github.com/apache/incubator-superset/pull/5721) [SIP-5] Repair and refactor CountryMap (#5721) (@kristw)
- [#5753](https://github.com/apache/incubator-superset/pull/5753) remove backend logic for wordcloud (#5753) (@conglei)
- [#5777](https://github.com/apache/incubator-superset/pull/5777) Fix redirect to SQL Lab (#5777) (@betodealmeida)
- [#5776](https://github.com/apache/incubator-superset/pull/5776) New branding images (#5776) (@elibrumbaugh)
- [#5767](https://github.com/apache/incubator-superset/pull/5767) Fix multilayer geoviz and color picker error (#5767) (@youngyjd)
- [#5718](https://github.com/apache/incubator-superset/pull/5718) [SIP-5] Refactor and repair partition (#5718) (@kristw)
- [#5763](https://github.com/apache/incubator-superset/pull/5763) [SIP-5] Refactor rose (#5763) (@kristw)
- [#5719](https://github.com/apache/incubator-superset/pull/5719) [SIP-5] Refactor World Map (#5719) (@kristw)
- [#5722](https://github.com/apache/incubator-superset/pull/5722) [dashboard] Update font style for markdown component (#5722) (@graceguo-supercat)
- [#5768](https://github.com/apache/incubator-superset/pull/5768) fix sqlparse bug and refactor (#5768) (@timifasubaa)
### 0.28.0rc5 (2018/08/29 04:05 +00:00)
- [#5765](https://github.com/apache/incubator-superset/pull/5765) [bugfix] 'DruidCluster' object has no attribute 'db_engine_spec' (#5765) (@mistercrunch)
- [#5715](https://github.com/apache/incubator-superset/pull/5715) [Table view] Handle empty arrays in fd.timeseries_limit_metric (#5715) (@betodealmeida)
- [#5759](https://github.com/apache/incubator-superset/pull/5759) Bug: fixing async syntax for python 3.7 (#5759) (@xtinec)
- [#5766](https://github.com/apache/incubator-superset/pull/5766) Disable input when IS (NOT) NULL selected in filters (#5766) (@betodealmeida)
- [#5764](https://github.com/apache/incubator-superset/pull/5764) [bugfix] IS NOT NULL filter triggers KeyError: 'val' (#5764) (@mistercrunch)
- [#5756](https://github.com/apache/incubator-superset/pull/5756) Add Myra Labs to user list in README (#5756) (@viksit)
- [#5712](https://github.com/apache/incubator-superset/pull/5712) [deck polygon] add support for geohash (#5712) (@mistercrunch)
- [#5729](https://github.com/apache/incubator-superset/pull/5729) Silence error on migration 4736ec66ce19 constraint drop (#5729) (@mistercrunch)
- [#5749](https://github.com/apache/incubator-superset/pull/5749) Prevent deleting databases that have attached tables (#5749) (@mistercrunch)
- [#5750](https://github.com/apache/incubator-superset/pull/5750) Merge pull request #5750 from mistercrunch/updating_0_28 (@mistercrunch)
- [#5732](https://github.com/apache/incubator-superset/pull/5732) Merge pull request #5732 from mistercrunch/build_docs (@mistercrunch)
- [#5731](https://github.com/apache/incubator-superset/pull/5731) Merge pull request #5731 from mistercrunch/faq_db_engines (@mistercrunch)
- [#5701](https://github.com/apache/incubator-superset/pull/5701) [SIP-5] Refactor sankey (#5701) (@kristw)
- [#5704](https://github.com/apache/incubator-superset/pull/5704) [SIP-5] Refactor and update heatmap (#5704) (@kristw)
- [13e48e8](https://github.com/apache/incubator-superset/commit/13e48e8c8eff626f0a6543d440bf3399c0938765) typo-delipo (@mistercrunch)
- [#5725](https://github.com/apache/incubator-superset/pull/5725) Merge pull request #5725 from mistercrunch/label_verbose_name (@mistercrunch)
- [ceda309](https://github.com/apache/incubator-superset/commit/ceda3092e3fed092a4ff5f11096a0718b9446145) UPDATING.md entry about dashboard v2 forced migration in 0.28 (@mistercrunch)
- [#5744](https://github.com/apache/incubator-superset/pull/5744) update webpack (#5744) (@hughhhh)
- [#5706](https://github.com/apache/incubator-superset/pull/5706) Merge pull request #5706 from mistercrunch/color_arcs (@mistercrunch)
- [#5724](https://github.com/apache/incubator-superset/pull/5724) Merge pull request #5724 from mistercrunch/css_editable_input (@mistercrunch)
- [#5723](https://github.com/apache/incubator-superset/pull/5723) Merge pull request #5723 from mistercrunch/fix_autocomplete_filters (@mistercrunch)
- [#5746](https://github.com/apache/incubator-superset/pull/5746) [bugfix] BigNumber crash, Horizon indent and Myanmar geojson (#5746) (@kristw)
- [#5699](https://github.com/apache/incubator-superset/pull/5699) [SIP-5] Refactor sunburst (#5699) (@kristw)
- [#5690](https://github.com/apache/incubator-superset/pull/5690) [SIP-5] Repair and refactor Horizon Chart (#5690) (@kristw)
- [#5738](https://github.com/apache/incubator-superset/pull/5738) remove unneeded console.log (#5738) (@hughhhh)
- [#5726](https://github.com/apache/incubator-superset/pull/5726) [celery] Using preferred configuration proceedure (#5726) (@john-bodley)
- [09d46a7](https://github.com/apache/incubator-superset/commit/09d46a7864a67d3e2ef70fb41a5c43b28d6c14c9) Fix tests (@mistercrunch)
- [#5717](https://github.com/apache/incubator-superset/pull/5717) Autofocus aggregation in metric control (#5717) (@betodealmeida)
- [#5735](https://github.com/apache/incubator-superset/pull/5735) make some text localizable, mainly in explore, query (#5735) (@hitdemo)
- [12cc2fb](https://github.com/apache/incubator-superset/commit/12cc2fbe15533c673b12bd3cf6bed2a5c8b8a46e) [docs] note as to how to build and view the docs (@mistercrunch)
- [bddc952](https://github.com/apache/incubator-superset/commit/bddc9522e82f77942e0797694fd619fe1653ff48) [docs] FAQ entry 'Does Superset work with [database engine]?' (@mistercrunch)
- [#5720](https://github.com/apache/incubator-superset/pull/5720) Fix FAQ on filters (#5720) (@betodealmeida)
- [e964d83](https://github.com/apache/incubator-superset/commit/e964d83b45b21b95f21218fa0f25fb44c7f95b18) [table editor] better table header for Metrics tab (@mistercrunch)
- [c447a97](https://github.com/apache/incubator-superset/commit/c447a970de3e6d240a5a9a0d7a1a5b737bd2332c) [css] show border around editable input while editing (@mistercrunch)
- [ba32944](https://github.com/apache/incubator-superset/commit/ba329440bcece3f2e7033b8c02bd27460b7dfb11) [table editor] fix 'Autocomplete filters' checkbox doesn't stick (@mistercrunch)
- [#5670](https://github.com/apache/incubator-superset/pull/5670) [SIP-5] Refactor treemap (#5670) (@kristw)
- [#5714](https://github.com/apache/incubator-superset/pull/5714) [bugfix] add item is missing on table editor metrics tab (#5714) (@mistercrunch)
- [#5716](https://github.com/apache/incubator-superset/pull/5716) Merge pull request #5716 from lyft/DPTOOLS-976 (@lyft)
- [c567a89](https://github.com/apache/incubator-superset/commit/c567a89ee7529e88649d78f415a54988b01e218e) Use 403 (@betodealmeida)
- [9827925](https://github.com/apache/incubator-superset/commit/9827925015a42a47d12db82595fd88de6a259d62) Return 401 on no authorization (@betodealmeida)
- [#5708](https://github.com/apache/incubator-superset/pull/5708) Geojson property names (#5708) (@joshbrooks)
- [#5702](https://github.com/apache/incubator-superset/pull/5702) remove console.log and change wording (#5702) (@kristw)
- [#5672](https://github.com/apache/incubator-superset/pull/5672) Revise markup.js and iframe.js (#5672) (@kristw)
- [#5703](https://github.com/apache/incubator-superset/pull/5703) [sqlparse] fix sqlparse bug (#5703) (@timifasubaa)
- [71866f6](https://github.com/apache/incubator-superset/commit/71866f6a127c616da07f221572ca04a95902e7e0) [deck arcs] add JS hooks for sourceColor & targetColor (@mistercrunch)
- [#5684](https://github.com/apache/incubator-superset/pull/5684) [security] Moving set/merge perm to security manager (#5684) (@john-bodley)
- [#5623](https://github.com/apache/incubator-superset/pull/5623) Merge pull request #5623 from mistercrunch/fix_templates (@mistercrunch)
- [#5694](https://github.com/apache/incubator-superset/pull/5694) Allow users to select color for big number (#5694) (@hughhhh)
- [#5697](https://github.com/apache/incubator-superset/pull/5697) Adds geodata for Myanmar (#5697) (@joshbrooks)
- [#5698](https://github.com/apache/incubator-superset/pull/5698) adds TimorLeste geodata (#5698) (@joshbrooks)
- [#5695](https://github.com/apache/incubator-superset/pull/5695) [bugfix] geohash lat/long is reversed (#5695) (@mistercrunch)
- [#5663](https://github.com/apache/incubator-superset/pull/5663) Make brush send events (#5663) (@betodealmeida)
- [#5634](https://github.com/apache/incubator-superset/pull/5634) [viz flow] detect TIMESTAMP, transition to line chart (#5634) (@mistercrunch)
- [#5638](https://github.com/apache/incubator-superset/pull/5638) Add categories and time slider to arc deck.gl viz (#5638) (@betodealmeida)
- [#5675](https://github.com/apache/incubator-superset/pull/5675) Fixes to the play slider (#5675) (@betodealmeida)
- [#5646](https://github.com/apache/incubator-superset/pull/5646) Increase pylint jobs (#5646) (@betodealmeida)
- [#5669](https://github.com/apache/incubator-superset/pull/5669) Repair and refactor Word Cloud (#5669) (@kristw)
- [#5691](https://github.com/apache/incubator-superset/pull/5691) Refactor force-directed graph (#5691) (@kristw)
- [#5687](https://github.com/apache/incubator-superset/pull/5687) [bugfix] Encode unicode error message response (#5687) (@zhaoyongjie)
- [#5641](https://github.com/apache/incubator-superset/pull/5641) Field names in big query can contain only alphanumeric and underscore (#5641) (@sumedhsakdeo)
### 0.27.0 (2018/08/21 20:16 +00:00)
- [#5682](https://github.com/apache/incubator-superset/pull/5682) [bugfix] making secondary_metric optional (#5682) (@mistercrunch)
- [#5665](https://github.com/apache/incubator-superset/pull/5665) Upgrade mysqlclient to 1.3.13 (#5665) (@emlittleworth)
- [#5640](https://github.com/apache/incubator-superset/pull/5640) Fix CSS (#5640) (@betodealmeida)
- [#5688](https://github.com/apache/incubator-superset/pull/5688) change title from hotkeys to keyboard shortcuts (#5688) (@kristw)
### 0.28.0rc3 (2018/08/21 17:19 +00:00)
- [#5683](https://github.com/apache/incubator-superset/pull/5683) [bug] 'an error has ooccured' when saving datasource (#5683) (@mistercrunch)
- [#5685](https://github.com/apache/incubator-superset/pull/5685) make some text localizable, mainly in dashboard, explore, datasource editor, webpage title (#5685) (@hitdemo)
- [#5655](https://github.com/apache/incubator-superset/pull/5655) Handling bigquery dialect when previewing data (#5655) (@sumedhsakdeo)
- [#5657](https://github.com/apache/incubator-superset/pull/5657) [bugfix] df is None breaks df.empty check (#5657) (@mistercrunch)
- [#5671](https://github.com/apache/incubator-superset/pull/5671) Refactor Chord vis (#5671) (@kristw)
- [#5681](https://github.com/apache/incubator-superset/pull/5681) Fix time filter in cache (#5681) (@betodealmeida)
- [#5662](https://github.com/apache/incubator-superset/pull/5662) Minor improvements to SQL Lab UI (#5662) (@kristw)
- [#5642](https://github.com/apache/incubator-superset/pull/5642) Filter out null locations by default (#5642) (@betodealmeida)
- [#5668](https://github.com/apache/incubator-superset/pull/5668) Update CONTRIBUTING.md (#5668) (@hughhhh)
- [#5652](https://github.com/apache/incubator-superset/pull/5652) [sqllab] call out transient state of tabs to users (#5652) (@williaster)
- [#5661](https://github.com/apache/incubator-superset/pull/5661) [bugfix] TypeError: adhocMetric.comparator.join is not a function (#5661) (@mistercrunch)
- [#5645](https://github.com/apache/incubator-superset/pull/5645) Fix checkbox is fails When disable Druid datasource (#5645) (@zhaoyongjie)
- [#5649](https://github.com/apache/incubator-superset/pull/5649) fix multilayer viz backend error (#5649) (@youngyjd)
- [#5644](https://github.com/apache/incubator-superset/pull/5644) handle exception and set dtype value to JSON, when column type JSON (#5644) (@sumedhsakdeo)
- [#5567](https://github.com/apache/incubator-superset/pull/5567) make filters use security manager (#5567) (@timifasubaa)
- [#5648](https://github.com/apache/incubator-superset/pull/5648) Updating yarn.lock for the vx upgrade (#5648) (@michellethomas)
- [#5647](https://github.com/apache/incubator-superset/pull/5647) Upgrading vx responsive to fix ResizeObserver issue (#5647) (@michellethomas)
- [#5643](https://github.com/apache/incubator-superset/pull/5643) use_slice_data in slice_json calls (#5643) (@michellethomas)
- [#5637](https://github.com/apache/incubator-superset/pull/5637) Explore View Perf Fix (#5637) (@sumedhsakdeo)
- [#5100](https://github.com/apache/incubator-superset/pull/5100) Fix form data issue switching viz types (#5100) (@michellethomas)
- [#5433](https://github.com/apache/incubator-superset/pull/5433) [title] Fix issue with non-string names in series title (#5433) (@john-bodley)
- [#5632](https://github.com/apache/incubator-superset/pull/5632) Fetch a batch of rows from bigquery (#5632) (@sumedhsakdeo)
- [#5630](https://github.com/apache/incubator-superset/pull/5630) [bubble] Fixing ad-hoc metric labels (#5630) (@john-bodley)
- [#5626](https://github.com/apache/incubator-superset/pull/5626) Tackling late-arriving comments from #5186 (#5626) (@mistercrunch)
- [#5612](https://github.com/apache/incubator-superset/pull/5612) [sql lab] always use NullPool (#5612) (@mistercrunch)
- [#5631](https://github.com/apache/incubator-superset/pull/5631) [bug fix] Fixed forced percentage format on tooltips and bubble chart tooltips format. (#5631) (@conglei)
- [#5629](https://github.com/apache/incubator-superset/pull/5629) [bugfix] TIMESTAMP not detected as date (#5629) (@mistercrunch)
- [#5621](https://github.com/apache/incubator-superset/pull/5621) Fix annotation_json endpoint (#5621) (@hughhhh)
- [#5624](https://github.com/apache/incubator-superset/pull/5624) [Dashobard]Fix bad merge (#5624) (@graceguo-supercat)
- [#5568](https://github.com/apache/incubator-superset/pull/5568) [bugfix] line_multi chart crashed on chosen (#5568) (#5572) (@kristw)
- [#5549](https://github.com/apache/incubator-superset/pull/5549) Add additional heatmap schemas (#5549) (@jerowe)
- [#5597](https://github.com/apache/incubator-superset/pull/5597) No exception on no data (#5597) (@betodealmeida)
- [d04d714](https://github.com/apache/incubator-superset/commit/d04d714fe594798f9a27a395cef1b748d7b13f37) Fix menu on 'import dashboards' page (@mistercrunch)
- [#5622](https://github.com/apache/incubator-superset/pull/5622) Add option to run query with ctrl+enter (#5622) (@betodealmeida)
- [#5603](https://github.com/apache/incubator-superset/pull/5603) [feature] Allow min/max value for the sparkline in time series table (#5603) (@kristw)
- [#5618](https://github.com/apache/incubator-superset/pull/5618) [dashboards] Increasing position_json to MEDIUMTEXT for MySQL (#5618) (@john-bodley)
- [#5584](https://github.com/apache/incubator-superset/pull/5584) [fix] Enforcing main dttm column (#5584) (@john-bodley)
- [#5611](https://github.com/apache/incubator-superset/pull/5611) make some text localizable (#5611) (@hitdemo)
- [#5480](https://github.com/apache/incubator-superset/pull/5480) fix cal_heatmap tips location error (#5480) (#5587) (@Narcissus7)
### 0.27.0rc1 (2018/08/12 17:03 +00:00)
- [#5589](https://github.com/apache/incubator-superset/pull/5589) [ad-hoc filters] Fixing legacy conversion (#5589) (@john-bodley)
- [#5596](https://github.com/apache/incubator-superset/pull/5596) [sql lab - explore flow] make sure groupby is empty (#5596) (@mistercrunch)
- [#5592](https://github.com/apache/incubator-superset/pull/5592) [bug]Fix load_examples dashboard version key name (#5592) (@graceguo-supercat)
- [#5579](https://github.com/apache/incubator-superset/pull/5579) [sql lab] visualization flow to detect unaliased columns (#5579) (@mistercrunch)
- [#5580](https://github.com/apache/incubator-superset/pull/5580) [table editor] disable 'Sync table metadata' button for Superset views (#5580) (@mistercrunch)
- [#5550](https://github.com/apache/incubator-superset/pull/5550) Template dashboard (#5550) (@betodealmeida)
- [#5562](https://github.com/apache/incubator-superset/pull/5562) update python3 version for testing to 3.6 (#5562) (@octaviancorlade)
- [#5574](https://github.com/apache/incubator-superset/pull/5574) Fixed the wrong icon for Source -> Table (#5574) (@conglei)
- [#5573](https://github.com/apache/incubator-superset/pull/5573) remove deep-equal and use _.isEqual instead (#5573) (@kristw)
- [#5186](https://github.com/apache/incubator-superset/pull/5186) Implement a React-based table editor (#5186) (@mistercrunch)
- [#5552](https://github.com/apache/incubator-superset/pull/5552) Add option for BigNumber to not start y-axis at 0 (#5552) (@kristw)
- [#5561](https://github.com/apache/incubator-superset/pull/5561) A collection of small bug fixes on master (#5561) (@mistercrunch)
- [#5564](https://github.com/apache/incubator-superset/pull/5564) remove uneccessary comma (#5564) (@hitdemo)
- [#5560](https://github.com/apache/incubator-superset/pull/5560) Remove function since_until_to_time_range (#5560) (@mistercrunch)
- [#5558](https://github.com/apache/incubator-superset/pull/5558) [sql lab] allow EXPlAIN queries (#5558) (@mistercrunch)
- [#5515](https://github.com/apache/incubator-superset/pull/5515) convert position to v2 for Superset load_examples (#5515) (@graceguo-supercat)
- [#5544](https://github.com/apache/incubator-superset/pull/5544) Improve URLs for Chart and Dashboard ModelViews (#5544) (@mistercrunch)
- [#5559](https://github.com/apache/incubator-superset/pull/5559) permissions bug fixes (#5559) (@timifasubaa)
- [#5546](https://github.com/apache/incubator-superset/pull/5546) [bugfix] time filter on dashboard view (#5546) (@mistercrunch)
- [#5543](https://github.com/apache/incubator-superset/pull/5543) Reduce dashboard position_json data size (#5543) (@graceguo-supercat)
- [#5487](https://github.com/apache/incubator-superset/pull/5487) Match viz dataframe column case to form_data fields for Snowflake, Oracle and Redshift (#5487) (@villebro)
- [#5398](https://github.com/apache/incubator-superset/pull/5398) Re-add dashboard short links (#5398) (@jaylindquist)
- [#5554](https://github.com/apache/incubator-superset/pull/5554) Add Thailand country map (#5554) (@ekasitk)
- [#5514](https://github.com/apache/incubator-superset/pull/5514) remove js packages that are not referenced in js code (#5514) (@kristw)
- [#4874](https://github.com/apache/incubator-superset/pull/4874) Portuguese translation (#4874) (@nunohelibeires)
- [#5523](https://github.com/apache/incubator-superset/pull/5523) [sql lab] simplify the visualize flow (#5523) (@mistercrunch)
- [#5469](https://github.com/apache/incubator-superset/pull/5469) Update BigNumber design (#5469) (@kristw)
- [#5536](https://github.com/apache/incubator-superset/pull/5536) Replace metadata refresh stacktrace with danger flash (#5536) (@villebro)
- [#5540](https://github.com/apache/incubator-superset/pull/5540) fix superset error message flow (#5540) (@timifasubaa)
- [#5531](https://github.com/apache/incubator-superset/pull/5531) Include README in MANIFEST (#5531) (@jeffreythewang)
- [#5437](https://github.com/apache/incubator-superset/pull/5437) Annotation Styles for Time Series Annotations (#5437) (@JamshedRahman)
- [#5538](https://github.com/apache/incubator-superset/pull/5538) Stop pretty printing dashboard json (#5538) (@michellethomas)
- [#5533](https://github.com/apache/incubator-superset/pull/5533) [ad-hoc filters] Remove legacy split in /explore (#5533) (@john-bodley)
- [#5517](https://github.com/apache/incubator-superset/pull/5517) [get_df] Updating multi-statement logic (#5517) (@john-bodley)
- [#5521](https://github.com/apache/incubator-superset/pull/5521) Adding 364 days to time compare option (#5521) (@michellethomas)
- [#5525](https://github.com/apache/incubator-superset/pull/5525) [ad-hoc filters] Fixing issue with legacy filters (#5525) (@john-bodley)
- [#5529](https://github.com/apache/incubator-superset/pull/5529) Fix time shift (#5529) (@betodealmeida)
- [#5380](https://github.com/apache/incubator-superset/pull/5380) Add time grain blacklist and addons to config.py (#5380) (@villebro)
- [#5522](https://github.com/apache/incubator-superset/pull/5522) added clickhouse as supported db (#5522) (@The-Alchemist)
- [#5512](https://github.com/apache/incubator-superset/pull/5512) hotfix - pass link not error message (#5512) (@timifasubaa)
- [#5504](https://github.com/apache/incubator-superset/pull/5504) Set max width for tooltips (#5504) (@jeffreythewang)
- [#5516](https://github.com/apache/incubator-superset/pull/5516) Fixed the issue of Zambia country map. (#5516) (@visshaljagtap)
- [#5500](https://github.com/apache/incubator-superset/pull/5500) allow security manager provide error message (#5500) (@timifasubaa)
- [#5425](https://github.com/apache/incubator-superset/pull/5425) set default layout for new added charts (#5425) (@graceguo-supercat)
- [#5459](https://github.com/apache/incubator-superset/pull/5459) Added India in country map visualizaion. (#5459) (@visshaljagtap)
- [#5508](https://github.com/apache/incubator-superset/pull/5508) Fix 5479 - unicode columns issue. (#5508) (@mmuru)
- [#5502](https://github.com/apache/incubator-superset/pull/5502) Improve hive/pyhive error message regex (#5502) (@mistercrunch)
- [#5505](https://github.com/apache/incubator-superset/pull/5505) Remove dashboard transition related config (#5505) (@graceguo-supercat)
- [#5490](https://github.com/apache/incubator-superset/pull/5490) [sqllab] fix unexpected keyword argument 'ignore_nan' (#5490) (@mistercrunch)
- [#5493](https://github.com/apache/incubator-superset/pull/5493) Apply SQL_QUERY_MUTATOR to explore & dashboard (#5493) (@mistercrunch)
- [#5494](https://github.com/apache/incubator-superset/pull/5494) [sql lab] fix Hive 'Transport' not open issue (#5494) (@mistercrunch)
- [#5495](https://github.com/apache/incubator-superset/pull/5495) [sql lab] extract Hive error messages (#5495) (@mistercrunch)
- [#5387](https://github.com/apache/incubator-superset/pull/5387) Visualization Unicode bug fix (#5387) (@JamshedRahman)
- [#5497](https://github.com/apache/incubator-superset/pull/5497) [migration] bug fix in dashboard migration (bebcf3fed1fe_) (#5497) (@graceguo-supercat)
- [#5492](https://github.com/apache/incubator-superset/pull/5492) Modify Athena connection description (#5492) (@yoonian)
- [#5478](https://github.com/apache/incubator-superset/pull/5478) Remove is-react dep (#5478) (@betodealmeida)
- [#5418](https://github.com/apache/incubator-superset/pull/5418) retire dashboard v1 (js and python) (#5418) (@graceguo-supercat)
- [#5463](https://github.com/apache/incubator-superset/pull/5463) Migrate dashboard positions data from v1 to v2 format (#5463) (@graceguo-supercat)
- [#5471](https://github.com/apache/incubator-superset/pull/5471) [migration] Fix migration 3dda56f1c (#5471) (@john-bodley)
- [#5468](https://github.com/apache/incubator-superset/pull/5468) fix migration 3dda56f1c (#5468) (@timifasubaa)
- [#5460](https://github.com/apache/incubator-superset/pull/5460) Move flake8-related packages deps to reqs-dev.txt (#5460) (@mistercrunch)
- [#5426](https://github.com/apache/incubator-superset/pull/5426) Add row_limit control to line chart (#5426) (@mistercrunch)
- [#5467](https://github.com/apache/incubator-superset/pull/5467) Fix broken dedup and remove redundant db_spec logic (#5467) (@villebro)
- [#5464](https://github.com/apache/incubator-superset/pull/5464) Fix the build by merging both db migrations heads (#5464) (@mistercrunch)
- [#5178](https://github.com/apache/incubator-superset/pull/5178) [sql] Correct SQL parameter formatting (#5178) (@john-bodley)
- [#5454](https://github.com/apache/incubator-superset/pull/5454) Clarify title when importing a table (#5454) (@mistercrunch)
- [#5455](https://github.com/apache/incubator-superset/pull/5455) Add week granularity for Clickhouse (#5455) (@qeorqe)
- [#5436](https://github.com/apache/incubator-superset/pull/5436) Added Zambia geojson up to district level. (#5436) (@AndreLesa)
- [#5410](https://github.com/apache/incubator-superset/pull/5410) Migrated to click (#5410) (@gbates101)
- [#5443](https://github.com/apache/incubator-superset/pull/5443) Add Snowflake connection string instructions (#5443) (@villebro)
- [#5448](https://github.com/apache/incubator-superset/pull/5448) Time filter fixes (#5448) (@betodealmeida)
- [#5413](https://github.com/apache/incubator-superset/pull/5413) remove limiting at the display level (#5413) (@timifasubaa)
- [#5432](https://github.com/apache/incubator-superset/pull/5432) Typo fixes in viz.py and CONTRIBUTING.md (#5432) (@visshaljagtap)
- [#5416](https://github.com/apache/incubator-superset/pull/5416) Add pylint back as a tox env (#5416) (@mistercrunch)
- [#5424](https://github.com/apache/incubator-superset/pull/5424) Avoid expensive select_star on dashboard bootstrap data (#5424) (@mistercrunch)
- [#5419](https://github.com/apache/incubator-superset/pull/5419) Fixed typos in currently modified files (#5419) (@visshaljagtap)
- [#5393](https://github.com/apache/incubator-superset/pull/5393) allow selection of dbs where csv can be uploaded to (#5393) (@timifasubaa)
- [#5415](https://github.com/apache/incubator-superset/pull/5415) Fix db migration 3dda56f1c4c6 (#5415) (@mistercrunch)
- [#5370](https://github.com/apache/incubator-superset/pull/5370) [webpack 4] third time's the charm ;) (#5370) (@williaster)
- [#5412](https://github.com/apache/incubator-superset/pull/5412) Fix time filter in dashboard v2 (#5412) (@betodealmeida)
- [#5411](https://github.com/apache/incubator-superset/pull/5411) allow 7 tabs, remove 'slice_' prefix in logs (#5411) (@williaster)
- [#5177](https://github.com/apache/incubator-superset/pull/5177) Time shift difference (#5177) (@betodealmeida)
- [#5295](https://github.com/apache/incubator-superset/pull/5295) [sqllab] Fix sqllab limit regex issue with sqlparse (#5295) (@timifasubaa)
- [#5101](https://github.com/apache/incubator-superset/pull/5101) Explore to SQL Lab (#5101) (@betodealmeida)
- [#5404](https://github.com/apache/incubator-superset/pull/5404) [big_number] tooltip shows in the wrong place (#5404) (@mistercrunch)
- [#4981](https://github.com/apache/incubator-superset/pull/4981) Make time filter more usable (#4981) (@betodealmeida)
- [#5329](https://github.com/apache/incubator-superset/pull/5329) [Table Viz] columns not match with group_by control (#5329) (@graceguo-supercat)
- [#5376](https://github.com/apache/incubator-superset/pull/5376) [bugfix] make MetricsControl work with DECK visualizations (#5376) (@mistercrunch)
- [#5375](https://github.com/apache/incubator-superset/pull/5375) Add `IS NOT NULL` and `IS NULL` as filter options (#5375) (@hughhhh)
- [#5352](https://github.com/apache/incubator-superset/pull/5352) Make Pypi upload support markdown (#5352) (@mistercrunch)
- [#5392](https://github.com/apache/incubator-superset/pull/5392) Fix display limit in sql lab (#5392) (@villebro)
- [#5403](https://github.com/apache/incubator-superset/pull/5403) Fix the build (#5403) (@mistercrunch)
- [#5368](https://github.com/apache/incubator-superset/pull/5368) quote hive column names (#5368) (@timifasubaa)
- [#5355](https://github.com/apache/incubator-superset/pull/5355) get rid of global `notify` (#5355) (@williaster)
- [#5236](https://github.com/apache/incubator-superset/pull/5236) [pie] improvements to pie charts (#5236) (@mistercrunch)
- [#5357](https://github.com/apache/incubator-superset/pull/5357) Set control 'percent_metrics's default to [] (#5357) (@mistercrunch)
- [#5379](https://github.com/apache/incubator-superset/pull/5379) Adding Druid Time Granularities (#5379) (@JamshedRahman)
- [#5371](https://github.com/apache/incubator-superset/pull/5371) Set ignore NaN as true for TableViz (#5371) (@hughhhh)
- [#5362](https://github.com/apache/incubator-superset/pull/5362) [dashboard] should use forceV2Edit property name (#5362) (@graceguo-supercat)
- [#5360](https://github.com/apache/incubator-superset/pull/5360) [dashboard] Fix save issue at Force_V2_Edit mode (#5360) (@graceguo-supercat)
- [#5334](https://github.com/apache/incubator-superset/pull/5334) CHANGELOG entry for 0.25.0 to 0.26.0 (#5334) (@mistercrunch)
- [#5303](https://github.com/apache/incubator-superset/pull/5303) use schema form field in upload csv (#5303) (@timifasubaa)
- [#5354](https://github.com/apache/incubator-superset/pull/5354) [cache] Adding description for a zero cache timeout (#5354) (@john-bodley)
- [#5356](https://github.com/apache/incubator-superset/pull/5356) added a 'no_trend_line' option (#5356) (@xiaoyugit)
### 0.26.2 (2018/07/05 13:37 +00:00)
- [#5349](https://github.com/apache/incubator-superset/pull/5349) impala support for epoch timestamps (#5349) (@aaronbannin)
- [#5211](https://github.com/apache/incubator-superset/pull/5211) [Bug fix] Divide by 1000.000 in epoch_ms_to_dttm() to not lose precision in Presto (#5211) (@EvelynTurner)
- [#5328](https://github.com/apache/incubator-superset/pull/5328) Implement rolling api introduced in pandas 0.18 (#5328) (@villebro)
- [#5337](https://github.com/apache/incubator-superset/pull/5337) normalize column names for Redshift (#5337) (@minh5)
### 0.26.1 (2018/07/04 21:16 +00:00)
- [#5338](https://github.com/apache/incubator-superset/pull/5338) A couple of setup.py fixes (#5338) (@xrmx)
- [#5346](https://github.com/apache/incubator-superset/pull/5346) RST formatting fix for Installation docs (#5346) (@kulte)
- [#5348](https://github.com/apache/incubator-superset/pull/5348) Fix typo in Start with Docker (#5348) (@kulte)
### 0.26.0 (2018/07/03 14:13 +00:00)
- [#5315](https://github.com/apache/incubator-superset/pull/5315) [cache] Allowing zero cache-timeout (#5315) (@john-bodley)
- [#5313](https://github.com/apache/incubator-superset/pull/5313) Fix flaky unit test - remove 'Markup' object in data (#5313) (@mistercrunch)

View File

@@ -206,6 +206,7 @@ source venv/bin/activate
# Install external dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Install Superset in editable (development) mode
pip install -e .
@@ -221,8 +222,8 @@ superset init
# Load some data to play with
superset load_examples
# Start the Flask web server (but see below for frontend asset compilation)
superset runserver -d
# Start the Flask dev web server (but see below for frontend asset compilation)
flask run -p 8080 --with-threads --reload --debugger
```
#### Logging to the browser console
@@ -292,6 +293,21 @@ npm run dev-server -- --supersetPort=8081
After adding or upgrading an NPM package by changing `package.json`, you must run `yarn install`, which will regenerate the `yarn.lock` file. Then, be sure to commit the new `yarn.lock` so that other users' builds are reproducible. See [the Yarn docs](https://yarnpkg.com/blog/2016/11/24/lockfiles-for-all/) for more information.
#### Feature flags
Superset supports a server-wide feature flag system, which eases the incremental development of features. To add a new feature flag, simply modify `superset_config.py` with something like the following:
```
FEATURE_FLAGS = {
'SCOPED_FILTER': True,
}
```
If you want to use the same flag in the client code, also add it to the FeatureFlag TypeScript enum in `superset/assets/src/featureFlags.ts`. For example,
```
export enum FeatureFlag {
SCOPED_FILTER = 'SCOPED_FILTER',
}
```
## Testing
All tests are carried out in [tox](http://tox.readthedocs.io/en/latest/index.html)
@@ -379,10 +395,10 @@ from flask_babel import lazy_gettext as _
then wrap our translatable strings with it, e.g. `_('Translate me')`. During extraction, string literals passed to `_` will be added to the generated `.po` file for each language for later translation.
At runtime, the `_` function will return the translation of the given string for the current language, or the given string itself if no translation is available.
In JavaScript, the technique is similar: we import `t` (simple translation), `tn` (translation containing a number), and `TCT` (translating entire React Components).
In JavaScript, the technique is similar: we import `t` (simple translation), `tn` (translation containing a number).
```javascript
import {t, tn, TCT} from locales;
import {t, tn } from '@superset-ui/translation';
```
### Enabling language selection

View File

@@ -1,8 +1,8 @@
Make sure these boxes are checked before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if any
- [ ] I have reproduced the issue with at least the latest released version of superset
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
### Superset version

View File

@@ -6,8 +6,6 @@ recursive-exclude superset/static/assets/docs *
recursive-exclude superset/static/assets/images/viz_thumbnails_large *
recursive-exclude superset/static/docs *
recursive-exclude superset/static/spec *
recursive-exclude superset/static/assets/src *
recursive-include superset/static/assets/src/visualizations/CountryMap/ *
recursive-exclude superset/static/images/viz_thumbnails_large *
recursive-exclude superset/static/assets/node_modules *
recursive-include superset/templates *

View File

@@ -177,10 +177,12 @@ the world know they are using Superset. Join our growing community!
- [ScopeAI](https://www.getscopeai.com)
- [Shopee](https://shopee.sg)
- [Shopkick](https://www.shopkick.com)
- [Showmax](https://tech.showmax.com)
- [Tails.com](https://tails.com)
- [THEICONIC](http://theiconic.com.au/)
- [Tobii](http://www.tobii.com/)
- [Tooploox](https://www.tooploox.com/)
- [TrustMedis](https://trustmedis.com)
- [Twitter](https://twitter.com/)
- [Udemy](https://www.udemy.com/)
- [VIPKID](https://www.vipkid.com.cn/)

View File

@@ -11,7 +11,8 @@ ENV LANG=C.UTF-8 \
HOME=/home/work
RUN apt-get update -y
#Install dependencies to fix `curl https support error` and `elaying package configuration warning`
RUN apt-get install -y apt-transport-https apt-utils
# Install some dependencies
# http://airbnb.io/superset/installation.html#os-dependencies
RUN apt-get update -y && apt-get install -y build-essential libssl-dev \
@@ -35,8 +36,11 @@ WORKDIR $HOME/incubator-superset
COPY ./ ./
RUN mkdir -p /home/work/.cache
RUN pip install --upgrade setuptools pip
RUN pip install -e . && pip install -r requirements-dev.txt
RUN pip install -r requirements.txt
RUN pip install -r requirements-dev.txt
RUN pip install -e .
ENV PATH=/home/work/incubator-superset/superset/bin:$PATH \
PYTHONPATH=./superset/:$PYTHONPATH

View File

@@ -4,7 +4,7 @@ set -ex
if [ "$#" -ne 0 ]; then
exec "$@"
elif [ "$SUPERSET_ENV" = "local" ]; then
superset runserver -d
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
elif [ "$SUPERSET_ENV" = "production" ]; then
superset runserver -a 0.0.0.0 -w $((2 * $(getconf _NPROCESSORS_ONLN) + 1))
else

View File

@@ -20,5 +20,5 @@ cd superset/assets && npm run build && cd ../../
# Start superset worker for SQL Lab
superset worker &
# To start a development web server, use the -d switch
superset runserver -d
# Start the dev web server
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0

View File

@@ -1,9 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os

View File

@@ -1,19 +1,19 @@
Druid
=====
Superset has a native connector to Druid, and a majority of Druid's
Superset has a native connector to Druid and a majority of Druid's
features are accessible through Superset.
.. note ::
Druid now supports SQL and can be accessed through Superset's
SQLAlchemy connector. The long term vision is to deprecate
SQLAlchemy connector. The long-term vision is to deprecate
the Druid native REST connector and query Druid exclusively through
the SQL interface.
Aggregations
------------
Common aggregations, or Druid metrics can be defined and used in Superset.
Common aggregations or Druid metrics can be defined and used in Superset.
The first and simpler use case is to use the checkbox matrix expose in your
datasource's edit view (``Sources -> Druid Datasources ->
[your datasource] -> Edit -> [tab] List Druid Column``).
@@ -21,8 +21,8 @@ Clicking the ``GroupBy`` and ``Filterable`` checkboxes will make the column
appear in the related dropdowns while in explore view. Checking
``Count Distinct``, ``Min``, ``Max`` or ``Sum`` will result in creating
new metrics that will appear in the ``List Druid Metric`` tab upon saving the
datasource. By editing these metrics, you'll notice that they their ``json``
element correspond to Druid aggregation definition. You can create your own
datasource. By editing these metrics, you'll notice that their ``json``
element corresponds to Druid aggregation definition. You can create your own
aggregations manually from the ``List Druid Metric`` tab following Druid
documentation.

View File

@@ -49,7 +49,7 @@ By default, default (null) values will be omitted. Use the ``-d`` flag to includ
If you want back references to be included (e.g. a column to include the table id
it belongs to) use the ``-b`` flag.
Alternatively you can export datasources using the UI:
Alternatively, you can export datasources using the UI:
1. Open **Sources** -> **Databases** to export all tables associated to a
single or multiple databases. (**Tables** for one or more tables,
@@ -95,7 +95,7 @@ those would be synchronised as well.
If you don't supply the sync flag (``-s``) importing will only add and update (override) fields.
E.g. you can add a ``verbose_name`` to the the column ``ds`` in the table ``random_time_series`` from the example datasets
E.g. you can add a ``verbose_name`` to the column ``ds`` in the table ``random_time_series`` from the example datasets
by saving the following YAML to file and then running the ``import_datasources`` command. ::
databases:

View File

@@ -23,7 +23,7 @@ flexible and lets you choose your web server (Gunicorn, Nginx, Apache),
your metadata database engine (MySQL, Postgres, MariaDB, ...),
your message queue (Redis, RabbitMQ, SQS, ...),
your results backend (S3, Redis, Memcached, ...), your caching layer
(memcached, Redis, ...), works well with services like NewRelic, StatsD and
(Memcached, Redis, ...), works well with services like NewRelic, StatsD and
DataDog, and has the ability to run analytic workloads against
most popular database technologies.
@@ -65,7 +65,7 @@ OS dependencies
Superset stores database connection information in its metadata database.
For that purpose, we use the ``cryptography`` Python library to encrypt
connection passwords. Unfortunately this library has OS level dependencies.
connection passwords. Unfortunately, this library has OS level dependencies.
You may want to attempt the next step
("Superset installation and initialization") and come back to this step if
@@ -82,7 +82,7 @@ the required dependencies are installed: ::
sudo apt-get install build-essential libssl-dev libffi-dev python3.5-dev python-pip libsasl2-dev libldap2-dev
otherwhise build for ``cryptography`` fails.
otherwise build for ``cryptography`` fails.
For **Fedora** and **RHEL-derivatives**, the following command will ensure
that the required dependencies are installed: ::
@@ -138,7 +138,7 @@ Follow these few simple steps to install Superset.::
# Install superset
pip install superset
# Create an admin user (you will be prompted to set username, first and last name before setting a password)
# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
fabmanager create-admin --app superset
# Initialize the database
@@ -173,14 +173,14 @@ application in a way that works well in your environment. Here's an **async**
setup known to work well in production: ::
 gunicorn \
-w 10 \
-k gevent \
--timeout 120 \
-b 0.0.0.0:6666 \
--limit-request-line 0 \
--limit-request-field_size 0 \
--statsd-host localhost:8125 \
superset:app
-w 10 \
-k gevent \
--timeout 120 \
-b 0.0.0.0:6666 \
--limit-request-line 0 \
--limit-request-field_size 0 \
--statsd-host localhost:8125 \
superset:app
Refer to the
`Gunicorn documentation <http://docs.gunicorn.org/en/stable/design.html>`_
@@ -188,7 +188,7 @@ for more information.
Note that *gunicorn* does not
work on Windows so the `superset runserver` command is not expected to work
in that context. Also note that the development web
in that context. Also, note that the development web
server (`superset runserver -d`) is not intended for production use.
If not using gunicorn, you may want to disable the use of flask-compress
@@ -197,9 +197,9 @@ by setting `ENABLE_FLASK_COMPRESS = False` in your `superset_config.py`
Flask-AppBuilder Permissions
----------------------------
By default every time the Flask-AppBuilder (FAB) app is initialized the
By default, every time the Flask-AppBuilder (FAB) app is initialized the
permissions and views are added automatically to the backend and associated with
the Admin role. The issue however is when you are running multiple concurrent
the Admin role. The issue, however, is when you are running multiple concurrent
workers this creates a lot of contention and race conditions when defining
permissions and views.
@@ -224,7 +224,7 @@ If you are running superset behind a load balancer or reverse proxy (e.g. NGINX
or ELB on AWS), you may need to utilise a healthcheck endpoint so that your
load balancer knows if your superset instance is running. This is provided
at ``/health`` which will return a 200 response containing "OK" if the
webserver is running.
the webserver is running.
If the load balancer is inserting X-Forwarded-For/X-Forwarded-Proto headers, you
should set `ENABLE_PROXY_FIX = True` in the superset config file to extract and use
@@ -358,7 +358,7 @@ Here's a list of some of the recommended packages.
| Teradata | ``pip install sqlalchemy-teradata`` | ``teradata://`` |
+---------------+-------------------------------------+-------------------------------------------------+
Note that many other database are supported, the main criteria being the
Note that many other databases are supported, the main criteria being the
existence of a functional SqlAlchemy dialect and Python driver. Googling
the keyword ``sqlalchemy`` in addition of a keyword that describes the
database you want to connect to should get you to the right place.
@@ -442,11 +442,11 @@ into your global default defined in ``CACHE_CONFIG``.
.. code-block:: python
CACHE_CONFIG = {
'CACHE_TYPE': 'redis',
'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
'CACHE_KEY_PREFIX': 'superset_results',
'CACHE_REDIS_URL': 'redis://localhost:6379/0',
}
'CACHE_TYPE': 'redis',
'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
'CACHE_KEY_PREFIX': 'superset_results',
'CACHE_REDIS_URL': 'redis://localhost:6379/0',
}
@@ -470,7 +470,7 @@ while the ``metadata_params`` get unpacked into the
Schemas (Postgres & Redshift)
-----------------------------
Postgres and Redshift, as well as other database,
Postgres and Redshift, as well as other databases,
use the concept of **schema** as a logical entity
on top of the **database**. For Superset to connect to a specific schema,
there's a **schema** parameter you can set in the table form.
@@ -596,9 +596,9 @@ On large analytic databases, it's common to run queries that
execute for minutes or hours.
To enable support for long running queries that
execute beyond the typical web request's timeout (30-60 seconds), it is
necessary to configure an asynchronous backend for Superset which consist of:
necessary to configure an asynchronous backend for Superset which consists of:
* one or many Superset worker (which is implemented as a Celery worker), and
* one or many Superset workers (which is implemented as a Celery worker), and
can be started with the ``celery worker`` command, run
``celery worker --help`` to view the related options.
* a celery broker (message queue) for which we recommend using Redis
@@ -651,7 +651,7 @@ This means that SQLite will not work in this context since it has
limited support for concurrency and
typically lives on the local file system.
Also note that SQL Lab supports Jinja templating in queries, and that it's
Also note that SQL Lab supports Jinja templating in queries and that it's
possible to overload
the default Jinja context in your environment by defining the
``JINJA_CONTEXT_ADDONS`` in your superset configuration. Objects referenced
@@ -686,7 +686,7 @@ Blueprints
`Blueprints are Flask's reusable apps <http://flask.pocoo.org/docs/0.12/blueprints/>`_.
Superset allows you to specify an array of Blueprints
in your ``superset_config`` module. Here's
an example on how this can work with a simple Blueprint. By doing
an example of how this can work with a simple Blueprint. By doing
so, you can expect Superset to serve a page that says "OK"
at the ``/simple_page`` url. This can allow you to run other things such
as custom data visualization applications alongside Superset, on the
@@ -739,7 +739,7 @@ Note that the above command will install Superset into ``default`` namespace of
Custom OAuth2 configuration
---------------------------
Beyond FAB supported providers (github, twitter, linkedin, google, azure), its easy to connect Superset with other OAuth2 Authorization Server implementations that supports "code" authorization.
Beyond FAB supported providers (github, twitter, linkedin, google, azure), its easy to connect Superset with other OAuth2 Authorization Server implementations that support "code" authorization.
The first step: Configure authorization in Superset ``superset_config.py``.
@@ -756,11 +756,11 @@ The first step: Configure authorization in Superset ``superset_config.py``.
'request_token_params':{
'scope': 'read' # Scope for the Authorization
},
'access_token_method':'POST', # HTTP Method to call access_token_url
'access_token_params':{ # Additional parameters for calls to access_token_url
'client_id':'myClientId'
'access_token_method':'POST', # HTTP Method to call access_token_url
'access_token_params':{ # Additional parameters for calls to access_token_url
'client_id':'myClientId'
},
'access_token_headers':{ # Additional headers for calls to access_token_url
'access_token_headers':{ # Additional headers for calls to access_token_url
'Authorization': 'Basic Base64EncodedClientIdAndSecret'
},
'base_url':'https://myAuthorizationServer/oauth2AuthorizationServer/',
@@ -788,11 +788,11 @@ Second step: Create a `CustomSsoSecurityManager` that extends `SupersetSecurityM
logging.debug("Oauth2 provider: {0}.".format(provider))
if provider == 'egaSSO':
# As example, this line request a GET to base_url + '/' + userDetails with Bearer Authentication,
# and expects that authorization server checks the token, and response with user details
# and expects that authorization server checks the token, and response with user details
me = self.appbuilder.sm.oauth_remotes[provider].get('userDetails').data
logging.debug("user_data: {0}".format(me))
return { 'name' : me['name'], 'email' : me['email'], 'id' : me['user_name'], 'username' : me['user_name'], 'first_name':'', 'last_name':''}
...
...
This file must be located at the same directory than ``superset_config.py`` with the name ``custom_sso_security_manager.py``.

View File

@@ -18,7 +18,7 @@ their original values as you run your next ``superset init`` command.
Since it's not recommended to alter the roles described here, it's right
to assume that your security strategy should be to compose user access based
on these base roles and roles that you create. For instance you could
create a role ``Financial Analyst`` that would be made of set of permissions
create a role ``Financial Analyst`` that would be made of a set of permissions
to a set of data sources (tables) and/or databases. Users would then be
granted ``Gamma``, ``Financial Analyst``, and perhaps ``sql_lab``.
@@ -29,13 +29,13 @@ other users and altering other people's slices and dashboards.
Alpha
"""""
Alpha have access to all data sources, but they cannot grant or revoke access
Alpha users have access to all data sources, but they cannot grant or revoke access
from other users. They are also limited to altering the objects that they
own. Alpha users can add and alter data sources.
Gamma
"""""
Gamma have limited access. They can only consume data coming from data sources
Gamma users have limited access. They can only consume data coming from data sources
they have been given access to through another complementary role.
They only have access to view the slices and
dashboards made from data sources that they have access to. Currently Gamma
@@ -75,7 +75,7 @@ click the ``+`` sign.
This new window allows you to give this new role a name, attribute it to users
and select the tables in the ``Permissions`` dropdown. To select the data
sources you want to associate with this role, simply click in the dropdown
sources you want to associate with this role, simply click on the dropdown
and use the typeahead to search for your table names.
You can then confirm with your Gamma users that they see the objects
@@ -87,12 +87,12 @@ Customizing
The permissions exposed by FAB are very granular and allow for a great level
of customization. FAB creates many permissions automagically for each model
that is create (can_add, can_delete, can_show, can_edit, ...) as well as for
that is created (can_add, can_delete, can_show, can_edit, ...) as well as for
each view. On top of that, Superset can expose more granular permissions like
``all_datasource_access``.
We do not recommend altering the 3 base roles as there
are a set of assumptions that Superset build upon. It is possible though for
are a set of assumptions that Superset is built upon. It is possible though for
you to create your own roles, and union them to existing ones.
Permissions
@@ -107,8 +107,7 @@ of permissions. Here are the different categories of permissions:
so on. By adding ``can_delete on Dashboard`` to a role, and granting that
role to a user, this user will be able to delete dashboards.
- **Views**: views are individual web pages, like the ``explore`` view or the
``SQL Lab`` view. When granted to a user, he/she will see that view in
the its menu items, and be able to load that page.
``SQL Lab`` view. When granted to a user, he/she will see that view in its menu items, and be able to load that page.
- **Data source**: For each data source, a permission is created. If the user
does not have the ``all_datasource_access`` permission granted, the user
will only be able to see Slices or explore the data sources that are granted

View File

@@ -231,7 +231,7 @@ You may want to do a couple more things with this measure:
Config > List Sql Metric > Edit Metric > D3Format*)
* Moreover, you may want to see the temperature measurements in plain degrees C,
not tenths of a degree. Or you may want to convert the temperature to degrees
Fahrenheit. You can change the SQL that gets executed agains the database, baking
Fahrenheit. You can change the SQL that gets executed against the database, baking
the logic into the measure itself (*Edit Table Config > List Sql Metric > Edit
Metric > SQL Expression*)

View File

@@ -1471,7 +1471,7 @@ List of Countries
+-------+------------------------------+
|GB-MRY | Moray |
+-------+------------------------------+
|GB-NAY | North Ayshire |
|GB-NAY | North Ayrshire |
+-------+------------------------------+
|GB-NLK | North Lanarkshire |
+-------+------------------------------+
@@ -1712,23 +1712,23 @@ List of Countries
+------+------------------------------+
You need to add a new Country ?
Need to add a new Country?
-------------------------------
To add a new country in country map tools, we need follow next steps :
To add a new country in country map tools, we need to follow the following steps :
1. You need shapfiles why contains data of your map.
You can get this file in this site : http://www.diva-gis.org/gdata
1. You need shapefiles which contain data of your map.
You can get this file on this site: http://www.diva-gis.org/gdata
2. You need to add ISO 3166-2 with column name ISO for all record in your file.
It's important because, it's a norm for mapping your data with geojson file
It's important because it's a norm for mapping your data with geojson file
3. You need to convert shapfile to geojson file.
This action can make with ogr2ogr tools : http://www.gdal.org/ogr2ogr.html
3. You need to convert shapefile to geojson file.
This action can make with ogr2ogr tools: http://www.gdal.org/ogr2ogr.html
4. Put your geojson file in next folder : superset/assets/visualizations/countries with the next name : nameofyourcountries.geojson
5. You can to reduce size of geojson file ont this site : http://mapshaper.org/
5. You can to reduce size of geojson file on this site: http://mapshaper.org/
6. Go in file superset/assets/javascripts/explorev2/stores/controls.jsx

View File

@@ -1,4 +1,5 @@
console_log==0.2.10
python-dotenv
flake8-commas==2.0.0
flake8-import-order==0.18
flake8-quotes==1.0.0

View File

@@ -9,37 +9,35 @@ amqp==2.3.2 # via kombu
asn1crypto==0.24.0 # via cryptography
babel==2.6.0 # via flask-babel, flower
billiard==3.5.0.4 # via celery
bleach==2.1.2
bleach==3.0.2
boto3==1.4.7
botocore==1.7.48
cchardet==1.1.3 # via tabulator
cchardet==1.0.0 # via tabulator
celery==4.2.0
certifi==2018.8.24 # via requests
cffi==1.11.5 # via cryptography
chardet==3.0.4 # via requests
click==6.7 # via flask, flask-appbuilder, tableschema, tabulator
click==6.7
colorama==0.3.9
contextlib2==0.5.5
cryptography==1.9
defusedxml==0.5.0 # via python3-openid
docutils==0.14 # via botocore
et-xmlfile==1.0.1 # via openpyxl
flask-appbuilder==1.12.0
flask-appbuilder==1.12.1
flask-babel==0.11.1 # via flask-appbuilder
flask-caching==1.4.0
flask-compress==1.4.0
flask-login==0.4.1 # via flask-appbuilder
flask-migrate==2.1.1
flask-openid==1.2.5 # via flask-appbuilder
flask-sqlalchemy==2.1 # via flask-appbuilder, flask-migrate
flask-sqlalchemy==2.3.2 # via flask-appbuilder, flask-migrate
flask-wtf==0.14.2
flask==0.12.2
flask==1.0.2
flower==0.9.2
future==0.16.0
futures==3.1.1 # via flower
future==0.16.0 # via pyhive
geopy==1.11.0
gunicorn==19.8.0
html5lib==1.0.1 # via bleach
humanize==0.5.1
idna==2.6
ijson==2.3 # via tabulator
@@ -69,12 +67,13 @@ python-editor==1.0.3 # via alembic
python-geohash==0.8.5
python3-openid==3.1.0 # via flask-openid
pytz==2018.5 # via babel, celery, flower, pandas
pyyaml==3.12
pyyaml==3.13
requests==2.18.4
rfc3986==1.1.0 # via tableschema
s3transfer==0.1.13 # via boto3
sasl==0.2.1 # via thrift-sasl
simplejson==3.15.0
six==1.11.0 # via bleach, cryptography, isodate, jsonlines, linear-tsv, pathlib2, polyline, pydruid, python-dateutil, sasl, sqlalchemy-utils, tableschema, tabulator, thrift
sqlalchemy-utils==0.32.21
sqlalchemy==1.2.2
sqlparse==0.2.4
@@ -87,7 +86,7 @@ unicodecsv==0.14.1
unidecode==1.0.22
urllib3==1.22 # via requests
vine==1.1.4 # via amqp
webencodings==0.5.1 # via html5lib
webencodings==0.5.1 # via bleach
werkzeug==0.14.1 # via flask
wtforms==2.2.1 # via flask-wtf
xlrd==1.1.0 # via tabulator

View File

@@ -53,22 +53,21 @@ setup(
zip_safe=False,
scripts=['superset/bin/superset'],
install_requires=[
'bleach',
'boto3==1.4.7',
'bleach>=3.0.2, <4.0.0',
'boto3>=1.4.7, <2.0.0',
'botocore>=1.7.0, <1.8.0',
'celery>=4.2.0',
'click==6.7',
'colorama==0.3.9',
'celery>=4.2.0, <5.0.0',
'click>=6.0, <7.0.0', # click >=7 forces "-" instead of "_"
'colorama',
'contextlib2',
'cryptography',
'flask<1.0.0',
'flask-appbuilder>=1.12.1',
'flask>=1.0.0, <2.0.0',
'flask-appbuilder>=1.12.1, <2.0.0',
'flask-caching',
'flask-compress',
'flask-migrate',
'flask-wtf',
'flower', # deprecated
'future>=0.16.0, <0.17',
'geopy',
'gunicorn', # deprecated
'humanize',
@@ -83,7 +82,7 @@ setup(
'pyhive>=0.4.0',
'python-dateutil',
'python-geohash',
'pyyaml>=3.11',
'pyyaml>=3.13',
'requests',
'simplejson>=3.15.0',
'sqlalchemy',

View File

@@ -13,9 +13,11 @@ from flask_migrate import Migrate
from flask_wtf.csrf import CSRFProtect
from werkzeug.contrib.fixers import ProxyFix
from superset import config, utils
from superset import config
from superset.connectors.connector_registry import ConnectorRegistry
from superset.security import SupersetSecurityManager
from superset.utils.core import (
get_update_perms_flag, pessimistic_connection_handling, setup_cache)
APP_DIR = os.path.dirname(__file__)
CONFIG_MODULE = os.environ.get('SUPERSET_CONFIG', 'superset.config')
@@ -97,11 +99,11 @@ if conf.get('SILENCE_FAB'):
logging.getLogger('flask_appbuilder').setLevel(logging.ERROR)
if app.debug:
app.logger.setLevel(logging.DEBUG)
app.logger.setLevel(logging.DEBUG) # pylint: disable=no-member
else:
# In production mode, add log handler to sys.stderr.
app.logger.addHandler(logging.StreamHandler())
app.logger.setLevel(logging.INFO)
app.logger.addHandler(logging.StreamHandler()) # pylint: disable=no-member
app.logger.setLevel(logging.INFO) # pylint: disable=no-member
logging.getLogger('pyhive.presto').setLevel(logging.INFO)
db = SQLA(app)
@@ -112,10 +114,10 @@ if conf.get('WTF_CSRF_ENABLED'):
for ex in csrf_exempt_list:
csrf.exempt(ex)
utils.pessimistic_connection_handling(db.engine)
pessimistic_connection_handling(db.engine)
cache = utils.setup_cache(app, conf.get('CACHE_CONFIG'))
tables_cache = utils.setup_cache(app, conf.get('TABLE_NAMES_CACHE_CONFIG'))
cache = setup_cache(app, conf.get('CACHE_CONFIG'))
tables_cache = setup_cache(app, conf.get('TABLE_NAMES_CACHE_CONFIG'))
migrate = Migrate(app, db, directory=APP_DIR + '/migrations')
@@ -183,7 +185,7 @@ appbuilder = AppBuilder(
base_template='superset/base.html',
indexview=MyIndexView,
security_manager_class=custom_sm,
update_perms=utils.get_update_perms_flag(),
update_perms=get_update_perms_flag(),
)
security_manager = appbuilder.sm

View File

@@ -18,7 +18,6 @@
"func-names": 0,
"react/jsx-no-bind": 0,
"no-confusing-arrow": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/anchor-has-content": 0,
"react/require-default-props": 0,
@@ -40,6 +39,10 @@
"react/no-string-refs": 0,
"indent": 0,
"no-multi-spaces": 0,
"padded-blocks": 0
"padded-blocks": 0,
"import/extensions": [".js", ".jsx", ".ts", ".tsx", ".json"]
},
"settings": {
"import/resolver": "webpack"
}
}

View File

@@ -37,7 +37,7 @@
null,
null
],
"description": "Bounds for the Y axis. When left empty, the bounds are dynamically defined based on the min/max of the data. Note that this feature will only expand the axis range. It won't narrow the data's extent."
"description": "Bounds for the Y-axis. When left empty, the bounds are dynamically defined based on the min/max of the data. Note that this feature will only expand the axis range. It won't narrow the data's extent."
},
"order_by_cols": {
"type": "SelectControl",
@@ -253,7 +253,7 @@
]
],
"default": "series",
"description": "Defines how the color are attributed."
"description": "Defines how the colors are attributed."
},
"canvas_image_rendering": {
"type": "SelectControl",
@@ -753,7 +753,7 @@
"label": "Reduce X ticks",
"renderTrigger": true,
"default": false,
"description": "Reduces the number of X axis ticks to be rendered. If true, the x axis wont overflow and labels may be missing. If false, a minimum width will be applied to columns and the width may overflow into an horizontal scroll."
"description": "Reduces the number of X-axis ticks to be rendered. If true, the x-axis won't overflow and labels may be missing. If false, a minimum width will be applied to columns and the width may overflow into a horizontal scroll."
},
"include_series": {
"type": "CheckboxControl",
@@ -834,7 +834,7 @@
"Usa"
]
],
"description": "The name of country that Superset should display"
"description": "The name of the country that Superset should display"
},
"country_fieldtype": {
"type": "SelectControl",
@@ -2242,14 +2242,14 @@
"label": "X bounds",
"renderTrigger": true,
"default": true,
"description": "Whether to display the min and max values of the X axis"
"description": "Whether to display the min and max values of the X-axis"
},
"y_axis_showminmax": {
"type": "CheckboxControl",
"label": "Y bounds",
"renderTrigger": true,
"default": true,
"description": "Whether to display the min and max values of the Y axis"
"description": "Whether to display the min and max values of the Y-axis"
},
"rich_tooltip": {
"type": "CheckboxControl",
@@ -2263,14 +2263,14 @@
"label": "Y Log Scale",
"default": false,
"renderTrigger": true,
"description": "Use a log scale for the Y axis"
"description": "Use a log scale for the Y-axis"
},
"x_log_scale": {
"type": "CheckboxControl",
"label": "X Log Scale",
"default": false,
"renderTrigger": true,
"description": "Use a log scale for the X axis"
"description": "Use a log scale for the X-axis"
},
"log_scale": {
"type": "CheckboxControl",

View File

@@ -2,5 +2,7 @@
"baseUrl": "http://localhost:8081",
"videoUploadOnPasses": false,
"ignoreTestFiles": ["**/!(*.test.js)"],
"projectId": "fbf96q"
"projectId": "fbf96q",
"viewportWidth": 1280,
"viewportHeight": 800
}

View File

@@ -1,71 +1,85 @@
import { WORLD_HEALTH_DASHBOARD, CHECK_DASHBOARD_FAVORITE_ENDPOINT } from './dashboard.helper';
import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper';
import readResponseBlob from '../../utils/readResponseBlob';
export default () => describe('top-level controls', () => {
let sliceIds = [];
let dashboard = {};
let isFavoriteDashboard = false;
const sliceRequests = [];
const forceRefreshRequests = [];
let mapId;
beforeEach(() => {
cy.server();
cy.login();
cy.route(CHECK_DASHBOARD_FAVORITE_ENDPOINT).as('countFavStar');
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.get('#app').then((data) => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
dashboard = bootstrapData.dashboard_data;
sliceIds = dashboard.slices.map(slice => (slice.slice_id));
});
const dashboard = bootstrapData.dashboard_data;
const sliceIds = dashboard.slices.map(slice => (slice.slice_id));
mapId = dashboard.slices.find(slice => (slice.form_data.viz_type === 'world_map')).slice_id;
cy.wait('@countFavStar').then((xhr) => {
isFavoriteDashboard = xhr.response.body.count === 1;
sliceIds
.forEach((id) => {
const sliceRequest = `getJson_${id}`;
sliceRequests.push(`@${sliceRequest}`);
cy.route('POST', `/superset/explore_json/?form_data={"slice_id":${id}}`).as(sliceRequest);
const forceRefresh = `getJson_${id}_force`;
forceRefreshRequests.push(`@${forceRefresh}`);
cy.route('POST', `/superset/explore_json/?form_data={"slice_id":${id}}&force=true`).as(forceRefresh);
});
});
});
it('should allow favor/unfavor', () => {
if (!isFavoriteDashboard) {
cy.get('.favstar').find('i').should('have.class', 'fa-star-o');
cy.get('.favstar').trigger('click');
cy.get('.favstar').find('i').should('have.class', 'fa-star')
.and('not.have.class', 'fa-star-o');
} else {
cy.get('.favstar').find('i').should('have.class', 'fa-star')
.and('not.have.class', 'fa-star-o');
cy.get('.favstar').trigger('click');
cy.get('.fave-unfave-icon').find('i').should('have.class', 'fa-star-o')
.and('not.have.class', 'fa-star');
}
// reset to original fav state
cy.get('.favstar').trigger('click');
afterEach(() => {
sliceRequests.length = 0;
forceRefreshRequests.length = 0;
});
it('should allow auto refresh', () => {
const sliceRequests = [];
const forceRefreshRequests = [];
sliceIds
.forEach((id) => {
const sliceRequest = `getJson_${id}`;
sliceRequests.push(`@${sliceRequest}`);
cy.route('POST', `/superset/explore_json/?form_data={"slice_id":${id}}`).as(sliceRequest);
it('should allow chart level refresh', () => {
cy.wait(sliceRequests);
cy.get('.grid-container .world_map').should('be.exist');
cy.get(`#slice_${mapId}-controls`).click();
cy.get(`#slice_${mapId}-controls`).next()
.find('.refresh-tooltip').trigger('click', { force: true });
const forceRefresh = `getJson_${id}_force`;
forceRefreshRequests.push(`@${forceRefresh}`);
cy.route('POST', `/superset/explore_json/?form_data={"slice_id":${id}}&force=true`).as(forceRefresh);
});
// not allow dashboard level force refresh when any chart is loading
cy.get('#save-dash-split-button').trigger('click', { forece: true });
cy.contains('Force refresh dashboard').parent().should('have.class', 'disabled');
// not allow chart level force refresh when it is loading
cy.get(`#slice_${mapId}-controls`).next()
.find('.refresh-tooltip')
.parent()
.parent()
.should('have.class', 'disabled');
cy.wait(`@getJson_${mapId}_force`);
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').parent().not('have.class', 'disabled');
});
it('should allow dashboard level force refresh', () => {
// when charts are not start loading, for example, under a secondary tab,
// should allow force refresh
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').parent().not('have.class', 'disabled');
// wait the all dash finish loading.
cy.wait(sliceRequests);
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').click();
cy.contains('Force refresh dashboard').trigger('click', { force: true });
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').parent().should('have.class', 'disabled');
// wait all charts force refreshed
cy.wait(forceRefreshRequests).then((xhrs) => {
// is_cached in response should be false
xhrs.forEach(async (xhr) => {
const responseBody = await readResponseBlob(xhr.response.body);
expect(responseBody.is_cached).to.equal(false);
xhrs.forEach((xhr) => {
readResponseBlob(xhr.response.body).then((responseBody) => {
expect(responseBody.is_cached).to.equal(false);
});
});
});
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').parent().not('have.class', 'disabled');
});
});

View File

@@ -0,0 +1,35 @@
import { WORLD_HEALTH_DASHBOARD, CHECK_DASHBOARD_FAVORITE_ENDPOINT } from './dashboard.helper';
export default () => describe('favorite dashboard', () => {
let isFavoriteDashboard = false;
beforeEach(() => {
cy.server();
cy.login();
cy.route(CHECK_DASHBOARD_FAVORITE_ENDPOINT).as('countFavStar');
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.wait('@countFavStar').then((xhr) => {
isFavoriteDashboard = xhr.response.body.count === 1;
});
});
it('should allow favor/unfavor', () => {
if (!isFavoriteDashboard) {
cy.get('.favstar').find('i').should('have.class', 'fa-star-o');
cy.get('.favstar').trigger('click');
cy.get('.favstar').find('i').should('have.class', 'fa-star')
.and('not.have.class', 'fa-star-o');
} else {
cy.get('.favstar').find('i').should('have.class', 'fa-star')
.and('not.have.class', 'fa-star-o');
cy.get('.favstar').trigger('click');
cy.get('.fave-unfave-icon').find('i').should('have.class', 'fa-star-o')
.and('not.have.class', 'fa-star');
}
// reset to original fav state
cy.get('.favstar').trigger('click');
});
});

View File

@@ -1,11 +1,13 @@
import DashboardControlsTest from './controls';
import DashboardEditModeTest from './edit_mode';
import DashboardFavStarTest from './fav_star';
import DashboardFilterTest from './filter';
import DashboardLoadTest from './load';
describe('Dashboard', () => {
DashboardControlsTest();
DashboardEditModeTest();
DashboardFavStarTest();
DashboardFilterTest();
DashboardLoadTest();
});

View File

@@ -61,7 +61,7 @@ describe('AdhocMetrics', () => {
});
});
it('Clear metric and set custom sql adhoc metric', () => {
xit('Clear metric and set custom sql adhoc metric', () => {
const metric = 'SUM(num)/COUNT(DISTINCT name)';
cy.visitChartByName('Num Births Trend');

View File

@@ -26,19 +26,22 @@ describe('Test explore links', () => {
});
it('Visit short link', () => {
cy.route('POST', 'r/shortner/').as('getShortUrl');
cy.visitChartByName('Growth Rate');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=short-link-button]').click();
cy.get('#shorturl-popover').within(() => {
cy.get('i[title="Copy to clipboard"]')
.siblings()
.first()
.invoke('text')
.then((text) => {
cy.visit(text);
// explicitly wait for the url response
cy.wait('@getShortUrl');
cy.wait(100);
cy.get('#shorturl-popover [data-test="short-url"]').invoke('text')
.then((text) => {
cy.visit(text);
});
});
cy.verifySliceSuccess({ waitAlias: '@getJson' });
});
@@ -52,7 +55,7 @@ describe('Test explore links', () => {
});
});
it('Test chart save as', () => {
xit('Test chart save as', () => {
const formData = {
...HEALTH_POP_FORM_DATA_DEFAULTS,
viz_type: 'table',
@@ -76,7 +79,7 @@ describe('Test explore links', () => {
});
});
it('Test chart save', () => {
xit('Test chart save', () => {
const chartName = 'Test chart';
cy.visitChartByName(chartName);
cy.verifySliceSuccess({ waitAlias: '@getJson' });

View File

@@ -0,0 +1,25 @@
import { FORM_DATA_DEFAULTS } from './shared.helper';
export default () => describe('FilterBox', () => {
const VIZ_DEFAULTS = { ...FORM_DATA_DEFAULTS, viz_type: 'filter_box' };
function verify(formData) {
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({ waitAlias: '@getJson' });
}
beforeEach(() => {
cy.server();
cy.login();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('should work with default date filter', () => {
verify(VIZ_DEFAULTS);
// Filter box should default to having a date filter with no filter selected
cy.get('div.filter_box').within(() => {
cy.get('span').contains('No filter');
});
});
});

View File

@@ -5,6 +5,7 @@ import BubbleTest from './bubble';
import CompareTest from './compare';
import DistBarTest from './dist_bar';
import DualLineTest from './dual_line';
import FilterBox from './filter_box';
import HistogramTest from './histogram';
import LineTest from './line';
import PieTest from './pie';
@@ -23,6 +24,7 @@ describe('All Visualizations', () => {
CompareTest();
DistBarTest();
DualLineTest();
FilterBox();
HistogramTest();
LineTest();
PieTest();

View File

@@ -40,6 +40,7 @@ export default () => {
it('successfully saves a query', () => {
cy.route('savedqueryviewapi/**').as('getSavedQuery');
cy.route('superset/tables/**').as('getTables');
const query = 'SELECT ds, gender, name, num FROM main.birth_names ORDER BY name LIMIT 3';
const savedQueryTitle = `CYPRESS TEST QUERY ${shortid.generate()}`;
@@ -83,7 +84,7 @@ export default () => {
cy.get('table tr:first-child a[href*="savedQueryId"').click();
// will timeout without explicitly waiting here
cy.wait('@getSavedQuery');
cy.wait(['@getSavedQuery', '@getTables']);
// run the saved query
cy.get('#js-sql-toolbar button')

View File

@@ -5,7 +5,7 @@ superset/bin/superset db upgrade
superset/bin/superset load_test_users
superset/bin/superset load_examples
superset/bin/superset init
superset/bin/superset runserver &
flask run -p 8081 --with-threads --reload --debugger &
cd "$(dirname "$0")"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 968 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

View File

@@ -1,11 +1,17 @@
module.exports = {
testRegex: '\\/spec\\/.*_spec\\.jsx?$',
testRegex: '\\/spec\\/.*_spec\\.(j|t)sx?$',
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/spec/__mocks__/styleMock.js',
'\\.(gif|ttf|eot|svg)$': '<rootDir>/spec/__mocks__/fileMock.js',
'^src/(.*)$': '<rootDir>/src/$1',
},
setupTestFrameworkScriptFile: '<rootDir>/spec/helpers/shim.js',
testURL: 'http://localhost',
collectCoverageFrom: ['src/**/*.{js,jsx}'],
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
coverageDirectory: '<rootDir>/coverage/',
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.tsx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
};

View File

@@ -1,6 +1,6 @@
{
"name": "superset",
"version": "0.28.1",
"version": "0.29.0rc3",
"description": "Superset is a data exploration platform designed to be visual, intuitive, and interactive.",
"license": "Apache-2.0",
"directories": {
@@ -15,8 +15,8 @@
"dev-server": "webpack-dev-server --mode=development --progress",
"prod": "node --max_old_space_size=4096 webpack --mode=production --colors --progress",
"build": "NODE_ENV=production webpack --mode=production --colors --progress",
"lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx .",
"lint-fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx .",
"lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx . && tslint -c tslint.json ./src/**/*.ts{,x}",
"lint-fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx . && tslint -c tslint.json --fix ./src/**/*.ts{,x}",
"sync-backend": "babel-node --presets env src/syncBackend.js",
"cypress": "cypress",
"cypress-debug": "cypress open --config watchForFileChanges=true"
@@ -51,7 +51,8 @@
"@data-ui/sparkline": "^0.0.54",
"@data-ui/theme": "^0.0.62",
"@data-ui/xy-chart": "^0.0.61",
"@superset-ui/core": "^0.0.5",
"@superset-ui/connection": "^0.3.0",
"@superset-ui/translation": "^0.3.0",
"@vx/legend": "^0.0.170",
"@vx/responsive": "0.0.172",
"@vx/scale": "^0.0.165",
@@ -62,11 +63,16 @@
"brace": "^0.11.1",
"classnames": "^2.2.5",
"d3": "^3.5.17",
"d3-array": "^1.2.4",
"d3-cloud": "^1.2.1",
"d3-color": "^1.2.0",
"d3-format": "^1.3.2",
"d3-hierarchy": "^1.1.5",
"d3-sankey": "^0.4.2",
"d3-scale": "^2.1.2",
"d3-selection": "^1.3.2",
"d3-svg-legend": "^1.x",
"d3-time-format": "^2.1.3",
"d3-tip": "^0.9.1",
"datamaps": "^0.5.8",
"datatables.net-bs": "^1.10.15",
@@ -74,11 +80,9 @@
"distributions": "^1.0.0",
"dnd-core": "^2.6.0",
"dompurify": "^1.0.3",
"fastdom": "^1.0.6",
"geojson-extent": "^0.3.2",
"geolib": "^2.0.24",
"immutable": "^3.8.2",
"jed": "^1.1.1",
"jquery": "3.1.1",
"json-bigint": "^0.3.0",
"lodash": "^4.17.11",
@@ -97,7 +101,6 @@
"react-bootstrap": "^0.31.5",
"react-bootstrap-dialog": "^0.10.0",
"react-bootstrap-slider": "2.1.5",
"react-bootstrap-table": "^4.3.1",
"react-color": "^2.13.8",
"react-datetime": "^2.14.0",
"react-dnd": "^2.5.4",
@@ -105,6 +108,7 @@
"react-dom": "^16.4.1",
"react-gravatar": "^2.6.1",
"react-hot-loader": "^4.3.6",
"react-loadable": "^5.5.0",
"react-map-gl": "^3.0.4",
"react-markdown": "^3.3.0",
"react-redux": "^5.0.2",
@@ -118,13 +122,13 @@
"react-syntax-highlighter": "^7.0.4",
"react-virtualized": "9.19.1",
"react-virtualized-select": "^3.1.3",
"reactable": "^1.1.0",
"reactable": "1.0.2",
"redux": "^3.5.2",
"redux-localstorage": "^0.4.1",
"redux-thunk": "^2.1.0",
"redux-undo": "^1.0.0-beta9-9-7",
"reselect": "^4.0.0",
"shortid": "^2.2.6",
"sprintf-js": "^1.1.1",
"srcdoc-polyfill": "^1.0.0",
"supercluster": "^4.1.1",
"underscore": "^1.8.3",
@@ -132,6 +136,9 @@
"viewport-mercator-project": "^5.0.0"
},
"devDependencies": {
"@types/jest": "^23.3.5",
"@types/react": "^16.4.18",
"@types/react-dom": "^16.0.9",
"babel-cli": "^6.14.0",
"babel-core": "^6.10.4",
"babel-eslint": "^8.2.2",
@@ -144,6 +151,7 @@
"babel-polyfill": "^6.23.0",
"babel-preset-airbnb": "^2.1.1",
"babel-preset-env": "^1.7.0",
"cache-loader": "^1.2.2",
"clean-webpack-plugin": "^0.1.19",
"css-loader": "^1.0.0",
"cypress": "^3.0.3",
@@ -152,6 +160,7 @@
"eslint": "^4.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-config-prettier": "^2.9.0",
"eslint-import-resolver-webpack": "^0.10.1",
"eslint-plugin-cypress": "^2.0.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jest": "^21.24.1",
@@ -162,7 +171,7 @@
"exports-loader": "^0.7.0",
"fetch-mock": "^7.0.0-alpha.6",
"file-loader": "^1.1.11",
"gl": "^4.0.4",
"fork-ts-checker-webpack-plugin": "^0.4.9",
"ignore-styles": "^5.0.1",
"imports-loader": "^0.7.1",
"jest": "^23.6.0",
@@ -182,7 +191,13 @@
"speed-measure-webpack-plugin": "^1.2.3",
"style-loader": "^0.21.0",
"terser-webpack-plugin": "^1.1.0",
"thread-loader": "^1.2.0",
"transform-loader": "^0.2.3",
"ts-jest": "^23.10.4",
"ts-loader": "^5.2.0",
"tslint": "^5.11.0",
"tslint-react": "^3.6.0",
"typescript": "^3.1.3",
"url-loader": "^1.0.1",
"webpack": "^4.19.0",
"webpack-assets-manifest": "^3.0.1",

View File

@@ -1,5 +1,5 @@
import fetchMock from 'fetch-mock';
import { SupersetClient } from '@superset-ui/core';
import { SupersetClient } from '@superset-ui/connection';
export default function setupSupersetClient() {
// The following is needed to mock out SupersetClient requests

View File

@@ -4,6 +4,9 @@ import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
import jsdom from 'jsdom';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import { configure as configureTranslation } from '@superset-ui/translation';
import setupSupersetClient from './setupSupersetClient';
configure({ adapter: new Adapter() });
@@ -45,3 +48,6 @@ global.window.XMLHttpRequest = global.XMLHttpRequest;
global.window.location = { href: 'about:blank' };
global.window.performance = { now: () => new Date().getTime() };
global.$ = require('jquery')(global.window);
configureTranslation();
setupSupersetClient();

View File

@@ -1,81 +0,0 @@
import React from 'react';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import { chart as initChart } from '../../../src/chart/chartReducer';
import Chart from '../../../src/chart/Chart';
import ChartBody from '../../../src/chart/ChartBody';
import Loading from '../../../src/components/Loading';
describe('Chart', () => {
const chart = {
...initChart,
queryResponse: {
form_data: {},
error: null,
status: 'success',
},
};
const mockedProps = {
...chart,
id: 223,
containerId: 'slice-container-223',
datasource: {},
formData: {},
vizType: 'pie',
height: 300,
width: 400,
actions: {
runQuery: () => {},
},
};
let wrapper;
beforeEach(() => {
wrapper = shallow(
<Chart {...mockedProps} />,
);
});
describe('renderVis', () => {
let stub;
beforeEach(() => {
stub = sinon.stub(wrapper.instance(), 'renderVis');
});
afterEach(() => {
stub.restore();
});
it('should not call when loading', () => {
const prevProp = wrapper.props();
wrapper.setProps({
height: 100,
});
wrapper.instance().componentDidUpdate(prevProp);
expect(stub.callCount).toBe(0);
});
it('should call after chart stop loading', () => {
const prevProp = wrapper.props();
wrapper.setProps({
chartStatus: 'success',
});
wrapper.instance().componentDidUpdate(prevProp);
expect(stub.callCount).toBe(1);
});
it('should call after resize', () => {
wrapper.setProps({
chartStatus: 'rendered',
height: 100,
});
expect(stub.callCount).toBe(1);
});
});
describe('render', () => {
it('should render ChartBody after loading is completed', () => {
expect(wrapper.find(Loading)).toHaveLength(1);
expect(wrapper.find(ChartBody)).toHaveLength(0);
});
});
});

View File

@@ -2,7 +2,6 @@ import fetchMock from 'fetch-mock';
import sinon from 'sinon';
import { Logger } from '../../../src/logger';
import setupSupersetClient from '../../helpers/setupSupersetClient';
import * as exploreUtils from '../../../src/explore/exploreUtils';
import * as actions from '../../../src/chart/chartAction';
@@ -17,7 +16,6 @@ describe('chart actions', () => {
};
beforeAll(() => {
setupSupersetClient();
setupDefaultFetchMock();
});
@@ -81,6 +79,7 @@ describe('chart actions', () => {
expect(dispatch.callCount).toBe(4);
expect(fetchMock.calls(MOCK_URL)).toHaveLength(1);
expect(dispatch.args[3][0].type).toBe(actions.CHART_UPDATE_SUCCEEDED);
expect(loggerStub.callCount).toBe(1);
return Promise.resolve();
});
@@ -97,6 +96,8 @@ describe('chart actions', () => {
// chart update, trigger query, update form data, fail
expect(dispatch.callCount).toBe(4);
expect(dispatch.args[3][0].type).toBe(actions.CHART_UPDATE_TIMEOUT);
expect(loggerStub.callCount).toBe(1);
expect(loggerStub.args[0][1].error_details).toBe('timeout');
setupDefaultFetchMock();
return Promise.resolve();
@@ -104,7 +105,7 @@ describe('chart actions', () => {
});
it('should dispatch CHART_UPDATE_FAILED action upon non-timeout non-abort failure', () => {
fetchMock.post(MOCK_URL, { throws: { error: 'misc error' } }, { overwriteRoutes: true });
fetchMock.post(MOCK_URL, { throws: { statusText: 'misc error' } }, { overwriteRoutes: true });
const timeoutInSec = 1 / 1000;
const actionThunk = actions.runQuery({}, false, timeoutInSec);
@@ -115,6 +116,9 @@ describe('chart actions', () => {
const updateFailedAction = dispatch.args[3][0];
expect(updateFailedAction.type).toBe(actions.CHART_UPDATE_FAILED);
expect(updateFailedAction.queryResponse.error).toBe('misc error');
expect(loggerStub.callCount).toBe(1);
expect(loggerStub.args[0][1].error_details).toBe('misc error');
setupDefaultFetchMock();
return Promise.resolve();

View File

@@ -0,0 +1,28 @@
import chartReducer, { chart } from '../../../src/chart/chartReducer';
import * as actions from '../../../src/chart/chartAction';
describe('chart reducers', () => {
const chartKey = 1;
let testChart;
let charts;
beforeEach(() => {
testChart = {
...chart,
id: chartKey,
};
charts = { [chartKey]: testChart };
});
it('should update endtime on fail', () => {
const newState = chartReducer(charts, actions.chartUpdateStopped(chartKey));
expect(newState[chartKey].chartUpdateEndTime).toBeGreaterThan(0);
expect(newState[chartKey].chartStatus).toEqual('stopped');
});
it('should update endtime on timeout', () => {
const newState = chartReducer(charts, actions.chartUpdateTimeout('timeout', 60, chartKey));
expect(newState[chartKey].chartUpdateEndTime).toBeGreaterThan(0);
expect(newState[chartKey].chartStatus).toEqual('failed');
});
});

View File

@@ -1,14 +1,22 @@
import React from 'react';
import Select from 'react-select';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import fetchMock from 'fetch-mock';
import AsyncSelect from '../../../src/components/AsyncSelect';
describe('AsyncSelect', () => {
afterAll(fetchMock.reset);
afterEach(fetchMock.resetHistory);
const dataEndpoint = '/chart/api/read';
const dataGlob = 'glob:*/chart/api/read';
fetchMock.get(dataGlob, []);
fetchMock.resetHistory();
const mockedProps = {
dataEndpoint: '/chart/api/read',
onChange: sinon.spy(),
dataEndpoint,
onChange: () => {},
placeholder: 'Select...',
mutator: () => [
{ value: 1, label: 'main' },
@@ -16,6 +24,7 @@ describe('AsyncSelect', () => {
],
valueRenderer: opt => opt.label,
};
it('is valid element', () => {
expect(
React.isValidElement(<AsyncSelect {...mockedProps} />),
@@ -30,52 +39,81 @@ describe('AsyncSelect', () => {
});
it('calls onChange on select change', () => {
const onChangeSpy = jest.fn();
const wrapper = shallow(
<AsyncSelect {...mockedProps} />,
<AsyncSelect {...mockedProps} onChange={onChangeSpy} />,
);
wrapper.find(Select).simulate('change', { value: 1 });
expect(mockedProps.onChange).toHaveProperty('callCount', 1);
expect(onChangeSpy.mock.calls).toHaveLength(1);
});
describe('auto select', () => {
let server;
beforeEach(() => {
server = sinon.fakeServer.create();
server.respondWith([
200, { 'Content-Type': 'application/json' }, JSON.stringify({}),
]);
});
afterEach(() => {
server.restore();
});
it('should be off by default', () => {
const wrapper = shallow(
<AsyncSelect {...mockedProps} />,
);
wrapper.instance().fetchOptions();
const spy = sinon.spy(wrapper.instance(), 'onChange');
expect(spy.callCount).toBe(0);
});
it('should auto select first option', () => {
const wrapper = shallow(
<AsyncSelect {...mockedProps} autoSelect />,
);
const spy = sinon.spy(wrapper.instance(), 'onChange');
server.respond();
it('should not call onChange if autoSelect=false', (done) => {
expect.assertions(2);
expect(spy.callCount).toBe(1);
expect(spy.calledWith(wrapper.instance().state.options[0])).toBe(true);
});
it('should not auto select when value prop is set', () => {
const wrapper = shallow(
<AsyncSelect {...mockedProps} value={2} autoSelect />,
const onChangeSpy = jest.fn();
shallow(
<AsyncSelect {...mockedProps} onChange={onChangeSpy} />,
);
const spy = sinon.spy(wrapper.instance(), 'onChange');
wrapper.instance().fetchOptions();
server.respond();
expect(spy.callCount).toBe(0);
expect(wrapper.find(Select)).toHaveLength(1);
setTimeout(() => {
expect(fetchMock.calls(dataGlob)).toHaveLength(1);
expect(onChangeSpy.mock.calls).toHaveLength(0);
done();
});
});
it('should auto select the first option if autoSelect=true', (done) => {
expect.assertions(3);
const onChangeSpy = jest.fn();
const wrapper = shallow(
<AsyncSelect {...mockedProps} onChange={onChangeSpy} autoSelect />,
);
setTimeout(() => {
expect(fetchMock.calls(dataGlob)).toHaveLength(1);
expect(onChangeSpy.mock.calls).toHaveLength(1);
expect(onChangeSpy).toBeCalledWith(wrapper.instance().state.options[0]);
done();
});
});
it('should not auto select when value prop is set and autoSelect=true', (done) => {
expect.assertions(3);
const onChangeSpy = jest.fn();
const wrapper = shallow(
<AsyncSelect {...mockedProps} value={2} onChange={onChangeSpy} autoSelect />,
);
setTimeout(() => {
expect(fetchMock.calls(dataGlob)).toHaveLength(1);
expect(onChangeSpy.mock.calls).toHaveLength(0);
expect(wrapper.find(Select)).toHaveLength(1);
done();
});
});
it('should call onAsyncError if there is an error fetching options', (done) => {
expect.assertions(3);
const errorEndpoint = 'async/error/';
const errorGlob = 'glob:*async/error/';
fetchMock.get(errorGlob, { throws: 'error' });
const onAsyncError = jest.fn();
shallow(
<AsyncSelect {...mockedProps} dataEndpoint={errorEndpoint} onAsyncError={onAsyncError} />,
);
setTimeout(() => {
expect(fetchMock.calls(errorGlob)).toHaveLength(1);
expect(onAsyncError.mock.calls).toHaveLength(1);
expect(onAsyncError).toBeCalledWith('error');
done();
});
});
});
});

View File

@@ -1,8 +1,9 @@
import { Provider } from 'react-redux';
import React from 'react';
import { shallow, mount } from 'enzyme';
import sinon from 'sinon';
import ParentSize from '@vx/responsive/build/components/ParentSize';
import { ParentSize } from '@vx/responsive';
import { Sticky, StickyContainer } from 'react-sticky';
import { TabContainer, TabContent, TabPane } from 'react-bootstrap';
@@ -11,6 +12,8 @@ import DashboardBuilder from '../../../../src/dashboard/components/DashboardBuil
import DashboardComponent from '../../../../src/dashboard/containers/DashboardComponent';
import DashboardHeader from '../../../../src/dashboard/containers/DashboardHeader';
import DashboardGrid from '../../../../src/dashboard/containers/DashboardGrid';
import * as dashboardStateActions from '../../../../src/dashboard/actions/dashboardState';
import WithDragDropContext from '../helpers/WithDragDropContext';
import {
dashboardLayout as undoableDashboardLayout,
@@ -23,6 +26,19 @@ const dashboardLayout = undoableDashboardLayout.present;
const layoutWithTabs = undoableDashboardLayoutWithTabs.present;
describe('DashboardBuilder', () => {
let favStarStub;
beforeAll(() => {
// this is invoked on mount, so we stub it instead of making a request
favStarStub = sinon
.stub(dashboardStateActions, 'fetchFaveStar')
.returns({ type: 'mock-action' });
});
afterAll(() => {
favStarStub.restore();
});
const props = {
dashboardLayout,
deleteTopLevelTabs() {},

View File

@@ -78,10 +78,4 @@ describe('Chart', () => {
wrapper.instance().addFilter();
expect(addFilter.callCount).toBe(1);
});
it('should return props.filters when its getFilters method is called', () => {
const filters = { column: ['value'] };
const wrapper = setup({ filters });
expect(wrapper.instance().getFilters()).toBe(filters);
});
});

View File

@@ -1,38 +0,0 @@
import React from 'react';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { shallow } from 'enzyme';
import Dashboard from '../../../../src/dashboard/containers/Dashboard';
import getInitialState from '../../../../src/dashboard/reducers/getInitialState';
describe('Dashboard Container', () => {
const middlewares = [thunk];
const mockStore = configureStore(middlewares);
let store;
let wrapper;
beforeAll(() => {
const bootstrapData = {
dashboard_data: {
slices: [],
metadata: {},
},
common: {
feature_flags: {
FOO_BAR: true,
},
conf: {},
},
};
store = mockStore(getInitialState(bootstrapData), {});
});
beforeEach(() => {
wrapper = shallow(<Dashboard />, { context: { store } });
});
it('should set feature flags', () => {
expect(wrapper.prop('isFeatureEnabled')('FOO_BAR')).toBe(true);
});
});

View File

@@ -23,7 +23,7 @@ describe('sliceEntities reducer', () => {
it('should set slices', () => {
const result = sliceEntitiesReducer(
{ slices: { a: {} } },
{ type: SET_ALL_SLICES, slices: { 1: {}, 2: {} } },
{ type: SET_ALL_SLICES, payload: { slices: { 1: {}, 2: {} } } },
);
expect(result.slices).toEqual({
@@ -39,10 +39,10 @@ describe('sliceEntities reducer', () => {
{},
{
type: FETCH_ALL_SLICES_FAILED,
error: { responseJSON: { message: 'errorrr' } },
payload: { error: 'failed' },
},
);
expect(result.isLoading).toBe(false);
expect(result.errorMessage.indexOf('errorrr')).toBeGreaterThan(-1);
expect(result.errorMessage.indexOf('failed')).toBeGreaterThan(-1);
});
});

View File

@@ -2,18 +2,20 @@ import React from 'react';
import { Tabs } from 'react-bootstrap';
import { shallow } from 'enzyme';
import configureStore from 'redux-mock-store';
import $ from 'jquery';
import sinon from 'sinon';
import fetchMock from 'fetch-mock';
import thunk from 'redux-thunk';
import DatasourceEditor from '../../../src/datasource/DatasourceEditor';
import Field from '../../../src/CRUD/Field';
import mockDatasource from '../../fixtures/mockDatasource';
const props = {
datasource: mockDatasource['7__table'],
addSuccessToast: () => {},
addDangerToast: () => {},
onChange: sinon.spy(),
onChange: () => {},
};
const extraColumn = {
column_name: 'new_column',
type: 'VARCHAR(10)',
@@ -25,26 +27,23 @@ const extraColumn = {
groupby: true,
};
const DATASOURCE_ENDPOINT = 'glob:*/datasource/external_metadata/*';
describe('DatasourceEditor', () => {
const mockStore = configureStore([]);
const mockStore = configureStore([thunk]);
const store = mockStore({});
fetchMock.get(DATASOURCE_ENDPOINT, []);
let wrapper;
let el;
let ajaxStub;
let inst;
beforeEach(() => {
ajaxStub = sinon.stub($, 'ajax');
el = <DatasourceEditor {...props} />;
wrapper = shallow(el, { context: { store } }).dive();
inst = wrapper.instance();
});
afterEach(() => {
ajaxStub.restore();
});
it('is valid', () => {
expect(React.isValidElement(el)).toBe(true);
});
@@ -53,12 +52,17 @@ describe('DatasourceEditor', () => {
expect(wrapper.find(Tabs)).toHaveLength(1);
});
it('makes an async request', () => {
it('makes an async request', (done) => {
wrapper.setState({ activeTabKey: 2 });
const syncButton = wrapper.find('.sync-from-source');
expect(syncButton).toHaveLength(1);
syncButton.simulate('click');
expect(ajaxStub.calledOnce).toBe(true);
setTimeout(() => {
expect(fetchMock.calls(DATASOURCE_ENDPOINT)).toHaveLength(1);
fetchMock.reset();
done();
}, 0);
});
it('merges columns', () => {
@@ -68,4 +72,8 @@ describe('DatasourceEditor', () => {
expect(inst.state.databaseColumns).toHaveLength(numCols + 1);
});
it('renders isSqla fields', () => {
expect(wrapper.state('isSqla')).toBe(true);
expect(wrapper.find(Field).find({ fieldKey: 'fetch_values_predicate' }).exists()).toBe(true);
});
});

View File

@@ -2,7 +2,8 @@ import React from 'react';
import { Modal } from 'react-bootstrap';
import configureStore from 'redux-mock-store';
import { shallow } from 'enzyme';
import $ from 'jquery';
import fetchMock from 'fetch-mock';
import thunk from 'redux-thunk';
import sinon from 'sinon';
import DatasourceModal from '../../../src/datasource/DatasourceModal';
@@ -13,31 +14,30 @@ const props = {
datasource: mockDatasource['7__table'],
addSuccessToast: () => {},
addDangerToast: () => {},
onChange: sinon.spy(),
onChange: () => {},
show: true,
onHide: () => {},
onDatasourceSave: sinon.spy(),
};
const SAVE_ENDPOINT = 'glob:*/datasource/save/';
const SAVE_PAYLOAD = { new: 'data' };
describe('DatasourceModal', () => {
const mockStore = configureStore([]);
const mockStore = configureStore([thunk]);
const store = mockStore({});
fetchMock.post(SAVE_ENDPOINT, SAVE_PAYLOAD);
let wrapper;
let el;
let ajaxStub;
let inst;
beforeEach(() => {
ajaxStub = sinon.stub($, 'ajax');
el = <DatasourceModal {...props} />;
wrapper = shallow(el, { context: { store } }).dive();
inst = wrapper.instance();
});
afterEach(() => {
ajaxStub.restore();
});
it('is valid', () => {
expect(React.isValidElement(el)).toBe(true);
});
@@ -50,8 +50,13 @@ describe('DatasourceModal', () => {
expect(wrapper.find(DatasourceEditor)).toHaveLength(1);
});
it('saves on confirm', () => {
it('saves on confirm', (done) => {
inst.onConfirmSave();
expect(ajaxStub.calledOnce).toBe(true);
setTimeout(() => {
expect(fetchMock.calls(SAVE_ENDPOINT)).toHaveLength(1);
expect(props.onDatasourceSave.getCall(0).args[0]).toEqual(SAVE_PAYLOAD);
fetchMock.reset();
done();
}, 0);
});
});

View File

@@ -7,7 +7,8 @@ import { SketchPicker } from 'react-color';
import ColorPickerControl from
'../../../../src/explore/components/controls/ColorPickerControl';
import ControlHeader from '../../../../src/explore/components/ControlHeader';
import { registerScheme } from '../../../../src/modules/ColorSchemeManager';
import getCategoricalSchemeRegistry from '../../../../src/modules/colors/CategoricalSchemeRegistrySingleton';
import CategoricalScheme from '../../../../src/modules/colors/CategoricalScheme';
const defaultProps = {
value: { },
@@ -17,7 +18,11 @@ describe('ColorPickerControl', () => {
let wrapper;
let inst;
beforeEach(() => {
registerScheme('test', ['red', 'green', 'blue'])
getCategoricalSchemeRegistry()
.registerValue('test', new CategoricalScheme({
name: 'test',
colors: ['red', 'green', 'blue'],
}))
.setDefaultSchemeName('test');
wrapper = shallow(<ColorPickerControl {...defaultProps} />);
inst = wrapper.instance();

View File

@@ -5,10 +5,10 @@ import { Creatable } from 'react-select';
import ColorSchemeControl from
'../../../../src/explore/components/controls/ColorSchemeControl';
import { getAllSchemes } from '../../../../src/modules/ColorSchemeManager';
import getCategoricalSchemeRegistry from '../../../../src/modules/colors/CategoricalSchemeRegistrySingleton';
const defaultProps = {
options: Object.keys(getAllSchemes()).map(s => ([s, s])),
options: getCategoricalSchemeRegistry().keys().map(s => ([s, s])),
};
describe('ColorSchemeControl', () => {

View File

@@ -1,11 +1,9 @@
import React from 'react';
import { shallow } from 'enzyme';
import { getFormDataFromControls, defaultControls }
from '../../../../src/explore/store';
import {
ControlPanelsContainer,
} from '../../../../src/explore/components/ControlPanelsContainer';
import ControlPanelSection from '../../../../src/explore/components/ControlPanelSection';
import { getFormDataFromControls, defaultControls } from 'src/explore/store';
import { ControlPanelsContainer } from 'src/explore/components/ControlPanelsContainer';
import ControlPanelSection from 'src/explore/components/ControlPanelSection';
import * as featureFlags from 'src/featureFlags';
const defaultProps = {
datasource_type: 'table',
@@ -18,12 +16,22 @@ const defaultProps = {
describe('ControlPanelsContainer', () => {
let wrapper;
let scopedFilterOn = false;
const isFeatureEnabledMock = jest.spyOn(featureFlags, 'isFeatureEnabled')
.mockImplementation(() => scopedFilterOn);
beforeEach(() => {
wrapper = shallow(<ControlPanelsContainer {...defaultProps} />);
afterAll(() => {
isFeatureEnabledMock.mockRestore();
});
it('renders ControlPanelSections', () => {
wrapper = shallow(<ControlPanelsContainer {...defaultProps} />);
expect(wrapper.find(ControlPanelSection)).toHaveLength(6);
});
it('renders filter panel when SCOPED_FILTER flag is on', () => {
scopedFilterOn = true;
wrapper = shallow(<ControlPanelsContainer {...defaultProps} />);
expect(wrapper.find(ControlPanelSection)).toHaveLength(7);
});
});

Some files were not shown because too many files have changed in this diff Show More