##// END OF EJS Templates
- Agregada la barra de perfil y patron activo.
jsalyrosas -
r208:209
parent child
Show More
1 NO CONTENT: new file 10644
@@ -1,531 +1,552
1 1 from django.shortcuts import render_to_response, redirect
2 2 from django.http import HttpResponse
3 3 from django.conf import settings
4 4 from django.utils.encoding import smart_str
5 5 from django.core.servers.basehttp import FileWrapper
6 6 import mimetypes
7 7 from django.contrib.auth.decorators import login_required
8 8 from django.template import RequestContext
9 9
10 10 from datetime import datetime
11 11 import os
12 12 from abscontrol.models import Profile, Pattern, AntennaDown, AntennaUp
13 13
14 14 from util.readABSFile import readABSFile
15 15 from util.saveABSFile import saveABSFile
16 16 from util.ABSData import ABSData
17 17 from util.OverJRO import OverJRO
18 18 from scripts.sendFile import sendFile
19 19 from scripts.changeBeam import changeBeam
20 20 from overJroShow import overJroShow
21 21
22 22 arrayTx = [["0","0","0","0","0","0","0","0"],\
23 23 ["0","0","0","0","0","0","0","0"],\
24 24 ["0","0","0","0","0","0","0","0"],\
25 25 ["0","0","0","0","0","0","0","0"],\
26 26 ["0","0","0","0","0","0","0","0"],\
27 27 ["0","0","0","0","0","0","0","0"],\
28 28 ["0","0","0","0","0","0","0","0"],\
29 29 ["0","0","0","0","0","0","0","0"]]
30 30
31 31 arrayUes = ["0.533333","0.00000","1.06667","0.00000"]
32 32
33 33 @login_required(login_url='/accounts/login/')
34 34 def index(request):
35 35 #latest_poll_list = profileAntenna.objects.all().order_by('-pub_date')[:5]
36 36 profile_list = Profile.objects.filter(state=1)
37 37 return render_to_response('abscontrol/index.html', {'profile_list': profile_list}, context_instance=RequestContext(request))
38 38
39 39 def new(request):
40 40 profile_list = Profile.objects.filter(state=1)
41 41 txtProfile = datetime.now().strftime("%Y%m%d%H%M%S%f")
42 42 newprofile = Profile(name=txtProfile)
43 43 newprofile.save()
44 44
45 45 lsPatterns = None
46 46
47 47 return render_to_response('abscontrol/new.html', {'profile_list': profile_list,
48 48 'profile_name' : newprofile.name,
49 49 'profile_id' : newprofile.id,
50 50 'lsPatterns' : lsPatterns,
51 51 'range' : range(8), 'arrayUes' : arrayUes,
52 52 }, context_instance=RequestContext(request))
53 53
54 54 def save(request):
55 55
56 56 txtProfile = request.POST["txtProfile"]
57 57
58 58 txtAntennaUp = request.POST["txtAntennaUp"]
59 59 txtTxUp = request.POST["txtTxUp"]
60 60 txtRxUp = request.POST["txtRxUp"]
61 61 txtUesUp = request.POST["txtUesUp"]
62 62
63 63 txtAntennaDown = request.POST["txtAntennaDown"]
64 64 txtTxDown = request.POST["txtTxDown"]
65 65 txtRxDown = request.POST["txtRxDown"]
66 66 txtUesDown = request.POST["txtUesDown"]
67 67
68 68 newprofile = Profile(name=txtProfile)
69 69 newprofile.save()
70 70
71 71 newpattern = newprofile.pattern_set.create(value=1)
72 72 newpattern.antennaup_set.create(value=txtAntennaUp,tx=txtTxUp,rx=txtRxUp,ues=txtUesUp)
73 73 newpattern.antennadown_set.create(value=txtAntennaDown,tx=txtTxDown,rx=txtRxDown,ues=txtUesDown)
74 74
75 75 newurl = '/abscontrol/view/%d' % newprofile.id
76 76
77 77 return redirect(newurl)
78 78
79 79 # Update temporal experiment
80 80 def upgrade(request, profile_id):
81 81 txtAntennaUp = request.POST["txtAntennaUp"]
82 82 txtTxUp = request.POST["txtTxUp"]
83 83 txtRxUp = request.POST["txtRxUp"]
84 84 txtUesUp = request.POST["txtUesUp"]
85 85
86 86 txtAntennaDown = request.POST["txtAntennaDown"]
87 87 txtTxDown = request.POST["txtTxDown"]
88 88 txtRxDown = request.POST["txtRxDown"]
89 89 txtUesDown = request.POST["txtUesDown"]
90 90
91 91 objProfile = Profile.objects.get(pk=profile_id)
92 92 newpattern = objProfile.pattern_set.create(value=1)
93 93 newpattern.antennaup_set.create(value=txtAntennaUp,tx=txtTxUp,rx=txtRxUp,ues=txtUesUp)
94 94 newpattern.antennadown_set.create(value=txtAntennaDown,tx=txtTxDown,rx=txtRxDown,ues=txtUesDown)
95 95
96 96 newurl = '/abscontrol/%d/edit/%d' % (int(profile_id), newpattern.id)
97 97 return redirect(newurl)
98 98
99 99 def update(request, profile_id):
100 100 txtProfile = request.POST["txtProfile"]
101 101
102 102 objProfile = Profile.objects.get(pk=profile_id)
103 103 objProfile.name = txtProfile
104 104 objProfile.state = 1
105 105 objProfile.save()
106 106
107 107 newurl = '/abscontrol/view/%d' % objProfile.id
108 108 return redirect(newurl)
109 109
110 110 def changeName(request, profile_id):
111 111 profile_list = Profile.objects.filter(state=1)
112 112 objProfile = Profile.objects.get(pk=profile_id)
113 113 lsPatterns = objProfile.pattern_set.all()
114 114
115 115 return render_to_response('abscontrol/changeName.html', {'profile_list': profile_list,
116 116 'objProfile': objProfile,
117 117 'lsPatterns' : lsPatterns,
118 118 }, context_instance=RequestContext(request))
119 119
120 120 def view(request, profile_id):
121 objProfileActive = None
122 objPatternActive = None
123
121 124 if request.method == 'GET' and 'pattern' in request.GET:
122 125 pattern_value = request.GET["pattern"]
123 126 else:
124 127 pattern_value = 1
125 128
126 129 profile_list = Profile.objects.filter(state=1)
127 130 objProfile = Profile.objects.get(pk=profile_id)
128 131
129 132 lsPatterns = objProfile.pattern_set.all()
130 133 patternChoosen = objProfile.pattern_set.get(value=pattern_value)
131 134 objAntennaUp = patternChoosen.antennaup_set.get()
132 135 objAntennaDown = patternChoosen.antennadown_set.get()
133 136
137 lsProfilesActive = Profile.objects.filter(is_active=1)
138 if len(lsProfilesActive) > 0:
139 objProfileActive = Profile.objects.get(is_active=1)
140
141 lsPatternsActive = Pattern.objects.filter(is_active=1)
142 if len(lsPatternsActive) > 0:
143 objPatternActive = Pattern.objects.get(is_active=1)
144
134 145 return render_to_response('abscontrol/view.html', {'objProfile': objProfile, 'profile_list': profile_list,
135 146 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,
136 147 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,
148 'profileActive' : objProfileActive, 'patternActive' : objPatternActive,
137 149 }, context_instance=RequestContext(request))
138 150
139 151 def edit(request, profile_id):
140 152 if request.method == 'GET' and 'pattern' in request.GET:
141 153 pattern_value = request.GET["pattern"]
142 154 else:
143 155 pattern_value = 1
144 156
145 157 absData = ABSData()
146 158 profile_list = Profile.objects.filter(state=1)
147 159 objProfile = Profile.objects.get(pk=profile_id)
148 160
149 161 lsPatterns = objProfile.pattern_set.all()
150 162 patternChoosen = objProfile.pattern_set.get(value=pattern_value)
151 163 objAntennaUp = patternChoosen.antennaup_set.get()
152 164 objAntennaDown = patternChoosen.antennadown_set.get()
153 165
154 166 arrayAntennaUp = absData.convertStringtoList2(objAntennaUp.value)
155 167 if objAntennaUp.tx != None:
156 168 arrayTxUp = absData.convertStringtoList2(objAntennaUp.tx)
157 169 else:
158 170 arrayTxUp = arrayTx
159 171 if objAntennaUp.rx != None:
160 172 arrayRxUp = absData.convertStringtoList2(objAntennaUp.rx)
161 173 else:
162 174 arrayRxUp = arrayTx
163 175 if objAntennaUp.ues != None:
164 176 arrayUesUp = absData.convertStringtoList1(objAntennaUp.ues)
165 177 else:
166 178 arrayUesUp = arrayUes
167 179
168 180 arrayAntennaDown = absData.convertStringtoList2(objAntennaDown.value)
169 181 if objAntennaDown.tx != None:
170 182 arrayTxDown = absData.convertStringtoList2(objAntennaDown.tx)
171 183 else:
172 184 arrayTxDown = arrayTx
173 185 if objAntennaDown.rx != None:
174 186 arrayRxDown = absData.convertStringtoList2(objAntennaDown.rx)
175 187 else:
176 188 arrayRxDown = arrayTx
177 189 if objAntennaDown.ues != None:
178 190 arrayUesDown = absData.convertStringtoList1(objAntennaDown.ues)
179 191 else:
180 192 arrayUesDown = arrayUes
181 193
182 194 return render_to_response('abscontrol/edit.html', {'objProfile': objProfile, 'profile_list': profile_list,
183 195 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,
184 196 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,
185 197 'arrayAntennaUp' : arrayAntennaUp, 'arrayTxUp' : arrayTxUp,
186 198 'arrayRxUp' : arrayRxUp, 'arrayRxDown' : arrayRxDown,
187 199 'arrayAntennaDown' : arrayAntennaDown, 'arrayTxDown' : arrayTxDown,
188 200 'arrayUesUp' : arrayUesUp, 'arrayUesDown' : arrayUesDown,
189 201 }, context_instance=RequestContext(request))
190 202
191 203 def addPattern(request, profile_id):
192 204 profile_list = Profile.objects.filter(state=1)
193 205 objProfile = Profile.objects.get(pk=profile_id)
194 206
195 207 return render_to_response('abscontrol/addPattern.html', {'objProfile': objProfile, 'profile_list': profile_list,
196 208 'range' : range(8), 'arrayUes' : arrayUes,
197 209 }, context_instance=RequestContext(request))
198 210
199 211 def editPattern(request, profile_id, pattern_id):
200 212 absData = ABSData()
201 213 profile_list = Profile.objects.filter(state=1)
202 214 objProfile = Profile.objects.get(pk=profile_id)
203 215 lsPatterns = objProfile.pattern_set.all()
204 216 patternChoosen = Pattern.objects.get(pk=pattern_id)
205 217 objAntennaUp = patternChoosen.antennaup_set.get()
206 218 objAntennaDown = patternChoosen.antennadown_set.get()
207 219
208 220 arrayAntennaUp = absData.convertStringtoList2(objAntennaUp.value)
209 221 if objAntennaUp.tx != None:
210 222 arrayTxUp = absData.convertStringtoList2(objAntennaUp.tx)
211 223 else:
212 224 arrayTxUp = arrayTx
213 225 if objAntennaUp.rx != None:
214 226 arrayRxUp = absData.convertStringtoList2(objAntennaUp.rx)
215 227 else:
216 228 arrayRxUp = arrayTx
217 229 if objAntennaUp.ues != None:
218 230 arrayUesUp = absData.convertStringtoList1(objAntennaUp.ues)
219 231 else:
220 232 arrayUesUp = arrayUes
221 233
222 234 arrayAntennaDown = absData.convertStringtoList2(objAntennaDown.value)
223 235 if objAntennaDown.tx != None:
224 236 arrayTxDown = absData.convertStringtoList2(objAntennaDown.tx)
225 237 else:
226 238 arrayTxDown = arrayTx
227 239 if objAntennaDown.rx != None:
228 240 arrayRxDown = absData.convertStringtoList2(objAntennaDown.rx)
229 241 else:
230 242 arrayRxDown = arrayTx
231 243 if objAntennaDown.ues != None:
232 244 arrayUesDown = absData.convertStringtoList1(objAntennaDown.ues)
233 245 else:
234 246 arrayUesDown = arrayUes
235 247
236 248 return render_to_response('abscontrol/editPattern.html', {'objProfile': objProfile, 'profile_list': profile_list,
237 249 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,
238 250 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,
239 251 'arrayAntennaUp' : arrayAntennaUp, 'arrayTxUp' : arrayTxUp,
240 252 'arrayRxUp' : arrayRxUp, 'arrayRxDown' : arrayRxDown,
241 253 'arrayAntennaDown' : arrayAntennaDown, 'arrayTxDown' : arrayTxDown,
242 254 'arrayUesUp' : arrayUesUp, 'arrayUesDown' : arrayUesDown,
243 255 }, context_instance=RequestContext(request))
244 256
245 257 def savePattern(request, profile_id):
246 258 pattern_id = 0
247 259 method = "save"
248 260
249 261 if 'pattern_id' in request.POST:
250 262 pattern_id = request.POST["pattern_id"]
251 263 method = "update"
252 264
253 265 maxValuePattern = 0
254 266 txtAntennaUp = request.POST["txtAntennaUp"]
255 267 txtTxUp = request.POST["txtTxUp"]
256 268 txtRxUp = request.POST["txtRxUp"]
257 269 txtUesUp = request.POST["txtUesUp"]
258 270
259 271 txtAntennaDown = request.POST["txtAntennaDown"]
260 272 txtTxDown = request.POST["txtTxDown"]
261 273 txtRxDown = request.POST["txtRxDown"]
262 274 txtUesDown = request.POST["txtUesDown"]
263 275
264 276 mode = request.POST["mode"]
265 277
266 278 if method == "save":
267 279 objProfile = Profile.objects.get(pk=profile_id)
268 280 lsPatterns = objProfile.pattern_set.all()
269 281 if len(lsPatterns) > 0:
270 282 for element in lsPatterns:
271 283 if element.value > maxValuePattern:
272 284 maxPattern = element.value
273 285 else:
274 286 maxPattern = 0
275 287
276 288 if maxPattern < 10 :
277 289 newValuePattern = maxPattern + 1
278 290 newpattern = objProfile.pattern_set.create(value=newValuePattern)
279 291 newpattern.antennaup_set.create(value=txtAntennaUp,tx=txtTxUp,rx=txtRxUp,ues=txtUesUp)
280 292 newpattern.antennadown_set.create(value=txtAntennaDown,tx=txtTxDown,rx=txtRxDown,ues=txtUesDown)
281 293 error = 0
282 294 else:
283 295 error = 1 # Can not add more patterns
284 296
285 297 if mode == "e":
286 298 newurl = '/abscontrol/%d/edit/%d' % (int(profile_id), newpattern.id)
287 299 else:
288 300 newurl = '/abscontrol/%d/view/%d' % (int(profile_id), newpattern.id)
289 301 else:
290 302 txtAntennaUpId = request.POST["txtAntennaUpId"]
291 303 objAntennaUp = AntennaUp.objects.get(pk=txtAntennaUpId)
292 304 objAntennaUp.value = txtAntennaUp
293 305 objAntennaUp.tx = txtTxUp
294 306 objAntennaUp.rx = txtRxUp
295 307 objAntennaUp.ues = txtUesUp
296 308 objAntennaUp.save()
297 309
298 310 txtAntennaDownId = request.POST["txtAntennaDownId"]
299 311 objAntennaDown = AntennaDown.objects.get(pk=txtAntennaDownId)
300 312 objAntennaDown.value = txtAntennaDown
301 313 objAntennaDown.tx = txtTxDown
302 314 objAntennaDown.rx = txtRxDown
303 315 objAntennaDown.ues = txtUesDown
304 316 objAntennaDown.save()
305 317
306 318 if mode == "e":
307 319 newurl = '/abscontrol/%d/edit/%d' % (int(profile_id), int(pattern_id))
308 320 else:
309 321 newurl = '/abscontrol/%d/view/%d' % (int(profile_id), int(pattern_id))
310 322
311 323 return redirect(newurl)
312 324
313 325 def viewPattern(request, profile_id, pattern_id):
314 326
315 327 profile_list = Profile.objects.filter(state=1)
316 328 objProfile = Profile.objects.get(pk=profile_id)
317 329
318 330 patternChoosen = Pattern.objects.get(pk=pattern_id)
319 331
320 332 objAntennaUp = patternChoosen.antennaup_set.get()
321 333 objAntennaDown = patternChoosen.antennadown_set.get()
322 334
323 335 lsPatterns = objProfile.pattern_set.all()
324 336
337 lsProfilesActive = Profile.objects.filter(is_active=1)
338 if len(lsProfilesActive) > 0:
339 objProfileActive = Profile.objects.get(is_active=1)
340
341 lsPatternsActive = Pattern.objects.filter(is_active=1)
342 if len(lsPatternsActive) > 0:
343 objPatternActive = Pattern.objects.get(is_active=1)
344
325 345 return render_to_response('abscontrol/viewPattern.html', {'objProfile': objProfile, 'profile_list': profile_list,
326 346 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,
327 347 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,
348 'profileActive' : objProfileActive, 'patternActive' : objPatternActive,
328 349 }, context_instance=RequestContext(request))
329 350
330 351 def deletePattern(request, profile_id, pattern_id):
331 352 newurl = '/abscontrol/edit/%d' % int(profile_id)
332 353
333 354 return redirect(newurl)
334 355
335 356 def importProfile(request):
336 357 profile_list = Profile.objects.filter(state=1)
337 358 return render_to_response('abscontrol/import.html', {'profile_list': profile_list,}, context_instance=RequestContext(request))
338 359
339 360 def upload(request):
340 361 profile_list = Profile.objects.filter(state=1)
341 362 if request.method == 'POST':
342 363 txtFilename = request.FILES['txtFile']
343 364 if txtFilename:
344 365 destination = open('/tmp/'+txtFilename.name, 'wb+')
345 366 for chunk in txtFilename.chunks():
346 367 destination.write(chunk)
347 368 destination.close()
348 369 filename = '/tmp/'+txtFilename.name
349 370 readFile = readABSFile(filename)
350 371 expName, num_patterns, patterns = readFile.getMetadata()
351 372
352 373 if expName != "" and num_patterns > 0:
353 374 if len(Profile.objects.filter(name__iexact=expName)) > 0:
354 375 txtError = "Experiment's name found."
355 376 return render_to_response('abscontrol/error.html', {'profile_list': profile_list,
356 377 'txtError' : txtError, },
357 378 context_instance=RequestContext(request))
358 379 else:
359 380 newprofile = Profile(name=expName)
360 381 newprofile.save()
361 382 newprofile.state = 1
362 383
363 384 for element in patterns:
364 385 newpattern = newprofile.pattern_set.create(value=element["number"])
365 386 newpattern.antennaup_set.create(value=element["up"])
366 387 newpattern.antennadown_set.create(value=element["down"])
367 388
368 389 newprofile.save()
369 390
370 391 newurl = '/abscontrol/edit/%d' % int(newprofile.id)
371 392 return redirect(newurl)
372 393 else:
373 394 txtError = "Experiment's name not found or the number of patterns is 0."
374 395 return render_to_response('abscontrol/error.html', {'profile_list': profile_list,
375 396 'txtError' : txtError, },
376 397 context_instance=RequestContext(request))
377 398 else:
378 399 txtError = "No file."
379 400
380 401 return render_to_response('abscontrol/error.html', {'profile_list': profile_list, 'txtError' : txtError, },
381 402 context_instance=RequestContext(request))
382 403
383 404 def getImgfromOverJRO(profile_id, objAntenna):
384 405 objProfile = Profile.objects.get(pk=profile_id)
385 406 exp_name = objProfile.name
386 407 phase_tx = objAntenna.value
387 408 gain_tx = objAntenna.tx
388 409 gain_rx = objAntenna.rx
389 410 ues_tx = objAntenna.ues
390 411 just_rx = objAntenna.only_rx
391 412
392 413 overjro = OverJRO()
393 414 overjro.setParameters(settings.MEDIA_ROOT, exp_name, phase_tx, gain_tx, gain_rx, ues_tx, just_rx)
394 415 contentFile = overjro.setTextContent()
395 416 finalpath = overjro.saveFile(contentFile)
396 417
397 418 currentdate = datetime.today()
398 419 newOverJro = overJroShow()
399 420 newOverJro.setInputParameters(settings.MEDIA_ROOT, currentdate, finalpath)
400 421 newOverJro.setupParameters()
401 422 newOverJro.execute()
402 423 path = newOverJro.getPlot()
403 424
404 425 return path
405 426
406 427 def overJROUp(request, profile_id, pattern_id, antenna_id):
407 428 objAntenna = AntennaUp.objects.get(pk=antenna_id)
408 429 img_path = getImgfromOverJRO(profile_id, objAntenna)
409 430 filename = os.path.split(img_path)[1]
410 431 return render_to_response('abscontrol/overjro_up.html', {'img_up': filename,'antennaUp': objAntenna,},
411 432 context_instance=RequestContext(request))
412 433
413 434 def overJRODown(request, profile_id, pattern_id, antenna_id):
414 435 objAntenna = AntennaDown.objects.get(pk=antenna_id)
415 436 img_path = getImgfromOverJRO(profile_id, objAntenna)
416 437 filename = os.path.split(img_path)[1]
417 438 return render_to_response('abscontrol/overjro_down.html', {'img_down': filename, 'antennaDown': objAntenna,},
418 439 context_instance=RequestContext(request))
419 440
420 441 def export(request, profile_id):
421 442 listPatterns = []
422 443 objProfile = Profile.objects.get(pk=profile_id)
423 444 exp_name = objProfile.name
424 445 lsPatterns = objProfile.pattern_set.all()
425 446 for element in lsPatterns:
426 447 objAntennaUp = element.antennaup_set.get()
427 448 objAntennaDown = element.antennadown_set.get()
428 449 dicPatterns = {"number" : element.value, "up" : objAntennaUp.value, "down" : objAntennaDown.value}
429 450 listPatterns.append(dicPatterns)
430 451
431 452 absFile = saveABSFile()
432 453 absFile.setParameters(settings.MEDIA_ROOT, exp_name, listPatterns)
433 454 filename, filesize = absFile.save()
434 455
435 456 wrapper = FileWrapper( open( filename, "r" ) )
436 457 content_type = mimetypes.guess_type( filename )[0]
437 458
438 459 response = HttpResponse(wrapper, content_type = content_type)
439 460 response['Content-Description'] = 'File Transfer'
440 461 response['Content-Disposition'] = 'attachment; filename=%s' % smart_str(filename)
441 462 response['Content-Transfer-Encoding'] = 'binary'
442 463 response['Expires'] = '0'
443 464 response['Cache-Control'] = 'must-revalidate'
444 465 response['Pragma'] = 'public'
445 466 response['Content-Length'] = '%s' % str(filesize)
446 467 response['X-Sendfile'] = '%s' % smart_str(filename)
447 468
448 469 return response
449 470
450 471 def send(request, profile_id):
451 472 listPatterns = []
452 473 objProfile = Profile.objects.get(pk=profile_id)
453 474 exp_name = objProfile.name
454 475
455 476 lsPatterns = objProfile.pattern_set.all()
456 477 for element in lsPatterns:
457 478 objAntennaUp = element.antennaup_set.get()
458 479 objAntennaDown = element.antennadown_set.get()
459 480 dicPatterns = {"number" : element.value, "up" : objAntennaUp.value, "down" : objAntennaDown.value}
460 481 listPatterns.append(dicPatterns)
461 482
462 483 absFile = saveABSFile()
463 484 absFile.setParameters(settings.MEDIA_ROOT, exp_name, listPatterns)
464 485 filename, filesize = absFile.save()
465 486
466 487 apiclient = sendFile()
467 488 apiclient.execute(filename)
468 489 output = apiclient.getOutput()
469 490
470 491 if output == "OK":
471 492 message = "File sent successfully."
472 493 lsProfilesActive = Profile.objects.filter(is_active=1)
473 494 if len(lsProfilesActive) > 0:
474 495 objProfileActive = Profile.objects.get(is_active=1)
475 496 objProfileActive.is_active = 0
476 497 objProfileActive.save()
477 498
478 499 lsPatternsActive = Pattern.objects.filter(is_active=1)
479 500 if len(lsPatternsActive) > 0:
480 501 objPatternActive = Pattern.objects.get(is_active=1)
481 502 objPatternActive.is_active = 0
482 503 objPatternActive.save()
483 504
484 505 objProfile.hits += 1
485 506 objProfile.is_active = 1
486 507 objProfile.save()
487 508
488 509 pattern_value = 1
489 510 patternChoosen = objProfile.pattern_set.get(value=pattern_value)
490 511 patternChoosen.is_active = 1
491 512 patternChoosen.save()
492 513
493 514 newurl = '/abscontrol/view/%d' % int(profile_id)
494 515
495 516 return redirect(newurl)
496 517 else:
497 518 message = "Error sending file."
498 519
499 520 profile_list = Profile.objects.all()
500 521
501 522 return render_to_response('abscontrol/sendFile.html', {'message': message, "profile_list" : profile_list,
502 523 'objProfile': objProfile,
503 524 }, context_instance=RequestContext(request))
504 525
505 526 def changePattern(request, profile_id, pattern_id):
506 527 patternChoosen = Pattern.objects.get(id=pattern_id)
507 528 beam = int(patternChoosen.value)-1
508 529
509 530 apiclient = changeBeam()
510 531 apiclient.execute(str(beam))
511 532 output = apiclient.getOutput()
512 533
513 534 if output == "OK":
514 535 lsPatternsActive = Pattern.objects.filter(is_active=1)
515 536 if len(lsPatternsActive) > 0:
516 537 objPatternActive = Pattern.objects.get(is_active=1)
517 538 objPatternActive.is_active = 0
518 539 objPatternActive.save()
519 540
520 541 patternChoosen.hits += 1
521 542 patternChoosen.is_active = 1
522 543 patternChoosen.save()
523 544
524 545 newurl = '/abscontrol/%d/view/%d/' % (int(profile_id), int(pattern_id))
525 546 return redirect(newurl)
526 547 else:
527 548 message = "Error sending file."
528 549 profile_list = Profile.objects.all()
529 550 return render_to_response('abscontrol/sendFile.html', {'message': message, "profile_list" : profile_list,
530 551 }, context_instance=RequestContext(request))
531 552 No newline at end of file
@@ -1,668 +1,724
1 1 /*
2 2 * font-family: 'Droid Sans', sans-serif;
3 3 * font-family: 'Ubuntu', sans-serif;
4 4 * font-family: 'Open Sans', sans-serif;
5 5 * font-family: 'Open Sans Condensed', sans-serif;
6 6 * font-family: 'Roboto Condensed', sans-serif;
7 7 */
8 8
9 9 body {
10 10 padding: 0;
11 11 margin: 0;
12 12 font-size: 12px; }
13 13
14 14 header {
15 15 width: 980px;
16 16 height: 50px;
17 17 text-align: center;
18 18 line-height: 50px;
19 19 border: 0px solid #fcc !important; }
20 20
21 21 #schema {
22 22 margin: 0 auto;
23 23 width: 980px;
24 24 padding: 10px 10px;
25 25 border: 0px solid #f00 !important; }
26 26
27 27 #content {
28 margin: 5px 0px;
29 border: 0px solid #1cc; }
28 margin: 2px 0px 0px 0px;
29 border: 0px solid #1cc !important; }
30 30
31 31 #topcolumn {
32 32 float: left;
33 33 width: 980px;
34 34 height: 40px;
35 35 line-height: 35px;
36 36 margin: 2px 0px;
37 37 border: 1px solid #ddd !important;
38 38 box-shadow: 2px 2px 5px #888; }
39 39
40 #activeProfileBar {
41 float: left;
42 width: 980px;
43 margin: 0px 0px;
44 height: 25px;
45 border: 1px solid #ddd !important;
46 box-shadow: 1px 1px 5px #ccc; }
47
40 48 #maincolumn {
41 49 float: left;
42 50 width: 980px;
43 margin: 2px 0px;
44 padding: 0px 0px;
51 margin: 2px 0px 0px 0px;
52 padding: 2px 0px 6px 0px;
45 53 border: 1px solid #ddd !important;
46 54 box-shadow: 2px 2px 5px #666; }
47 55
48 56 footer {
49 57 height: 30px;
50 58 line-height: 30px;
51 59 text-align: center;
52 60 margin: 0px 0px;
53 61 border: 0px solid #200 !important;
54 62 box-shadow: 2px 2px 5px #888; }
55 63
56 64 .cleardivs {
57 65 clear: both;
58 66 border: 0px solid #400;
59 67 height: 0px; }
60 68
61 69 textarea {
62 70 resize: none;
63 71 overflow: hidden; }
64 72
65 73 /****************************************************************************************/
66 74 /****** ESTILOS GENERALES *****************/
67 75 /****************************************************************************************/
68 76 a {
69 77 font-family: 'Droid Sans', sans-serif;
70 78 text-decoration: none;
71 79 color: #1494F6; }
72 80
73 81 .mnu {
74 82 height: 22px;
75 83 border: 0px solid #c55 !important; }
76 84
77 85 .mnu li {
78 86 display:inline; }
79 87
80 88 .MnuVertical, .MnuHorizontal {
81 89 font-family: 'Droid Sans', sans-serif;
82 90 font-size: inherit;
83 91 font-style: normal;
84 92 text-shadow: 2px 2px #eee; }
85 93
86 94 .MnuHorizontal ul {
87 95 list-style: none;
88 96 list-style-type: none;
89 97 margin: 0; }
90 98
91 99 /*.MnuHorizontal{
92 100 display: -webkit-box;
93 101 -webkit-box-orient:horizontal; }
94 102
95 103 .MnuHorizontal a{
96 104 display:block;
97 105 padding:10px;
98 106 -webkit-box-flex:1;
99 107 text-align:center; }*/
100 108
101 109 .link-disabled {
102 110 color: #666;
103 111 text-decoration: None;
104 112 cursor: default; }
105 113
106 114 /****************************************************************************************/
107 115 /****** MENU DE NAVEGACION DE PERFILES *************/
108 116 /****************************************************************************************/
109 117 #infoProfiles {
110 118 float: left;
111 119 width: 300px;
112 120 margin: 0px;
113 121 padding: 2px 0px;
114 122 border: 0px solid #1cc !important; }
115 123
116 124 #infoProfiles label {
117 125 padding: 10px 10px 10px 12px;
118 126 margin: 10px 0;
119 127 font-family: 'Droid Sans', sans-serif;
120 128 /*font-family: 'Roboto Condensed', sans-serif;*/
121 129 /*letter-spacing: 0.046em;*/ }
122 130
123 131 #infoProfiles select {
124 132 padding: 4px 0px; margin: 0;
125 133 font-family: 'Droid Sans', sans-serif;
126 134 font-size: 12px;
127 letter-spacing: 0.006;
135 letter-spacing: 0.006em;
128 136 width: 200px; }
129 137
130 138 #mnuProfiles {
131 139 margin: 0;
132 140 float: right;
133 141 padding: 2px 10px;
134 142 border: 0px solid #1494F6 !important; }
135 143
136 144 #mnuProfiles ul {
137 145 list-style: none;
138 146 list-style-type: none;
139 147 margin: 0;
140 148 padding-left: 20px;
141 149 border: 0px solid #f00 !important; }
142 150
143 151 #mnuProfiles li {
144 152 width: 80px;
145 153 float: left;
146 154 padding: 2px;
147 155 border: 0px solid #c55 !important; }
148 156
149 157 #mnuProfiles a {
150 158 font-weight: normal;
151 159 color: #1494F6;
152 160 display: block;
153 161 text-align: center;
154 162 border-bottom: 1px solid #1494F6 !important;
155 163 text-decoration: none;
156 164 padding: 0px 4px;
157 165 line-height: 18px;
158 166 margin: 6px; }
159 167
160 168 /****************************************************************************************/
169 /****** BARRA DE PERFILES ACTIVOS *************/
170 /****************************************************************************************/
171
172 #activeProfileBar label, a{
173 line-height: 20px;
174 float: left;
175 letter-spacing: 0.01em;
176 padding: 3px 12px;
177 border: 0px solid #f00 !important; }
178
179 .titleBar {
180 color: #333;
181 margin-left: 2px;
182 text-align: right; }
183
184 .ActiveProfile, .ActivePattern, .lnkActiveProfile {
185 color: #001bf4;
186 margin: 0px 2px;
187 text-align: left;
188 text-decoration: None; }
189
190 .navbarsep{
191 float: left; }
192
193 /****************************************************************************************/
161 194 /******** FORMULARIO DE PERFILES *************************************/
162 195 /****************************************************************************************/
163 196 #divProfile {
164 197 margin: 10px 0px;
165 198 padding: 10px 10px;
166 199 width: 500px;
167 200 border: 0px solid #dff !important; }
168 201
169 202 #divProfile label,input[type=text],input[type=file] {
170 203 font-family: 'Open Sans', sans-serif;
171 /*font-family: 'Roboto Condensed', sans-serif;*/
172 204 font-size: inherit; }
205
206 #divProfile label {
207 float: left;
208 text-align: right;
209 width: 120px;
210 padding: 3px 10px 3px 10px;
211 line-height: 20px;
212 border: 0px solid #d85 !important;
213 }
214
215 #divProfile input[type=text] {
216 letter-spacing: 0.08em;
217 padding: 2px 10px 2px 10px;
218 width: 200px;
219 }
220
221 #divProfile input[type=text]:FOCUS {
222 border: 1px solid #faa !important;
223 border-radius: 0.26em;
224 box-shadow: 2px 2px 5px #fbb;
225 }
226
227 .lblProfile {
228 width: 200px; }
173 229
174 230 #divPattern textarea,input[type=text],label,input[type=file],input[type=button],input[type=submit] {
175 231 font-family: 'Roboto Condensed', sans-serif;
176 232 font-size: inherit; }
177 233
178 234 .antenna, .NewAntenna {
179 235 box-shadow: 1px 1px 2px #666;
180 236 padding: 5px;
181 237 margin: 10px auto;
182 238 display: block;
183 239 border: 0px solid #fee !important; }
184 240
185 241 .antenna {
186 242 width: 520px; }
187 243
188 244 .NewAntenna {
189 245 width: 750px;
190 246 border: 0px solid #f00 !important; }
191 247
192 248 .flsAntenna, .NewFlsAntenna {
193 249 margin: 0;
194 250 padding: 0px;
195 251 border: 1px solid #fee !important; }
196 252
197 253 .flsAntenna {
198 254 width: 510px; }
199 255
200 256 .NewFlsAntenna {
201 257 width: 100%; }
202 258
203 259 .legendAntenna {
204 260 font-family: 'Roboto Condensed', sans-serif;
205 261 font-size: inherit;
206 262 text-align: left;
207 263 margin-left: 10px; }
208 264
209 265 .infoAntenna {
210 266 width: 500px;
211 267 float: left;
212 268 border: 0px solid #f00 !important; }
213 269
214 270 .overJRO {
215 271 width: 250px;
216 272 float: left;
217 273 margin: 0px 5px;
218 274 border: 0px solid #1cc !important; }
219 275
220 276 .divAntenna, .NewDivAntenna, .NewDivTx {
221 277 float: left;
222 278 margin: 10px;
223 279 border: 0px solid #fcc !important; }
224 280
225 281 .divAntenna {
226 282 width: 220px;
227 283 border: 0px solid #fcc !important; }
228 284
229 285 .NewDivAntenna {
230 286 border: 0px solid #fcc !important; }
231 287
232 288 .NewDivTx {
233 289 border: 0px solid #fcc !important; }
234 290
235 291 .titleField {
236 292 display: block;
237 293 text-align: center;
238 294 font-family: 'Roboto Condensed', sans-serif;
239 295 letter-spacing: 0.086em; }
240 296
241 297 .txtAntenna, .view-textAntenna {
242 298 width: 175px;
243 299 max-width: 180px;
244 300 height: 160px;
245 301 max-height: 165px;
246 302 background: #fdfdfb;
247 303 border: 2px solid #eee !important;
248 304 text-align: justify;
249 305 margin: 0 auto;
250 306 line-height: 20px; }
251 307
252 308 .txtAntenna {
253 309 padding: 4px;
254 310 }
255 311
256 312 .view-textAntenna {
257 313 padding: 2px;
258 314 font-family: "Ubuntu";
259 315 font-size: inherit; }
260 316
261 317 .boxAntenna, .boxTR {
262 318 border: 2px solid #eee !important;
263 319 text-align: center;
264 320 display: block;
265 321 float: left;
266 322 margin: 0;
267 323 padding: 0; }
268 324
269 325 .boxAntenna {
270 326 padding: 3px; }
271 327
272 328 .boxTR {
273 329 padding: 3px; }
274 330
275 331 .fullLine{
276 332 font-size: 0.95em; }
277 333
278 334 .lineInputs, .lineInputsTx {
279 335 text-align: left;
280 336 line-height: 1.4em;
281 337 padding: 0;
282 338 margin: 0px;
283 339 display: block;
284 340 float: left;
285 341 border: 0px solid #1cc !important; }
286 342
287 343 .lineInputs {
288 344 /*width: 240px;*/
289 345 border: 0px solid #1cc !important; }
290 346
291 347 .lineInputsTx {
292 348 /*width: 185px;*/
293 349 border: 0px solid #1cc !important; }
294 350
295 351 .divValuesAntenna, .divValuesTx {
296 352 float: left;
297 353 display: block;
298 354 margin: 0 auto;
299 355 border: 0px solid #bbb !important; }
300 356
301 357 .divValuesAntenna {
302 358 /*width: 230px;*/
303 359 border: 0px solid #2eb !important; }
304 360
305 361 .divValuesTx {
306 362 /*width: 175px;*/
307 363 border: 0px solid #bbb !important; }
308 364
309 365 .divValuesAntenna input[type=text], .divValuesTx input[type=text] {
310 366 border: 0px;
311 367 border-bottom: 1px solid #666 !important;
312 368 line-height: 1.1em;
313 369 font-family: 'Roboto Condensed', sans-serif; }
314 370
315 371 .divValuesAntenna input[type=text] {
316 372 width: 18px; }
317 373
318 374 .divValuesTx input[type=text]{
319 375 width: 11px; }
320 376
321 377 .lblSign, .lblSignTx {
322 378 font-family: 'Roboto Condensed', sans-serif;
323 379 color: #666;
324 380 float: left;
325 381 margin: 0px;
326 382 border: 0px solid #bbb !important; }
327 383
328 384 .lblSignLeft {
329 385 font-family: 'Roboto Condensed', sans-serif;
330 386 color: #666;
331 387 float: left;
332 388 margin: 0px 2px 0px 0px;
333 389 padding: 0;
334 390 border: 0px solid #f00 !important; }
335 391
336 392 .lblSignRight {
337 393 font-family: 'Roboto Condensed', sans-serif;
338 394 color: #666;
339 395 float: left;
340 396 margin: 0;
341 397 padding: 0;
342 398 border: 0px solid #f00 !important; }
343 399
344 400 .lblNewSignLeft, .lblNewSignRight {
345 401 font-family: 'Roboto Condensed', sans-serif;
346 402 color: #666;
347 403 float: left;
348 404 padding: 0; }
349 405
350 406 .lblNewSignLeft {
351 407 margin: 0px 2px 0px 0px;
352 408 border: 0px solid #f00 !important; }
353 409
354 410 .lblNewSignRight {
355 411 margin: 0;
356 412 border: 0px solid #f00 !important; }
357 413
358 414 .divTx {
359 415 display: block;
360 416 float: left;
361 417 margin: 10px;
362 418 border: 0px solid #f00 !important; }
363 419
364 420 .divTx label {
365 421 display: block; }
366 422
367 423 .divTx textarea {
368 424 width: 100px;
369 425 max-width: 100px;
370 426 height: 160px;
371 427 max-height: 165px;
372 428 text-align: justify;
373 429 border: 2px solid #eee !important;
374 430 font-family: "Ubuntu";
375 431 font-size: inherit;
376 432 line-height: 20px; }
377 433
378 434 .divTx p {
379 435 width: 100px;
380 436 max-width: 105px;
381 437 height: 160px;
382 438 max-height: 165px;
383 439 background: #fdfdfb;
384 440 padding: 2px;
385 441 border: 1px solid #eee !important;
386 442 font-family: 'Ubuntu', sans-serif;
387 443 font-size: inherit;
388 444 text-align: justify;
389 445 margin: 0 auto;
390 446 line-height: 20px; }
391 447
392 448 .divUes {
393 449 display: block;
394 450 margin: 10px; }
395 451
396 452 .divUes input[type=text] {
397 453 width: 240px;
398 454 max-width: 240px;
399 455 font-family: 'Ubuntu', sans-serif;
400 456 font-size: inherit; }
401 457
402 458 .divNewUes {
403 459 width: 350px;
404 460 display: block;
405 461 margin: 0px 10px;
406 462 padding: 0;
407 463 font-family: 'Roboto Condensed', sans-serif;
408 464 /*overflow: hidden;*/
409 465 border: 0px solid #f00 !important; }
410 466
411 467 .titleUes {
412 468 width: 35px;
413 469 text-align: right;
414 470 padding-right: 5px;
415 471 float: left;
416 472 line-height: 22px;
417 473 font-family: 'Roboto Condensed', sans-serif;
418 474 letter-spacing: 0.086em;
419 475 border: 0px solid #266 !important; }
420 476
421 477 .valueUes {
422 478 width: 300px;
423 479 float: left;
424 480 border: 0px solid #2f4 !important;
425 481 line-height: 22px; }
426 482
427 483 .lblUes {
428 484 font-family: 'Roboto Condensed', sans-serif;
429 485 color: #666;
430 486 font-size: 1.1em; }
431 487
432 488 .txtUnitUes {
433 489 width: 60px;
434 490 border: 0;
435 491 padding: 0px 2px;
436 492 text-align: center;
437 493 font-family: 'Roboto Condensed', sans-serif;
438 494 font-size: 0.95em;
439 495 border-bottom: 1px solid #666 !important; }
440 496 /*
441 497 .divNewUes input[type=text] {
442 498 width: 240px;
443 499 max-width: 240px;
444 500 line-height: 22px; }
445 501 */
446 502 .checkOnly {
447 503 width: 120px;
448 504 float: left;
449 505 display: block;
450 506 line-height: 25px;
451 507 border: 0px solid #1cc !important; }
452 508
453 509 .overJRO img {
454 510 width: 400px;
455 511 height: 270px;
456 512 text-align: center;
457 513 vertical-align: middle;
458 514 margin: 10px 5px 5px 5px;
459 515 display: block;
460 516 background: #fdfdfb;
461 517 border: 1px solid #eee !important; }
462 518
463 519 .overJRO a {
464 520 text-align: center;
465 521 margin-left: 160px;
466 522 display: block; }
467 523
468 524 .activeOverJRO {
469 525 width: 60px;
470 526 padding: 0px 2px;
471 527 border-bottom: 1px solid #1494F6 !important; }
472 528
473 529 /****************************************************************************************/
474 530 /****** MENU DE NAVEGACION DE PATRONES **********************************/
475 531 /****************************************************************************************/
476 532 #divMnuPattern {
477 533 width: 280px;
478 534 height: 25px;
479 535 display: block;
480 536 float: right;
481 537 margin: 5px 40px 5px 0px;
482 538 border: 0px solid #1cc !important; }
483 539
484 540 #divMnuPattern li {
485 541 float: right;
486 542 display: block;
487 543 width: 60px;
488 544 border: 0px solid #2cc !important; }
489 545
490 546 #divMnuPattern a {
491 547 display: block;
492 548 line-height: 22px;
493 549 text-decoration: none;
494 550 padding: 0px 5px;
495 551 margin: 0px 2px;
496 552 text-align: center;
497 553 color: #1494F6;
498 554 border-bottom: 1px solid #1494F6 !important; }
499 555
500 556 #infoPattern {
501 557 display: block;
502 558 margin: 0px 25px;
503 559 border: 0px solid #1494f6 !important; }
504 560
505 561 #navPatterns {
506 562 margin: 0 auto;
507 563 width: 700px;
508 564 height: 30px;
509 565 border: 0px solid #d00 !important;
510 566 font-family: 'Ubuntu', sans-serif;
511 567 font-size: 14px;
512 568 padding: 5px 0px; }
513 569
514 570 #navPatternList {
515 571 margin: 0 auto;
516 572 border: 0px solid #ecc !important; }
517 573
518 574 #navPatternList ul {
519 575 list-style: none;
520 576 list-style-type: none;
521 577 margin: 0; }
522 578
523 579 #navPatternList ul li {
524 580 float: left;
525 581 width: 50px;
526 582 border: 1px solid #eee !important; }
527 583
528 584 #navPatternList a {
529 585 width: 50px;
530 586 display: block;
531 587 text-align: center;
532 588 line-height: 30px;
533 589 padding: 1px 0px;
534 590 border: 0px solid #1cc !important; }
535 591
536 592 .lnkPattern {
537 593 background-color: #ccc !important;
538 594 color: #eee; }
539 595
540 596 .lnkPatternSelected {
541 597 background-color: #2cc !important;
542 598 color: #fff; }
543 599
544 600 .lnkPatternActive {
545 601 color: #f66;
546 602 }
547 603
548 604 .divListofPatterns {
549 605 width: 650px;
550 606 display: block;
551 607 border: 1px solid #1cc !important;
552 608 margin: 0 auto; }
553 609
554 610 .divPattern {
555 611 width: 600px;
556 612 display: block;
557 613 border: 1px solid #f00 !important;
558 614 margin: 2px auto; }
559 615
560 616 /****************************************************************************************/
561 617 /****** HEADER *************/
562 618 /****************************************************************************************/
563 619 header nav {
564 620 width: 960px;
565 621 margin: 0 auto;
566 622 height: 100%;
567 623 border: 0px solid #1cc !important; }
568 624
569 625 header nav a {
570 626 font-family: 'Roboto Condensed', sans-serif;
571 627 font-size: 1.98em;
572 628 text-transform: uppercase;
573 629 width: 232px;
574 630 padding: 2px;
575 631 text-align: center;
576 632 border: 1px solid #ddd !important;
577 633 box-shadow: 1px 1px 2px #ddd;
578 634 display: block;
579 635 float: left;
580 636 height: 45px;
581 637 text-decoration: none;
582 638 background: #eee;
583 639 line-height: 45px;
584 640 color: #15425d;
585 641 margin: 0px 1px; }
586 642
587 643 header nav a.selected {
588 644 background: #666;
589 645 color: #fff; }
590 646
591 647 #Main_Head {
592 648 margin: 0 auto;
593 649 height: 100%;
594 650 border: 1px solid #ddd !important;
595 651 box-shadow: 1px 1px 2px #ddd;
596 652 border-radius: 5px;
597 653 display: block; }
598 654
599 655 .Main_Title {
600 656 font-size: 2em;
601 657 letter-spacing: 0.06em;
602 658 color: #444;
603 659 text-shadow: 2px 2px #ccc; }
604 660
605 661 /****************************************************************************************/
606 662 /****** FOOTER *************/
607 663 /****************************************************************************************/
608 664 footer p {
609 665 font-family: 'Roboto Condensed', sans-serif;
610 666 font-size: 0.98em; }
611 667
612 668 /****************************************************************************************/
613 669 /****** LOGIN *************/
614 670 /****************************************************************************************/
615 671 #contentLogin {
616 672 margin: 0;
617 673 padding: 0;
618 674 border: 0px solid #1cc; }
619 675
620 676 #MainColumnLogin {
621 677 margin: 2px auto;
622 678 border: 0px solid #f00 !important;
623 679 box-shadow: 1px 1px 2px #ddd;
624 680 border-radius: 2px;
625 681 background-color: #eee;
626 682 width: 100%;
627 683 padding: 5px 0px;
628 684 }
629 685
630 686 .row_reg {
631 687 margin: 5px auto;
632 688 display: block;
633 689 width: 90%;
634 690 border: 0px solid #1cc !important;
635 691 line-height: 22px;
636 692 }
637 693
638 694 .row_reg label, .row_reg input[type=text] {
639 695 float: left;
640 696 line-height: 22px;
641 697 }
642 698
643 699 #id_username, #id_password {
644 700 width: 160px;
645 701 line-height: 22px;
646 702 }
647 703
648 704 .row_reg label {
649 705 width: 400px;
650 706 text-align: right;
651 707 padding-right: 10px;
652 708 border: 0px solid #d22 !important;
653 709 }
654 710
655 711 .row_reg input[type=submit], .row_reg input[type=button] {
656 712 margin-left: 410px;
657 713 width: 80px;
658 714 }
659 715
660 716 #lblTitleLogin {
661 717 width: 100%;
662 718 text-align: center;
663 719 font-size: 1.2em;
664 720 font-weight: normal;
665 721 color: #222;
666 722 border: 0px solid #f00 !important;
667 723 background-color: #ccc;
668 724 } No newline at end of file
@@ -1,310 +1,314
1 1 {% extends "abscontrol/index.html" %}
2 2 {% block title %}ABS CONTROL:::PROFILE:::{{ objProfile.name }}{% endblock %}
3 3 {% block scripting %}
4 4 <script src="/static/static/js/patterns.js"></script>
5 5 {% endblock %}
6 6 {% block mnu_profile %}
7 7 <nav class="MnuHorizontal" id="mnuProfiles">
8 8 <ul>
9 9 <li><a href="{% url abscontrol.views.new %}">New</a></li>
10 {% if objProfile and patternChoosen %}
10 11 <li><a href="{% url abscontrol.views.viewPattern objProfile.id patternChoosen.id %}">View</a></li>
12 {% endif %}
11 13 {% if objProfile.state == 0 %}
12 14 <li><a href="/abscontrol/changeName/{{ objProfile.id }}/">Save</a></li>
13 15 {% else %}
14 16 <li><a href="#" id="lnkUpdateProfile">Save</a></li>
15 17 {% endif %}
16 18 <li><a href="#">Save as</a></li>
17 19 <li><a href="{% url abscontrol.views.importProfile %}">Import</a></li>
18 20 {% if objProfile %}
19 21 <li><a href="#" id="lnkExport" alt="{{ objProfile.id }}">Export</a></li>
20 22 {% endif %}
21 23 </ul>
22 24 </nav>
23 25 {% endblock %}
24 26 {% block maincolumn%}
25 27 <div id="maincolumn">
26 28 {% if objProfile.state == 1 %}
27 29 <form action="{% url abscontrol.views.update objProfile.id %}" method="post" id="frmProfile">
28 30 {% csrf_token %}
29 31 <div id="divProfile">
30 32 <label for="lblName">Profile:</label>
31 33 <input type="text" name="txtProfile" value="{{ objProfile.name }}"/>
32 34 </div>
33 35 <input type="hidden" name="mode" value="e">
34 36 </form>
35 37 {% else %}
36 38 <div id="divProfile">
37 <label for="lblName">Profile: {{ objProfile.name }}</label>
38 </div>
39 <label for="lblName">Profile:</label>
40 <label for="lblName" class="lblProfile">{{ objProfile.name }}</label>
41 </div>
42 <div class="cleardivs"></div>
39 43 {% endif %}
40 44 {% if patternChoosen %}
41 45 <div id="navPatterns">
42 46 <nav class="" id="navPatternList">
43 47 <ul>
44 48 {% for element in lsPatterns %}
45 49 {% if patternChoosen.id == element.id %}
46 50 <li><a href="{% url abscontrol.views.editPattern objProfile.id element.id %}" class="lnkPatternSelected">{{ element.value }}</a></li>
47 51 {% else %}
48 52 <li><a href="{% url abscontrol.views.editPattern objProfile.id element.id %}" class="lnkPattern">{{ element.value }}</a></li>
49 53 {% endif %}
50 54 {% endfor %}
51 55 </ul>
52 56 </nav>
53 57 </div>
54 58 {% endif %}
55 59 {% block mnuPattern %}
56 60 <div class="divMenu" id="divMnuPattern">
57 61 <nav class="MnuHorizontal">
58 62 <ul class="mnu" id="mnuPattern">
59 63 {% if lsPatterns|length > 1 %}
60 64 <li><a href="{% url abscontrol.views.deletePattern objProfile.id patternChoosen.id %}">Delete</a></li>
61 65 {% endif %}
62 66 <li><a href="#" class="" id="lnkSavePattern">Save</a></li>
63 67 {% if lsPatterns|length < 10 %}
64 68 <li><a href="{% url abscontrol.views.addPattern objProfile.id %}">Add</a></li>
65 69 {% endif %}
66 70 </ul>
67 71 </nav>
68 72 </div>
69 73 <div class="cleardivs"></div>
70 74 {% endblock %}
71 75 {% block pattern %}
72 76 <div id="divPattern">
73 77 <form action="{% url abscontrol.views.savePattern objProfile.id %}" id="frmPattern" method="post">
74 78 {% csrf_token %}
75 79 <div id="antennaUp" class="NewAntenna">
76 80 <fieldset class="NewFlsAntenna">
77 81 <legend class="legendAntenna">UP</legend>
78 82 <div class="NewDivAntenna">
79 83 <label for="lblAntenna" class="titleField">Antenna</label>
80 84 <div class="boxAntenna" id="divtxtAntenna">
81 85 {% for lines in arrayAntennaUp %}
82 86 <div class="fullLine">
83 87 {% if forloop.first %}
84 88 <label for="lblSignLeft" class="lblSignLeft">[</label>
85 89 {% else %}
86 90 <label for="lblSignLeft" class="lblSignLeft">&nbsp;</label>
87 91 {% endif %}
88 92 <div class="lineInputs">
89 93 <label for="lblSign" class="lblSign">[</label>
90 94 <div class="divValuesAntenna">
91 95 {% for line in lines %}
92 96 <input type="text" name="txtUnitAntennaUp" class="txtUnitAntenna" id="txtUnitAntennaUp_{{ forloop.parentloop.counter0 }}_{{ forloop.counter0 }}" value="{{line}}" maxlength="3" />
93 97 {% if not forloop.last %},{% endif %}
94 98 {% endfor %}
95 99 </div>
96 100 <label for="lblSign" class="lblSign">]</label>
97 101 </div>
98 102 {% if forloop.last %}
99 103 <label for="lblSignRight" class="lblSignRight">]</label>
100 104 {% else %}
101 105 <label for="lblSignRight" class="lblSignRight">,</label>
102 106 {% endif %}
103 107 </div>
104 108 <div class="cleardivs"></div>
105 109 {% endfor %}
106 110 </div>
107 111 </div>
108 112 <div class="NewDivTx">
109 113 <label for="lblTx" class="titleField">Tx</label>
110 114 <div class="boxTR" id="divtxtTR">
111 115 {% for lines in arrayTxUp %}
112 116 <div class="fullLine">
113 117 {% if forloop.first %}
114 118 <label for="lblNewSignLeft" class="lblNewSignLeft">[</label>
115 119 {% else %}
116 120 <label for="lblNewSignLeft" class="lblNewSignLeft">&nbsp;</label>
117 121 {% endif %}
118 122 <div class="lineInputsTx">
119 123 <label for="lblSign" class="lblSignTx">[</label>
120 124 <div class="divValuesTx">
121 125 {% for line in lines %}
122 126 <input type="text" name="txtUnitTxUp" class="txtUnitTx" id="txtUnitTxUp_{{ forloop.parentloop.counter0 }}_{{ forloop.counter0 }}" value="{{ line }}" maxlength="1" />
123 127 {% if not forloop.last %},{% endif %}
124 128 {% endfor %}
125 129 </div>
126 130 <label for="lblSign" class="lblSignTx">]</label>
127 131 </div>
128 132 {% if forloop.last %}
129 133 <label for="lblNewSignRight" class="lblNewSignRight">]</label>
130 134 {% else %}
131 135 <label for="lblNewSignRight" class="lblNewSignRight">,</label>
132 136 {% endif %}
133 137 </div>
134 138 <div class="cleardivs"></div>
135 139 {% endfor %}
136 140 </div>
137 141 <div class="cleardivs"></div>
138 142 </div>
139 143 <div class="NewDivTx">
140 144 <label for="lblRx" class="titleField">Rx</label>
141 145 <div class="boxTR" id="divtxtTR">
142 146 {% for lines in arrayRxUp %}
143 147 <div class="fullLine">
144 148 {% if forloop.first %}
145 149 <label for="lblNewSignLeft" class="lblNewSignLeft">[</label>
146 150 {% else %}
147 151 <label for="lblNewSignLeft" class="lblNewSignLeft">&nbsp;</label>
148 152 {% endif %}
149 153 <div class="lineInputsTx">
150 154 <label for="lblSign" class="lblSignTx">[</label>
151 155 <div class="divValuesTx">
152 156 {% for line in lines %}
153 157 <input type="text" name="txtUnitRxUp" class="txtUnitRx" id="txtUnitRxUp_{{ forloop.parentloop.counter0 }}_{{ forloop.counter0 }}" value="{{ line }}" maxlength="1" />
154 158 {% if not forloop.last %},{% endif %}
155 159 {% endfor %}
156 160 </div>
157 161 <label for="lblSign" class="lblSignTx">]</label>
158 162 </div>
159 163 {% if forloop.last %}
160 164 <label for="lblNewSignRight" class="lblNewSignRight">]</label>
161 165 {% else %}
162 166 <label for="lblNewSignRight" class="lblNewSignRight">,</label>
163 167 {% endif %}
164 168 </div>
165 169 <div class="cleardivs"></div>
166 170 {% endfor %}
167 171 </div>
168 172 <div class="cleardivs"></div>
169 173 </div>
170 174 <div class="cleardivs"></div>
171 175 <div class="divNewUes">
172 176 <label for="lblUes" class="titleUes">Ues:</label>
173 177 <div class="valueUes">
174 178 <label for="lblUes">[</label>
175 179 {% for element in arrayUesUp %}
176 180 <input type="text" name="unitUesUp_{{ forloop.counter }}" value="{{ element }}" maxlength="8" class="txtUnitUes" />
177 181 {% if not forloop.last %},{% endif %}
178 182 {% endfor %}
179 183 <label for="lblUes">]</label>
180 184 </div>
181 185 </div>
182 186 <input type="hidden" name="txtAntennaUpId" value="{{ antennaUp.id }}" />
183 187 </fieldset>
184 188 <input type="hidden" name="txtAntennaUp" value="" />
185 189 <input type="hidden" name="txtTxUp" value="" />
186 190 <input type="hidden" name="txtRxUp" value="" />
187 191 <input type="hidden" name="txtUesUp" value="" />
188 192 </div>
189 193 <div id="antennaDown" class="NewAntenna">
190 194 <fieldset class="NewFlsAntenna">
191 195 <legend class="legendAntenna">DOWN</legend>
192 196 <div class="NewDivAntenna">
193 197 <label for="lblAntenna" class="titleField">Antenna</label>
194 198 <div class="boxAntenna" id="divtxtAntenna">
195 199 {% for lines in arrayAntennaDown %}
196 200 <div class="fullLine">
197 201 {% if forloop.first %}
198 202 <label for="lblSignLeft" class="lblSignLeft">[</label>
199 203 {% else %}
200 204 <label for="lblSignLeft" class="lblSignLeft">&nbsp;</label>
201 205 {% endif %}
202 206 <div class="lineInputs">
203 207 <label for="lblSign" class="lblSign">[</label>
204 208 <div class="divValuesAntenna">
205 209 {% for line in lines %}
206 210 <input type="text" name="txtUnitAntennaDown" class="txtUnitAntenna" id="txtUnitAntennaDown_{{ forloop.parentloop.counter0 }}_{{ forloop.counter0 }}" value="{{ line }}" maxlength="3" />
207 211 {% if not forloop.last %},{% endif %}
208 212 {% endfor %}
209 213 </div>
210 214 <label for="lblSign" class="lblSign">]</label>
211 215 </div>
212 216 {% if forloop.last %}
213 217 <label for="lblSignRight" class="lblSignRight">]</label>
214 218 {% else %}
215 219 <label for="lblSignRight" class="lblSignRight">,</label>
216 220 {% endif %}
217 221 </div>
218 222 <div class="cleardivs"></div>
219 223 {% endfor %}
220 224 </div>
221 225 </div>
222 226 <div class="NewDivTx">
223 227 <label for="lblTx" class="titleField">Tx</label>
224 228 <div class="boxTR" id="divtxtTR">
225 229 {% for lines in arrayTxDown %}
226 230 <div class="fullLine">
227 231 {% if forloop.first %}
228 232 <label for="lblNewSignLeft" class="lblNewSignLeft">[</label>
229 233 {% else %}
230 234 <label for="lblNewSignLeft" class="lblNewSignLeft">&nbsp;</label>
231 235 {% endif %}
232 236 <div class="lineInputsTx">
233 237 <label for="lblSign" class="lblSignTx">[</label>
234 238 <div class="divValuesTx">
235 239 {% for line in lines %}
236 240 <input type="text" name="txtUnitTxDown" class="txtUnitTx" id="txtUnitTxDown_{{ forloop.parentloop.counter0 }}_{{ forloop.counter0 }}" value="{{ line }}" maxlength="1" />
237 241 {% if not forloop.last %},{% endif %}
238 242 {% endfor %}
239 243 </div>
240 244 <label for="lblSign" class="lblSignTx">]</label>
241 245 </div>
242 246 {% if forloop.last %}
243 247 <label for="lblNewSignRight" class="lblNewSignRight">]</label>
244 248 {% else %}
245 249 <label for="lblNewSignRight" class="lblNewSignRight">,</label>
246 250 {% endif %}
247 251 </div>
248 252 <div class="cleardivs"></div>
249 253 {% endfor %}
250 254 </div>
251 255 <div class="cleardivs"></div>
252 256 </div>
253 257 <div class="NewDivTx">
254 258 <label for="lblRx" class="titleField">Rx</label>
255 259 <div class="boxTR" id="divtxtTR">
256 260 {% for lines in arrayRxDown %}
257 261 <div class="fullLine">
258 262 {% if forloop.first %}
259 263 <label for="lblNewSignLeft" class="lblNewSignLeft">[</label>
260 264 {% else %}
261 265 <label for="lblNewSignLeft" class="lblNewSignLeft">&nbsp;</label>
262 266 {% endif %}
263 267 <div class="lineInputsTx">
264 268 <label for="lblSign" class="lblSignTx">[</label>
265 269 <div class="divValuesTx">
266 270 {% for line in lines %}
267 271 <input type="text" name="txtUnitRxDown" class="txtUnitRx" id="txtUnitRxDown_{{ forloop.parentloop.counter0 }}_{{ forloop.counter0 }}" value="{{ line }}" />
268 272 {% if not forloop.last %},{% endif %}
269 273 {% endfor %}
270 274 </div>
271 275 <label for="lblSign" class="lblSignTx">]</label>
272 276 </div>
273 277 {% if forloop.last %}
274 278 <label for="lblNewSignRight" class="lblNewSignRight">]</label>
275 279 {% else %}
276 280 <label for="lblNewSignRight" class="lblNewSignRight">,</label>
277 281 {% endif %}
278 282 </div>
279 283 <div class="cleardivs"></div>
280 284 {% endfor %}
281 285 </div>
282 286 <div class="cleardivs"></div>
283 287 </div>
284 288 <div class="cleardivs"></div>
285 289 <div class="divNewUes">
286 290 <label for="lblUes" class="titleUes">Ues:</label>
287 291 <div class="valueUes">
288 292 <label for="lblUes">[</label>
289 293 {% for element in arrayUesDown %}
290 294 <input type="text" name="unitUesDown_{{ forloop.counter }}" value="{{ element }}" maxlength="8" class="txtUnitUes" />
291 295 {% if not forloop.last %},{% endif %}
292 296 {% endfor %}
293 297 <label for="lblUes">]</label>
294 298 </div>
295 299 </div>
296 300 <input type="hidden" name="txtAntennaDownId" value="{{ antennaDown.id }}" />
297 301 </fieldset>
298 302 <input type="hidden" name="txtAntennaDown" value="" />
299 303 <input type="hidden" name="txtTxDown" value="" />
300 304 <input type="hidden" name="txtRxDown" value="" />
301 305 <input type="hidden" name="txtUesDown" value="" />
302 306 </div>
303 307 <input type="hidden" name="pattern_id" id="pattern_id" value="{{ patternChoosen.id }}" />
304 308 <input type="hidden" name="profile_id" id="profile_id" value="{{ objProfile.id }}" />
305 309 <input type="hidden" name="mode" value="e">
306 310 </form>
307 311 </div>
308 312 {% endblock %}
309 313 </div>
310 314 {% endblock %}
@@ -1,264 +1,264
1 1 {% extends "abscontrol/index.html" %}
2 2 {% load url from future %}
3 3 {% block title %}ABS CONTROL:::::NEW PROFILE{% endblock %}
4 4 {% block scripting %}
5 5 <script src="/static/static/js/patterns.js"></script>
6 6 {% endblock %}
7 7 {% block maincolumn%}
8 8 <div id="maincolumn">
9 <!-- <form action="/abscontrol/{{ profile_id }}/save/" method="post" id="frmPattern"> -->
10 9 <form action="/abscontrol/upgrade/{{ profile_id }}/" method="post" id="frmPattern">
11 10 {% csrf_token %}
12 11 <div id="divProfile">
13 <label for="lblName">Profile: {{ profile_name }}</label>
12 <label for="lblName">Profile:</label>
13 <label for="lblName" class="lblProfile">{{ profile_name }}</label>
14 14 </div>
15 15 {% block mnuPattern %}
16 16 <div class="divMenu" id="divMnuPattern">
17 17 <nav class="MnuHorizontal">
18 18 <ul class="mnu" id="mnuPattern">
19 19 <li><a href="#" id="lnkSavePattern">Save</a></li>
20 20 </ul>
21 21 </nav>
22 22 </div>
23 23 <div class="cleardivs"></div>
24 24 {% endblock %}
25 25 <div id="divPattern">
26 26 <div id="antennaUp" class="NewAntenna">
27 27 <fieldset class="NewFlsAntenna">
28 28 <legend class="legendAntenna">UP</legend>
29 29 <div class="NewDivAntenna">
30 30 <label for="lblAntenna" class="titleField">Antenna</label>
31 31 <div class="boxAntenna" id="divtxtAntenna">
32 32 {% for i in range %}
33 33 <div class="fullLine">
34 34 {% if i == 0 %}
35 35 <label for="lblSignLeft" class="lblSignLeft">[</label>
36 36 {% else %}
37 37 <label for="lblSignLeft" class="lblSignLeft">&nbsp;</label>
38 38 {% endif %}
39 39 <div class="lineInputs">
40 40 <label for="lblSign" class="lblSign">[</label>
41 41 <div class="divValuesAntenna">
42 42 {% for j in range %}
43 43 <input type="text" name="txtUnitAntennaUp" class="txtUnitAntenna" id="txtUnitAntennaUp_{{ i }}_{{ j }}" value="0.5" maxlength="3" />
44 44 {% if j != 7 %},{% endif %}
45 45 {% endfor %}
46 46 </div>
47 47 <label for="lblSign" class="lblSign">]</label>
48 48 </div>
49 49 {% if i == 7 %}
50 50 <label for="lblSignRight" class="lblSignRight">]</label>
51 51 {% else %}
52 52 <label for="lblSignRight" class="lblSignRight">,</label>
53 53 {% endif %}
54 54 </div>
55 55 <div class="cleardivs"></div>
56 56 {% endfor %}
57 57 </div>
58 58 </div>
59 59 <div class="NewDivTx">
60 60 <label for="lblTx" class="titleField">Tx</label>
61 61 <div class="boxTR" id="divtxtTR">
62 62 {% for i in range %}
63 63 <div class="fullLine">
64 64 {% if i == 0 %}
65 65 <label for="lblNewSignLeft" class="lblNewSignLeft">[</label>
66 66 {% else %}
67 67 <label for="lblNewSignLeft" class="lblNewSignLeft">&nbsp;</label>
68 68 {% endif %}
69 69 <div class="lineInputsTx">
70 70 <label for="lblSign" class="lblSignTx">[</label>
71 71 <div class="divValuesTx">
72 72 {% for j in range %}
73 73 <input type="text" name="txtUnitTxUp" class="txtUnitTx" id="txtUnitTxUp_{{ i }}_{{ j }}" value="1" maxlength="1" />
74 74 {% if j != 7 %},{% endif %}
75 75 {% endfor %}
76 76 </div>
77 77 <label for="lblSign" class="lblSignTx">]</label>
78 78 </div>
79 79 {% if i == 7 %}
80 80 <label for="lblNewSignRight" class="lblNewSignRight">]</label>
81 81 {% else %}
82 82 <label for="lblNewSignRight" class="lblNewSignRight">,</label>
83 83 {% endif %}
84 84 </div>
85 85 <div class="cleardivs"></div>
86 86 {% endfor %}
87 87 </div>
88 88 <div class="cleardivs"></div>
89 89 </div>
90 90 <div class="NewDivTx">
91 91 <label for="lblRx" class="titleField">Rx</label>
92 92 <div class="boxTR" id="divtxtTR">
93 93 {% for i in range %}
94 94 <div class="fullLine">
95 95 {% if i == 0 %}
96 96 <label for="lblNewSignLeft" class="lblNewSignLeft">[</label>
97 97 {% else %}
98 98 <label for="lblNewSignLeft" class="lblNewSignLeft">&nbsp;</label>
99 99 {% endif %}
100 100 <div class="lineInputsTx">
101 101 <label for="lblSign" class="lblSignTx">[</label>
102 102 <div class="divValuesTx">
103 103 {% for j in range %}
104 104 <input type="text" name="txtUnitRxUp" class="txtUnitRx" id="txtUnitRxUp_{{ i }}_{{ j }}" value="0" maxlength="1" />
105 105 {% if j != 7 %},{% endif %}
106 106 {% endfor %}
107 107 </div>
108 108 <label for="lblSign" class="lblSignTx">]</label>
109 109 </div>
110 110 {% if i == 7 %}
111 111 <label for="lblNewSignRight" class="lblNewSignRight">]</label>
112 112 {% else %}
113 113 <label for="lblNewSignRight" class="lblNewSignRight">,</label>
114 114 {% endif %}
115 115 </div>
116 116 <div class="cleardivs"></div>
117 117 {% endfor %}
118 118 </div>
119 119 <div class="cleardivs"></div>
120 120 </div>
121 121 <div class="cleardivs"></div>
122 122 <div class="divNewUes">
123 123 <label for="lblUes" class="titleUes">Ues:</label>
124 124 <div class="valueUes">
125 125 <label for="lblUes">[</label>
126 126 {% for element in arrayUes %}
127 127 <input type="text" name="unitUesUp_{{ forloop.counter }}" value="{{ element }}" maxlength="8" class="txtUnitUes" />
128 128 {% if not forloop.last %},{% endif %}
129 129 {% endfor %}
130 130 <label for="lblUes">]</label>
131 131 </div>
132 132 </div>
133 133 <div class="checkOnly">
134 134 <input type="checkbox" name="chkOnlyRxUp" value="" />
135 135 <label for="lblOnlyRx">Only Rx</label>
136 136 </div>
137 137 </fieldset>
138 138 <input type="hidden" name="txtAntennaUp" value="" />
139 139 <input type="hidden" name="txtTxUp" value="" />
140 140 <input type="hidden" name="txtRxUp" value="" />
141 141 <input type="hidden" name="txtUesUp" value="" />
142 142 </div>
143 143 <div id="antennaDown" class="NewAntenna">
144 144 <fieldset class="NewFlsAntenna">
145 145 <legend class="legendAntenna">DOWN</legend>
146 146 <div class="NewDivAntenna">
147 147 <label for="lblAntenna" class="titleField">Antenna</label>
148 148 <div class="boxAntenna" id="divtxtAntenna">
149 149 {% for i in range %}
150 150 <div class="fullLine">
151 151 {% if i == 0 %}
152 152 <label for="lblSignLeft" class="lblSignLeft">[</label>
153 153 {% else %}
154 154 <label for="lblSignLeft" class="lblSignLeft">&nbsp;</label>
155 155 {% endif %}
156 156 <div class="lineInputs">
157 157 <label for="lblSign" class="lblSign">[</label>
158 158 <div class="divValuesAntenna">
159 159 {% for j in range %}
160 160 <input type="text" name="txtUnitAntennaDown" class="txtUnitAntenna" id="txtUnitAntennaDown_{{ i }}_{{ j }}" value="0.5" maxlength="3" />
161 161 {% if j != 7 %},{% endif %}
162 162 {% endfor %}
163 163 </div>
164 164 <label for="lblSign" class="lblSign">]</label>
165 165 </div>
166 166 {% if i == 7 %}
167 167 <label for="lblSignRight" class="lblSignRight">]</label>
168 168 {% else %}
169 169 <label for="lblSignRight" class="lblSignRight">,</label>
170 170 {% endif %}
171 171 </div>
172 172 <div class="cleardivs"></div>
173 173 {% endfor %}
174 174 </div>
175 175 </div>
176 176 <div class="NewDivTx">
177 177 <label for="lblTx" class="titleField">Tx</label>
178 178 <div class="boxTR" id="divtxtTR">
179 179 {% for i in range %}
180 180 <div class="fullLine">
181 181 {% if i == 0 %}
182 182 <label for="lblNewSignLeft" class="lblNewSignLeft">[</label>
183 183 {% else %}
184 184 <label for="lblNewSignLeft" class="lblNewSignLeft">&nbsp;</label>
185 185 {% endif %}
186 186 <div class="lineInputsTx">
187 187 <label for="lblSign" class="lblSignTx">[</label>
188 188 <div class="divValuesTx">
189 189 {% for j in range %}
190 190 <input type="text" name="txtUnitTxDown" class="txtUnitTx" id="txtUnitTxDown_{{ i }}_{{ j }}" value="1" maxlength="1" />
191 191 {% if j != 7 %},{% endif %}
192 192 {% endfor %}
193 193 </div>
194 194 <label for="lblSign" class="lblSignTx">]</label>
195 195 </div>
196 196 {% if i == 7 %}
197 197 <label for="lblNewSignRight" class="lblNewSignRight">]</label>
198 198 {% else %}
199 199 <label for="lblNewSignRight" class="lblNewSignRight">,</label>
200 200 {% endif %}
201 201 </div>
202 202 <div class="cleardivs"></div>
203 203 {% endfor %}
204 204 </div>
205 205 <div class="cleardivs"></div>
206 206 </div>
207 207 <div class="NewDivTx">
208 208 <label for="lblRx" class="titleField">Rx</label>
209 209 <div class="boxTR" id="divtxtTR">
210 210 {% for i in range %}
211 211 <div class="fullLine">
212 212 {% if i == 0 %}
213 213 <label for="lblNewSignLeft" class="lblNewSignLeft">[</label>
214 214 {% else %}
215 215 <label for="lblNewSignLeft" class="lblNewSignLeft">&nbsp;</label>
216 216 {% endif %}
217 217 <div class="lineInputsTx">
218 218 <label for="lblSign" class="lblSignTx">[</label>
219 219 <div class="divValuesTx">
220 220 {% for j in range %}
221 221 <input type="text" name="txtUnitRxDown" class="txtUnitRx" id="txtUnitRxDown_{{ i }}_{{ j }}" value="0" />
222 222 {% if j != 7 %},{% endif %}
223 223 {% endfor %}
224 224 </div>
225 225 <label for="lblSign" class="lblSignTx">]</label>
226 226 </div>
227 227 {% if i == 7 %}
228 228 <label for="lblNewSignRight" class="lblNewSignRight">]</label>
229 229 {% else %}
230 230 <label for="lblNewSignRight" class="lblNewSignRight">,</label>
231 231 {% endif %}
232 232 </div>
233 233 <div class="cleardivs"></div>
234 234 {% endfor %}
235 235 </div>
236 236 <div class="cleardivs"></div>
237 237 </div>
238 238 <div class="cleardivs"></div>
239 239 <div class="divNewUes">
240 240 <label for="lblUes" class="titleUes">Ues:</label>
241 241 <div class="valueUes">
242 242 <label for="lblUes">[</label>
243 243 {% for element in arrayUes %}
244 244 <input type="text" name="unitUesDown_{{ forloop.counter }}" value="{{ element }}" maxlength="8" class="txtUnitUes" />
245 245 {% if not forloop.last %},{% endif %}
246 246 {% endfor %}
247 247 <label for="lblUes">]</label>
248 248 </div>
249 249 </div>
250 250 <div class="checkOnly">
251 251 <input type="checkbox" name="chkOnlyRxDown" value="" />
252 252 <label for="lblOnlyRx">Only Rx</label>
253 253 </div>
254 254 </fieldset>
255 255 <input type="hidden" name="txtAntennaDown" value="" />
256 256 <input type="hidden" name="txtTxDown" value="" />
257 257 <input type="hidden" name="txtRxDown" value="" />
258 258 <input type="hidden" name="txtUesDown" value="" />
259 259 </div>
260 260 </div>
261 261 <input type="hidden" name="mode" value="e">
262 262 </form>
263 263 </div>
264 264 {% endblock %}
@@ -1,141 +1,156
1 1 {% extends "abscontrol/index.html" %}
2 2 {% block title %}ABS CONTROL:::PROFILE:::{{ objProfile.name }}{% endblock %}
3 3
4 4 {% block mnu_profile %}
5 5 <nav class="MnuHorizontal" id="mnuProfiles">
6 6 <ul>
7 7 <li><a href="{% url abscontrol.views.new %}">New</a></li>
8 8 {% if patternChoosen %}
9 9 <li><a href="/abscontrol/{{ objProfile.id }}/edit/{{ patternChoosen.id }}">Edit</a></li>
10 10 {% else %}
11 11 <li><a href="/abscontrol/edit/{{ objProfile.id }}">Edit</a></li>
12 12 {% endif %}
13 13 <li><a href="#">Save as</a></li>
14 14 <li><a href="{% url abscontrol.views.importProfile %}">Import</a></li>
15 15 <li><a href="#" id="lnkExport" alt="{{ objProfile.id }}">Export</a></li>
16 16 <li><a href="#" id="lnkSendFile" alt="{{ objProfile.id }}">Send</a></li>
17 17 </ul>
18 18 </nav>
19 19 {% endblock %}
20 20 {% block maincolumn%}
21 {% block activeProfileBar %}
22 <div class="cleardivs"></div>
23 <div id="activeProfileBar">
24 <label for="lblProfileTitle" class="titleBar">Active Profile</label>
25 <img src="/media/navbarsep.png" class="navbarsep">
26 {% if profileActive != None %}
27 <a href="{% url abscontrol.views.view profileActive.id %}" class="lnkActiveProfile">{{ profileActive.name }}</a>
28 {% endif %}
29 {% if patternActive != None %}
30 <img src="/media/navbarsep.png" class="navbarsep">
31 <a href="{% url abscontrol.views.viewPattern profileActive.id patternActive.id %}" class="lnkActiveProfile">{{ patternActive.value }}</a>
32 {% endif %}
33 </div>
34 <div class="cleardivs"></div>
35 {% endblock %}
21 36 <div id="maincolumn">
22 37 {% if objProfile.state == 0 %}
23 38 <div id="divProfile">
24 39 <label for="lblName">Profile:</label>
25 40 <label for="lblProfile">{{ objProfile.name }}</label>
26 41 </div>
27 42 {% endif %}
28 43 {% if patternChoosen %}
29 44 <div id="navPatterns">
30 45 <nav class="" id="navPatternList">
31 46 <ul>
32 47 {% for element in lsPatterns %}
33 48 <li>
34 49 {% if patternChoosen.id == element.id %}
35 50 {% if element.is_active == 1 %}
36 51 <a href="/abscontrol/{{ objProfile.id }}/view/{{ element.id }}/" class="lnkPatternSelected lnkPatternActive">{{ element.value }}</a>
37 52 {% else %}
38 53 <a href="/abscontrol/{{ objProfile.id }}/view/{{ element.id }}/" class="lnkPatternSelected">{{ element.value }}</a>
39 54 {% endif %}
40 55 {% else %}
41 56 {% if element.is_active == 1 %}
42 57 <a href="/abscontrol/{{ objProfile.id }}/view/{{ element.id }}/" class="lnkPattern lnkPatternActive">{{ element.value }}</a>
43 58 {% else %}
44 59 <a href="/abscontrol/{{ objProfile.id }}/view/{{ element.id }}/" class="lnkPattern">{{ element.value }}</a>
45 60 {% endif %}
46 61 {% endif %}
47 62 </li>
48 63 {% endfor %}
49 64 </ul>
50 65 <div class="cleardivs"></div>
51 66 </nav>
52 67 </div>
53 68 {% endif %}
54 69 {% block mnuPattern %}
55 70 {% if objProfile.is_active == 1 %}
56 71 <div class="divMenu" id="divMnuPattern">
57 72 <nav class="MnuHorizontal">
58 73 <ul class="mnu" id="mnuPattern">
59 74 <li><a href="#" class="lnkChangePattern">Apply</a></li>
60 75 </ul>
61 76 </nav>
62 77 </div>
63 78 <div class="cleardivs"></div>
64 79 {% endif %}
65 80 {% endblock %}
66 81 <div id="divPattern">
67 82 <div id="infoPattern">
68 83 <div id="antennaUp" class="antenna" style="float: left">
69 84 <fieldset class="flsAntenna">
70 85 <legend class="legendAntenna">UP</legend>
71 86 <div class="infoAntenna">
72 87 <div class="divAntenna">
73 88 <label for="lblAntenna">Antenna</label>
74 89 <p class="view-textAntenna">{{ antennaUp.value }}</p>
75 90 </div>
76 91 <div class="divTx">
77 92 <label for="lblTx">Tx</label>
78 93 <p>{{ antennaUp.tx }}</p>
79 94 </div>
80 95 <div class="divTx">
81 96 <label for="lblRx">Rx</label>
82 97 <p>{{ antennaUp.rx }}</p>
83 98 </div>
84 99 <div class="cleardivs"></div>
85 100 <div class="divUes">
86 101 <label for="lblUes">Ues:</label>
87 102 <label for="lblAntennaUpUes">{{ antennaUp.ues }}</label>
88 103 {% if antennaUp.only_rx == 0 %}
89 104 <input type="checkbox" name="chkOnlyRxUp" value="" />
90 105 {% else %}
91 106 <input type="checkbox" name="chkOnlyRxUp" value="" checked="checked"/>
92 107 {% endif %}
93 108 <label for="lblOnlyRx">Only RX</label>
94 109 </div>
95 110 </div>
96 111 </fieldset>
97 112 </div>
98 113 {% include 'abscontrol/overjro_up.html' %}
99 114 <div class="cleardivs"></div>
100 115
101 116 <div id="antennaDown" class="antenna" style="float: left">
102 117 <fieldset class="flsAntenna">
103 118 <legend class="legendAntenna">DOWN</legend>
104 119 <div class="infoAntenna">
105 120 <div class="divAntenna">
106 121 <label for="lblAntenna">Antenna</label>
107 122 <p class="view-textAntenna">{{ antennaDown.value }}</p>
108 123 </div>
109 124 <div class="divTx">
110 125 <label for="lblTx">Tx</label>
111 126 <p>{{ antennaDown.tx }}</p>
112 127 </div>
113 128 <div class="divTx">
114 129 <label for="lblRx">Rx</label>
115 130 <p>{{ antennaDown.rx }}</p>
116 131 </div>
117 132 <div class="cleardivs"></div>
118 133 <div class="divUes">
119 134 <label for="lblUes">Ues:</label>
120 135 <label for="lblAntennaDownUes">{{ antennaDown.ues }}</label>
121 136 {% if antennaDown.only_rx == 0 %}
122 137 <input type="checkbox" name="chkOnlyRxDown" value="" />
123 138 {% else %}
124 139 <input type="checkbox" name="chkOnlyRxDown" value="" checked="checked"/>
125 140 {% endif %}
126 141 <label for="lblOnlyRx">Only RX</label>
127 142 </div>
128 143 </div>
129 144
130 145 </fieldset>
131 146 </div>
132 147 {% include 'abscontrol/overjro_down.html' %}
133 148 <div class="cleardivs"></div>
134 149 </div>
135 150 <input type="hidden" name="txtAntennaUpId" value="{{ antennaUp.id }}"/>
136 151 <input type="hidden" name="txtAntennaDownId" value="{{ antennaDown.id }}"/>
137 152 <input type="hidden" name="txtPatternId" value="{{ patternChoosen.id }}"/>
138 153 <input type="hidden" name="txtProfileId" value="{{ objProfile.id }}"/>
139 154 </div>
140 155 </div>
141 156 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now