diff --git a/TODO b/TODO index 427fe74..b47e9f6 100644 --- a/TODO +++ b/TODO @@ -5,7 +5,6 @@ -> redraw 'ignore's as a greyed out box? -> menu should only allow override IF we have put override on... SO, override manual match, is awkward if somehow the file/face changes (e.g. we rescan a file for faces, do I delete override? if not and we rescan, there will he a new face id, how do I know which it connects with????) - - allow joblog search from the viewer for that file... * should allow right-click from View menu (particularly useful on search) to show other files around this one by date (maybe that folder or something?) diff --git a/internal/icons.svg b/internal/icons.svg index b1a3e22..a19cc56 100644 --- a/internal/icons.svg +++ b/internal/icons.svg @@ -207,8 +207,22 @@ - - + + + - diff --git a/internal/js/view_support.js b/internal/js/view_support.js index ceaf57e..c6b70cb 100644 --- a/internal/js/view_support.js +++ b/internal/js/view_support.js @@ -284,10 +284,14 @@ function JoblogSearch() data="eid="+current $.ajax({ type: 'POST', data: data, url: '/joblog_search', success: function(res) { data = JSON.parse(res) - div='
' + div ='
' + div+='' for( i=0; i' - div+='' + { + div+='' + } + div+='
LogWhenJob
' + data[i].log + '' + data[i].log_date + '' + div+='' + data[i].name + ' #:'+data[i].id+'
' $('#dbox-title').html("Logs relating to this filename") $('#dbox-content').html(div) $('#dbox').modal('show') diff --git a/job.py b/job.py index fa50983..22c6c42 100644 --- a/job.py +++ b/job.py @@ -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