Commit Graph

3713 Commits

Author SHA1 Message Date
Maxime Beauchemin 9dffe3abb0
Link to the ASF's code of conduct (#6406) 2018-11-25 08:46:37 -08:00
Krist Wongsuphasawat 2916c48567
use same xaxis formatter for line chart tooltip (#6412) 2018-11-20 17:35:13 -08:00
timifasubaa 91b758f3bc
Reduce data loaded before loading tests (#6298)
* reduce data loaded before loading tests

* make cypress only load needed tests
2018-11-19 15:27:25 -08:00
Evans Hauser a6f013270d Update README.md (#6410) 2018-11-19 14:04:57 -08:00
Maxime Beauchemin 8155f4bf30
[bugfix] deckgl legend is not interactive (#6365)
* [bugfix] deckgl legend is not interactive

Somehow when clicking categories in the legend, nothing happened. The
problem seemed to be around the `getDerivedStateFromProps` override
which gets triggered after each render and would alter the state and
reset the categories state to their origin.

Changed the method name to not be an override and just be called once
in the constructor

https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops

* lint
2018-11-19 14:02:07 -08:00
Maxime Beauchemin 4c4b6c41a1
Minor improvements to Histogram viz (#6391)
* Minor improvements to Histogram viz

* prevent legend overflow (spill) by simply hiding it
* legend title only includes metric name when necessary
* control validator asking forcing at least one numeric column to be
selected

* Removing print()
2018-11-19 14:01:20 -08:00
michellethomas d1a3ba85dd
Adding cypress tests for showing errors, time range filter, and verbose name (#6407)
* Adding cypress tests for showing erros, time range filter, and verbose name

* Adding tests for time range without ago

* Adding test to verify error message showing
2018-11-19 11:29:46 -08:00
Andy 8f3d911149 'Fligth' filename typo (#6364)
* renamed the raw data to correct typo

* renamed flight data ref to correct typo
2018-11-18 15:26:30 -05:00
Yongjie Zhao 5913c27830 Expose Sqllab status in databases list view (#6388) 2018-11-16 21:00:58 -08:00
Grace Guo e469086d61
[fix] view results in sql lab (#6405) 2018-11-16 20:58:05 -08:00
Maxime Beauchemin 8177fa17fa
[bugfix] deck.gl grid&hex don't respond to zoom&drag (#6363)
* [bugfix] deck.gl grid&hex don't respond to zoom&drag

Following recent changes, Hex & Grid component wouldn't respond to
viewport interactions. This fixes the issue.

This PR also greatly improve rendering performance by only recomputing
the deck.gl layers when needed, as opposed to every time the viewport
changes, which is very inneficient.

Note that most other deck.gl layers seem to be systematically
recomputing layers, we'll have to fix this in another PR.

* Addressing comments
2018-11-16 17:12:19 -08:00
Maxime Beauchemin 4c94447635
Fix adhoc metrics in Polygon (#6399)
* Fix adhoc metrics in Polygon

* Addressing comments
2018-11-16 17:06:21 -08:00
Christine Chambers 8b2cae007d [SIP-5] QueryBuilder in the client for granularity and groupby in word cloud (#6377)
* [SIP-5] QueryBuilder in the client for groupby field

- Lay the structure of the QueryContext builder in the client
- QueryContext builder composes different portions of the queryContext object (to be sent to server from the client) from the datasourceBuilder and the queryObjectBuilder.
- The datasourceBuilder builds the datasource id and type by parsing them from the datasource field in formdata
- The queryObjectBuilder currently only builds the groupby field. It will further compose the queryObject from sub query builders in future PRs.
- Create a buildQuery method for WordCloud and override the groupby value with the value of series from formdata.

* Addressing PR comments
- Rename query builder files and their default exports
- Move tests into spec/javascripts/superset-ui for easy mass migration to superset-uiin the future
- Define viz specific formData and export formData for each viz type as intersection type of the generic formData and the viz specific one
- Specify the type signature for sqla and druid based data sources

* Addressing additional PR comments.
- Introduce a Datasource class and leverage Typescript's declaration merging of the interface
by the same name.
- Let Typescript infer the return type of various builders instead of specifying them explicitly

* Further tweaking the generic buildQueryContext method and viz speicific buildQuery methodes per PR comments.

* git mv a renamed file.

* addressing additional pr comments
2018-11-16 15:51:50 -08:00
Grace Guo c42bcf81bc
[migration]clean up __from and __to parameters in dashboard json_metadata (#6378) 2018-11-16 11:03:22 -08:00
Jeffrey Wang 8c4f723a61 Set default limit on creation of new qe and on run (#6400) 2018-11-15 15:38:51 -08:00
timifasubaa c17de3940c
Split cypress tests (#6241)
* aplit cypress tests

* split into three
2018-11-15 12:26:33 -08:00
Grace Guo ec1316a5a8
[fix] JS error after delete row level tab (#6393) 2018-11-15 10:30:08 -08:00
Kengo Seki e66b0469b4 Add Japan country map (#6368)
* Add Japan country map

* Fix obsolete paths in the document about adding new country map
2018-11-14 18:46:57 -08:00
Maxime Beauchemin d6953210b8
Disable flaky cypress SQL Lab test (#6302)
* Disable flaky cypress SQL Lab test

* lint
2018-11-14 18:21:55 -08:00
Kengo Seki a5b528c688 Update the installation document based on Python 3.6+ (#6370)
* Update the description based on Ubuntu 16.04 with 18.04,
  since Python version bundled with the former is 3.5,
  which is not already supported

* Remove obsolete descriptions based on Python <= 3.5
2018-11-14 18:14:11 -08:00
Maxime Beauchemin 4690563d40
[bugfix] prevent d3-format from raising (#6386)
Since https://github.com/apache/incubator-superset/pull/6287 and
effectively moving to a new version of d3, d3-format and d3-time-format
raises when receiving invalid input strings.

This code wraps the potential issues inside `try` blocks that will
effectively return an `ERROR` string as output to the formatting
function.
2018-11-14 11:22:06 -08:00
Krist Wongsuphasawat cb556688ec do not convert value to lowercase when looking up color (#6384) 2018-11-13 13:44:43 -08:00
timifasubaa d9a7d565a0
remove user params (#6345) 2018-11-13 09:27:08 -08:00
Conglei 8e2d28dd6e Fixed the cache issue for BigNumber (#6375)
* fixed the cache issue for bignumber

* fixed
2018-11-12 12:57:46 -08:00
Maxime Beauchemin e0b3927ece
[bugfix] visualization flickers when rerunning query (#6374)
When hitting the Query button in the explore view, the previous chart
gets shown (flaskhed quickly) between the moment where the loading
spinner goes away and the new chart show up. This fix seems to prevent
this.
2018-11-12 10:49:27 -08:00
James Finucane b44c8349ee [bugfix] EventFlow does not display (#6367)
* Fix EventFlow transform is not a function

transformProps was being passed into EventFlowChartPlugin as object (module) as opposed to function. This commit changes the implementation to be consistent with the other ChartPlugins and fixes the typeError that causes EventFlow Chart to not display.

* Revert to lazy-loading transformProps

- Revert to lazy-loading transformProps
- Fix in Superchart will default to transformProps.default if available to allow for the lazy-loading

* Fix for lazy-loaded imports in ChartPlugins

* Fix lint error
2018-11-12 10:41:21 -08:00
John Bodley 0873abde12
[404] Aborting for views with invalid dashboard/slice IDs (#6355) 2018-11-12 10:08:20 -08:00
John Bodley 74f0817bf0
[hive] Fixing where lastest partition logic (#6357) 2018-11-12 10:07:38 -08:00
Grace Guo 1a5ca35a55
[cypress] Test dashboard save/save_as functions (#6361) 2018-11-11 21:57:23 -08:00
Krist Wongsuphasawat a7b52da6ce [reviewable] Integrate @superset-ui/{core,color,chart} modules (#6234)
* Add d3 micro packages

* Replace d3 imports with specific modules import

* Define d3 colors

* import specific d3 submodules instead of entire d3

* update function name

* move function location and fix small bug

* Move primary color to control

* remove colorscalefactory usage

* remove unused d3

* fix unit test

* fix color picker

* use @superset-ui/color

* update package version

* remove files that are extracted

* replace all references

* fix two files

* Revert some changes to split to another PR

* remove adaptor

* Address Christine's comment

* remove d3 v3 from calendar

* remove d3.scale.threshold

* Get rid of colorScalerFactory and revise hexToRGB

* fix color cleaning

* fix lint
2018-11-11 10:07:05 -08:00
Maxime Beauchemin 841d5e6338
[nvd3] refactor margins (#6282) 2018-11-10 15:56:20 -08:00
Christine Chambers 81349df625 Parse datasource_id as integer on the server side (#6359)
- Datasource ids are being serialized into strings on the client side and python's default json.load doesn't deserialize strings representing integers as integers. Adding an integer parsing step when initializing QueryContext.
2018-11-10 15:45:03 -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 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