-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cros0400/PlottingScripts
Reorganizing into WagonDB and EngineDB web interfaces
- Loading branch information
Showing
210 changed files
with
24,960 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import home_page_list | ||
|
||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
form = cgi.FieldStorage() | ||
#card_id = form.getvalue('card_id') | ||
serial_num = base.cleanCGInumber(form.getvalue('serial_num')) | ||
board_id = base.cleanCGInumber(form.getvalue('board_id')) | ||
|
||
base.header(title='Add extra information about board') | ||
base.top() | ||
|
||
home_page_list.add_board_info_form(serial_num, board_id) | ||
|
||
print('<div class="row">') | ||
print('<div class="col-md-5 pt-2 ps-5 mx-2 my-2">') | ||
print('<h2>List of All Boards</h2>' ) | ||
print('<b><em>(Sorted by Serial Number)</em></b> <badge class="badge bg-primary">Successful Tests</badge>') | ||
print('</div>') | ||
print('</div>') | ||
|
||
home_page_list.render_list_module() | ||
|
||
base.bottom() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import cgitb | ||
import base | ||
import module_functions | ||
import os | ||
import connect | ||
|
||
cgitb.enable() | ||
|
||
base_url = connect.get_base_url() | ||
|
||
print("Location: %s/summary.py\n\n"%(base_url)) | ||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
form = cgi.FieldStorage() | ||
sn = base.cleanCGInumber(form.getvalue("serial_num")) | ||
board_id = base.cleanCGInumber(form.getvalue("board_id")) | ||
location = form.getvalue("location") | ||
daqid = form.getvalue("daq_chip_id") | ||
trig1id = form.getvalue("trigger_chip_1_id") | ||
trig2id = form.getvalue("trigger_chip_2_id") | ||
comments = cgi.escape(form.getvalue("comments")) | ||
|
||
base.header(title='Add Board Info') | ||
base.top() | ||
|
||
module_functions.add_board_info(board_id, str(sn), location, daqid, trig1id, trig2id, comments) | ||
|
||
base.bottom() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import add_test_functions | ||
import os | ||
|
||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
form = cgi.FieldStorage() | ||
label_applied = base.cleanCGInumber(form.getvalue("label_applied")) | ||
database_entry = base.cleanCGInumber(form.getvalue("database_entry")) | ||
label_legibility = base.cleanCGInumber(form.getvalue("label_legibility")) | ||
power_cycle = base.cleanCGInumber(form.getvalue("power_cycle")) | ||
tester = cgi.escape(form.getvalue("tester")) | ||
serial_num = base.cleanCGInumber(form.getvalue("serial_num")) | ||
comments = form.getvalue("comments") | ||
|
||
test_results = {"Label Applied": label_applied, "Database Entry": database_entry, "Label Legibility": label_legibility, "Power Cycle": power_cycle} | ||
|
||
if comments: | ||
comments = cgi.escape(comments) | ||
|
||
base.header(title='Add Test') | ||
base.top() | ||
|
||
test_id=add_test_functions.add_init_tests(serial_num, tester, test_results, comments) | ||
|
||
base.bottom() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import home_page_list | ||
|
||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
base.header(title='Add a new module to HGCAL Wagon Test') | ||
base.top() | ||
|
||
home_page_list.add_module_form() | ||
|
||
print('<div class="row">') | ||
print('<div class="col-md-5 pt-2 ps-5 mx-2 my-2">') | ||
print('<h2>List of All Boards</h2>' ) | ||
print('<b><em>(Sorted by Serial Number)</em></b> <badge class="badge bg-primary">Successful Tests</badge>') | ||
print('</div>') | ||
print('</div>') | ||
|
||
home_page_list.render_list_module() | ||
|
||
base.bottom() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import home_page_list | ||
import connect | ||
import os | ||
|
||
base_url = connect.get_base_url() | ||
|
||
print("Location: %s/summary.py\n\n" % base_url) | ||
|
||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
base.header(title='Adding a new module...') | ||
base.top() | ||
|
||
form = cgi.FieldStorage() | ||
|
||
if form.getvalue('serial_number'): | ||
sn = (form.getvalue('serial_number')) | ||
|
||
home_page_list.add_module(sn) | ||
|
||
print('<div class="row">') | ||
print('<div class="col-md-3 ps-4 pt-2 mx-2 my-2">') | ||
print('<h2>List of All Boards</h2>' ) | ||
print('<b><em>(Sorted by Serial Number)</em></b>') | ||
print('</div>') | ||
print('<div class="col-md-3 ps-5 pt-2 mx-2 my-2">') | ||
print('<a href="add_module.py">') | ||
print('<button type="button">Add a New Board</button>') | ||
print('</a>') | ||
print('</div>') | ||
print('</div>') | ||
|
||
print('<br><br>') | ||
|
||
|
||
home_page_list.render_list_module() | ||
|
||
base.bottom() | ||
|
||
|
||
else: | ||
print('<div class="row">') | ||
print('<div class="col-md-12 ps-4 pt-2 mx-2 my-2">') | ||
print('<h4><b> FAILED. Enter SERIAL NUMBER </b></h4>') | ||
print('</div>') | ||
print('</div>') | ||
|
||
home_page_list.add_module_form() | ||
|
||
|
||
print('<div class="row">') | ||
print('<div class="col-md-3 ps-4 pt-2 mx-2 my-2">') | ||
print('<h2>List of All Boards</h2>' ) | ||
print('<b><em>(Sorted by Serial Number)</em></b>') | ||
print('</div>') | ||
print('</div>') | ||
|
||
print('<br><br>') | ||
|
||
home_page_list.render_list_module() | ||
|
||
base.bottom() | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import home_page_list | ||
import add_test_functions | ||
|
||
|
||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
base.header(title='Add New Test Template') | ||
base.top() | ||
|
||
add_test_functions.add_new_test_template() | ||
|
||
base.bottom() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import add_test_functions | ||
import os | ||
import connect | ||
|
||
base_url = connect.get_base_url() | ||
|
||
print("Location: %s/summary.py\n\n" % base_url) | ||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
form = cgi.FieldStorage() | ||
test_name = cgi.escape(form.getvalue("test_name")) | ||
required = base.cleanCGInumber(form.getvalue("required")) | ||
test_desc_short = cgi.escape(form.getvalue("test_desc_short")) | ||
test_desc_long = cgi.escape(form.getvalue("test_desc_long")) | ||
password = cgi.escape(form.getvalue("password")) | ||
|
||
base.header(title='Add New Test Template') | ||
base.top() | ||
|
||
test_id=add_test_functions.add_new_test(test_name, required, test_desc_short, test_desc_long, password) | ||
|
||
base.bottom() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import module_functions | ||
import os | ||
|
||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
base.header(title='Add New User') | ||
base.top() | ||
|
||
tests = module_functions.add_new_user_ID() | ||
|
||
base.bottom() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import home_page_list | ||
import add_test_functions | ||
|
||
|
||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
form = cgi.FieldStorage() | ||
#card_id = form.getvalue('card_id') | ||
serial_num = base.cleanCGInumber(form.getvalue('serial_num')) | ||
suggested_test = base.cleanCGInumber(form.getvalue('suggested')) | ||
|
||
base.header(title='Add Test') | ||
base.top() | ||
|
||
add_test_functions.add_test_template(serial_num, suggested_test) | ||
|
||
base.bottom() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/python3 | ||
|
||
import cgi | ||
import base | ||
import add_test_functions | ||
import os | ||
import connect | ||
|
||
base_url = connect.get_base_url() | ||
|
||
print("Location: %s/summary.py\n\n" % base_url) | ||
#cgi header | ||
print("Content-type: text/html\n") | ||
|
||
form = cgi.FieldStorage() | ||
person_id = base.cleanCGInumber(form.getvalue("person_id")) | ||
test_type = base.cleanCGInumber(form.getvalue("test_type")) | ||
serial_num = base.cleanCGInumber(form.getvalue("serial_number")) | ||
success = base.cleanCGInumber(form.getvalue("success")) | ||
comments = form.getvalue("comments") | ||
|
||
if comments: | ||
comments = cgi.escape(comments) | ||
|
||
base.header(title='Add Test') | ||
base.top() | ||
|
||
test_id=add_test_functions.add_test(person_id, test_type, serial_num, success, comments) | ||
|
||
for itest in [1]: | ||
afile = form['attach%d'%(itest)] | ||
if (afile.name): | ||
adesc= form.getvalue("attachdesc%d"%(itest)) | ||
if adesc: | ||
adesc = cgi.escape(adesc) | ||
acomment= form.getvalue("attachcomment%d"%(itest)) | ||
if acomment: | ||
acomment = cgi.escape(acomment) | ||
add_test_functions.add_test_attachment(test_id,afile,adesc,acomment) | ||
elif (afile.filename): | ||
adesc= form.getvalue("attachdesc%d"%(itest)) | ||
if adesc: | ||
adesc = cgi.escape(adesc) | ||
acomment= form.getvalue("attachcomment%d"%(itest)) | ||
if acomment: | ||
acomment = cgi.escape(acomment) | ||
add_test_functions.add_test_attachment_gui(test_id,afile,adesc,acomment) | ||
|
||
base.bottom() |
Oops, something went wrong.