mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Configure Visualizations (#365)
* make viz types configurable * make visualizations configurable * deault every viz is true * add blacklist viz_type * fix build
This commit is contained in:
parent
badcd8bfa1
commit
3f0171b77b
@ -121,6 +121,15 @@ IMG_UPLOAD_URL = '/static/uploads/'
|
||||
CACHE_DEFAULT_TIMEOUT = None
|
||||
CACHE_CONFIG = {'CACHE_TYPE': 'null'}
|
||||
|
||||
|
||||
# ---------------------------------------------------
|
||||
# List of viz_types not allowed in your environment
|
||||
# For example: Blacklist pivot table and treemap:
|
||||
# VIZ_TYPE_BLACKLIST = ['pivot_table', 'treemap']
|
||||
# ---------------------------------------------------
|
||||
|
||||
VIZ_TYPE_BLACKLIST = []
|
||||
|
||||
try:
|
||||
from caravel_config import * # noqa
|
||||
except Exception:
|
||||
|
@ -14,7 +14,6 @@ import logging
|
||||
import uuid
|
||||
from collections import OrderedDict, defaultdict
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
from flask import flash, request, Markup
|
||||
@ -1540,4 +1539,5 @@ viz_types_list = [
|
||||
TreemapViz,
|
||||
]
|
||||
|
||||
viz_types = OrderedDict([(v.viz_type, v) for v in viz_types_list])
|
||||
viz_types = OrderedDict([(v.viz_type, v) for v in viz_types_list
|
||||
if v.viz_type not in config.get('VIZ_TYPE_BLACKLIST')])
|
||||
|
Loading…
Reference in New Issue
Block a user