polished log button and content of dbox
This commit is contained in:
1
TODO
1
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?)
|
||||
|
||||
|
||||
@@ -207,8 +207,22 @@
|
||||
<svg id="user" viewBox="0 0 16 16">
|
||||
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
|
||||
</svg>
|
||||
<svg id="log" viewBox="0 0 16 16">
|
||||
<path d="M6 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-5 6s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zM11 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4zm2 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm0 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2z"/>
|
||||
<svg id="log" viewBox="0 0 548.291 548.291">
|
||||
<path d="M486.201,196.124h-13.166V132.59c0-0.396-0.062-0.795-0.115-1.196c-0.021-2.523-0.825-5-2.552-6.963L364.657,3.677
|
||||
c-0.033-0.031-0.064-0.042-0.085-0.073c-0.63-0.707-1.364-1.292-2.143-1.795c-0.229-0.157-0.461-0.286-0.702-0.421
|
||||
c-0.672-0.366-1.387-0.671-2.121-0.892c-0.2-0.055-0.379-0.136-0.577-0.188C358.23,0.118,357.401,0,356.562,0H96.757
|
||||
C84.894,0,75.256,9.651,75.256,21.502v174.613H62.092c-16.971,0-30.732,13.756-30.732,30.733v159.812
|
||||
c0,16.968,13.761,30.731,30.732,30.731h13.164V526.79c0,11.854,9.638,21.501,21.501,21.501h354.776
|
||||
c11.853,0,21.501-9.647,21.501-21.501V417.392h13.166c16.966,0,30.729-13.764,30.729-30.731V226.854
|
||||
C516.93,209.872,503.167,196.124,486.201,196.124z M96.757,21.502h249.054v110.009c0,5.939,4.817,10.75,10.751,10.75h94.972v53.861
|
||||
H96.757V21.502z M317.816,303.427c0,47.77-28.973,76.746-71.558,76.746c-43.234,0-68.531-32.641-68.531-74.152
|
||||
c0-43.679,27.887-76.319,70.906-76.319C293.389,229.702,317.816,263.213,317.816,303.427z M82.153,377.79V232.085h33.073v118.039
|
||||
h57.944v27.66H82.153V377.79z M451.534,520.962H96.757v-103.57h354.776V520.962z M461.176,371.092
|
||||
c-10.162,3.454-29.402,8.209-48.641,8.209c-26.589,0-45.833-6.698-59.24-19.664c-13.396-12.535-20.75-31.568-20.529-52.967
|
||||
c0.214-48.436,35.448-76.108,83.229-76.108c18.814,0,33.292,3.688,40.431,7.139l-6.92,26.37
|
||||
c-7.999-3.457-17.942-6.268-33.942-6.268c-27.449,0-48.209,15.567-48.209,47.134c0,30.049,18.807,47.771,45.831,47.771
|
||||
c7.564,0,13.623-0.852,16.21-2.152v-30.488h-22.478v-25.723h54.258V371.092L461.176,371.092z"/>
|
||||
<path d="M212.533,305.37c0,28.535,13.407,48.64,35.452,48.64c22.268,0,35.021-21.186,35.021-49.5
|
||||
c0-26.153-12.539-48.655-35.237-48.655C225.504,255.854,212.533,277.047,212.533,305.37z"/>
|
||||
</svg>
|
||||
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 26 KiB |
@@ -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 ='<div><table class="table table-striped table-sm sm-txt">'
|
||||
div+='<tr><th>Log</th><th>When</th><th>Job</th></tr>'
|
||||
for( i=0; i<data.length; i++ )
|
||||
div+='Log: ' + data[i].log + '<br>'
|
||||
div+='</div>'
|
||||
{
|
||||
div+='<tr><td>' + data[i].log + '</td><td>' + data[i].log_date + '</td><td>'
|
||||
div+='<a href="/job/' + data[i].id + '">' + data[i].name + ' #:'+data[i].id+'</a></td></tr>'
|
||||
}
|
||||
div+='</table></div>'
|
||||
$('#dbox-title').html("Logs relating to this filename")
|
||||
$('#dbox-content').html(div)
|
||||
$('#dbox').modal('show')
|
||||
|
||||
5
job.py
5
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
|
||||
|
||||
Reference in New Issue
Block a user