Skip to content

Commit eed2cd9

Browse files
committed
Added a set of chart options for small activity indication graphs. Fixed a pylint nit.
- Legacy-Id: 11939
1 parent 15a8e28 commit eed2cd9

1 file changed

Lines changed: 56 additions & 4 deletions

File tree

ietf/settings.py

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def skip_suspicious_operations(record):
188188
from django.http import UnreadablePostError
189189
def skip_unreadable_post(record):
190190
if record.exc_info:
191-
exc_type, exc_value = record.exc_info[:2]
191+
exc_type, exc_value = record.exc_info[:2] # pylint: disable=unused-variable
192192
if isinstance(exc_value, UnreadablePostError):
193193
return False
194194
return True
@@ -381,7 +381,7 @@ def skip_unreadable_post(record):
381381

382382
# These are regexes
383383
TEST_URL_COVERAGE_EXCLUDE = [
384-
"^\^admin/",
384+
r"^\^admin/",
385385
]
386386

387387
# Tese are filename globs
@@ -730,12 +730,64 @@ def skip_unreadable_post(record):
730730
# squashing them to equidistant columns
731731
"ordinal": False,
732732
},
733-
}
733+
}
734+
735+
CHART_TYPE_ACTIVITY_OPTIONS = {
736+
"chart": {
737+
"type": 'column',
738+
},
739+
"credits": {
740+
"enabled": False,
741+
},
742+
"navigation": {
743+
"buttonOptions": {
744+
"enabled": False,
745+
}
746+
},
747+
"navigator": {
748+
"enabled": False,
749+
},
750+
"rangeSelector" : {
751+
"enabled": False,
752+
},
753+
"scrollbar": {
754+
"enabled": False,
755+
},
756+
"series" : [{
757+
"name" : None,
758+
"animation": False,
759+
"type" : "column",
760+
"data" : [],
761+
"dataGrouping": {
762+
"units": [[
763+
'year', # unit name
764+
[1,], # allowed multiples
765+
]]
766+
},
767+
"turboThreshold": 1, # Only check format of first data point. All others are the same
768+
"pointIntervalUnit": 'day',
769+
"pointPadding": -0.2,
770+
}],
771+
"title" : {
772+
"text" : None,
773+
},
774+
"xAxis": {
775+
"type": "datetime",
776+
# This makes the axis use the given coordinates, rather than
777+
# squashing them to equidistant columns
778+
"ordinal": False,
779+
},
780+
"yAxis": {
781+
"labels": {
782+
"enabled": False,
783+
}
784+
},
785+
}
734786

735787

736788
# Put the production SECRET_KEY in settings_local.py, and also any other
737789
# sensitive or site-specific changes. DO NOT commit settings_local.py to svn.
738-
from settings_local import * # pyflakes:ignore
790+
from settings_local import * # pyflakes:ignore pylint: disable=wildcard-import
739791

740792
# Add DEV_APPS to INSTALLED_APPS
741793
INSTALLED_APPS += DEV_APPS

0 commit comments

Comments
 (0)