To save some CPU cycles, we will return immediately if the
images don't look newer than the stitch. NB this does mean
that the stitched image will be repeatedly transferred, as its
URL will change each time it's re-requested.
Alternatively, we could fail with an error, which may be more efficient, at the expense of being uglier.
checkExistingTasks was looking up the task's `self` link by
checking for `rel=self`, which failed. I have corrected this
to `rel="self"` - `self` would have evaluated to `undefined`.
The log viewer was scrolling to the bottom when new logs
appeared, but not when the status updated. This meant that the status update may have been invisible. I now scroll
when the status changes too, which should fix the problem.
NB there's a confusing feature, where stage.move will
fail after the task has been cancelled, because it is cancellable.
For now, we can work around it by passing `block_cancellation` but
this may want to be solved more generally in LabThings
I've tidied up the UI a bit here:
* The modal box stays open and must be explicitly closed.
Pretty much everywhere we want to use this, it would be nice
to see the final confirmation it's worked - so I have removed
the line that closes it after the task completes.
* The progress bar no longer animates after the task has
finished (logic previously didn't consider that state as the
bar wasn't visible except while it was running).
* A helpful message is printed when the task completes or is
cancelled.
Python stack traces use spaces and carets to "underline" the
code causing the problem. I've now matched and processed
these lines to add <u> tags.
This necessitated escaping messages and displaying raw HTML
which is now done by `escapeText`.
I fixed a logic error related to the reversing of the list, and
now display multi-line log messages as a single summary line with a "more info" link to expand them.
Expanded log messages show without text wrap - this makes
Python exception traces easier to read.
For extra points, we could even do something cunning, like
process the ^^^ markers into <u>
Autofocus timing is pretty critical. I've introduced the ability
to abort moves, which introduces ~50ms timing jitter. This
commit reverts the tming-critical move in autofocus to the old behaviour.
I've only reverted the move that really matters - this means
that if you start a massive sweep by accident, you can still
abort it when it's moving down to the start of the sweep.