aboutsummaryrefslogtreecommitdiff
path: root/app/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/views.py')
-rw-r--r--app/views.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/views.py b/app/views.py
index b1aa800..86a01fd 100644
--- a/app/views.py
+++ b/app/views.py
@@ -85,7 +85,7 @@ def status():
import mysql.connector as con
mycon = con.connect(host=app.config['DB_HOST'],user=app.config['DB_USER'],password=app.config['DB_PASSWORD'],port=app.config['DB_PORT'],database=app.config['DB_NAME'])
mycursor = mycon.cursor()
- sqlQuery = 'select id, protein_name, ligand_name, date, description, done from curieweb where id="%s"' % (jobID)
+ sqlQuery = 'select id, protein_name, ligand_name, date, description, done, pdb from curieweb where id="%s"' % (jobID)
mycursor.execute(sqlQuery)
records = mycursor.fetchall()
if records == []:
@@ -100,7 +100,14 @@ def status():
done="Completed"
elif done==0:
done="Queued"
- return render_template('job_status.html',ID=jobID,pn=protein_name,ln=ligand_name,subDate=date,desc=description,status=done)
+ if protein_name == None:
+ protein_name = r[6]
+
+ PDFReport = "/static/uploads/reports/" + str(jobID) + ".pdf"
+ AndroidModel = "/static/uploads/3DModels/" + str(jobID) + ".gltf"
+ iOSModel = "/static/uploads/3DModels/" + str(jobID) + ".usdz"
+
+ return render_template('job_status.html',ID=jobID,pn=protein_name,ln=ligand_name,subDate=date,desc=description,status=done,PDFReport=PDFReport,AndroidModel=AndroidModel,iOSModel=iOSModel)
flash_errors(taskStatusForm)
return render_template('job_status_form.html',form=taskStatusForm)
@@ -215,7 +222,8 @@ def dock_upload():
mycon.commit()
print("Description",description)
-
+ cwd = os.path.join(os.getcwd(),"app")
+ subprocess.Popen(['python3', 'dock-docker.py'],cwd=cwd)
return render_template('display_result.html', filename="OwO", description=description,job=jobID)
flash_errors(form)