changing options on files_*, search, also next/prev all now use POST->redirect model, so should allow back/forward browser buttons to work - commit so we can test in PROD

This commit is contained in:
2022-01-22 21:36:58 +11:00
parent 491663f1c9
commit 0f4632e240
14 changed files with 264 additions and 77 deletions

31
TODO
View File

@@ -1,28 +1,25 @@
## GENERAL
* for below.. make Options( request )
- remove all "Options()" that are not set by a user-choice in the F/E and just make sure new "Options" sets all defaults as needed
-- ALSO, preferences are different to app settings... allow prefs from "ddp" menu
-> it should allow default pagesize, default thumbsize, etc.
-- viewlist can work out new view_eids server side, and pass them back as json data
- can consider an optim-- new_view page makes calls to viewlist to ADD json data only, so only trigger a new "viewlist" if we dont have data for that part of the eids
- in fact if we "re-use" a pa_user_state, we need to update it with anything that changed -- not sure but that should just happen in State()
- use prefs in States() for defaults, rather than hardcoding "50", etc.
- search allows folder/flat change in GUI, should disable it
- search NOO -- no code to handle noo!!!
* going forward into search page (and probably all POSTs) does not work
don't render_template instead do a redirect to a GET of the new, or list? for del...
* need to catch "option changes" as POSTs to make them GETs somehow...
(search, files_ip POST change trigger issue)
-- I think it is the same URL being used issue? -- validate this in PROD only I think
[DONE] files.py:@app.route("/view/<id>", methods=["POST"])
files.py:@app.route("/viewlist", methods=["POST"])
-- this will need a total rewrite for viewer to handle fullscreen across offset/size boundaries so fix that instead
job.py:@app.route("/jobs", methods=["GET", "POST"])
job.py:@app.route("/job/<id>", methods=["GET","POST"])
-- these need to store 'job prefs' somewhere...
files.py:@app.route("/fix_dups", methods=["POST"])
* going forward into search page (and probably all POSTs) does not work -- use POST -> redirect to GET
/viewlist ? -> think it works, BUT, need a rewrite anyway to use json data rather than new urls...
job.py:@app.route("/jobs", methods=["GET", "POST"])
job.py:@app.route("/job/<id>", methods=["GET","POST"])
-- these need to store 'job prefs' somewhere...
files.py:@app.route("/fix_dups", methods=["POST"])
???
* optim to not run_ai_on_* for scan, needs to make sure last run_ai_on actually ran/worked - might have failed (or in my case was marked stale and I cancelled it)
-- also the case for get file details though, need to make sure last one was completed
* viewlist can work out new view_eids server side, and pass them back as json data
- can consider an optim-- new_view page makes calls to viewlist to ADD json data only, so only trigger a new "viewlist" if we dont have data for that part of the eids
* per file you could select an unknown face and add it as a ref img to an existing person, or make a new person and attach?
* [DONE] order/ find face with largest size and at least show that as unmatched
- could also try to check it vs. other faces, if it matches more than say 10? we offer it up as a required ref img, then cut that face (with margin) out and use it is a new ref image / person