##// END OF EJS Templates
revision app ABS
lgonzales -
r335:472668b9b709
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,75 +1,75
1 from django import forms
1 from django import forms
2 from .models import ABSConfiguration, ABSBeam
2 from .models import ABSConfiguration, ABSBeam
3 from .widgets import UpDataWidget, DownDataWidget, EditUpDataWidget, EditDownDataWidget
3 from .widgets import UpDataWidget, DownDataWidget, EditUpDataWidget, EditDownDataWidget
4 from apps.main.models import Configuration
4 from apps.main.models import Configuration
5 import os
5 import os
6
6
7 class ABSConfigurationForm(forms.ModelForm):
7 class ABSConfigurationForm(forms.ModelForm):
8 def __init__(self, *args, **kwargs):
8 def __init__(self, *args, **kwargs):
9 super(ABSConfigurationForm, self).__init__(*args, **kwargs)
9 super(ABSConfigurationForm, self).__init__(*args, **kwargs)
10
10
11 class Meta:
11 class Meta:
12 model = ABSConfiguration
12 model = ABSConfiguration
13 exclude = ('type', 'status', 'parameters', 'active_beam',
13 exclude = ('type', 'status', 'parameters', 'active_beam',
14 'module_status', 'module_messages', 'module_mode',
14 'module_status', 'module_messages', 'module_mode',
15 'author', 'hash')
15 'author', 'hash')
16
16
17
17
18 class ABSBeamAddForm(forms.Form):
18 class ABSBeamAddForm(forms.Form):
19
19
20 up_data = forms.CharField(widget=UpDataWidget, label='')
20 up_data = forms.CharField(widget=UpDataWidget, label='')
21 down_data = forms.CharField(widget=DownDataWidget, label='')
21 down_data = forms.CharField(widget=DownDataWidget, label='')
22
22
23 def __init__(self, *args, **kwargs):
23 def __init__(self, *args, **kwargs):
24 super(ABSBeamAddForm, self).__init__(*args, **kwargs)
24 super(ABSBeamAddForm, self).__init__(*args, **kwargs)
25
25
26
26
27
27
28 class ABSBeamEditForm(forms.Form):
28 class ABSBeamEditForm(forms.Form):
29
29
30 up_data = forms.CharField(widget=EditUpDataWidget, label='')
30 up_data = forms.CharField(widget=EditUpDataWidget, label='')
31 down_data = forms.CharField(widget=EditDownDataWidget, label='')
31 down_data = forms.CharField(widget=EditDownDataWidget, label='')
32
32
33 def __init__(self, *args, **kwargs):
33 def __init__(self, *args, **kwargs):
34 super(ABSBeamEditForm, self).__init__(*args, **kwargs)
34 super(ABSBeamEditForm, self).__init__(*args, **kwargs)
35
35
36 if 'initial' in kwargs:
36 if 'initial' in kwargs:
37 if 'beam' in self.initial:
37 if 'beam' in self.initial:
38 self.fields['up_data'].initial = self.initial['beam']
38 self.fields['up_data'].initial = self.initial['beam']
39 self.fields['down_data'].initial = self.initial['beam']
39 self.fields['down_data'].initial = self.initial['beam']
40
40
41
41
42 class ExtFileField(forms.FileField):
42 class ExtFileField(forms.FileField):
43 """
43 """
44 Same as forms.FileField, but you can specify a file extension whitelist.
44 Same as forms.FileField, but you can specify a file extension whitelist.
45
45
46 >>> from django.core.files.uploadedfile import SimpleUploadedFile
46 >>> from django.core.files.uploadedfile import SimpleUploadedFile
47 >>>
47 >>>
48 >>> t = ExtFileField(ext_whitelist=(".pdf", ".txt"))
48 >>> t = ExtFileField(ext_whitelist=(".pdf", ".txt"))
49 >>>
49 >>>
50 >>> t.clean(SimpleUploadedFile('filename.pdf', 'Some File Content'))
50 >>> t.clean(SimpleUploadedFile('filename.pdf', 'Some File Content'))
51 >>> t.clean(SimpleUploadedFile('filename.txt', 'Some File Content'))
51 >>> t.clean(SimpleUploadedFile('filename.txt', 'Some File Content'))
52 >>>
52 >>>
53 >>> t.clean(SimpleUploadedFile('filename.exe', 'Some File Content'))
53 >>> t.clean(SimpleUploadedFile('filename.exe', 'Some File Content'))
54 Traceback (most recent call last):
54 Traceback (most recent call last):
55 ...
55 ...
56 ValidationError: [u'Not allowed filetype!']
56 ValidationError: [u'Not allowed filetype!']
57 """
57 """
58 def __init__(self, *args, **kwargs):
58 def __init__(self, *args, **kwargs):
59 extensions = kwargs.pop("extensions")
59 extensions = kwargs.pop("extensions")
60 self.extensions = [i.lower() for i in extensions]
60 self.extensions = [i.lower() for i in extensions]
61
61
62 super(ExtFileField, self).__init__(*args, **kwargs)
62 super(ExtFileField, self).__init__(*args, **kwargs)
63
63
64 def clean(self, *args, **kwargs):
64 def clean(self, *args, **kwargs):
65 data = super(ExtFileField, self).clean(*args, **kwargs)
65 data = super(ExtFileField, self).clean(*args, **kwargs)
66 filename = data.name
66 filename = data.name
67 ext = os.path.splitext(filename)[1]
67 ext = os.path.splitext(filename)[1]
68 ext = ext.lower()
68 ext = ext.lower()
69 if ext not in self.extensions:
69 if ext not in self.extensions:
70 raise forms.ValidationError('Not allowed file type: %s' % ext)
70 raise forms.ValidationError('Not allowed file type: %s' % ext)
71
71
72
72
73 class ABSImportForm(forms.Form):
73 class ABSImportForm(forms.Form):
74
74
75 file_name = ExtFileField(extensions=['.json'])
75 file_name = ExtFileField(extensions=['.json'])
@@ -1,878 +1,997
1 from django.db import models
1 from django.db import models
2 from apps.main.models import Configuration , User
2 from apps.main.models import Configuration , User
3 from django.urls import reverse
3 from django.urls import reverse
4 from celery.execute import send_task
4 from celery.execute import send_task
5 from datetime import datetime
5 from datetime import datetime
6 import ast
6 import ast
7 import socket
7 import socket
8 import json
8 import json
9 import requests
9 import requests
10 import struct
10 import struct
11 import os, sys, time
11 import os, sys, time
12
12
13 antenna_default = json.dumps({
13 antenna_default = json.dumps({
14 "antenna_up": [[0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
14 "antenna_up": [[0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
15 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
15 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
16 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
16 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
17 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
17 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
18 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0],
18 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0],
19 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0],
19 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0],
20 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0],
20 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0],
21 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]
21 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]
22 ]
22 ]
23 ,
23 ,
24 "antenna_down": [[0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
24 "antenna_down": [[0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
25 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
25 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
26 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
26 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
27 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
27 [0.0,0.0,0.0,0.0,0.5,0.5,0.5,0.5],
28 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0],
28 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0],
29 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0],
29 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0],
30 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0],
30 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0],
31 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]],
31 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]],
32 })
32 })
33
33
34
34
35 tx_default = json.dumps({
35 tx_default = json.dumps({
36 "up": [[1,1,1,1,0,0,0,0],
36 "up": [[1,1,1,1,0,0,0,0],
37 [1,1,1,1,0,0,0,0],
37 [1,1,1,1,0,0,0,0],
38 [1,1,1,1,0,0,0,0],
38 [1,1,1,1,0,0,0,0],
39 [1,1,1,1,0,0,0,0],
39 [1,1,1,1,0,0,0,0],
40 [0,0,0,0,1,1,1,1],
40 [0,0,0,0,1,1,1,1],
41 [0,0,0,0,1,1,1,1],
41 [0,0,0,0,1,1,1,1],
42 [0,0,0,0,1,1,1,1],
42 [0,0,0,0,1,1,1,1],
43 [0,0,0,0,1,1,1,1]],
43 [0,0,0,0,1,1,1,1]],
44
44
45 "down": [[1,1,1,1,0,0,0,0],
45 "down": [[1,1,1,1,0,0,0,0],
46 [1,1,1,1,0,0,0,0],
46 [1,1,1,1,0,0,0,0],
47 [1,1,1,1,0,0,0,0],
47 [1,1,1,1,0,0,0,0],
48 [1,1,1,1,0,0,0,0],
48 [1,1,1,1,0,0,0,0],
49 [0,0,0,0,1,1,1,1],
49 [0,0,0,0,1,1,1,1],
50 [0,0,0,0,1,1,1,1],
50 [0,0,0,0,1,1,1,1],
51 [0,0,0,0,1,1,1,1],
51 [0,0,0,0,1,1,1,1],
52 [0,0,0,0,1,1,1,1]],
52 [0,0,0,0,1,1,1,1]],
53 })
53 })
54
54
55 rx_default = json.dumps({
55 rx_default = json.dumps({
56 "up": [[1,1,1,1,0,0,0,0],
56 "up": [[1,1,1,1,0,0,0,0],
57 [1,1,1,1,0,0,0,0],
57 [1,1,1,1,0,0,0,0],
58 [1,1,1,1,0,0,0,0],
58 [1,1,1,1,0,0,0,0],
59 [1,1,1,1,0,0,0,0],
59 [1,1,1,1,0,0,0,0],
60 [0,0,0,0,1,1,1,1],
60 [0,0,0,0,1,1,1,1],
61 [0,0,0,0,1,1,1,1],
61 [0,0,0,0,1,1,1,1],
62 [0,0,0,0,1,1,1,1],
62 [0,0,0,0,1,1,1,1],
63 [0,0,0,0,1,1,1,1]],
63 [0,0,0,0,1,1,1,1]],
64
64
65 "down": [[1,1,1,1,0,0,0,0],
65 "down": [[1,1,1,1,0,0,0,0],
66 [1,1,1,1,0,0,0,0],
66 [1,1,1,1,0,0,0,0],
67 [1,1,1,1,0,0,0,0],
67 [1,1,1,1,0,0,0,0],
68 [1,1,1,1,0,0,0,0],
68 [1,1,1,1,0,0,0,0],
69 [0,0,0,0,1,1,1,1],
69 [0,0,0,0,1,1,1,1],
70 [0,0,0,0,1,1,1,1],
70 [0,0,0,0,1,1,1,1],
71 [0,0,0,0,1,1,1,1],
71 [0,0,0,0,1,1,1,1],
72 [0,0,0,0,1,1,1,1]],
72 [0,0,0,0,1,1,1,1]],
73 })
73 })
74
74
75 status_default = '0000000000000000000000000000000000000000000000000000000000000000'
75 status_default = '0000000000000000000000000000000000000000000000000000000000000000'
76 default_messages = {}
76 default_messages = {}
77
77
78 for i in range(1,65):
78 for i in range(1,65):
79 default_messages[str(i)] = "Module "+str(i)
79 default_messages[str(i)] = "Module "+str(i)
80
80
81
81
82 ues_default = json.dumps({
82 ues_default = json.dumps({
83 "up": [0.533333,0.00000,1.06667,0.00000],
83 "up": [0.533333,0.00000,1.06667,0.00000],
84 "down": [0.533333,0.00000,1.06667,0.00000]
84 "down": [0.533333,0.00000,1.06667,0.00000]
85 })
85 })
86
86
87 onlyrx_default = json.dumps({
87 onlyrx_default = json.dumps({
88 "up": False,
88 "up": False,
89 "down": False
89 "down": False
90 })
90 })
91
91
92 def up_convertion(cadena):
92 def up_convertion(cadena):
93 valores = []
93 valores = []
94 for c in cadena:
94 for c in cadena:
95 if c == 1.0: valores=valores+['000']
95 if c == 1.0: valores=valores+['000']
96 if c == 2.0: valores=valores+['001']
96 if c == 2.0: valores=valores+['001']
97 if c == 3.0: valores=valores+['010']
97 if c == 3.0: valores=valores+['010']
98 if c == 0.0: valores=valores+['011']
98 if c == 0.0: valores=valores+['011']
99 if c == 0.5: valores=valores+['100']
99 if c == 0.5: valores=valores+['100']
100 if c == 1.5: valores=valores+['101']
100 if c == 1.5: valores=valores+['101']
101 if c == 2.5: valores=valores+['110']
101 if c == 2.5: valores=valores+['110']
102 if c == 3.5: valores=valores+['111']
102 if c == 3.5: valores=valores+['111']
103
103
104 return valores
104 return valores
105
105
106 def up_conv_bits(value):
106 def up_conv_bits(value):
107
107
108 if value == 1.0: bits="000"
108 if value == 1.0: bits="000"
109 if value == 2.0: bits="001"
109 if value == 2.0: bits="001"
110 if value == 3.0: bits="010"
110 if value == 3.0: bits="010"
111 if value == 0.0: bits="011"
111 if value == 0.0: bits="011"
112 if value == 0.5: bits="100"
112 if value == 0.5: bits="100"
113 if value == 1.5: bits="101"
113 if value == 1.5: bits="101"
114 if value == 2.5: bits="110"
114 if value == 2.5: bits="110"
115 if value == 3.5: bits="111"
115 if value == 3.5: bits="111"
116
116
117 return bits
117 return bits
118
118
119 def down_convertion(cadena):
119 def down_convertion(cadena):
120 valores = []
120 valores = []
121 for c in cadena:
121 for c in cadena:
122 if c == 1.0: valores=valores+['000']
122 if c == 1.0: valores=valores+['000']
123 if c == 2.0: valores=valores+['001']
123 if c == 2.0: valores=valores+['001']
124 if c == 3.0: valores=valores+['010']
124 if c == 3.0: valores=valores+['010']
125 if c == 0.0: valores=valores+['011']
125 if c == 0.0: valores=valores+['011']
126 if c == 0.5: valores=valores+['100']
126 if c == 0.5: valores=valores+['100']
127 if c == 1.5: valores=valores+['101']
127 if c == 1.5: valores=valores+['101']
128 if c == 2.5: valores=valores+['110']
128 if c == 2.5: valores=valores+['110']
129 if c == 3.5: valores=valores+['111']
129 if c == 3.5: valores=valores+['111']
130
130
131 return valores
131 return valores
132
132
133 def down_conv_bits(value):
133 def down_conv_bits(value):
134
134
135 if value == 1.0: bits="000"
135 if value == 1.0: bits="000"
136 if value == 2.0: bits="001"
136 if value == 2.0: bits="001"
137 if value == 3.0: bits="010"
137 if value == 3.0: bits="010"
138 if value == 0.0: bits="011"
138 if value == 0.0: bits="011"
139 if value == 0.5: bits="100"
139 if value == 0.5: bits="100"
140 if value == 1.5: bits="101"
140 if value == 1.5: bits="101"
141 if value == 2.5: bits="110"
141 if value == 2.5: bits="110"
142 if value == 3.5: bits="111"
142 if value == 3.5: bits="111"
143
143
144 return bits
144 return bits
145
145
146 def up_conv_value(bits):
146 def up_conv_value(bits):
147
147
148 if bits == "000": value=1.0
148 if bits == "000": value=1.0
149 if bits == "001": value=2.0
149 if bits == "001": value=2.0
150 if bits == "010": value=3.0
150 if bits == "010": value=3.0
151 if bits == "011": value=0.0
151 if bits == "011": value=0.0
152 if bits == "100": value=0.5
152 if bits == "100": value=0.5
153 if bits == "101": value=1.5
153 if bits == "101": value=1.5
154 if bits == "110": value=2.5
154 if bits == "110": value=2.5
155 if bits == "111": value=3.5
155 if bits == "111": value=3.5
156
156
157 return value
157 return value
158
158
159 def down_conv_value(bits):
159 def down_conv_value(bits):
160
160
161 if bits == "000": value=1.0
161 if bits == "000": value=1.0
162 if bits == "001": value=2.0
162 if bits == "001": value=2.0
163 if bits == "010": value=3.0
163 if bits == "010": value=3.0
164 if bits == "011": value=0.0
164 if bits == "011": value=0.0
165 if bits == "100": value=0.5
165 if bits == "100": value=0.5
166 if bits == "101": value=1.5
166 if bits == "101": value=1.5
167 if bits == "110": value=2.5
167 if bits == "110": value=2.5
168 if bits == "111": value=3.5
168 if bits == "111": value=3.5
169
169
170 return value
170 return value
171
171
172 def ip2position(module_number):
172 def ip2position(module_number):
173 j=0
173 j=0
174 i=0
174 i=0
175 for x in range(0,module_number-1):
175 for x in range(0,module_number-1):
176 j=j+1
176 j=j+1
177 if j==8:
177 if j==8:
178 i=i+1
178 i=i+1
179 j=0
179 j=0
180
180
181 pos = [i,j]
181 pos = [i,j]
182 return pos
182 return pos
183
183
184
184
185 def fromBinary2Char(binary_string):
185 def fromBinary2Char(binary_string):
186 number = int(binary_string, 2)
186 number = int(binary_string, 2)
187 #Plus 33 to avoid more than 1 characters values such as: '\x01'-'\x1f'
187 #Plus 33 to avoid more than 1 characters values such as: '\x01'-'\x1f'
188 number = number + 33
188 number = number + 33
189 char = chr(number)
189 char = chr(number)
190 return char
190 return char
191
191
192 def fromChar2Binary(char):
192 def fromChar2Binary(char):
193 number = ord(char) - 33
193 number = ord(char) - 33
194 #Minus 33 to get the real value
194 #Minus 33 to get the real value
195 bits = bin(number)[2:]
195 bits = bin(number)[2:]
196 #To ensure we have a string with 6bits
196 #To ensure we have a string with 6bits
197 if len(bits) < 6:
197 if len(bits) < 6:
198 bits = bits.zfill(6)
198 bits = bits.zfill(6)
199 return bits
199 return bits
200
200
201 OPERATION_MODES = (
201 OPERATION_MODES = (
202 (0, 'Manual'),
202 (0, 'Manual'),
203 (1, 'Automatic'),
203 (1, 'Automatic'),
204 )
204 )
205
205
206 class ABSActive(models.Model):
207 conf = models.ForeignKey(ABSConfiguration, null=True, verbose_name='ABS Configuration', on_delete=models.CASCADE)
206
208
207 class ABSConfiguration(Configuration):
209 class ABSConfiguration(Configuration):
208 active_beam = models.PositiveSmallIntegerField(verbose_name='Active Beam', default=0)
210 active_beam = models.PositiveSmallIntegerField(verbose_name='Active Beam', default=0)
209 module_status = models.CharField(verbose_name='Module Status', max_length=10000, default=status_default)
211 module_status = models.CharField(verbose_name='Module Status', max_length=10000, default=status_default)
210 operation_mode = models.PositiveSmallIntegerField(verbose_name='Operation Mode', choices=OPERATION_MODES, default = 0)
212 operation_mode = models.PositiveSmallIntegerField(verbose_name='Operation Mode', choices=OPERATION_MODES, default = 0)
211 operation_value = models.FloatField(verbose_name='Periodic (seconds)', default="10", null=True, blank=True)
213 operation_value = models.FloatField(verbose_name='Periodic (seconds)', default="10", null=True, blank=True)
212 module_messages = models.CharField(verbose_name='Modules Messages', max_length=10000, default=json.dumps(default_messages))
214 module_messages = models.CharField(verbose_name='Modules Messages', max_length=10000, default=json.dumps(default_messages))
213
215
214 class Meta:
216 class Meta:
215 db_table = 'abs_configurations'
217 db_table = 'abs_configurations'
216
218
217 def get_absolute_url_plot(self):
219 def get_absolute_url_plot(self):
218 return reverse('url_plot_abs_patterns', args=[str(self.id)])
220 return reverse('url_plot_abs_patterns', args=[str(self.id)])
219
221
220
222
221 def parms_to_dict(self):
223 def parms_to_dict(self):
222
224
223 parameters = {}
225 parameters = {}
224
226
225 parameters['device_id'] = self.device.id
227 parameters['device_id'] = self.device.id
226 parameters['label'] = self.label
228 parameters['label'] = self.label
227 parameters['device_type'] = self.device.device_type.name
229 parameters['device_type'] = self.device.device_type.name
228 parameters['beams'] = {}
230 parameters['beams'] = {}
229
231
230 beams = ABSBeam.objects.filter(abs_conf=self)
232 beams = ABSBeam.objects.filter(abs_conf=self)
231 b=1
233 b=1
232 for beam in beams:
234 for beam in beams:
233 #absbeam = ABSBeam.objects.get(pk=beams[beam])
235 #absbeam = ABSBeam.objects.get(pk=beams[beam])
234 parameters['beams']['beam'+str(b)] = beam.parms_to_dict()#absbeam.parms_to_dict()
236 parameters['beams']['beam'+str(b)] = beam.parms_to_dict()#absbeam.parms_to_dict()
235 b+=1
237 b+=1
236
238
237 return parameters
239 return parameters
238
240
239
241
240 def dict_to_parms(self, parameters):
242 def dict_to_parms(self, parameters):
241
243
242 self.label = parameters['label']
244 self.label = parameters['label']
243
245
244 absbeams = ABSBeam.objects.filter(abs_conf=self)
246 absbeams = ABSBeam.objects.filter(abs_conf=self)
245 beams = parameters['beams']
247 beams = parameters['beams']
246
248
247 if absbeams:
249 if absbeams:
248 beams_number = len(beams)
250 beams_number = len(beams)
249 absbeams_number = len(absbeams)
251 absbeams_number = len(absbeams)
250 if beams_number==absbeams_number:
252 if beams_number==absbeams_number:
251 i = 1
253 i = 1
252 for absbeam in absbeams:
254 for absbeam in absbeams:
253 absbeam.dict_to_parms(beams['beam'+str(i)])
255 absbeam.dict_to_parms(beams['beam'+str(i)])
254 i = i+1
256 i = i+1
255 elif beams_number > absbeams_number:
257 elif beams_number > absbeams_number:
256 i = 1
258 i = 1
257 for absbeam in absbeams:
259 for absbeam in absbeams:
258 absbeam.dict_to_parms(beams['beam'+str(i)])
260 absbeam.dict_to_parms(beams['beam'+str(i)])
259 i=i+1
261 i=i+1
260 for x in range(i,beams_number+1):
262 for x in range(i,beams_number+1):
261 new_beam = ABSBeam(
263 new_beam = ABSBeam(
262 name =beams['beam'+str(i)]['name'],
264 name =beams['beam'+str(i)]['name'],
263 antenna =json.dumps(beams['beam'+str(i)]['antenna']),
265 antenna =json.dumps(beams['beam'+str(i)]['antenna']),
264 abs_conf = self,
266 abs_conf = self,
265 tx =json.dumps(beams['beam'+str(i)]['tx']),
267 tx =json.dumps(beams['beam'+str(i)]['tx']),
266 rx =json.dumps(beams['beam'+str(i)]['rx']),
268 rx =json.dumps(beams['beam'+str(i)]['rx']),
267 ues =json.dumps(beams['beam'+str(i)]['ues']),
269 ues =json.dumps(beams['beam'+str(i)]['ues']),
268 only_rx =json.dumps(beams['beam'+str(i)]['only_rx'])
270 only_rx =json.dumps(beams['beam'+str(i)]['only_rx'])
269 )
271 )
270 new_beam.save()
272 new_beam.save()
271 i=i+1
273 i=i+1
272 else: #beams_number < absbeams_number:
274 else: #beams_number < absbeams_number:
273 i = 1
275 i = 1
274 for absbeam in absbeams:
276 for absbeam in absbeams:
275 if i <= beams_number:
277 if i <= beams_number:
276 absbeam.dict_to_parms(beams['beam'+str(i)])
278 absbeam.dict_to_parms(beams['beam'+str(i)])
277 i=i+1
279 i=i+1
278 else:
280 else:
279 absbeam.delete()
281 absbeam.delete()
280 else:
282 else:
281 for beam in beams:
283 for beam in beams:
282 new_beam = ABSBeam(
284 new_beam = ABSBeam(
283 name =beams[beam]['name'],
285 name =beams[beam]['name'],
284 antenna =json.dumps(beams[beam]['antenna']),
286 antenna =json.dumps(beams[beam]['antenna']),
285 abs_conf = self,
287 abs_conf = self,
286 tx =json.dumps(beams[beam]['tx']),
288 tx =json.dumps(beams[beam]['tx']),
287 rx =json.dumps(beams[beam]['rx']),
289 rx =json.dumps(beams[beam]['rx']),
288 ues =json.dumps(beams[beam]['ues']),
290 ues =json.dumps(beams[beam]['ues']),
289 only_rx =json.dumps(beams[beam]['only_rx'])
291 only_rx =json.dumps(beams[beam]['only_rx'])
290 )
292 )
291 new_beam.save()
293 new_beam.save()
292
294
293
295
294
296
295 def update_from_file(self, parameters):
297 def update_from_file(self, parameters):
296
298
297 self.dict_to_parms(parameters)
299 self.dict_to_parms(parameters)
298 self.save()
300 self.save()
299
301
300
302
301 def get_beams(self, **kwargs):
303 def get_beams(self, **kwargs):
302 '''
304 '''
303 This function returns ABS Configuration beams
305 This function returns ABS Configuration beams
304 '''
306 '''
305 return ABSBeam.objects.filter(abs_conf=self.pk, **kwargs)
307 return ABSBeam.objects.filter(abs_conf=self.pk, **kwargs)
306
308
307 def clone(self, **kwargs):
309 def clone(self, **kwargs):
308
310
309 beams = self.get_beams()
311 beams = self.get_beams()
310 self.pk = None
312 self.pk = None
311 self.id = None
313 self.id = None
312 for attr, value in kwargs.items():
314 for attr, value in kwargs.items():
313 setattr(self, attr, value)
315 setattr(self, attr, value)
314 self.save()
316 self.save()
315
317
316 for beam in beams:
318 for beam in beams:
317 beam.clone(abs_conf=self)
319 beam.clone(abs_conf=self)
318
320
319 #-----For Active Beam-----
321 #-----For Active Beam-----
320 new_beams = ABSBeam.objects.filter(abs_conf=self)
322 new_beams = ABSBeam.objects.filter(abs_conf=self)
321 self.active_beam = new_beams[0].id
323 self.active_beam = new_beams[0].id
322 self.save()
324 self.save()
323 #-----For Active Beam-----
325 #-----For Active Beam-----
324 #-----For Device Status---
326 #-----For Device Status---
325 self.device.status = 3
327 self.device.status = 3
326 self.device.save()
328 self.device.save()
327 #-----For Device Status---
329 #-----For Device Status---
328
330
329 return self
331 return self
330
332
331
333
332 def start_device(self):
334 def start_device(self):
333
335
334 if self.device.status == 3:
336 if self.device.status == 3:
335
337
336 try:
338 try:
337 #self.write_device()
339 #self.write_device()
338 send_task('task_change_beam', [self.id],)
340 send_task('task_change_beam', [self.id],)
339 self.message = 'ABS running'
341 self.message = 'ABS running'
340
342
341 except Exception as e:
343 except Exception as e:
342 self.message = str(e)
344 self.message = str(e)
343 return False
345 return False
344
346
345 return True
347 return True
346
348
347 else:
349 else:
348 self.message = 'Please, select Write ABS Device first.'
350 self.message = 'Please, select Write ABS Device first.'
349 return False
351 return False
350
352
351
353
352 def stop_device(self):
354 def stop_device(self):
353
355
354 self.device.status = 2
356 self.device.status = 2
355 self.device.save()
357 self.device.save()
356 self.message = 'ABS has been stopped.'
358 self.message = 'ABS has been stopped.'
357 self.save()
359 self.save()
358
360
359 return True
361 return True
360
362
361
363
362 def write_device(self):
364 def write_device(self):
363
365
364 """
366 """
365 This function sends the beams list to every abs module.
367 This function sends the beams list to every abs module.
366 It needs 'module_conf' function
368 It needs 'module_conf' function
367 """
369 """
368
370 print("Write")
369 beams = ABSBeam.objects.filter(abs_conf=self)
371 beams = ABSBeam.objects.filter(abs_conf=self)
370 nbeams = len(beams)
372 nbeams = len(beams)
373
374 # Se manda a cero RC para poder realizar cambio de beam
375 if self.experiment is None:
376 confs = []
377 else:
378 confs = Configuration.objects.filter(experiment = self.experiment).filter(type=0)
379 confdds = ''
380 confjars = ''
381 confrc = ''
382 #TO STOP DEVICES: DDS-JARS-RC
383 for i in range(0,len(confs)):
384 if i==0:
385 for conf in confs:
386 if conf.device.device_type.name == 'dds':
387 confdds = conf
388 confdds.stop_device()
389 break
390 if i==1:
391 for conf in confs:
392 if conf.device.device_type.name == 'jars':
393 confjars = conf
394 confjars.stop_device()
395 break
396 if i==2:
397 for conf in confs:
398 if conf.device.device_type.name == 'rc':
399 confrc = conf
400 confrc.stop_device()
401 break
402
403 '''
371 if self.connected_modules() == 0 :
404 if self.connected_modules() == 0 :
405 print("No encuentra modulos")
372 self.message = "No ABS Module detected."
406 self.message = "No ABS Module detected."
373 return False
407 return False
374
408 '''
375 #-------------Write each abs module-----------
409 #-------------Write each abs module-----------
376
410
377 if beams:
411 if beams:
378 block_id = 0
412 block_id = 0
379 message = 'SNDF{:03d}{:02d}{:02d}'.format(nbeams, nbeams, block_id)
413 message = 'SNDF{:03d}{:02d}{:02d}'.format(nbeams, nbeams, block_id)
380 for i, status in enumerate(self.module_status):
414 for i, status in enumerate(self.module_status):
381 message += ''.join([fromBinary2Char(beam.module_6bits(i)) for beam in beams])
415 message += ''.join([fromBinary2Char(beam.module_6bits(i)) for beam in beams])
382 status = ['0'] * 64
416 status = ['0'] * 64
383 n = 0
417 n = 0
384
418 print("Llega una antes entrar a multicast")
385 sock = self.send_multicast(message)
419 sock = self.send_multicast(message)
386
420
387 for i in range(32):
421 while True:
422 #for i in range(32):
388 try:
423 try:
389 data, address = sock.recvfrom(1024)
424 data, address = sock.recvfrom(1024)
390 print (address, data)
425 print (address, data)
426
391 if data == '1':
427 if data == '1':
392 status[int(address[0][10:])-1] = '3'
428 status[int(address[0][10:])-1] = '3'
393 elif data == '0':
429 elif data == '0':
394 status[int(address[0][10:])-1] = '1'
430 status[int(address[0][10:])-1] = '1'
431 except socket.timeout:
432 print('Timeout')
433 break
395 except Exception as e:
434 except Exception as e:
396 print ('Error {}'.format(e))
435 print ('Error {}'.format(e))
397 n += 1
436 n += 1
398 sock.close()
437 sock.close()
399 else:
438 else:
400 self.message = "ABS Configuration does not have beams"
439 self.message = "ABS Configuration does not have beams"
440 #Start DDS-RC-JARS
441 if confdds:
442 confdds.start_device()
443 if confrc:
444 #print confrc
445 confrc.start_device()
446 if confjars:
447 confjars.start_device()
401 return False
448 return False
402
449
403 if n == 64:
450 if n == 64:
404 self.message = "Could not write ABS Modules"
451 self.message = "Could not write ABS Modules"
405 self.device.status = 0
452 self.device.status = 0
406 self.module_status = ''.join(status)
453 self.module_status = ''.join(status)
407 self.save()
454 self.save()
455 #Start DDS-RC-JARS
456 if confdds:
457 confdds.start_device()
458 if confrc:
459 #print confrc
460 confrc.start_device()
461 if confjars:
462 confjars.start_device()
408 return False
463 return False
409 else:
464 else:
410 self.message = "ABS Beams List have been sent to ABS Modules"
465 self.message = "ABS Beams List have been sent to ABS Modules"
411 self.active_beam = beams[0].pk
466 self.active_beam = beams[0].pk
412
467
468 #Start DDS-RC-JARS
469 if confdds:
470 confdds.start_device()
471 if confrc:
472 #print confrc
473 confrc.start_device()
474 if confjars:
475 confjars.start_device()
476
413 self.device.status = 3
477 self.device.status = 3
414 self.module_status = ''.join(status)
478 self.module_status = ''.join(status)
415 self.save()
479 self.save()
416
480 conf_active = ABSActive.objects.get(pk=1)
481 conf_active.conf = self
482 conf_active.save()
417 return True
483 return True
418
484
419
485
420 def read_module(self, module):
486 def read_module(self, module):
421
487
422 """
488 """
423 Read out-bits (up-down) of 1 abs module NOT for Configuration
489 Read out-bits (up-down) of 1 abs module NOT for Configuration
424 """
490 """
425
491
426 ip_address = self.device.ip_address
492 ip_address = self.device.ip_address
427 ip_address = ip_address.split('.')
493 ip_address = ip_address.split('.')
428 module_seq = (ip_address[0],ip_address[1],ip_address[2])
494 module_seq = (ip_address[0],ip_address[1],ip_address[2])
429 dot = '.'
495 dot = '.'
430 module_ip = dot.join(module_seq)+'.'+str(module)
496 module_ip = dot.join(module_seq)+'.'+str(module)
431 module_port = self.device.port_address
497 module_port = self.device.port_address
432 read_route = 'http://'+module_ip+':'+str(module_port)+'/read'
498 read_route = 'http://'+module_ip+':'+str(module_port)+'/read'
433
499
434 module_status = json.loads(self.module_status)
500 module_status = json.loads(self.module_status)
435 print(read_route)
501 print(read_route)
436
502
437 module_bits = ''
503 module_bits = ''
438
504
439 try:
505 try:
440 r_read = requests.get(read_route, timeout=0.5)
506 r_read = requests.get(read_route, timeout=0.5)
441 answer = r_read.json()
507 answer = r_read.json()
442 module_bits = answer['allbits']
508 module_bits = answer['allbits']
443 except:
509 except:
444 return {}
510 return {}
445
511
446 return module_bits
512 return module_bits
447
513
448 def read_device(self):
514 def read_device(self):
449
515
450 parms = {}
516 parms = {}
451 # Reads active modules.
517 # Reads active modules.
452 module_status = json.loads(self.module_status)
518 module_status = json.loads(self.module_status)
453 total = 0
519 total = 0
454 for status in module_status:
520 for status in module_status:
455 if module_status[status] != 0:
521 if module_status[status] != 0:
456 module_bits = self.read_module(int(status))
522 module_bits = self.read_module(int(status))
457 bits={}
523 bits={}
458 if module_bits:
524 if module_bits:
459 bits = (str(module_bits['um2']) + str(module_bits['um1']) + str(module_bits['um0']) +
525 bits = (str(module_bits['um2']) + str(module_bits['um1']) + str(module_bits['um0']) +
460 str(module_bits['dm2']) + str(module_bits['dm1']) + str(module_bits['dm0']) )
526 str(module_bits['dm2']) + str(module_bits['dm1']) + str(module_bits['dm0']) )
461 parms[str(status)] = bits
527 parms[str(status)] = bits
462
528
463 total +=1
529 total +=1
464
530
465 if total==0:
531 if total==0:
466 self.message = "No ABS Module detected. Please select 'Status'."
532 self.message = "No ABS Module detected. Please select 'Status'."
467 return False
533 return False
468
534
469
535
470
536
471 self.message = "ABS Modules have been read"
537 self.message = "ABS Modules have been read"
472 #monitoreo_tx = JROABSClnt_01CeCnMod000000MNTR10
538 #monitoreo_tx = JROABSClnt_01CeCnMod000000MNTR10
473 return parms
539 return parms
474
540
475
541
476 def connected_modules(self):
542 def connected_modules(self):
477 """
543 """
478 This function returns the number of connected abs-modules without updating.
544 This function returns the number of connected abs-modules without updating.
479 """
545 """
480 num = 0
546 num = 0
481 print(self.module_status)
547 print(self.module_status)
482 for i, status in enumerate(self.module_status):
548 for i, status in enumerate(self.module_status):
483 if status != '0':
549 if status != '0':
484 num += 1
550 num += 1
485 #print('status {}:{}'.format(i+1, status))
551 #print('status {}:{}'.format(i+1, status))
486 return num
552 return num
487
553
488 def send_multicast(self, message):
554 def send_multicast(self, message):
489
555 #print("Send multicast")
490 multicast_group = ('224.3.29.71', 10000)
556 multicast_group = ('224.3.29.71', 10000)
491 # Create the datagram socket
557 # Create the datagram socket
492 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
558 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
493 sock.settimeout(1)
559 sock.settimeout(1)
494 local_ip = os.environ.get('LOCAL_IP', '192.168.1.128')
560 local_ip = os.environ.get('LOCAL_IP', '192.168.2.128')
495 sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, socket.inet_aton(local_ip))
561 sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, socket.inet_aton(local_ip))
496 sock.sendto(message, multicast_group)
562 sock.sendto(message.encode(), multicast_group)
497 print('Sending ' + message)
563 print('Sending ' + message)
498 return sock
564 return sock
499
565
500 def status_device(self):
566 def status_device(self):
501 """
567 """
502 This function returns the status of all abs-modules as one.
568 This function returns the status of all abs-modules as one.
503 If at least one module is connected, its answer is "1"
569 If at least one module is connected, its answer is "1"
504 """
570 """
505
571 print ('Status device')
572 print (self.active_beam)
573 beams = ABSBeam.objects.filter(abs_conf=self)
574 #print beams[self.active_beam-1].module_6bits(0)
575 active = ABSActive.objects.get(pk=1)
576 if active.conf != self:
577 self.message = 'La configuracion actual es la del siguiente enlace %s.' % active.conf.get_absolute_url()
578 self.message += "\n"
579 self.message += 'Se debe realizar un write en esta configuracion para luego obtener un status valido.'
580
581 return False
582
506 sock = self.send_multicast('MNTR')
583 sock = self.send_multicast('MNTR')
507
584
508 n = 0
585 n = 0
509 status = ['0'] * 64
586 status = ['0'] * 64
510 for i in range(32):
587
588 while True:
589 #for i in range(32):
511 #if True:
590 #if True:
512 try:
591 try:
592 print("Recibiendo")
513 address = None
593 address = None
514 data, address = sock.recvfrom(1024)
594 data, address = sock.recvfrom(2)
515 x = int(address[0][10:])-1
595 print (address, data)
596 print("!!!!")
597 data = data.decode()
598 aux_mon = "1"
599 aux_expected = aux_mon
600 if(len(data)==2):
601 print ("data[1]: ")
602 print (data[1])
603 aux_mon = fromChar2Binary(data[1])
604 print (aux_mon)
605 aux_i = (str(address[0]).split('.'))[3]
606 print (aux_i)
607 print ('Active beam')
608 beam_active = ABSBeam.objects.get(pk=self.active_beam)
609 print (beam_active)
610 aux_expected = beam_active.module_6bits(int(aux_i)-1)
611 print (aux_expected)
612
613 print ("data[0]: ")
614 print (data[0])
615
516 if data[0] == '1':
616 if data[0] == '1':
517 remote = fromChar2Binary(data[1])
617 status[int(address[0][10:])-1] = '3'
518 local = ABSBeam.objects.get(pk=self.active_beam).module_6bits(x)
618 if aux_mon == aux_expected:
519 if local == remote:
619 print ('Es igual')
520 status[x] = '3'
521 print('Module: {} connected...igual'.format(address))
522 else:
620 else:
523 status[x] = '2'
621 print ('Es diferente')
524 print('Module: {} connected...diferente'.format(address))
622 status[int(address[0][10:])-1] = '2'
623
525 elif data[0] == '0':
624 elif data[0] == '0':
526 status[x] = '1'
625 status[int(address[0][10:])-1] = '1'
527 n += 1
626 n += 1
627 print('Module: {} connected'.format(address))
628 except socket.timeout:
629 print('Timeout')
630 break
528 except:
631 except:
529 print('Module: {} error'.format(address))
632 print('Module: {} error'.format(address))
530 pass
633 pass
634
531 sock.close()
635 sock.close()
532
636
533 if n > 0:
637 if n > 0:
534 self.message = 'ABS modules Status have been updated.'
638 self.message = 'ABS modules Status have been updated.'
535 self.device.status = 1
639 self.device.status = 1
536 else:
640 else:
537 self.device.status = 0
641 self.device.status = 0
538 self.message = 'No ABS module is connected.'
642 self.message = 'No ABS module is connected.'
539 self.module_status = ''.join(status)
643 self.module_status = ''.join(status)
540 self.save()
644 self.save()
541
645
542 return self.device.status
646 return self.device.status
543
647
544
648
545 def send_beam(self, beam_pos):
649 def send_beam(self, beam_pos):
546 """
650 """
547 This function connects to a multicast group and sends the beam number
651 This function connects to a multicast group and sends the beam number
548 to all abs modules.
652 to all abs modules.
549 """
653 """
654 print ('Send beam')
655 print (self.active_beam)
656 beams = ABSBeam.objects.filter(abs_conf=self)
657 #print beams[self.active_beam-1].module_6bits(0)
658 active = ABSActive.objects.get(pk=1)
659 if active.conf != self:
660 self.message = 'La configuracion actual es la del siguiente enlace %s.' % active.conf.get_absolute_url()
661 self.message += "\n"
662 self.message += 'Se debe realizar un write en esta configuracion para luego obtener un status valido.'
663
664 return False
550
665
551 # Se manda a cero RC para poder realizar cambio de beam
666 # Se manda a cero RC para poder realizar cambio de beam
552 if self.experiment is None:
667 if self.experiment is None:
553 confs = []
668 confs = []
554 else:
669 else:
555 confs = Configuration.objects.filter(experiment = self.experiment).filter(type=0)
670 confs = Configuration.objects.filter(experiment = self.experiment).filter(type=0)
556 confdds = ''
671 confdds = ''
557 confjars = ''
672 confjars = ''
558 confrc = ''
673 confrc = ''
559 #TO STOP DEVICES: DDS-JARS-RC
674 #TO STOP DEVICES: DDS-JARS-RC
560 for i in range(0,len(confs)):
675 for i in range(0,len(confs)):
561 if i==0:
676 if i==0:
562 for conf in confs:
677 for conf in confs:
563 if conf.device.device_type.name == 'dds':
678 if conf.device.device_type.name == 'dds':
564 confdds = conf
679 confdds = conf
565 confdds.stop_device()
680 confdds.stop_device()
566 break
681 break
567 if i==1:
682 if i==1:
568 for conf in confs:
683 for conf in confs:
569 if conf.device.device_type.name == 'jars':
684 if conf.device.device_type.name == 'jars':
570 confjars = conf
685 confjars = conf
571 confjars.stop_device()
686 confjars.stop_device()
572 break
687 break
573 if i==2:
688 if i==2:
574 for conf in confs:
689 for conf in confs:
575 if conf.device.device_type.name == 'rc':
690 if conf.device.device_type.name == 'rc':
576 confrc = conf
691 confrc = conf
577 confrc.stop_device()
692 confrc.stop_device()
578 break
693 break
579 if beam_pos > 0:
694 if beam_pos > 0:
580 beam_pos = beam_pos - 1
695 beam_pos = beam_pos - 1
581 else:
696 else:
582 beam_pos = 0
697 beam_pos = 0
583
698
584 #El indice del apunte debe ser menor que el numero total de apuntes
699 #El indice del apunte debe ser menor que el numero total de apuntes
585 #El servidor tcp en el embebido comienza a contar desde 0
700 #El servidor tcp en el embebido comienza a contar desde 0
586 status = ['0'] * 64
701 status = ['0'] * 64
587 message = 'CHGB{}'.format(beam_pos)
702 message = 'CHGB{}'.format(beam_pos)
588 sock = self.send_multicast(message)
703 sock = self.send_multicast(message)
589 for i in range(32):
704 while True:
705 #for i in range(32):
590 try:
706 try:
591 data, address = sock.recvfrom(1024)
707 data, address = sock.recvfrom(1024)
592 print (address, data)
708 print (address, data)
709 data = data.decode()
593 if data == '1':
710 if data == '1':
594 status[int(address[0][10:])-1] = '3'
711 status[int(address[0][10:])-1] = '3'
595 elif data == '0':
712 elif data == '0':
596 status[int(address[0][10:])-1] = '1'
713 status[int(address[0][10:])-1] = '1'
714 except socket.timeout:
715 print('Timeout')
716 break
597 except Exception as e:
717 except Exception as e:
598 print ('Error {}'.format(e))
718 print ('Error {}'.format(e))
599 pass
719 pass
600
720
601 sock.close()
721 sock.close()
602
722
603 #Start DDS-RC-JARS
723 #Start DDS-RC-JARS
604 if confdds:
724 if confdds:
605 confdds.start_device()
725 confdds.start_device()
606 if confrc:
726 if confrc:
607 #print confrc
727 #print confrc
608 confrc.start_device()
728 confrc.start_device()
609 if confjars:
729 if confjars:
610 confjars.start_device()
730 confjars.start_device()
611
731
612 self.message = "ABS Beam has been changed"
732 self.message = "ABS Beam has been changed"
613 self.module_status = ''.join(status)
733 self.module_status = ''.join(status)
614 self.save()
734 self.save()
615 return True
735 return True
616
736
617
737
618 def get_absolute_url_import(self):
738 def get_absolute_url_import(self):
619 return reverse('url_import_abs_conf', args=[str(self.id)])
739 return reverse('url_import_abs_conf', args=[str(self.id)])
620
740
621
622 class ABSBeam(models.Model):
741 class ABSBeam(models.Model):
623
742
624 name = models.CharField(max_length=60, default='Beam')
743 name = models.CharField(max_length=60, default='Beam')
625 antenna = models.CharField(verbose_name='Antenna', max_length=1000, default=antenna_default)
744 antenna = models.CharField(verbose_name='Antenna', max_length=1000, default=antenna_default)
626 abs_conf = models.ForeignKey('ABSConfiguration', null=True,
745 abs_conf = models.ForeignKey('ABSConfiguration', null=True,
627 verbose_name='ABS Configuration', on_delete=models.CASCADE)
746 verbose_name='ABS Configuration', on_delete=models.CASCADE)
628 tx = models.CharField(verbose_name='Tx', max_length=1000, default=tx_default)
747 tx = models.CharField(verbose_name='Tx', max_length=1000, default=tx_default)
629 rx = models.CharField(verbose_name='Rx', max_length=1000, default=rx_default)
748 rx = models.CharField(verbose_name='Rx', max_length=1000, default=rx_default)
630 s_time = models.TimeField(verbose_name='Star Time', default='00:00:00')
749 s_time = models.TimeField(verbose_name='Star Time', default='00:00:00')
631 e_time = models.TimeField(verbose_name='End Time', default='23:59:59')
750 e_time = models.TimeField(verbose_name='End Time', default='23:59:59')
632 ues = models.CharField(verbose_name='Ues', max_length=100, default=ues_default)
751 ues = models.CharField(verbose_name='Ues', max_length=100, default=ues_default)
633 only_rx = models.CharField(verbose_name='Only RX', max_length=40, default=onlyrx_default)
752 only_rx = models.CharField(verbose_name='Only RX', max_length=40, default=onlyrx_default)
634
753
635 class Meta:
754 class Meta:
636 db_table = 'abs_beams'
755 db_table = 'abs_beams'
637
756
638 def __unicode__(self):
757 def __unicode__(self):
639 return u'%s' % (self.name)
758 return u'%s' % (self.name)
640
759
641 def parms_to_dict(self):
760 def parms_to_dict(self):
642
761
643 parameters = {}
762 parameters = {}
644 parameters['name'] = self.name
763 parameters['name'] = self.name
645 parameters['antenna'] = ast.literal_eval(self.antenna)
764 parameters['antenna'] = ast.literal_eval(self.antenna)
646 parameters['abs_conf'] = self.abs_conf.name
765 parameters['abs_conf'] = self.abs_conf.name
647 parameters['tx'] = ast.literal_eval(self.tx)
766 parameters['tx'] = ast.literal_eval(self.tx)
648 parameters['rx'] = ast.literal_eval(self.rx)
767 parameters['rx'] = ast.literal_eval(self.rx)
649 parameters['s_time'] = self.s_time.strftime("%H:%M:%S")
768 parameters['s_time'] = self.s_time.strftime("%H:%M:%S")
650 parameters['e_time'] = self.e_time.strftime("%H:%M:%S")
769 parameters['e_time'] = self.e_time.strftime("%H:%M:%S")
651 parameters['ues'] = ast.literal_eval(self.ues)
770 parameters['ues'] = ast.literal_eval(self.ues)
652 parameters['only_rx'] = json.loads(self.only_rx)
771 parameters['only_rx'] = json.loads(self.only_rx)
653
772
654 return parameters
773 return parameters
655
774
656 def dict_to_parms(self, parameters):
775 def dict_to_parms(self, parameters):
657
776
658 self.name = parameters['name']
777 self.name = parameters['name']
659 self.antenna = json.dumps(parameters['antenna'])
778 self.antenna = json.dumps(parameters['antenna'])
660 #self.abs_conf = parameters['abs_conf']
779 #self.abs_conf = parameters['abs_conf']
661 self.tx = json.dumps(parameters['tx'])
780 self.tx = json.dumps(parameters['tx'])
662 self.rx = json.dumps(parameters['rx'])
781 self.rx = json.dumps(parameters['rx'])
663 #self.s_time = parameters['s_time']
782 #self.s_time = parameters['s_time']
664 #self.e_time = parameters['e_time']
783 #self.e_time = parameters['e_time']
665 self.ues = json.dumps(parameters['ues'])
784 self.ues = json.dumps(parameters['ues'])
666 self.only_rx = json.dumps(parameters['only_rx'])
785 self.only_rx = json.dumps(parameters['only_rx'])
667 self.save()
786 self.save()
668
787
669
788
670 def clone(self, **kwargs):
789 def clone(self, **kwargs):
671
790
672 self.pk = None
791 self.pk = None
673 self.id = None
792 self.id = None
674 for attr, value in kwargs.items():
793 for attr, value in kwargs.items():
675 setattr(self, attr, value)
794 setattr(self, attr, value)
676
795
677 self.save()
796 self.save()
678
797
679 return self
798 return self
680
799
681
800
682 def module_6bits(self, module):
801 def module_6bits(self, module):
683 """
802 """
684 This function reads antenna pattern and choose 6bits (upbits-downbits) for one abs module
803 This function reads antenna pattern and choose 6bits (upbits-downbits) for one abs module
685 """
804 """
686 module += 1
805 module += 1
687 if module > 64:
806 if module > 64:
688 beam_bits = ""
807 beam_bits = ""
689 return beam_bits
808 return beam_bits
690
809
691 data = ast.literal_eval(self.antenna)
810 data = ast.literal_eval(self.antenna)
692 up_data = data['antenna_up']
811 up_data = data['antenna_up']
693 down_data = data['antenna_down']
812 down_data = data['antenna_down']
694
813
695 pos = ip2position(module)
814 pos = ip2position(module)
696 up_value = up_data[pos[0]][pos[1]]
815 up_value = up_data[pos[0]][pos[1]]
697 down_value = down_data[pos[0]][pos[1]]
816 down_value = down_data[pos[0]][pos[1]]
698
817
699 up_bits = up_conv_bits(up_value)
818 up_bits = up_conv_bits(up_value)
700 down_bits = down_conv_bits(down_value)
819 down_bits = down_conv_bits(down_value)
701 beam_bits = up_bits+down_bits
820 beam_bits = up_bits+down_bits
702
821
703 return beam_bits
822 return beam_bits
704
823
705
824
706 @property
825 @property
707 def get_upvalues(self):
826 def get_upvalues(self):
708 """
827 """
709 This function reads antenna pattern and show the up-value of one abs module
828 This function reads antenna pattern and show the up-value of one abs module
710 """
829 """
711
830
712 data = ast.literal_eval(self.antenna)
831 data = ast.literal_eval(self.antenna)
713 up_data = data['antenna_up']
832 up_data = data['antenna_up']
714
833
715 up_values = []
834 up_values = []
716 for data in up_data:
835 for data in up_data:
717 for i in range(0,8):
836 for i in range(0,8):
718 up_values.append(data[i])
837 up_values.append(data[i])
719
838
720 return up_values
839 return up_values
721
840
722 @property
841 @property
723 def antenna_upvalues(self):
842 def antenna_upvalues(self):
724 """
843 """
725 This function reads antenna pattern and show the up - values of one abs beam
844 This function reads antenna pattern and show the up - values of one abs beam
726 in a particular order
845 in a particular order
727 """
846 """
728 data = ast.literal_eval(self.antenna)
847 data = ast.literal_eval(self.antenna)
729 up_data = data['antenna_up']
848 up_data = data['antenna_up']
730
849
731 return up_data
850 return up_data
732
851
733 @property
852 @property
734 def antenna_downvalues(self):
853 def antenna_downvalues(self):
735 """
854 """
736 This function reads antenna pattern and show the down - values of one abs beam
855 This function reads antenna pattern and show the down - values of one abs beam
737 in a particular order
856 in a particular order
738 """
857 """
739 data = ast.literal_eval(self.antenna)
858 data = ast.literal_eval(self.antenna)
740 down_data = data['antenna_down']
859 down_data = data['antenna_down']
741
860
742 return down_data
861 return down_data
743
862
744 @property
863 @property
745 def get_downvalues(self):
864 def get_downvalues(self):
746 """
865 """
747 This function reads antenna pattern and show the down-value of one abs module
866 This function reads antenna pattern and show the down-value of one abs module
748 """
867 """
749
868
750 data = ast.literal_eval(self.antenna)
869 data = ast.literal_eval(self.antenna)
751 down_data = data['antenna_down']
870 down_data = data['antenna_down']
752
871
753 down_values = []
872 down_values = []
754 for data in down_data:
873 for data in down_data:
755 for i in range(0,8):
874 for i in range(0,8):
756 down_values.append(data[i])
875 down_values.append(data[i])
757
876
758 return down_values
877 return down_values
759
878
760 @property
879 @property
761 def get_up_ues(self):
880 def get_up_ues(self):
762 """
881 """
763 This function shows the up-ues-value of one beam
882 This function shows the up-ues-value of one beam
764 """
883 """
765 data = ast.literal_eval(self.ues)
884 data = ast.literal_eval(self.ues)
766 up_ues = data['up']
885 up_ues = data['up']
767
886
768 return up_ues
887 return up_ues
769
888
770 @property
889 @property
771 def get_down_ues(self):
890 def get_down_ues(self):
772 """
891 """
773 This function shows the down-ues-value of one beam
892 This function shows the down-ues-value of one beam
774 """
893 """
775 data = ast.literal_eval(self.ues)
894 data = ast.literal_eval(self.ues)
776 down_ues = data['down']
895 down_ues = data['down']
777
896
778 return down_ues
897 return down_ues
779
898
780 @property
899 @property
781 def get_up_onlyrx(self):
900 def get_up_onlyrx(self):
782 """
901 """
783 This function shows the up-onlyrx-value of one beam
902 This function shows the up-onlyrx-value of one beam
784 """
903 """
785 data = json.loads(self.only_rx)
904 data = json.loads(self.only_rx)
786 up_onlyrx = data['up']
905 up_onlyrx = data['up']
787
906
788 return up_onlyrx
907 return up_onlyrx
789
908
790 @property
909 @property
791 def get_down_onlyrx(self):
910 def get_down_onlyrx(self):
792 """
911 """
793 This function shows the down-onlyrx-value of one beam
912 This function shows the down-onlyrx-value of one beam
794 """
913 """
795 data = json.loads(self.only_rx)
914 data = json.loads(self.only_rx)
796 down_onlyrx = data['down']
915 down_onlyrx = data['down']
797
916
798 return down_onlyrx
917 return down_onlyrx
799
918
800 @property
919 @property
801 def get_tx(self):
920 def get_tx(self):
802 """
921 """
803 This function shows the tx-values of one beam
922 This function shows the tx-values of one beam
804 """
923 """
805 data = json.loads(self.tx)
924 data = json.loads(self.tx)
806
925
807 return data
926 return data
808
927
809 @property
928 @property
810 def get_uptx(self):
929 def get_uptx(self):
811 """
930 """
812 This function shows the up-tx-values of one beam
931 This function shows the up-tx-values of one beam
813 """
932 """
814 data = json.loads(self.tx)
933 data = json.loads(self.tx)
815 up_data = data['up']
934 up_data = data['up']
816
935
817 up_values = []
936 up_values = []
818 for data in up_data:
937 for data in up_data:
819 for i in range(0,8):
938 for i in range(0,8):
820 up_values.append(data[i])
939 up_values.append(data[i])
821
940
822 return up_values
941 return up_values
823
942
824 @property
943 @property
825 def get_downtx(self):
944 def get_downtx(self):
826 """
945 """
827 This function shows the down-tx-values of one beam
946 This function shows the down-tx-values of one beam
828 """
947 """
829 data = json.loads(self.tx)
948 data = json.loads(self.tx)
830 down_data = data['down']
949 down_data = data['down']
831
950
832 down_values = []
951 down_values = []
833 for data in down_data:
952 for data in down_data:
834 for i in range(0,8):
953 for i in range(0,8):
835 down_values.append(data[i])
954 down_values.append(data[i])
836
955
837 return down_values
956 return down_values
838
957
839
958
840
959
841 @property
960 @property
842 def get_rx(self):
961 def get_rx(self):
843 """
962 """
844 This function shows the rx-values of one beam
963 This function shows the rx-values of one beam
845 """
964 """
846 data = json.loads(self.rx)
965 data = json.loads(self.rx)
847
966
848 return data
967 return data
849
968
850 @property
969 @property
851 def get_uprx(self):
970 def get_uprx(self):
852 """
971 """
853 This function shows the up-rx-values of one beam
972 This function shows the up-rx-values of one beam
854 """
973 """
855 data = json.loads(self.rx)
974 data = json.loads(self.rx)
856 up_data = data['up']
975 up_data = data['up']
857
976
858 up_values = []
977 up_values = []
859 for data in up_data:
978 for data in up_data:
860 for i in range(0,8):
979 for i in range(0,8):
861 up_values.append(data[i])
980 up_values.append(data[i])
862
981
863 return up_values
982 return up_values
864
983
865 @property
984 @property
866 def get_downrx(self):
985 def get_downrx(self):
867 """
986 """
868 This function shows the down-rx-values of one beam
987 This function shows the down-rx-values of one beam
869 """
988 """
870 data = json.loads(self.rx)
989 data = json.loads(self.rx)
871 down_data = data['down']
990 down_data = data['down']
872
991
873 down_values = []
992 down_values = []
874 for data in down_data:
993 for data in down_data:
875 for i in range(0,8):
994 for i in range(0,8):
876 down_values.append(data[i])
995 down_values.append(data[i])
877
996
878 return down_values
997 return down_values
@@ -1,19 +1,21
1 {% extends "dev_conf_edit.html" %}
1 {% extends "dev_conf_edit.html" %}
2
2
3 {% load bootstrap4 %}
3 {% load bootstrap4 %}
4 {% load static %}
4 {% load static %}
5 {% load main_tags %}
5 {% load main_tags %}
6
6
7
8
7 {% block content %}
9 {% block content %}
8 <form class="form" method="post">
10 <form class="form" method="post">
9 {% csrf_token %}
11 {% csrf_token %}
10 {#% bootstrap_form form layout='horizontal' size='medium' %#}
12 {#% bootstrap_form form layout='horizontal' size='medium' %#}
11 {{form}}
13 {{form}}
12 <div style="clear: both;"></div>
14 <div style="clear: both;"></div>
13 <br>
15 <br>
14 <div class="pull-right">
16 <div class="pull-right">
15 <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button>
17 <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button>
16 <button type="submit" class="btn btn-primary">{{button}}</button>
18 <button type="submit" class="btn btn-primary">{{button}}</button>
17 </div>
19 </div>
18 </form>
20 </form>
19 {% endblock %}
21 {% endblock %}
@@ -1,42 +1,42
1 {% load bootstrap4 %}
1 {% load bootstrap4 %}
2
2
3 {% if abs_beams %}
3 {% if abs_beams %}
4
4
5 <div class="pull-right">
5 <div class="pull-right">
6 <button id="bt_toggle" type="button" class="btn btn-default btn-sm" >
6 <button id="bt_toggle" type="button" class="btn btn-default btn-sm" >
7 Expand/Collapse
7 Expand/Collapse
8 </button>
8 </button>
9 </div><br><br>
9 </div><br><br>
10
10
11
11
12 {% for beam in abs_beams %}
12 {% for beam in abs_beams %}
13 <div class="panel panel-default" id="panel-{{beam.id}}">
13 <div class="panel panel-default" id="panel-{{beam.id}}">
14 <div class="panel-heading" role="tab" id="heading{{beam.id}}">
14 <div class="panel-heading" role="tab" id="heading{{beam.id}}">
15 <h4 class="panel-title">
15 <h4 class="panel-title">
16 <a role="button" onclick="beam_values(beam.id)" data-toggle="collapse" data-parent="#div_lines" href="#collapse{{beam.id}}" aria-expanded="true" aria-controls="collapse{{beam.id}}">
16 <a role="button" onclick="beam_values(beam.id)" data-toggle="collapse" data-parent="#div_lines" href="#collapse{{beam.id}}" aria-expanded="true" aria-controls="collapse{{beam.id}}">
17 #{{forloop.counter}}: {{beam.name}}
17 #{{forloop.counter}}: {{beam.name}}
18 </a>
18 </a>
19 {% if edit %}
19 {% if edit %}
20 <button id="bt_remove_beam-{{ beam.id }}" type="button" class="btn-xs btn-default pull-right" name="bt_remove_beam" value="{{beam.pk}}"><span class="far fa-trash-alt" aria-hidden="true"></span></button>
20 <button id="bt_remove_beam-{{ beam.id }}" type="button" class="btn-xs btn-default pull-right" name="bt_remove_beam" value="{{beam.pk}}"><span class="far fa-trash-alt" aria-hidden="true"></span></button>
21 <button id="bt_edit_beam-{{ beam.id }}" type="button" class="btn-xs btn-default pull-right" name="bt_edit_beam" value="{{beam.pk}}"><span class="fas fa-pencil" aria-hidden="true"></span></button>
21 <button id="bt_edit_beam-{{ beam.id }}" type="button" class="btn-xs btn-default pull-right" name="bt_edit_beam" value="{{beam.pk}}"><span class="fa fa-pencil" aria-hidden="true"></span></button>
22 {% endif %}
22 {% endif %}
23 </h4>
23 </h4>
24 </div>
24 </div>
25 <div id="collapse{{beam.id}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading{{beam.id}}">
25 <div id="collapse{{beam.id}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading{{beam.id}}">
26 <div class="panel-body">
26 <div class="panel-body">
27 {% include "abs_beam_values.html" %}
27 {% include "abs_beam_values.html" %}
28 {# bootstrap_form beam.form layout='horizontal' size='small' #}
28 {# bootstrap_form beam.form layout='horizontal' size='small' #}
29 <br>
29 <br>
30
30
31 <br>
31 <br>
32 <!--<button type="button" class="btn btn-sm btn-default" style="margin-left: 10px" name="bt_add_subline" value="{{line.pk}}">Add {{line.line_type.name}}</button>-->
32 <!--<button type="button" class="btn btn-sm btn-default" style="margin-left: 10px" name="bt_add_subline" value="{{line.pk}}">Add {{line.line_type.name}}</button>-->
33 {# endif #}
33 {# endif #}
34
34
35 </div>
35 </div>
36 </div>
36 </div>
37 </div>
37 </div>
38 {% endfor%}
38 {% endfor%}
39
39
40 {% else %}
40 {% else %}
41 <p style="color:#b4bcc2; margin-left: 5%;"><i>No Beams...</i></p>
41 <p style="color:#b4bcc2; margin-left: 5%;"><i>No Beams...</i></p>
42 {% endif %}
42 {% endif %}
@@ -1,336 +1,339
1 {% extends "dev_conf.html" %} {% load static %} {% load bootstrap4 %} {% load main_tags %}
1 {% extends "dev_conf.html" %} {% load static %} {% load bootstrap4 %} {% load main_tags %}
2 {% block extra-head %}
2 {% block extra-head %}
3 <style>
3 <style>
4 .abs {
4 .abs {
5 width: auto;
5 width: auto;
6 display: inline-block;
6 display: inline-block;
7 text-align: center;
7 text-align: center;
8 }
8 }
9
9
10 .abs td {
10 .abs td {
11 padding: 4px;
11 padding: 4px;
12 }
12 }
13
13
14 .module td {
14 .module td {
15 padding: 4px 15px 4px 15px;
15 padding: 4px 15px 4px 15px;
16 font-weight: bold;
16 font-weight: bold;
17 border: 1px solid
17 border: 1px solid
18 }
18 }
19
19
20 .legend {
20 .legend {
21 margin-left: 15px;
21 margin-left: 15px;
22 display: inline-block;
22 display: inline-block;
23 border: 2px solid;
23 border: 2px solid;
24 vertical-align: top;
24 vertical-align: top;
25 }
25 }
26
26
27 .legend th {
27 .legend th {
28 border-bottom: 1px dashed;
28 border-bottom: 1px dashed;
29 font-weight: bold;
29 font-weight: bold;
30 vertical-align: center;
30 vertical-align: center;
31 text-align: center;
31 text-align: center;
32 }
32 }
33
33
34 .legend td {
34 .legend td {
35 padding: 2px;
35 padding: 2px;
36 text-align: center;
36 text-align: center;
37 font-weight: bold;
37 font-weight: bold;
38 }
38 }
39
39
40 </style>
40 </style>
41 {% endblock %}
41 {% endblock %}
42 {% block extra-menu-actions %}
42 {% block extra-menu-actions %}
43 <li>
43 <li>
44 <a href="{{ dev_conf.get_absolute_url_plot }}" target="_blank">
44 <a href="{{ dev_conf.get_absolute_url_plot }}" target="_blank">
45 <span class="far fa-image" aria-hidden="true"></span> View Patterns </a>
45 <span class="far fa-image" aria-hidden="true"></span> View Patterns </a>
46 </li>
46 </li>
47 {% endblock %}
47 {% endblock %}
48 {% block extra-content %}
48 {% block extra-content %}
49 {% if beams %}
49 {% if beams %}
50 <h4>Beams:</h4>
50 <h4>Beams:</h4>
51 <div class="container">
51 <div class="container">
52 <ul class="nav nav-pills">
52 <ul class="nav nav-pills">
53 {% for beam in beams %}
53 {% for beam in beams %}
54 <li {%if beam.pk == active_beam %} class="active" {% endif %}>
54 <li class="nav-item">
55 <a data-toggle="pill" href="#menu{{forloop.counter}}">{{forloop.counter}}</a>
55 <a {%if beam.pk == active_beam %} class="nav-link active" {% else %} class="nav-link" {% endif %} data-toggle="pill" href="#menu{{forloop.counter}}">{{forloop.counter}}</a>
56 </li>
56 </li>
57 {% endfor %}
57 {% endfor %}
58 </ul>
58 </ul>
59
59
60 <div class="tab-content">
60 <div class="tab-content">
61 {% for beam in beams %}
61 {% for beam in beams %}
62 <div id="menu{{forloop.counter}}" class="tab-pane fade {%if beam.pk == active_beam %}active in{% endif %}">
62 <div id="menu{{forloop.counter}}" class="tab-pane fade {%if beam.pk == active_beam %}in active show{% endif %}">
63 <h3>{%if beam.pk == active_beam %}Active Beam: {%endif%}{{beam.name}}</h3>
63 <h3>{%if beam.pk == active_beam %}Active Beam: {%endif%}{{beam.name}}</h3>
64 <table id="abs_pattern{{forloop.counter}}" class="abs">
64 <table id="abs_pattern{{forloop.counter}}" class="abs">
65 <tr>
65 <tr>
66 <td>
66 <td>
67 <b>North Quarter</b>
67 <b>North Quarter</b>
68 <table class="module">
68 <table class="module">
69 <tr>
69 <tr>
70 <td title='{{module_messages.1}}'><span {%if beam.pk == active_beam %} {{color_status.1}} {%endif%}>{{beam.get_upvalues.0}}</span></td>
70 <td title='{{module_messages.1}}'><span {%if beam.pk == active_beam %} {{color_status.1}} {%endif%}>{{beam.get_upvalues.0}}</span></td>
71 <td title='{{module_messages.2}}'><span {%if beam.pk == active_beam %} {{color_status.2}} {%endif%}>{{beam.get_upvalues.1}}</span></td>
71 <td title='{{module_messages.2}}'><span {%if beam.pk == active_beam %} {{color_status.2}} {%endif%}>{{beam.get_upvalues.1}}</span></td>
72 <td title='{{module_messages.3}}'><span {%if beam.pk == active_beam %} {{color_status.3}} {%endif%}>{{beam.get_upvalues.2}}</span></td>
72 <td title='{{module_messages.3}}'><span {%if beam.pk == active_beam %} {{color_status.3}} {%endif%}>{{beam.get_upvalues.2}}</span></td>
73 <td title='{{module_messages.4}}'><span {%if beam.pk == active_beam %} {{color_status.4}} {%endif%}>{{beam.get_upvalues.3}}</span></td>
73 <td title='{{module_messages.4}}'><span {%if beam.pk == active_beam %} {{color_status.4}} {%endif%}>{{beam.get_upvalues.3}}</span></td>
74 </tr>
74 </tr>
75 <tr>
75 <tr>
76 <td title='{{module_messages.1}}'><span {%if beam.pk == active_beam %} {{color_status.1}} {%endif%}>{{beam.get_downvalues.0}}</span></td>
76 <td title='{{module_messages.1}}'><span {%if beam.pk == active_beam %} {{color_status.1}} {%endif%}>{{beam.get_downvalues.0}}</span></td>
77 <td title='{{module_messages.2}}'><span {%if beam.pk == active_beam %} {{color_status.2}} {%endif%}>{{beam.get_downvalues.1}}</span></td>
77 <td title='{{module_messages.2}}'><span {%if beam.pk == active_beam %} {{color_status.2}} {%endif%}>{{beam.get_downvalues.1}}</span></td>
78 <td title='{{module_messages.3}}'> <span {%if beam.pk == active_beam %} {{color_status.3}} {%endif%}>{{beam.get_downvalues.2}}</span></td>
78 <td title='{{module_messages.3}}'> <span {%if beam.pk == active_beam %} {{color_status.3}} {%endif%}>{{beam.get_downvalues.2}}</span></td>
79 <td title='{{module_messages.4}}'> <span {%if beam.pk == active_beam %} {{color_status.4}} {%endif%}>{{beam.get_downvalues.3}}</span></td>
79 <td title='{{module_messages.4}}'> <span {%if beam.pk == active_beam %} {{color_status.4}} {%endif%}>{{beam.get_downvalues.3}}</span></td>
80 </tr>
80 </tr>
81 <tr>
81 <tr>
82 <td title='{{module_messages.9}}'> <span {%if beam.pk == active_beam %} {{color_status.9}} {%endif%}>{{beam.get_upvalues.8}}</span></td>
82 <td title='{{module_messages.9}}'> <span {%if beam.pk == active_beam %} {{color_status.9}} {%endif%}>{{beam.get_upvalues.8}}</span></td>
83 <td title='{{module_messages.10}}'><span {%if beam.pk == active_beam %} {{color_status.10}} {%endif%}>{{beam.get_upvalues.9}}</span></td>
83 <td title='{{module_messages.10}}'><span {%if beam.pk == active_beam %} {{color_status.10}} {%endif%}>{{beam.get_upvalues.9}}</span></td>
84 <td title='{{module_messages.11}}'><span {%if beam.pk == active_beam %} {{color_status.11}} {%endif%}>{{beam.get_upvalues.10}}</span></td>
84 <td title='{{module_messages.11}}'><span {%if beam.pk == active_beam %} {{color_status.11}} {%endif%}>{{beam.get_upvalues.10}}</span></td>
85 <td title='{{module_messages.12}}'><span {%if beam.pk == active_beam %} {{color_status.12}} {%endif%}>{{beam.get_upvalues.11}}</span></td>
85 <td title='{{module_messages.12}}'><span {%if beam.pk == active_beam %} {{color_status.12}} {%endif%}>{{beam.get_upvalues.11}}</span></td>
86 </tr>
86 </tr>
87 <tr>
87 <tr>
88 <td title='{{module_messages.9}}'> <span {%if beam.pk == active_beam %} {{color_status.9}} {%endif%}>{{beam.get_downvalues.8}}</span></td>
88 <td title='{{module_messages.9}}'> <span {%if beam.pk == active_beam %} {{color_status.9}} {%endif%}>{{beam.get_downvalues.8}}</span></td>
89 <td title='{{module_messages.10}}'><span {%if beam.pk == active_beam %} {{color_status.10}} {%endif%}>{{beam.get_downvalues.9}}</span></td>
89 <td title='{{module_messages.10}}'><span {%if beam.pk == active_beam %} {{color_status.10}} {%endif%}>{{beam.get_downvalues.9}}</span></td>
90 <td title='{{module_messages.11}}'><span {%if beam.pk == active_beam %} {{color_status.11}} {%endif%}>{{beam.get_downvalues.10}}</span></td>
90 <td title='{{module_messages.11}}'><span {%if beam.pk == active_beam %} {{color_status.11}} {%endif%}>{{beam.get_downvalues.10}}</span></td>
91 <td title='{{module_messages.12}}'><span {%if beam.pk == active_beam %} {{color_status.12}} {%endif%}>{{beam.get_downvalues.11}}</span></td>
91 <td title='{{module_messages.12}}'><span {%if beam.pk == active_beam %} {{color_status.12}} {%endif%}>{{beam.get_downvalues.11}}</span></td>
92 </tr>
92 </tr>
93 <tr>
93 <tr>
94 <td title='{{module_messages.17}}'><span {%if beam.pk == active_beam %} {{color_status.17}} {%endif%}>{{beam.get_upvalues.16}}</span></td>
94 <td title='{{module_messages.17}}'><span {%if beam.pk == active_beam %} {{color_status.17}} {%endif%}>{{beam.get_upvalues.16}}</span></td>
95 <td title='{{module_messages.18}}'><span {%if beam.pk == active_beam %} {{color_status.18}} {%endif%}>{{beam.get_upvalues.17}}</span></td>
95 <td title='{{module_messages.18}}'><span {%if beam.pk == active_beam %} {{color_status.18}} {%endif%}>{{beam.get_upvalues.17}}</span></td>
96 <td title='{{module_messages.19}}'><span {%if beam.pk == active_beam %} {{color_status.19}} {%endif%}>{{beam.get_upvalues.18}}</span></td>
96 <td title='{{module_messages.19}}'><span {%if beam.pk == active_beam %} {{color_status.19}} {%endif%}>{{beam.get_upvalues.18}}</span></td>
97 <td title='{{module_messages.20}}'><span {%if beam.pk == active_beam %} {{color_status.20}} {%endif%}>{{beam.get_upvalues.19}}</span></td>
97 <td title='{{module_messages.20}}'><span {%if beam.pk == active_beam %} {{color_status.20}} {%endif%}>{{beam.get_upvalues.19}}</span></td>
98 </tr>
98 </tr>
99 <tr>
99 <tr>
100 <td title='{{module_messages.17}}'><span {%if beam.pk == active_beam %} {{color_status.17}} {%endif%}>{{beam.get_downvalues.16}}</span></td>
100 <td title='{{module_messages.17}}'><span {%if beam.pk == active_beam %} {{color_status.17}} {%endif%}>{{beam.get_downvalues.16}}</span></td>
101 <td title='{{module_messages.18}}'><span {%if beam.pk == active_beam %} {{color_status.18}} {%endif%}>{{beam.get_downvalues.17}}</span></td>
101 <td title='{{module_messages.18}}'><span {%if beam.pk == active_beam %} {{color_status.18}} {%endif%}>{{beam.get_downvalues.17}}</span></td>
102 <td title='{{module_messages.19}}'><span {%if beam.pk == active_beam %} {{color_status.19}} {%endif%}>{{beam.get_downvalues.18}}</span></td>
102 <td title='{{module_messages.19}}'><span {%if beam.pk == active_beam %} {{color_status.19}} {%endif%}>{{beam.get_downvalues.18}}</span></td>
103 <td title='{{module_messages.20}}'><span {%if beam.pk == active_beam %} {{color_status.20}} {%endif%}>{{beam.get_downvalues.19}}</span></td>
103 <td title='{{module_messages.20}}'><span {%if beam.pk == active_beam %} {{color_status.20}} {%endif%}>{{beam.get_downvalues.19}}</span></td>
104 </tr>
104 </tr>
105 <tr>
105 <tr>
106 <td title='{{module_messages.25}}'><span {%if beam.pk == active_beam %} {{color_status.25}} {%endif%}>{{beam.get_upvalues.24}}</span></td>
106 <td title='{{module_messages.25}}'><span {%if beam.pk == active_beam %} {{color_status.25}} {%endif%}>{{beam.get_upvalues.24}}</span></td>
107 <td title='{{module_messages.26}}'><span {%if beam.pk == active_beam %} {{color_status.26}} {%endif%}>{{beam.get_upvalues.25}}</span></td>
107 <td title='{{module_messages.26}}'><span {%if beam.pk == active_beam %} {{color_status.26}} {%endif%}>{{beam.get_upvalues.25}}</span></td>
108 <td title='{{module_messages.27}}'><span {%if beam.pk == active_beam %} {{color_status.27}} {%endif%}>{{beam.get_upvalues.26}}</span></td>
108 <td title='{{module_messages.27}}'><span {%if beam.pk == active_beam %} {{color_status.27}} {%endif%}>{{beam.get_upvalues.26}}</span></td>
109 <td title='{{module_messages.28}}'><span {%if beam.pk == active_beam %} {{color_status.28}} {%endif%}>{{beam.get_upvalues.27}}</span></td>
109 <td title='{{module_messages.28}}'><span {%if beam.pk == active_beam %} {{color_status.28}} {%endif%}>{{beam.get_upvalues.27}}</span></td>
110 </tr>
110 </tr>
111 <tr>
111 <tr>
112 <td title='{{module_messages.25}}'><span {%if beam.pk == active_beam %} {{color_status.25}} {%endif%}>{{beam.get_downvalues.24}}</span></td>
112 <td title='{{module_messages.25}}'><span {%if beam.pk == active_beam %} {{color_status.25}} {%endif%}>{{beam.get_downvalues.24}}</span></td>
113 <td title='{{module_messages.26}}'><span {%if beam.pk == active_beam %} {{color_status.26}} {%endif%}>{{beam.get_downvalues.25}}</span></td>
113 <td title='{{module_messages.26}}'><span {%if beam.pk == active_beam %} {{color_status.26}} {%endif%}>{{beam.get_downvalues.25}}</span></td>
114 <td title='{{module_messages.27}}'><span {%if beam.pk == active_beam %} {{color_status.27}} {%endif%}>{{beam.get_downvalues.26}}</span></td>
114 <td title='{{module_messages.27}}'><span {%if beam.pk == active_beam %} {{color_status.27}} {%endif%}>{{beam.get_downvalues.26}}</span></td>
115 <td title='{{module_messages.28}}'><span {%if beam.pk == active_beam %} {{color_status.28}} {%endif%}>{{beam.get_downvalues.27}}</span></td>
115 <td title='{{module_messages.28}}'><span {%if beam.pk == active_beam %} {{color_status.28}} {%endif%}>{{beam.get_downvalues.27}}</span></td>
116 </tr>
116 </tr>
117 </table>
117 </table>
118 </td>
118 </td>
119 <td>
119 <td>
120 <b>East Quarter</b>
120 <b>East Quarter</b>
121 <table class="module">
121 <table class="module">
122 <tr>
122 <tr>
123 <td title='{{module_messages.5}}'> <span {%if beam.pk == active_beam %} {{color_status.5}} {%endif%}>{{beam.get_upvalues.4}}</span></td>
123 <td title='{{module_messages.5}}'> <span {%if beam.pk == active_beam %} {{color_status.5}} {%endif%}>{{beam.get_upvalues.4}}</span></td>
124 <td title='{{module_messages.6}}'> <span {%if beam.pk == active_beam %} {{color_status.6}} {%endif%}>{{beam.get_upvalues.5}}</span></td>
124 <td title='{{module_messages.6}}'> <span {%if beam.pk == active_beam %} {{color_status.6}} {%endif%}>{{beam.get_upvalues.5}}</span></td>
125 <td title='{{module_messages.7}}'> <span {%if beam.pk == active_beam %} {{color_status.7}} {%endif%}>{{beam.get_upvalues.6}}</span></td>
125 <td title='{{module_messages.7}}'> <span {%if beam.pk == active_beam %} {{color_status.7}} {%endif%}>{{beam.get_upvalues.6}}</span></td>
126 <td title='{{module_messages.8}}'> <span {%if beam.pk == active_beam %} {{color_status.8}} {%endif%}>{{beam.get_upvalues.7}}</span></td>
126 <td title='{{module_messages.8}}'> <span {%if beam.pk == active_beam %} {{color_status.8}} {%endif%}>{{beam.get_upvalues.7}}</span></td>
127 </tr>
127 </tr>
128 <tr>
128 <tr>
129 <td title='{{module_messages.5}}'> <span {%if beam.pk == active_beam %} {{color_status.5}} {%endif%}>{{beam.get_downvalues.4}}</span></td>
129 <td title='{{module_messages.5}}'> <span {%if beam.pk == active_beam %} {{color_status.5}} {%endif%}>{{beam.get_downvalues.4}}</span></td>
130 <td title='{{module_messages.6}}'> <span {%if beam.pk == active_beam %} {{color_status.6}} {%endif%}>{{beam.get_downvalues.5}}</span></td>
130 <td title='{{module_messages.6}}'> <span {%if beam.pk == active_beam %} {{color_status.6}} {%endif%}>{{beam.get_downvalues.5}}</span></td>
131 <td title='{{module_messages.7}}'> <span {%if beam.pk == active_beam %} {{color_status.7}} {%endif%}>{{beam.get_downvalues.6}}</span></td>
131 <td title='{{module_messages.7}}'> <span {%if beam.pk == active_beam %} {{color_status.7}} {%endif%}>{{beam.get_downvalues.6}}</span></td>
132 <td title='{{module_messages.8}}'> <span {%if beam.pk == active_beam %} {{color_status.8}} {%endif%}>{{beam.get_downvalues.7}}</span></td>
132 <td title='{{module_messages.8}}'> <span {%if beam.pk == active_beam %} {{color_status.8}} {%endif%}>{{beam.get_downvalues.7}}</span></td>
133 </tr>
133 </tr>
134 <tr>
134 <tr>
135 <td title='{{module_messages.13}}'><span {%if beam.pk == active_beam %} {{color_status.13}} {%endif%}>{{beam.get_upvalues.12}}</span></td>
135 <td title='{{module_messages.13}}'><span {%if beam.pk == active_beam %} {{color_status.13}} {%endif%}>{{beam.get_upvalues.12}}</span></td>
136 <td title='{{module_messages.14}}'><span {%if beam.pk == active_beam %} {{color_status.14}} {%endif%}>{{beam.get_upvalues.13}}</span></td>
136 <td title='{{module_messages.14}}'><span {%if beam.pk == active_beam %} {{color_status.14}} {%endif%}>{{beam.get_upvalues.13}}</span></td>
137 <td title='{{module_messages.15}}'><span {%if beam.pk == active_beam %} {{color_status.15}} {%endif%}>{{beam.get_upvalues.14}}</span></td>
137 <td title='{{module_messages.15}}'><span {%if beam.pk == active_beam %} {{color_status.15}} {%endif%}>{{beam.get_upvalues.14}}</span></td>
138 <td title='{{module_messages.16}}'><span {%if beam.pk == active_beam %} {{color_status.16}} {%endif%}>{{beam.get_upvalues.15}}</span></td>
138 <td title='{{module_messages.16}}'><span {%if beam.pk == active_beam %} {{color_status.16}} {%endif%}>{{beam.get_upvalues.15}}</span></td>
139 </tr>
139 </tr>
140 <tr>
140 <tr>
141 <td title='{{module_messages.13}}'><span {%if beam.pk == active_beam %} {{color_status.13}} {%endif%}>{{beam.get_downvalues.12}}</span></td>
141 <td title='{{module_messages.13}}'><span {%if beam.pk == active_beam %} {{color_status.13}} {%endif%}>{{beam.get_downvalues.12}}</span></td>
142 <td title='{{module_messages.14}}'><span {%if beam.pk == active_beam %} {{color_status.14}} {%endif%}>{{beam.get_downvalues.13}}</span></td>
142 <td title='{{module_messages.14}}'><span {%if beam.pk == active_beam %} {{color_status.14}} {%endif%}>{{beam.get_downvalues.13}}</span></td>
143 <td title='{{module_messages.15}}'><span {%if beam.pk == active_beam %} {{color_status.15}} {%endif%}>{{beam.get_downvalues.14}}</span></td>
143 <td title='{{module_messages.15}}'><span {%if beam.pk == active_beam %} {{color_status.15}} {%endif%}>{{beam.get_downvalues.14}}</span></td>
144 <td title='{{module_messages.16}}'><span {%if beam.pk == active_beam %} {{color_status.16}} {%endif%}>{{beam.get_downvalues.15}}</span></td>
144 <td title='{{module_messages.16}}'><span {%if beam.pk == active_beam %} {{color_status.16}} {%endif%}>{{beam.get_downvalues.15}}</span></td>
145 </tr>
145 </tr>
146 <tr>
146 <tr>
147 <td title='{{module_messages.21}}'><span {%if beam.pk == active_beam %} {{color_status.21}} {%endif%}>{{beam.get_upvalues.20}}</span></td>
147 <td title='{{module_messages.21}}'><span {%if beam.pk == active_beam %} {{color_status.21}} {%endif%}>{{beam.get_upvalues.20}}</span></td>
148 <td title='{{module_messages.22}}'><span {%if beam.pk == active_beam %} {{color_status.22}} {%endif%}>{{beam.get_upvalues.21}}</span></td>
148 <td title='{{module_messages.22}}'><span {%if beam.pk == active_beam %} {{color_status.22}} {%endif%}>{{beam.get_upvalues.21}}</span></td>
149 <td title='{{module_messages.23}}'><span {%if beam.pk == active_beam %} {{color_status.23}} {%endif%}>{{beam.get_upvalues.22}}</span></td>
149 <td title='{{module_messages.23}}'><span {%if beam.pk == active_beam %} {{color_status.23}} {%endif%}>{{beam.get_upvalues.22}}</span></td>
150 <td title='{{module_messages.24}}'><span {%if beam.pk == active_beam %} {{color_status.24}} {%endif%}>{{beam.get_upvalues.23}}</span></td>
150 <td title='{{module_messages.24}}'><span {%if beam.pk == active_beam %} {{color_status.24}} {%endif%}>{{beam.get_upvalues.23}}</span></td>
151 </tr>
151 </tr>
152 <tr>
152 <tr>
153 <td title='{{module_messages.21}}'><span {%if beam.pk == active_beam %} {{color_status.21}} {%endif%}>{{beam.get_downvalues.20}}</span></td>
153 <td title='{{module_messages.21}}'><span {%if beam.pk == active_beam %} {{color_status.21}} {%endif%}>{{beam.get_downvalues.20}}</span></td>
154 <td title='{{module_messages.22}}'><span {%if beam.pk == active_beam %} {{color_status.22}} {%endif%}>{{beam.get_downvalues.21}}</span></td>
154 <td title='{{module_messages.22}}'><span {%if beam.pk == active_beam %} {{color_status.22}} {%endif%}>{{beam.get_downvalues.21}}</span></td>
155 <td title='{{module_messages.23}}'><span {%if beam.pk == active_beam %} {{color_status.23}} {%endif%}>{{beam.get_downvalues.22}}</span></td>
155 <td title='{{module_messages.23}}'><span {%if beam.pk == active_beam %} {{color_status.23}} {%endif%}>{{beam.get_downvalues.22}}</span></td>
156 <td title='{{module_messages.24}}'><span {%if beam.pk == active_beam %} {{color_status.24}} {%endif%}>{{beam.get_downvalues.23}}</span></td>
156 <td title='{{module_messages.24}}'><span {%if beam.pk == active_beam %} {{color_status.24}} {%endif%}>{{beam.get_downvalues.23}}</span></td>
157 </tr>
157 </tr>
158 <tr>
158 <tr>
159 <td title='{{module_messages.29}}'><span {%if beam.pk == active_beam %} {{color_status.29}} {%endif%}>{{beam.get_upvalues.28}}</span></td>
159 <td title='{{module_messages.29}}'><span {%if beam.pk == active_beam %} {{color_status.29}} {%endif%}>{{beam.get_upvalues.28}}</span></td>
160 <td title='{{module_messages.30}}'><span {%if beam.pk == active_beam %} {{color_status.30}} {%endif%}>{{beam.get_upvalues.29}}</span></td>
160 <td title='{{module_messages.30}}'><span {%if beam.pk == active_beam %} {{color_status.30}} {%endif%}>{{beam.get_upvalues.29}}</span></td>
161 <td title='{{module_messages.31}}'><span {%if beam.pk == active_beam %} {{color_status.31}} {%endif%}>{{beam.get_upvalues.30}}</span></td>
161 <td title='{{module_messages.31}}'><span {%if beam.pk == active_beam %} {{color_status.31}} {%endif%}>{{beam.get_upvalues.30}}</span></td>
162 <td title='{{module_messages.32}}'><span {%if beam.pk == active_beam %} {{color_status.32}} {%endif%}>{{beam.get_upvalues.31}}</span></td>
162 <td title='{{module_messages.32}}'><span {%if beam.pk == active_beam %} {{color_status.32}} {%endif%}>{{beam.get_upvalues.31}}</span></td>
163 </tr>
163 </tr>
164 <tr>
164 <tr>
165 <td title='{{module_messages.29}}'><span {%if beam.pk == active_beam %} {{color_status.29}} {%endif%}>{{beam.get_downvalues.28}}</span></td>
165 <td title='{{module_messages.29}}'><span {%if beam.pk == active_beam %} {{color_status.29}} {%endif%}>{{beam.get_downvalues.28}}</span></td>
166 <td title='{{module_messages.30}}'><span {%if beam.pk == active_beam %} {{color_status.30}} {%endif%}>{{beam.get_downvalues.29}}</span></td>
166 <td title='{{module_messages.30}}'><span {%if beam.pk == active_beam %} {{color_status.30}} {%endif%}>{{beam.get_downvalues.29}}</span></td>
167 <td title='{{module_messages.31}}'><span {%if beam.pk == active_beam %} {{color_status.31}} {%endif%}>{{beam.get_downvalues.30}}</span></td>
167 <td title='{{module_messages.31}}'><span {%if beam.pk == active_beam %} {{color_status.31}} {%endif%}>{{beam.get_downvalues.30}}</span></td>
168 <td title='{{module_messages.32}}'><span {%if beam.pk == active_beam %} {{color_status.32}} {%endif%}>{{beam.get_downvalues.31}}</span></td>
168 <td title='{{module_messages.32}}'><span {%if beam.pk == active_beam %} {{color_status.32}} {%endif%}>{{beam.get_downvalues.31}}</span></td>
169 </tr>
169 </tr>
170 </table>
170 </table>
171 </td>
171 </td>
172 </tr>
172 </tr>
173 <tr>
173 <tr>
174 <td>
174 <td>
175 <b>West Quarter</b>
175 <b>West Quarter</b>
176 <table class="module">
176 <table class="module">
177 <tr>
177 <tr>
178 <td title='{{module_messages.33}}'><span {%if beam.pk == active_beam %} {{color_status.33}} {%endif%}>{{beam.get_upvalues.32}}</span></td>
178 <td title='{{module_messages.33}}'><span {%if beam.pk == active_beam %} {{color_status.33}} {%endif%}>{{beam.get_upvalues.32}}</span></td>
179 <td title='{{module_messages.34}}'><span {%if beam.pk == active_beam %} {{color_status.34}} {%endif%}>{{beam.get_upvalues.33}}</span></td>
179 <td title='{{module_messages.34}}'><span {%if beam.pk == active_beam %} {{color_status.34}} {%endif%}>{{beam.get_upvalues.33}}</span></td>
180 <td title='{{module_messages.35}}'><span {%if beam.pk == active_beam %} {{color_status.35}} {%endif%}>{{beam.get_upvalues.34}}</span></td>
180 <td title='{{module_messages.35}}'><span {%if beam.pk == active_beam %} {{color_status.35}} {%endif%}>{{beam.get_upvalues.34}}</span></td>
181 <td title='{{module_messages.36}}'><span {%if beam.pk == active_beam %} {{color_status.36}} {%endif%}>{{beam.get_upvalues.35}}</span></td>
181 <td title='{{module_messages.36}}'><span {%if beam.pk == active_beam %} {{color_status.36}} {%endif%}>{{beam.get_upvalues.35}}</span></td>
182 </tr>
182 </tr>
183 <tr>
183 <tr>
184 <td title='{{module_messages.33}}'><span {%if beam.pk == active_beam %} {{color_status.33}} {%endif%}>{{beam.get_downvalues.32}}</span></td>
184 <td title='{{module_messages.33}}'><span {%if beam.pk == active_beam %} {{color_status.33}} {%endif%}>{{beam.get_downvalues.32}}</span></td>
185 <td title='{{module_messages.34}}'><span {%if beam.pk == active_beam %} {{color_status.34}} {%endif%}>{{beam.get_downvalues.33}}</span></td>
185 <td title='{{module_messages.34}}'><span {%if beam.pk == active_beam %} {{color_status.34}} {%endif%}>{{beam.get_downvalues.33}}</span></td>
186 <td title='{{module_messages.35}}'><span {%if beam.pk == active_beam %} {{color_status.35}} {%endif%}>{{beam.get_downvalues.34}}</span></td>
186 <td title='{{module_messages.35}}'><span {%if beam.pk == active_beam %} {{color_status.35}} {%endif%}>{{beam.get_downvalues.34}}</span></td>
187 <td title='{{module_messages.36}}'><span {%if beam.pk == active_beam %} {{color_status.36}} {%endif%}>{{beam.get_downvalues.35}}</span></td>
187 <td title='{{module_messages.36}}'><span {%if beam.pk == active_beam %} {{color_status.36}} {%endif%}>{{beam.get_downvalues.35}}</span></td>
188 </tr>
188 </tr>
189 <tr>
189 <tr>
190 <td title='{{module_messages.41}}'><span {%if beam.pk == active_beam %} {{color_status.41}} {%endif%}>{{beam.get_upvalues.40}}</span></td>
190 <td title='{{module_messages.41}}'><span {%if beam.pk == active_beam %} {{color_status.41}} {%endif%}>{{beam.get_upvalues.40}}</span></td>
191 <td title='{{module_messages.42}}'><span {%if beam.pk == active_beam %} {{color_status.42}} {%endif%}>{{beam.get_upvalues.41}}</span></td>
191 <td title='{{module_messages.42}}'><span {%if beam.pk == active_beam %} {{color_status.42}} {%endif%}>{{beam.get_upvalues.41}}</span></td>
192 <td title='{{module_messages.43}}'><span {%if beam.pk == active_beam %} {{color_status.43}} {%endif%}>{{beam.get_upvalues.42}}</span></td>
192 <td title='{{module_messages.43}}'><span {%if beam.pk == active_beam %} {{color_status.43}} {%endif%}>{{beam.get_upvalues.42}}</span></td>
193 <td title='{{module_messages.44}}'><span {%if beam.pk == active_beam %} {{color_status.44}} {%endif%}>{{beam.get_upvalues.43}}</span></td>
193 <td title='{{module_messages.44}}'><span {%if beam.pk == active_beam %} {{color_status.44}} {%endif%}>{{beam.get_upvalues.43}}</span></td>
194 </tr>
194 </tr>
195 <tr>
195 <tr>
196 <td title='{{module_messages.41}}'><span {%if beam.pk == active_beam %} {{color_status.41}} {%endif%}>{{beam.get_downvalues.40}}</span></td>
196 <td title='{{module_messages.41}}'><span {%if beam.pk == active_beam %} {{color_status.41}} {%endif%}>{{beam.get_downvalues.40}}</span></td>
197 <td title='{{module_messages.42}}'><span {%if beam.pk == active_beam %} {{color_status.42}} {%endif%}>{{beam.get_downvalues.41}}</span></td>
197 <td title='{{module_messages.42}}'><span {%if beam.pk == active_beam %} {{color_status.42}} {%endif%}>{{beam.get_downvalues.41}}</span></td>
198 <td title='{{module_messages.43}}'><span {%if beam.pk == active_beam %} {{color_status.43}} {%endif%}>{{beam.get_downvalues.42}}</span></td>
198 <td title='{{module_messages.43}}'><span {%if beam.pk == active_beam %} {{color_status.43}} {%endif%}>{{beam.get_downvalues.42}}</span></td>
199 <td title='{{module_messages.44}}'><span {%if beam.pk == active_beam %} {{color_status.44}} {%endif%}>{{beam.get_downvalues.43}}</span></td>
199 <td title='{{module_messages.44}}'><span {%if beam.pk == active_beam %} {{color_status.44}} {%endif%}>{{beam.get_downvalues.43}}</span></td>
200 </tr>
200 </tr>
201 <tr>
201 <tr>
202 <td title='{{module_messages.49}}'><span {%if beam.pk == active_beam %} {{color_status.49}} {%endif%}>{{beam.get_upvalues.48}}</span></td>
202 <td title='{{module_messages.49}}'><span {%if beam.pk == active_beam %} {{color_status.49}} {%endif%}>{{beam.get_upvalues.48}}</span></td>
203 <td title='{{module_messages.51}}'><span {%if beam.pk == active_beam %} {{color_status.50}} {%endif%}>{{beam.get_upvalues.49}}</span></td>
203 <td title='{{module_messages.51}}'><span {%if beam.pk == active_beam %} {{color_status.50}} {%endif%}>{{beam.get_upvalues.49}}</span></td>
204 <td title='{{module_messages.52}}'><span {%if beam.pk == active_beam %} {{color_status.51}} {%endif%}>{{beam.get_upvalues.50}}</span></td>
204 <td title='{{module_messages.52}}'><span {%if beam.pk == active_beam %} {{color_status.51}} {%endif%}>{{beam.get_upvalues.50}}</span></td>
205 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {{color_status.52}} {%endif%}>{{beam.get_upvalues.51}}</span></td>
205 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {{color_status.52}} {%endif%}>{{beam.get_upvalues.51}}</span></td>
206 </tr>
206 </tr>
207 <tr>
207 <tr>
208 <td title='{{module_messages.49}}'><span {%if beam.pk == active_beam %} {{color_status.49}} {%endif%}>{{beam.get_downvalues.48}}</span></td>
208 <td title='{{module_messages.49}}'><span {%if beam.pk == active_beam %} {{color_status.49}} {%endif%}>{{beam.get_downvalues.48}}</span></td>
209 <td title='{{module_messages.50}}'><span {%if beam.pk == active_beam %} {{color_status.50}} {%endif%}>{{beam.get_downvalues.49}}</span></td>
209 <td title='{{module_messages.50}}'><span {%if beam.pk == active_beam %} {{color_status.50}} {%endif%}>{{beam.get_downvalues.49}}</span></td>
210 <td title='{{module_messages.51}}'><span {%if beam.pk == active_beam %} {{color_status.51}} {%endif%}>{{beam.get_downvalues.50}}</span></td>
210 <td title='{{module_messages.51}}'><span {%if beam.pk == active_beam %} {{color_status.51}} {%endif%}>{{beam.get_downvalues.50}}</span></td>
211 <td title='{{module_messages.52}}'><span {%if beam.pk == active_beam %} {{color_status.52}} {%endif%}>{{beam.get_downvalues.51}}</span></td>
211 <td title='{{module_messages.52}}'><span {%if beam.pk == active_beam %} {{color_status.52}} {%endif%}>{{beam.get_downvalues.51}}</span></td>
212 </tr>
212 </tr>
213 <tr>
213 <tr>
214 <td title='{{module_messages.57}}'><span {%if beam.pk == active_beam %} {{color_status.57}} {%endif%}>{{beam.get_upvalues.56}}</span></td>
214 <td title='{{module_messages.57}}'><span {%if beam.pk == active_beam %} {{color_status.57}} {%endif%}>{{beam.get_upvalues.56}}</span></td>
215 <td title='{{module_messages.58}}'><span {%if beam.pk == active_beam %} {{color_status.58}} {%endif%}>{{beam.get_upvalues.57}}</span></td>
215 <td title='{{module_messages.58}}'><span {%if beam.pk == active_beam %} {{color_status.58}} {%endif%}>{{beam.get_upvalues.57}}</span></td>
216 <td title='{{module_messages.59}}'><span {%if beam.pk == active_beam %} {{color_status.59}} {%endif%}>{{beam.get_upvalues.58}}</span></td>
216 <td title='{{module_messages.59}}'><span {%if beam.pk == active_beam %} {{color_status.59}} {%endif%}>{{beam.get_upvalues.58}}</span></td>
217 <td title='{{module_messages.60}}'><span {%if beam.pk == active_beam %} {{color_status.60}} {%endif%}>{{beam.get_upvalues.59}}</span></td>
217 <td title='{{module_messages.60}}'><span {%if beam.pk == active_beam %} {{color_status.60}} {%endif%}>{{beam.get_upvalues.59}}</span></td>
218 </tr>
218 </tr>
219 <tr>
219 <tr>
220 <td title='{{module_messages.57}}'><span {%if beam.pk == active_beam %} {{color_status.57}} {%endif%}>{{beam.get_downvalues.56}}</span></td>
220 <td title='{{module_messages.57}}'><span {%if beam.pk == active_beam %} {{color_status.57}} {%endif%}>{{beam.get_downvalues.56}}</span></td>
221 <td title='{{module_messages.58}}'><span {%if beam.pk == active_beam %} {{color_status.58}} {%endif%}>{{beam.get_downvalues.57}}</span></td>
221 <td title='{{module_messages.58}}'><span {%if beam.pk == active_beam %} {{color_status.58}} {%endif%}>{{beam.get_downvalues.57}}</span></td>
222 <td title='{{module_messages.59}}'><span {%if beam.pk == active_beam %} {{color_status.59}} {%endif%}>{{beam.get_downvalues.58}}</span></td>
222 <td title='{{module_messages.59}}'><span {%if beam.pk == active_beam %} {{color_status.59}} {%endif%}>{{beam.get_downvalues.58}}</span></td>
223 <td title='{{module_messages.60}}'><span {%if beam.pk == active_beam %} {{color_status.60}} {%endif%}>{{beam.get_downvalues.59}}</span></td>
223 <td title='{{module_messages.60}}'><span {%if beam.pk == active_beam %} {{color_status.60}} {%endif%}>{{beam.get_downvalues.59}}</span></td>
224 </tr>
224 </tr>
225 </table>
225 </table>
226 </td>
226 </td>
227 <td>
227 <td>
228 <b>South Quarter</b>
228 <b>South Quarter</b>
229 <table class="module">
229 <table class="module">
230 <tr>
230 <tr>
231 <td title='{{module_messages.37}}'><span {%if beam.pk == active_beam %} {{color_status.37}} {%endif%}>{{beam.get_upvalues.36}}</span></td>
231 <td title='{{module_messages.37}}'><span {%if beam.pk == active_beam %} {{color_status.37}} {%endif%}>{{beam.get_upvalues.36}}</span></td>
232 <td title='{{module_messages.38}}'><span {%if beam.pk == active_beam %} {{color_status.38}} {%endif%}>{{beam.get_upvalues.37}}</span></td>
232 <td title='{{module_messages.38}}'><span {%if beam.pk == active_beam %} {{color_status.38}} {%endif%}>{{beam.get_upvalues.37}}</span></td>
233 <td title='{{module_messages.39}}'><span {%if beam.pk == active_beam %} {{color_status.39}} {%endif%}>{{beam.get_upvalues.38}}</span></td>
233 <td title='{{module_messages.39}}'><span {%if beam.pk == active_beam %} {{color_status.39}} {%endif%}>{{beam.get_upvalues.38}}</span></td>
234 <td title='{{module_messages.40}}'><span {%if beam.pk == active_beam %} {{color_status.40}} {%endif%}>{{beam.get_upvalues.39}}</span></td>
234 <td title='{{module_messages.40}}'><span {%if beam.pk == active_beam %} {{color_status.40}} {%endif%}>{{beam.get_upvalues.39}}</span></td>
235 </tr>
235 </tr>
236 <tr>
236 <tr>
237 <td title='{{module_messages.37}}'><span {%if beam.pk == active_beam %} {{color_status.37}} {%endif%}>{{beam.get_downvalues.36}}</span></td>
237 <td title='{{module_messages.37}}'><span {%if beam.pk == active_beam %} {{color_status.37}} {%endif%}>{{beam.get_downvalues.36}}</span></td>
238 <td title='{{module_messages.38}}'><span {%if beam.pk == active_beam %} {{color_status.38}} {%endif%}>{{beam.get_downvalues.37}}</span></td>
238 <td title='{{module_messages.38}}'><span {%if beam.pk == active_beam %} {{color_status.38}} {%endif%}>{{beam.get_downvalues.37}}</span></td>
239 <td title='{{module_messages.39}}'><span {%if beam.pk == active_beam %} {{color_status.39}} {%endif%}>{{beam.get_downvalues.38}}</span></td>
239 <td title='{{module_messages.39}}'><span {%if beam.pk == active_beam %} {{color_status.39}} {%endif%}>{{beam.get_downvalues.38}}</span></td>
240 <td title='{{module_messages.40}}'><span {%if beam.pk == active_beam %} {{color_status.40}} {%endif%}>{{beam.get_downvalues.39}}</span></td>
240 <td title='{{module_messages.40}}'><span {%if beam.pk == active_beam %} {{color_status.40}} {%endif%}>{{beam.get_downvalues.39}}</span></td>
241 </tr>
241 </tr>
242 <tr>
242 <tr>
243 <td title='{{module_messages.45}}'><span {%if beam.pk == active_beam %} {{color_status.45}} {%endif%}>{{beam.get_upvalues.44}}</span></td>
243 <td title='{{module_messages.45}}'><span {%if beam.pk == active_beam %} {{color_status.45}} {%endif%}>{{beam.get_upvalues.44}}</span></td>
244 <td title='{{module_messages.46}}'><span {%if beam.pk == active_beam %} {{color_status.46}} {%endif%}>{{beam.get_upvalues.45}}</span></td>
244 <td title='{{module_messages.46}}'><span {%if beam.pk == active_beam %} {{color_status.46}} {%endif%}>{{beam.get_upvalues.45}}</span></td>
245 <td title='{{module_messages.47}}'><span {%if beam.pk == active_beam %} {{color_status.47}} {%endif%}>{{beam.get_upvalues.46}}</span></td>
245 <td title='{{module_messages.47}}'><span {%if beam.pk == active_beam %} {{color_status.47}} {%endif%}>{{beam.get_upvalues.46}}</span></td>
246 <td title='{{module_messages.48}}'><span {%if beam.pk == active_beam %} {{color_status.48}} {%endif%}>{{beam.get_upvalues.47}}</span></td>
246 <td title='{{module_messages.48}}'><span {%if beam.pk == active_beam %} {{color_status.48}} {%endif%}>{{beam.get_upvalues.47}}</span></td>
247 </tr>
247 </tr>
248 <tr>
248 <tr>
249 <td title='{{module_messages.45}}'><span {%if beam.pk == active_beam %} {{color_status.45}} {%endif%}>{{beam.get_downvalues.44}}</span></td>
249 <td title='{{module_messages.45}}'><span {%if beam.pk == active_beam %} {{color_status.45}} {%endif%}>{{beam.get_downvalues.44}}</span></td>
250 <td title='{{module_messages.46}}'><span {%if beam.pk == active_beam %} {{color_status.46}} {%endif%}>{{beam.get_downvalues.45}}</span></td>
250 <td title='{{module_messages.46}}'><span {%if beam.pk == active_beam %} {{color_status.46}} {%endif%}>{{beam.get_downvalues.45}}</span></td>
251 <td title='{{module_messages.47}}'><span {%if beam.pk == active_beam %} {{color_status.47}} {%endif%}>{{beam.get_downvalues.46}}</span></td>
251 <td title='{{module_messages.47}}'><span {%if beam.pk == active_beam %} {{color_status.47}} {%endif%}>{{beam.get_downvalues.46}}</span></td>
252 <td title='{{module_messages.48}}'><span {%if beam.pk == active_beam %} {{color_status.48}} {%endif%}>{{beam.get_downvalues.47}}</span></td>
252 <td title='{{module_messages.48}}'><span {%if beam.pk == active_beam %} {{color_status.48}} {%endif%}>{{beam.get_downvalues.47}}</span></td>
253 </tr>
253 </tr>
254 <tr>
254 <tr>
255 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {{color_status.53}} {%endif%}>{{beam.get_upvalues.52}}</span></td>
255 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {{color_status.53}} {%endif%}>{{beam.get_upvalues.52}}</span></td>
256 <td title='{{module_messages.54}}'><span {%if beam.pk == active_beam %} {{color_status.54}} {%endif%}>{{beam.get_upvalues.53}}</span></td>
256 <td title='{{module_messages.54}}'><span {%if beam.pk == active_beam %} {{color_status.54}} {%endif%}>{{beam.get_upvalues.53}}</span></td>
257 <td title='{{module_messages.55}}'><span {%if beam.pk == active_beam %} {{color_status.55}} {%endif%}>{{beam.get_upvalues.54}}</span></td>
257 <td title='{{module_messages.55}}'><span {%if beam.pk == active_beam %} {{color_status.55}} {%endif%}>{{beam.get_upvalues.54}}</span></td>
258 <td title='{{module_messages.56}}'><span {%if beam.pk == active_beam %} {{color_status.56}} {%endif%}>{{beam.get_upvalues.55}}</span></td>
258 <td title='{{module_messages.56}}'><span {%if beam.pk == active_beam %} {{color_status.56}} {%endif%}>{{beam.get_upvalues.55}}</span></td>
259 </tr>
259 </tr>
260 <tr>
260 <tr>
261 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {{color_status.53}} {%endif%}>{{beam.get_downvalues.52}}</span></td>
261 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {{color_status.53}} {%endif%}>{{beam.get_downvalues.52}}</span></td>
262 <td title='{{module_messages.54}}'><span {%if beam.pk == active_beam %} {{color_status.54}} {%endif%}>{{beam.get_downvalues.53}}</span></td>
262 <td title='{{module_messages.54}}'><span {%if beam.pk == active_beam %} {{color_status.54}} {%endif%}>{{beam.get_downvalues.53}}</span></td>
263 <td title='{{module_messages.55}}'><span {%if beam.pk == active_beam %} {{color_status.55}} {%endif%}>{{beam.get_downvalues.54}}</span></td>
263 <td title='{{module_messages.55}}'><span {%if beam.pk == active_beam %} {{color_status.55}} {%endif%}>{{beam.get_downvalues.54}}</span></td>
264 <td title='{{module_messages.56}}'><span {%if beam.pk == active_beam %} {{color_status.56}} {%endif%}>{{beam.get_downvalues.55}}</span></td>
264 <td title='{{module_messages.56}}'><span {%if beam.pk == active_beam %} {{color_status.56}} {%endif%}>{{beam.get_downvalues.55}}</span></td>
265 </tr>
265 </tr>
266 <tr>
266 <tr>
267 <td title='{{module_messages.61}}'><span {%if beam.pk == active_beam %} {{color_status.61}} {%endif%}>{{beam.get_upvalues.60}}</span></td>
267 <td title='{{module_messages.61}}'><span {%if beam.pk == active_beam %} {{color_status.61}} {%endif%}>{{beam.get_upvalues.60}}</span></td>
268 <td title='{{module_messages.62}}'><span {%if beam.pk == active_beam %} {{color_status.62}} {%endif%}>{{beam.get_upvalues.61}}</span></td>
268 <td title='{{module_messages.62}}'><span {%if beam.pk == active_beam %} {{color_status.62}} {%endif%}>{{beam.get_upvalues.61}}</span></td>
269 <td title='{{module_messages.63}}'><span {%if beam.pk == active_beam %} {{color_status.63}} {%endif%}>{{beam.get_upvalues.62}}</span></td>
269 <td title='{{module_messages.63}}'><span {%if beam.pk == active_beam %} {{color_status.63}} {%endif%}>{{beam.get_upvalues.62}}</span></td>
270 <td title='{{module_messages.64}}'><span {%if beam.pk == active_beam %} {{color_status.64}} {%endif%}>{{beam.get_upvalues.63}}</span></td>
270 <td title='{{module_messages.64}}'><span {%if beam.pk == active_beam %} {{color_status.64}} {%endif%}>{{beam.get_upvalues.63}}</span></td>
271 </tr>
271 </tr>
272 <tr>
272 <tr>
273 <td title='{{module_messages.61}}'><span {%if beam.pk == active_beam %} {{color_status.61}} {%endif%}>{{beam.get_downvalues.60}}</span></td>
273 <td title='{{module_messages.61}}'><span {%if beam.pk == active_beam %} {{color_status.61}} {%endif%}>{{beam.get_downvalues.60}}</span></td>
274 <td title='{{module_messages.62}}'><span {%if beam.pk == active_beam %} {{color_status.62}} {%endif%}>{{beam.get_downvalues.61}}</span></td>
274 <td title='{{module_messages.62}}'><span {%if beam.pk == active_beam %} {{color_status.62}} {%endif%}>{{beam.get_downvalues.61}}</span></td>
275 <td title='{{module_messages.63}}'><span {%if beam.pk == active_beam %} {{color_status.63}} {%endif%}>{{beam.get_downvalues.62}}</span></td>
275 <td title='{{module_messages.63}}'><span {%if beam.pk == active_beam %} {{color_status.63}} {%endif%}>{{beam.get_downvalues.62}}</span></td>
276 <td title='{{module_messages.64}}'><span {%if beam.pk == active_beam %} {{color_status.64}} {%endif%}>{{beam.get_downvalues.63}}</span></td>
276 <td title='{{module_messages.64}}'><span {%if beam.pk == active_beam %} {{color_status.64}} {%endif%}>{{beam.get_downvalues.63}}</span></td>
277 </tr>
277 </tr>
278 </table>
278 </table>
279 </td>
279 </td>
280 </tr>
280 </tr>
281 </table>
281 </table>
282
282
283 {% if beam.id == active_beam %}
283 {% if beam.id == active_beam %}
284 <table class="legend">
284 <table class="legend">
285 <tr>
285 <tr>
286 <th>Legend</th>
286 <th>Legend</th>
287 </tr>
287 </tr>
288 <tr>
288 <tr>
289 <td class="text-warning">Connected</td>
289 <td class="text-warning">Connected</td>
290 </tr>
290 </tr>
291 <tr>
291 <tr>
292 <td class="text-success">Running</td>
292 <td class="text-success">Running</td>
293 </tr>
293 </tr>
294 <tr>
294 <tr>
295 <td class="text-info">Mismath</td>
295 <td class="text-info">Mismath</td>
296 </tr>
296 </tr>
297 <tr>
297 <tr>
298 <td class="text-danger">Disconnected</td>
298 <td class="text-danger">Disconnected</td>
299 </tr>
299 </tr>
300 </table>
300 </table>
301 {% else %}
301 {% else %}
302 <div style="vertical-align: top; display:inline-block;">
302 <div style="vertical-align: top; display:inline-block;">
303 <button id="send_beam{{forloop.counter}}" type="button" class="btn btn-default">
303 <button id="send_beam{{forloop.counter}}" type="button" class="btn btn-default">
304 <span class="fas fa-external-link-square-alt" aria-hidden="true"></span>
304 <span class="fas fa-external-link-square-alt" aria-hidden="true"></span>
305 Change Beam</button>
305 Change Beam</button>
306 </div>
306 </div>
307 {% endif %}
307 {% endif %}
308 </div>
308 </div>
309 {% endfor %}
309 {% endfor %}
310 </div>
310 </div>
311 </div>
311 </div>
312
312
313
313
314 {% else %}
314 {% else %}
315 <p style="color:#b4bcc2; margin-left: 5%;">
315 <p style="color:#b4bcc2; margin-left: 5%;">
316 <i>No Beams...</i>
316 <i>No Beams...</i>
317 </p>
317 </p>
318 {% endif %} {% endblock extra-content %} {% block extra-js%}
318 {% endif %}
319 {% endblock extra-content %}
320 {% block extra-js%}
319 <script>
321 <script>
320 $(document).ready(function () {
322 $(document).ready(function () {
321
323
322 {% for beam in beams %}
324 {% for beam in beams %}
323
325
324 {% if dev_conf.operation_mode == 1 %}
326 {% if dev_conf.operation_mode == 1 %}
325 $("#send_beam{{forloop.counter}}").prop('disabled', true)
327 $("#send_beam{{forloop.counter}}").prop('disabled', true)
326 {% else %}
328 {% else %}
327 $("#send_beam{{forloop.counter}}").click(function () {
329 $("#send_beam{{forloop.counter}}").click(function () {
328 document.location = "{% url 'url_send_beam' dev_conf.id beam.id %}";
330 document.location = "{% url 'url_send_beam' dev_conf.id beam.id %}";
329 });
331 });
330 {% endif %}
332 {% endif %}
331
333
332 {% endfor %}
334 {% endfor %}
333
335
334
336
335 });
337 });
336 </script> {% endblock %} No newline at end of file
338 </script>
339 {% endblock %}
@@ -1,47 +1,47
1 {% extends "dev_conf_edit.html" %}
1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap4 %}
2 {% load bootstrap4 %}
3 {% load static %}
3 {% load static %}
4
4
5 {% block extra-head %}
5 {% block extra-head %}
6 <style type="text/css">
6 <style type="text/css">
7 /* show the move cursor as the user moves the mouse over the panel header.*/
7 /* show the move cursor as the user moves the mouse over the panel header.*/
8 .panel-default { cursor: move; }
8 .panel-default { cursor: move; }
9 </style>
9 </style>
10 <script src="{% static 'js/jquery-ui.min.js' %}"></script>
10
11
11
12 {% endblock %}
12 {% endblock %}
13
13
14 {% block content %}
14 {% block content %}
15 <form class="form" method="post">
15 <form class="form" method="post">
16 {% csrf_token %}
16 {% csrf_token %}
17 {% bootstrap_form form layout='horizontal' size='medium' %}
17 {% bootstrap_form form layout='horizontal' size='medium' %}
18 <div style="clear: both;"></div>
18 <div style="clear: both;"></div>
19 <h2>ABS Beams</h2><hr>
19 <h2>ABS Beams</h2><hr>
20 <div class="panel-group" id="div_beams" role="tablist" aria-multiselectable="true">
20 <div class="panel-group" id="div_beams" role="tablist" aria-multiselectable="true">
21 {% include "abs_beams_list.html" %}
21 {% include "abs_beams_list.html" %}
22 </div>
22 </div>
23 <div style="clear: both;"></div>
23 <div style="clear: both;"></div>
24 <br>
24 <br>
25 <div class="pull-right">
25 <div class="pull-right">
26 <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button>
26 <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button>
27 <button type="button" class="btn btn-primary" id="bt_add_beam">Add Beam</button>
27 <button type="button" class="btn btn-primary" id="bt_add_beam">Add Beam</button>
28 <button type="submit" class="btn btn-primary">{{button}}</button>
28 <button type="submit" class="btn btn-primary">{{button}}</button>
29 </div>
29 </div>
30 </form>
30 </form>
31 {% endblock %}
31 {% endblock %}
32
32
33
33
34 {% block extra-js%}
34 {% block extra-js%}
35 <script src="{% static 'js/abs.js' %}"></script>
35 <script src="{% static 'js/abs.js' %}"></script>
36 <script type="text/javascript">
36 <script type="text/javascript">
37
37
38 $("#bt_toggle").click(function() {
38 $("#bt_toggle").click(function() {
39 $(".panel-collapse").collapse('toggle')
39 $(".panel-collapse").collapse('toggle')
40 });
40 });
41
41
42 $("#bt_add_beam").click(function() {
42 $("#bt_add_beam").click(function() {
43 document.location = "{% url 'url_add_abs_beam' id_conf %}";
43 document.location = "{% url 'url_add_abs_beam' id_conf %}";
44 });
44 });
45
45
46 </script>
46 </script>
47 {% endblock %}
47 {% endblock %}
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now