I'm not very familiar with react. If you know a better way, you could change the code to perhaps one modal that is dynamically changed to the element clicked?
In terms of DOM heaviness, we expect scans to be in the order of tens of items. Having tens of not-visible and relatively short dom elements like these is not an issue, browsers have to handle much worse on many sites, the impact should be negligible.
Oops, left over from previous code
This is actually what I initially had, but in testing I encountered the situation where the error triggered by the cancellation happened in the flask setup code for the job, crashing the entire worker. With the current implementation that doesn't happen, because either it's not yet started and we do "soft" cancellation, or it is started and we know we are past the flask initialization and have an error handler in place for handling the triggered timeout exception.
I wonder if this is related to the update of flask to 2.3.x (!442 (merged))? They made some changes to the setup of applications and perhaps it no longer initializes a separate connection per celery worker, where it did do so in the past?
On that note though, in my testing on localhost for scan cancelling I had no issues with concurrent scan jobs (which was after the update of flask), so I wonder why these issues are popping up now?
Separating the plot problems from the table/selectable problems would require a larger rewrite of the corresponding front-end code. I would have to rewrite the filter to frontend and apply it there after fetching or add a property on the returned data to filter on in the frontend (seems to go against the "style" of the code). If you want, that is definitely possible, but seems good to think about the full intention.
Taico Aerts (c88190e1) at 31 Oct 09:38
Merge branch 'master' of https://gitlab.kwant-project.org/zesje/zes...
... and 10 more commits
Taico Aerts (99bf72e8) at 31 Oct 09:33
Import link_copy_to_scan from raw_scans
... and 2 more commits
Taico Aerts (b7244ab2) at 31 Oct 09:32
Merge branch '590-see-what-scan-a-missing-page-should-originate-fro...
... and 11 more commits
Taico Aerts (10bf84f5) at 29 Oct 23:26
Taico Aerts (10bf84f5) at 29 Oct 22:44
Import link_copy_to_scan from raw_scans
Taico Aerts (50e7bb36) at 26 Oct 08:36
Fix message
Taico Aerts (d1895262) at 24 Oct 22:33
Well the thing is that those tasks aren't actually running or taking capacity any more (most likely). The way the task updates are done, a full zesje restart/crash will stop all tasks but not report back they have stopped. This will leave the task at the progress it was at forever.
I've implemented cancellation (!446), but I will make an addition such that cancelling a task that is not running will then correct the status to cancelled.
Related to #578 . I feel that if the ability is added to cancel a scan, then the need for a bulk cancel option is not really there any more.
Taico Aerts (eed1a194) at 23 Oct 21:23
Fix linter issues
Taico Aerts (18515f28) at 23 Oct 21:22
Fix inversion of condition