* 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
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!!
* [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
* 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
* 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
* change because error: E: The method driver /usr/lib/apt/methods/https could not be found.
要提交的变更:
修改: contrib/docker/Dockerfile
* 修改: contrib/docker/Dockerfile