polished log button and content of dbox

This commit is contained in:
2022-02-06 16:11:41 +11:00
parent 645d419748
commit 66eab072ce
4 changed files with 26 additions and 10 deletions

5
job.py
View File

@@ -218,7 +218,7 @@ def joblog_search():
eid=request.form['eid']
ent_cursor=db.engine.execute( f"select name from entry where id = {eid}" )
for ent in ent_cursor:
jobs_cursor=db.engine.execute( f"select l.log, j.id, j.name, j.state, j.last_update from joblog l, job j where l.job_id = j.id and l.log ilike '%%{ent[0]}%%' ")
jobs_cursor=db.engine.execute( f"select l.log, j.id, j.name, j.state, l.log_date from joblog l, job j where l.job_id = j.id and l.log ilike '%%{ent[0]}%%' ")
# turn DB output into json and return it to the f/e
ret='[ '
@@ -230,8 +230,7 @@ def joblog_search():
ret+= '{'
ret+= f'"id":"{j.id}", '
ret+= f'"name":"{j.name}", '
ret+= f'"finished":"{j.last_update}", '
ret+= f'"status":"{j.state}", '
ret+= f'"log_date":"{j.log_date}", '
ret+= f'"log": "{j.log}"'
ret+= '}'
first_job=0