added a clear messages (forced) to allow M to clear out annoying messages if needed
This commit is contained in:
18
job.py
18
job.py
@@ -78,13 +78,6 @@ class PA_JobManager_Message(PA,db.Model):
|
|||||||
job = db.relationship ("Job" )
|
job = db.relationship ("Job" )
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# GetJM_Message: used in html to display any message for this front-end
|
|
||||||
################################################################################
|
|
||||||
def GetJM_Message():
|
|
||||||
msg=PA_JPA_JobManager_MessageobManager_Message.query.first()
|
|
||||||
return msg
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Used in main html to show a red badge of # jobs to draw attention there are
|
# Used in main html to show a red badge of # jobs to draw attention there are
|
||||||
# active jobs being processed in the background
|
# active jobs being processed in the background
|
||||||
@@ -344,3 +337,14 @@ def _jinja2_filter_datetime(date, fmt=None):
|
|||||||
return date.strftime("%d/%m/%Y %I:%M:%S %p")
|
return date.strftime("%d/%m/%Y %I:%M:%S %p")
|
||||||
else:
|
else:
|
||||||
return "N/A"
|
return "N/A"
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# allow a way to force the messages to be deleted if really needed - its a bit
|
||||||
|
# lame, but a quick fix
|
||||||
|
################################################################################
|
||||||
|
@app.route('/force_clear')
|
||||||
|
@login_required
|
||||||
|
def force_clear():
|
||||||
|
PA_JobManager_Message.query.delete();
|
||||||
|
db.session.commit()
|
||||||
|
return redirect("/")
|
||||||
|
|||||||
Reference in New Issue
Block a user