* [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
* 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
- 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
* 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
- 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)
* [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
* 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()
* 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
* [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
* [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
* 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
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.
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.