order joblogsearch by log_date

This commit is contained in:
2022-02-06 16:16:09 +11:00
parent 3fe5f1438e
commit 8625b1d217

2
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, l.log_date 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]}%%' order by l.log_date")
# turn DB output into json and return it to the f/e
ret='[ '