mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Merge pull request #605 from EverythingMe/small_fixes_11_10_2015
Feature: allow setting HighChart's turbo threshold value
This commit is contained in:
commit
1a3df37940
@ -272,6 +272,9 @@
|
||||
};
|
||||
|
||||
var chartOptions = $.extend(true, {}, defaultOptions, chartsDefaults);
|
||||
chartOptions.plotOptions.series = {
|
||||
turboThreshold: featureFlags.highChartsTurboThreshold
|
||||
}
|
||||
|
||||
// $timeout makes sure that this function invoked after the DOM ready. When draw/init
|
||||
// invoked after the DOM is ready, we see first an empty HighCharts objects and later
|
||||
|
@ -248,7 +248,12 @@ function getKeyFromObject(obj, key) {
|
||||
element.html(column.cellTemplate);
|
||||
compile(element.contents())(childScope);
|
||||
} else {
|
||||
element.html(sanitize(scope.formatedValue));
|
||||
if (typeof scope.formatedValue === 'string' || scope.formatedValue instanceof String) {
|
||||
element.html(sanitize(scope.formatedValue));
|
||||
} else {
|
||||
element.text(scope.formatedValue);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,8 @@ def index(**kwargs):
|
||||
|
||||
features = {
|
||||
'clientSideMetrics': settings.CLIENT_SIDE_METRICS,
|
||||
'allowScriptsInUserInput': settings.ALLOW_SCRIPTS_IN_USER_INPUT
|
||||
'allowScriptsInUserInput': settings.ALLOW_SCRIPTS_IN_USER_INPUT,
|
||||
'highChartsTurboThreshold': settings.HIGHCHARTS_TURBO_THRESHOLD
|
||||
}
|
||||
|
||||
return render_template("index.html", user=json.dumps(user), name=settings.NAME,
|
||||
|
@ -141,6 +141,8 @@ SENTRY_DSN = os.environ.get("REDASH_SENTRY_DSN", "")
|
||||
# Client side toggles:
|
||||
ALLOW_SCRIPTS_IN_USER_INPUT = parse_boolean(os.environ.get("REDASH_ALLOW_SCRIPTS_IN_USER_INPUT", "false"))
|
||||
CLIENT_SIDE_METRICS = parse_boolean(os.environ.get("REDASH_CLIENT_SIDE_METRICS", "false"))
|
||||
# http://api.highcharts.com/highcharts#plotOptions.series.turboThreshold
|
||||
HIGHCHARTS_TURBO_THRESHOLD = int(os.environ.get("REDASH_HIGHCHARTS_TURBO_THRESHOLD", "1000"))
|
||||
|
||||
# Features:
|
||||
FEATURE_ALLOW_ALL_TO_EDIT_QUERIES = parse_boolean(os.environ.get("REDASH_FEATURE_ALLOW_ALL_TO_EDIT", "true"))
|
||||
|
Loading…
Reference in New Issue
Block a user