mirror of https://github.com/apache/superset.git
Fix display limit in sql lab (#5392)
* Fix display limit in sql lab * Add redundant variable from config.py * Fix test config * Change to SQL_MAX_ROW * Remove last remaining occurence of DISPLAY_SQL_MAX_ROW
This commit is contained in:
parent
2eeff2ae0b
commit
bd475879a4
|
@ -250,8 +250,7 @@ BACKUP_COUNT = 30
|
||||||
MAPBOX_API_KEY = os.environ.get('MAPBOX_API_KEY', '')
|
MAPBOX_API_KEY = os.environ.get('MAPBOX_API_KEY', '')
|
||||||
|
|
||||||
# Maximum number of rows returned in the SQL editor
|
# Maximum number of rows returned in the SQL editor
|
||||||
SQL_MAX_ROW = 1000000
|
SQL_MAX_ROW = 1000
|
||||||
DISPLAY_SQL_MAX_ROW = 1000
|
|
||||||
|
|
||||||
# Maximum number of tables/views displayed in the dropdown window in SQL Lab.
|
# Maximum number of tables/views displayed in the dropdown window in SQL Lab.
|
||||||
MAX_TABLE_NAMES = 3000
|
MAX_TABLE_NAMES = 3000
|
||||||
|
|
|
@ -2477,7 +2477,7 @@ class Superset(BaseSupersetView):
|
||||||
'{}'.format(rejected_tables)))
|
'{}'.format(rejected_tables)))
|
||||||
|
|
||||||
payload = utils.zlib_decompress_to_string(blob)
|
payload = utils.zlib_decompress_to_string(blob)
|
||||||
display_limit = app.config.get('DISPLAY_SQL_MAX_ROW', None)
|
display_limit = app.config.get('SQL_MAX_ROW', None)
|
||||||
if display_limit:
|
if display_limit:
|
||||||
payload_json = json.loads(payload)
|
payload_json = json.loads(payload)
|
||||||
payload_json['data'] = payload_json['data'][:display_limit]
|
payload_json['data'] = payload_json['data'][:display_limit]
|
||||||
|
|
Loading…
Reference in New Issue