added persistent and cant_close to PA_JobManager_FE_Message, used them from pa_job_manager to set status messages with persistence/close buttons appropriately for items like fix_dups/stale_jobs. When "fixing" now, the persistent Status message stays, but its now positioned approx. below the navbar on the right and is ok. Started on changing status to a more sensible naming conventions (away from alert to level) - more work to complete this

This commit is contained in:
2023-01-10 17:45:02 +11:00
parent 56c2d586b6
commit 0784861331
8 changed files with 46 additions and 64 deletions

15
TODO
View File

@@ -1,17 +1,7 @@
### GENERAL
* get all status messages to use toasts AND get func to also increase/descrease the job counter as appropriate)
- [DONE] all (success/creation) status messages use toasts
-- [DONE] make a helper func for setting toast body and use it in base.html && file_support.js
-- [DONE] make a helper func for setting 'Active Jobs' text/badge and call it when document ready (rather/both than start of base.html)
-- [DONE] trigger a timeout to play back pa_job_mgr message to FE and reset 'Active Jobs' text/badge until it hits 0
-- [DONE] (re)start this code if any new jobs is created (on move ONLY FOR NOW
-- [DONE] make js StatusMsg() take a 'data' (json response) and process that
-- [DONE] make it include message from the API endpoint doing the work, not in the js code...
-- [TODO] fix base.html to only call toast() and only in document.ready()
-- [DONE] this means handling danger, and persistent / no time-out toast()s
-- [DONE] warning works now (colors, etc.)
-- [DONE] clean up has to be a POST back to server to clear DB (jscript/async has no other way)
-- [TODO] go through the crazy persistent status msgs for checkdups, etc. and make sure they all work
-- [TODO] ensure all pa_job_mgr jobs are sending messages back to the FE -- SHOULD??? I just hook FinishJob???
* should be using jsonify to return real json to my API calls, e.g:
use make_response( jsonify (... ) )
@@ -19,7 +9,8 @@
all GETs stay as is for now (as they expect a html reply, not data, and then html is base.html+ and it handles the status)
-- ONLY time this will fail is multiple status messages (which can occur I believe if a Wake of job mgr and then a job is created in DB, the success will only be shown)
-- [TODO] simple fix will be to get 'hidden' jobs (wake job_mgr and maybe? metadata) to post failure events to the JobMgr_FE DB queue
-- [TODO] when ALL converted, replace 'alert="..."' with 'status="..."'
-- [TODO] -- change class Status to class UILog
-- [TODO] -- change alert to level
* delete files should behave like /move_files (stay on same page) as well as the status messages above