first-pass of popups for job creation for more than just move files, and fix BUG-112 (after move highlighting is broken)
This commit is contained in:
1
BUGs
1
BUGs
@@ -6,4 +6,3 @@ BUG-106: cant add trudy /pat? as refimgs via FaceDBox
|
||||
(it came from a face bbox, BUT, I have grown the face seln by 10%?)
|
||||
BUG-109: add mich force override, removed it, then re-added it, then rebuild DB form scratch and metadata has a duplicate
|
||||
- redo disco metadata with md5 not UUID of face dataS
|
||||
BUG-112: with 'move_files' staying on same page, highlighting is now broken as ecnt is in the wrong order
|
||||
|
||||
3
TODO
3
TODO
@@ -1,5 +1,8 @@
|
||||
### GENERAL
|
||||
* get all status messages to use toasts AND get func to also increase/descrease the job counter as appropriate)
|
||||
- [DONE] all status messages use toasts
|
||||
-- [TODO] make a helper func for setting toast body and use it in base.html && file_support.js
|
||||
-- [TODO] make a helper func for setting 'Active Jobs' text/badge and call it when document ready (rather/both than start of base.html)
|
||||
|
||||
* ignore face should ignore ALL matching faces (re: Declan)
|
||||
|
||||
|
||||
6
files.py
6
files.py
@@ -502,7 +502,7 @@ def search(search_term):
|
||||
def scannow():
|
||||
job=NewJob("scannow" )
|
||||
st.SetMessage("scanning for new files in: <a href=/job/{}>Job #{}</a> (Click the link to follow progress)".format( job.id, job.id) )
|
||||
return render_template("base.html")
|
||||
return redirect("/jobs")
|
||||
|
||||
################################################################################
|
||||
# /files/forcescan -> deletes old data in DB, and does a brand new scan
|
||||
@@ -512,7 +512,7 @@ def scannow():
|
||||
def forcescan():
|
||||
job=NewJob("forcescan" )
|
||||
st.SetMessage("force scan & rebuild data for files in: <a href=/job/{}>Job #{}</a> (Click the link to follow progress)".format( job.id, job.id) )
|
||||
return render_template("base.html")
|
||||
return redirect("/jobs")
|
||||
|
||||
################################################################################
|
||||
# /files/scan_sp -> allows us to force a check for new files
|
||||
@@ -522,7 +522,7 @@ def forcescan():
|
||||
def scan_sp():
|
||||
job=NewJob("scan_sp" )
|
||||
st.SetMessage("scanning for new files in: <a href=/job/{}>Job #{}</a> (Click the link to follow progress)".format( job.id, job.id) )
|
||||
return render_template("base.html")
|
||||
return redirect("/jobs")
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -61,6 +61,8 @@ function MoveSubmit()
|
||||
{
|
||||
// remove the images being moved
|
||||
$("[name^=eid-]").each( function() { $('#'+$(this).attr('value')).remove() } )
|
||||
// reorder the images via ecnt again, so highlighting can work
|
||||
document.mf_id=0; $('.figure').each( function() { $(this).attr('ecnt', document.mf_id ); document.mf_id++ } )
|
||||
$('#dbox').modal('hide')
|
||||
$.ajax({ type: 'POST', data: $('#mv_fm').serialize(), url: '/move_files', success: function(data){ $('.toast-body').html( "Created <a class='link-light' href=/job/" + data.job_id + ">Job #" + data.job_id + "</a> to move selected file(s)" ); $('.toast').toast("show"); return false; } })
|
||||
}
|
||||
|
||||
2
job.py
2
job.py
@@ -197,7 +197,7 @@ def joblog(id):
|
||||
@login_required
|
||||
def wakeup():
|
||||
WakePAJobManager()
|
||||
return render_template("base.html")
|
||||
return redirect("/")
|
||||
|
||||
################################################################################
|
||||
@app.route("/stale_job/<id>", methods=["POST"])
|
||||
|
||||
@@ -242,7 +242,7 @@ def person(id):
|
||||
person = Person.query.get(id)
|
||||
if not person:
|
||||
st.SetMessage( f"No such person with id: {id}", "danger" )
|
||||
return render_template("base.html" )
|
||||
return redirect("/")
|
||||
form = PersonForm(request.values, obj=person)
|
||||
return render_template("person.html", person=person, form=form, page_title = page_title)
|
||||
|
||||
|
||||
@@ -133,12 +133,6 @@
|
||||
</div class="container-fluid">
|
||||
</nav>
|
||||
|
||||
{% if GetMessage()|length %}
|
||||
<div id="status" class="py-2 mx-1 alert alert-{{GetAlert()}}">
|
||||
{{ GetMessage()|safe}}
|
||||
{{ ClearStatus() }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if GetJM_Message() != None %}
|
||||
{% set msg=GetJM_Message() %}
|
||||
{% if request.endpoint != "fix_dups" and request.endpoint != "rm_dups" and request.endpoint != "stale_jobs" %}
|
||||
@@ -178,6 +172,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if GetMessage()|length %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
msg = "{{ GetMessage()|safe }}"
|
||||
msg=msg.replace('href=', 'class=link-light href=')
|
||||
$('.toast-body').html( msg )
|
||||
$('.toast').toast("show");
|
||||
} )
|
||||
</script>
|
||||
{{ ClearStatus() }}
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user