Skip to content

Commit 0281ca6

Browse files
committed
4.7.5
- each process could have each own diagram height
1 parent c53a78c commit 0281ca6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

process/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__title__ = 'django-process'
22
__description__ = 'An app for create process workflows and schedule tasks on django'
33
__url__ = 'https://github.com/Jesrat/django-process'
4-
__version__ = '4.7.4'
4+
__version__ = '4.7.5'
55
__author__ = 'Josue Gomez'
66
__author_email__ = 'jgomez@jesrat.com'
77
__license__ = 'Apache 2.0'

process/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Process(models.Model):
2727
day_of_month = models.CharField(_("day of month"), max_length=50)
2828
month = models.CharField(_("month"), max_length=50)
2929
day_of_week = models.CharField(_("day of week"), max_length=50)
30+
chart_height = models.PositiveIntegerField(_("chart height"), default=0)
3031
objects = models.Manager()
3132

3233
def __str__(self):

process/templatetags/process_diagram.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<script>
1313
Highcharts.chart('container-process-{id}', {
1414
chart: {
15-
height: """ + get_conf('diagram__chart_height') + """,
15+
height: {chart_height},
1616
inverted: true
1717
},
1818
title: {
@@ -97,4 +97,5 @@ def diagram(obj):
9797
response = response.replace('{name}', str(obj.__str__()))
9898
response = response.replace('{data}', str(data))
9999
response = response.replace('{nodes}', str(nodes))
100+
response = response.replace('{chart_height}', process.chart_height or get_conf('diagram__chart_height'))
100101
return mark_safe(response)

0 commit comments

Comments
 (0)