5ee81a95401c485ebe815af2127ea651bf0378f7
[htsworkflow.git] / htsworkflow / frontend / bcmagic / utils.py
1
2
3 def report_error(message):
4     """
5     Return a dictionary with a command to display 'message'
6     """
7     return {'mode': 'Error', 'status': message}
8     
9
10 def redirect_to_url(url):
11     """
12     Return a bcm dictionary with a command to redirect to 'url'
13     """
14     return {'mode': 'redirect', 'url': url}
15     
16
17 def autofill(field, value):
18     """
19     Return a bcm dictionary with a command to automatically fill the
20     corresponding "field" with "value"
21     """
22     return {'mode': 'autofill', 'field': field, 'value': value}