Commit Graph

3688 Commits

Author SHA1 Message Date
Krist Wongsuphasawat 20e1ac6242
Update `@superset-ui/colors` (#6464)
* Update package version and update breaking changes for color

* update color function usage

* update dependency
2018-11-30 09:50:42 -08:00
Chris Williams 5f7817a6a3
[SIP-5] Build metrics in query_object in the client (#6423)
* [SIP-5] Build metrics in query_object in the client
- Unify the metric interface (absorb the current plain string metric for built-in metric keys into the format used by adhoc metric)
- Port the logic in adhocMetric on the client and process_metrics in the backend to the new typed Metrics class
- Omit hasCustomLabel and formFromData properties from the new metric interface as their value can be inferred from label and optionName
- Expose from the Metrics class both metrics and their labels as public methods to match the all_metrics and metric_labels fields in the backend code
- Provide defaut values for filters, metrics and groupby in the backend

* addressing PR comments

* Adding a comment for metrictype values
2018-11-29 20:57:55 -08:00
michellethomas 5261d8a9fe
Fixing error when clearing big number (#6465) 2018-11-29 18:52:49 -08:00
Krist Wongsuphasawat e715cdb9ac
[READY] Update SuperChart onRenderXXX listeners (#6376)
* Revise LoadableRenderer (+3 squashed commits)
Squashed commits:
[f1614c7c] extract createLoadableRenderer into a separate function
[8689bc94] extend LoadableRenderer
[3d04ff2b] remove skipRendering

* add number of times function was called to the test
2018-11-29 11:09:08 -08:00
Christine Chambers e06f87304c Adding a comment for metrictype values 2018-11-29 13:31:22 -05:00
Christine Chambers a4597afee0 addressing PR comments 2018-11-28 19:39:18 -05:00
Christine Chambers c11e9c8b67 [SIP-5] Build metrics in query_object in the client
- Unify the metric interface (absorb the current plain string metric for built-in metric keys into the format used by adhoc metric)
- Port the logic in adhocMetric on the client and process_metrics in the backend to the new typed Metrics class
- Omit hasCustomLabel and formFromData properties from the new metric interface as their value can be inferred from label and optionName
- Expose from the Metrics class both metrics and their labels as public methods to match the all_metrics and metric_labels fields in the backend code
- Provide defaut values for filters, metrics and groupby in the backend
2018-11-28 19:39:18 -05:00
Junda Yang 2731a010ca fix metadata cache bug (#6458) 2018-11-28 15:15:28 -08:00
Junda Yang f1cae2ecdd override get_view_names in PrestoEngineSpec (#6459)
* override get_view_names in PrestoEngineSpec

* add test

* flake 8

* flake 8
2018-11-28 15:13:38 -08:00
Ville Brofeldt 4579b12732 Ensure that dttm is of same timezone as epoch_with_tz (#6453) 2018-11-27 21:59:23 -08:00
aboganas 71a713dcec replace missing round function in d3 to fix MapBox (#6444)
* replace missing round function in d3

* added unit test

* fixed linting
2018-11-27 21:34:27 -08:00
Maxime Beauchemin 2931baa294
Deprecate database attribute allow_run_sync (#4961)
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op
2018-11-27 21:08:44 -08:00
aboganas 529cb5cab1 fix Calendar Heatmap (#6445)
* fix  D3 v4.0, selections are not arrays anymore

* added vale checking

* fixed linting

* cleanup
2018-11-27 20:54:25 -08:00
aboganas b0a55743b3 fix sunburst breadcrumbs (#6451) 2018-11-27 16:54:10 -08:00
Fokko Driesprong 8a8e840819 Rename Druid to Apache Druid (Incubating) (#6419) 2018-11-27 11:59:10 -08:00
Hugh A. Miles II 52bb92d0d4 [Docs] Make sure venv is py3 and export app (#6401)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2018-11-27 11:41:50 -08:00
Victor Noël 02aa3c6395 Improve development experience with Docker (#5966)
- Improve Docker image
  - smaller
  - faster to build
  - deterministict dependencies (see #5958)
- Rework process to simplify setting things up
  - updated documentation
  - less commands to type
  - no files to move and modify
  - optional loading of samples
- Still working in standalone mode (without volumes for superset)
2018-11-27 11:19:55 -08:00
Grace Guo 3e4742fa7b
[fix] edit chart title cause JS error (#6438) 2018-11-27 10:36:56 -08:00
Jiaji Zhou 1eb0d0d835 Remove coordinator in Druid Cluster config (#5164) (#6443) 2018-11-27 09:41:16 -08:00
pavitranrambo 2b2c650040 Grammatical Error (#6439) 2018-11-26 23:22:05 -08:00
Grace Guo 2489876bc9
[logging] Add render failure error into log (#6422) 2018-11-26 11:51:25 -08:00
Craig Rueda 5ca8c0ba3c Updated local dev instructions to include missing step (#6428) 2018-11-26 11:16:58 -08:00
Krist Wongsuphasawat 3c6e882d28 [bugfix] Display raw value in addition to ERROR (#6417)
* Display raw value in addition to ERROR

* update unit test
2018-11-26 10:44:42 -08:00
zhaoyu89730105 7eb46843cb FixBug sqlMetricModels No attribute get_perm (#6433) 2018-11-26 09:08:54 -08:00
Christian Jauvin 0b830ced93 Fix French typos (#6435) 2018-11-26 09:07:37 -08:00
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