@@ -18,9 +18,13 DATA_TYPE = ( | |||||
18 | class JARSfilter(models.Model): |
|
18 | class JARSfilter(models.Model): | |
19 |
|
19 | |||
20 | name = models.CharField(max_length=60, unique=True, default='') |
|
20 | name = models.CharField(max_length=60, unique=True, default='') | |
21 |
|
|
21 | clock = models.FloatField(verbose_name='Clock Input (MHz)',validators=[MinValueValidator(5), MaxValueValidator(75)], null=True, default=60) | |
22 |
|
|
22 | mult = models.PositiveIntegerField(verbose_name='Multiplier',validators=[MinValueValidator(1), MaxValueValidator(20)], default=5) | |
|
23 | fch = models.DecimalField(verbose_name='Frequency (MHz)', validators=[MinValueValidator(0), MaxValueValidator(150)], max_digits=19, decimal_places=16, null=True, default=49.9200) | |||
|
24 | filter_fir = models.PositiveIntegerField(verbose_name='FIR Filter',validators=[MinValueValidator(1), MaxValueValidator(20)], default = 6) | |||
|
25 | filter_2 = models.PositiveIntegerField(verbose_name='Filter 2',validators=[MinValueValidator(1), MaxValueValidator(20)], default = 10) | |||
23 | filter_5 = models.PositiveIntegerField(verbose_name='Filter 5',validators=[MinValueValidator(1), MaxValueValidator(20)], default = 1) |
|
26 | filter_5 = models.PositiveIntegerField(verbose_name='Filter 5',validators=[MinValueValidator(1), MaxValueValidator(20)], default = 1) | |
|
27 | speed = models.PositiveIntegerField(verbose_name='Speed',validators=[MinValueValidator(0), MaxValueValidator(100000)], default = 0) | |||
24 |
|
28 | |||
25 | class Meta: |
|
29 | class Meta: | |
26 | db_table = 'jars_filters' |
|
30 | db_table = 'jars_filters' |
@@ -3,6 +3,20 | |||||
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 | |||
|
6 | {% block content %} | |||
|
7 | <form class="form" method="post"> | |||
|
8 | {% csrf_token %} | |||
|
9 | {% bootstrap_form form layout='horizontal' size='medium' %} | |||
|
10 | <div style="clear: both;"></div> | |||
|
11 | <br> | |||
|
12 | <div class="pull-right"> | |||
|
13 | <button type="button" class="btn btn-primary" id="bt_add_line">See Filter</button> | |||
|
14 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button> | |||
|
15 | <button type="submit" class="btn btn-primary">{{button}}</button> | |||
|
16 | </div> | |||
|
17 | </form> | |||
|
18 | {% endblock %} | |||
|
19 | ||||
6 | {% block extra-js%} |
|
20 | {% block extra-js%} | |
7 | <script src="{% static 'js/jars.js' %}"></script> |
|
21 | <script src="{% static 'js/jars.js' %}"></script> | |
8 | {% endblock %} No newline at end of file |
|
22 | {% endblock %} |
@@ -26,7 +26,7 def jars_conf(request, id_conf): | |||||
26 | 'cards_number', 'channels_number', |
|
26 | 'cards_number', 'channels_number', | |
27 | 'rd_directory', 'create_directory', |
|
27 | 'rd_directory', 'create_directory', | |
28 | 'include_expname', 'raw_data_blocks', |
|
28 | 'include_expname', 'raw_data_blocks', | |
29 | 'acq_profiles', 'profiles_block'] |
|
29 | 'acq_profiles', 'profiles_block', 'filter'] | |
30 |
|
30 | |||
31 | kwargs['title'] = 'JARS Configuration' |
|
31 | kwargs['title'] = 'JARS Configuration' | |
32 | kwargs['suptitle'] = 'Details' |
|
32 | kwargs['suptitle'] = 'Details' |
General Comments 0
You need to be logged in to leave comments.
Login now