SocketIO clients no longer automatically subscribe to the jobs updates.
This is now done explicitly via the `allJobs` subscription type, and
unsubscribing is also possible.
The tasks table resize function is called via `this.$nextTick()`, which
means that the component can actually already be unmounted by the time
the actual function call is performed. This is now detected & handled.
A task can exist in the database but not have any log stored on disk yet.
This is now returned as `204 No Content` instead of an internal server
error.
The web interface is also adjusted to cope with this.
Show workers with their status, and allow clicking on a worker to activate
it and show its details (which currently is limited to just its ID). Does
include Vue Router handling of the active worker ID and CSS classes for
worker statuses.
This basically copies the `JobsTable` component to `workers/WorkersTable`.
The intention is that all the jobs-specific components will move into a
`jobs` subdirectory at some point.
The "fix" is just setting the height to 50% instead of 100%, as the latter
will make it as big as the entire column; that causes the scrollbar to
show, as the column title isn't taken into account.
The `JobDetails` component now emits a `reshuffled` event whenever its
contents have changed, so that other components can respond to any changes
in available space. This event now triggers a resize of the tasks table
on the next DOM tick (so that the new sizes of the HTML elements are
available).
The `TasksTable` component also recomputes the table size when the task
status filters change (because that might have triggered a show/hide of
the filter bar). It also computes the available height slightly differently
so that it's all done relative to the tabulator element.
There is just one TODO left, which is a hard-coded offset of 12 that
should be obtained dynamically from somewhere -- no idea where it comes
from or why it's necessary.
Calculate the Tasks List height by subtracting its offsetTop from
the Jobs Details column height.
Known issues:
There is a glitch in which the height can be sometimes longer or shorter
than expected, due to asynchronous loading of other components in Job Details
(such as Job Settings or table filters).
Do not use pink for queued/requeueing. Pink in Blender is used to indicate
something going wrong (missing textures, broken shaders). Use a shade of
blue instead which is closer in hue to green which means completed.
The code to fetch the task log tail is moved from `JobsView.vue` to
`TaskLog.vue`, as that knows exactly when it's shown & hidden.
The subscriptions to the task log updates will have to be managed in the
same way; that's for another commit.
Clicking on a job/task in their respective lists will now always activate
it, regardless of where on the row was clicked.
Managing the filters by clicking on the status was a nice idea, but was
confusing in practice.
Implement task log broadcasting via SocketIO. The logs aren't shown in the
web interface yet, but do arrive there in a Pinia store. That store is
capped at 1000 lines to keep memory requirements low-ish.
Tabulator can't handle data changes before it's been initialised. If
there is a race condition and a job/task update comes in before that, just
ignore the update.
It might be better to use Vue's `nextTick()` function to defer the update
until Tabulator is ready to receive it, but doing so in a reliable way
might be tricky.
Fix a bug where the filter would only show available statuses and thus
make it impossible to disable a filter that's no longer available.
For example, when showing only `active` tasks, and no task is active any
more, it would remove the "filter circle" for `active` status, and thus
make it impossible to disable the filter. Now the filter will always
show all enabled statuses, even when there is no more job/task
with that status.