Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added support to configure the default explorer viz #13610

Merged
merged 3 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion superset-frontend/src/explore/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function getControlsState(state, inputFormData) {
* */
// Getting a list of active control names for the current viz
const formData = { ...inputFormData };
const vizType = formData.viz_type || 'table';
const vizType = formData.viz_type || state.common.conf.DEFAULT_EXPLORER_VIZ || 'table';

handleDeprecatedControls(formData);

Expand Down
3 changes: 3 additions & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def _try_json_readsha( # pylint: disable=unused-argument
VERSION_SHA_LENGTH = 8
VERSION_SHA = _try_json_readsha(VERSION_INFO_FILE, VERSION_SHA_LENGTH)

# default viz used in chart explorer
DEFAULT_EXPLORER_VIZ = 'table'
cccs-jc marked this conversation as resolved.
Show resolved Hide resolved

ROW_LIMIT = 50000
VIZ_ROW_LIMIT = 10000
# max rows retreieved when requesting samples from datasource in explore view
Expand Down
1 change: 1 addition & 0 deletions superset/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"DISABLE_DATASET_SOURCE_EDIT",
"ENABLE_JAVASCRIPT_CONTROLS",
"DEFAULT_SQLLAB_LIMIT",
"DEFAULT_EXPLORER_VIZ",
"SQL_MAX_ROW",
"SUPERSET_WEBSERVER_DOMAINS",
"SQLLAB_SAVE_WARNING_MESSAGE",
Expand Down