135 Commits

Author SHA1 Message Date
Sybren A. Stüvel
abed318500 Web: remove Vue logo 2022-05-12 15:11:20 +02:00
Sybren A. Stüvel
0b39f229a1 Implement may-I-keep-running protocol
Worker and Manager implementation of the "may-I-kee-running" protocol.

While running tasks, the Worker will ask the Manager periodically
whether it's still allowed to keep running that task. This allows the
Manager to abort commands on Workers when:

- the Worker should go to another state (typically 'asleep' or
  'shutdown'),
- the task changed status from 'active' to something non-runnable
  (typically 'canceled' when the job as a whole is canceled).
- the task has been assigned to a different Worker. This can happen when
  a Worker loses its connection to its Manager, resulting in a task
  timeout (not yet implemented) after which the task can be assigned to
  another Worker. If then the connectivity is restored, the first Worker
  should abort (last-assigned Worker wins).
2022-05-12 15:06:05 +02:00
Sybren A. Stüvel
fd16f7939e OAPI: regenerate code 2022-05-12 15:06:05 +02:00
Sybren A. Stüvel
4bdaeb73a6 Web: set fixed height for the task table
It looks rather ugly, and this should be addressed, but without the
`height` option of Tabulator it won't be using the Virtual DOM and result
in very slow browser performance.
2022-05-12 13:53:17 +02:00
Sybren A. Stüvel
07576f3225 Web: ensure switching active jobs doesn't retain previous job data
Pinia's `$patch()` function will merge the given state with the current
state, instead of doing a replacement. As a result, going from an active
job with metadata fields `A` and `B`, to a job with metadata fields `B`
and `C` would actually have fields `A`, `B`, and `C` in the Pinia store.

This is resolved by replacing the `$patch(object)` with `$patch(function)`
and having that function replace the entire job.
2022-05-12 10:55:42 +02:00
Sybren A. Stüvel
47361cdc69 Web: show task activity in details view 2022-05-11 18:11:02 +02:00
Sybren A. Stüvel
2559238701 Web: CSS, tweak status colours for Queued, Requeued, and Paused
I didn't like how "queued", "paused", and "cancelled" had the same colour,
as they represent rather different statuses (may run in future, vs. won't
run at all).
2022-05-11 18:10:46 +02:00
Sybren A. Stüvel
c992966723 Web: CSS, use variables for "active" row colours in tables 2022-05-11 18:09:42 +02:00
Sybren A. Stüvel
0c8fce7b42 Web: hide notifications after a few seconds
The notifications (like "job requeued" after pushing the "requeue" button)
are now hidden after 5 seconds.
2022-05-11 15:11:17 +02:00
Sybren A. Stüvel
1f76c3bc64 Web: remove job/task ID column from table 2022-05-11 15:03:40 +02:00
Sybren A. Stüvel
cc10d3e4bb Web: also let Vue Router track the active task
This basically does the same as 63ac7287321a101c3f601eeb151be73154ef7720
but then for tasks.
2022-05-11 15:02:02 +02:00
Sybren A. Stüvel
6b9d7dba6d Web: extra safety check in Jobs Pinia store function 2022-05-11 15:00:25 +02:00
Sybren A. Stüvel
d2f5fa5ca7 Web: simplify handling of job updates 2022-05-11 15:00:05 +02:00
Sybren A. Stüvel
03b880fdb3 Web: also subscribe to current job when webapp starts 2022-05-11 14:59:14 +02:00
Sybren A. Stüvel
e9e1cd8be8 Web: show SocketIO connection status 2022-05-11 13:09:01 +02:00
Sybren A. Stüvel
63ac728732 Web: remove concept of "selected jobs" and replace with "active job"
The selection mechanism of Tabulator was getting in the way of having nice
navigation, as it would deselect (i.e. nav to "/") before selecting the
next job (i.e. nav to "/jobs/{job-id}").

The active job is now determined by the URL and thus handled by Vue Router.
Clicking on a job simply navigates to its URL, which causes the reactive
system to load & display it.

It is still intended to get job selection for "mass actions", but that's
only possible after normal navigation is working well.
2022-05-11 12:13:25 +02:00
Sybren A. Stüvel
af39414a06 Web: introduce VueRouter and split up into more components
Most of the code moved from `App.vue` to `views/JobsView.vue`.
Notification bar has its own component, and there are placeholder
"views" for Workers and Settings pages.

There is still some clunky handling of updates via SocketIO, as those
are a mix of job-specific and global (like SocketIO reconnection
events). The advantage of the current approach is that SocketIO
connections are closed when you leave the Jobs page, and reopened when
you enter the Workers page. My gut feeling says this is nice because it
ensures that all SocketIO connection-specific things are cleaned up when
you navigate.
2022-05-06 16:50:20 +02:00
Sybren A. Stüvel
cbf07f1142 Web: remove CSS for removed job statuses 2022-05-06 15:10:40 +02:00
Sybren A. Stüvel
24755e32b6 OAPI: regenerate code 2022-05-06 15:10:31 +02:00
Sybren A. Stüvel
cfab4f5b76 Web: use title case in status indicator 2022-05-06 12:14:28 +02:00
Sybren A. Stüvel
1cf3cb3344 Web: remove check on tabulator.initialized
This check is no longer necessary now we wait with fetching the tasks/jobs
until the `tableBuilt` event is received.
2022-05-06 11:59:52 +02:00
Sybren A. Stüvel
7bda798009 Web: remove debug console.log() calls 2022-05-06 11:59:11 +02:00
Francesco Siddi
a70438ec4f Load table data on 'tableBuilt' event
Before this change, the tables would not get consistently populated
with the jobs or task data. Thanks Sybren for the fix!
2022-05-05 17:04:08 +02:00
Sybren A. Stüvel
ba34652cd1 Implement task status changes from web interface
This also reworks some of the logic due to the recently-removed
`cancel-requested` task status.
2022-05-05 16:44:09 +02:00
Sybren A. Stüvel
23680c27bf OAPI: regenerate code 2022-05-05 16:36:38 +02:00
Sybren A. Stüvel
7b1b6030d3 OAPI: regenerate code 2022-05-05 16:04:45 +02:00
Pablo Vazquez
84fe14fa46 Web: Color adjustments to statuses 2022-05-05 15:39:31 +02:00
Pablo Vazquez
79397a4ed3 Web: Style spinner
Forked from supahfunk's https://codepen.io/supah/pen/BjYLdW
2022-05-04 19:30:14 +02:00
Pablo Vazquez
60df6e33dc Web: Adjust accent color
Use Lineup's color scheme.
2022-05-04 19:29:20 +02:00
Pablo Vazquez
a3b807d016 Web: minor style tweaks 2022-05-04 19:28:59 +02:00
Pablo Vazquez
8488d792bf Web: Add stauts indicator to Tasks table 2022-05-04 19:28:39 +02:00
Pablo Vazquez
56089bba99 Web: Remove ID cell from tables 2022-05-04 19:28:07 +02:00
Pablo Vazquez
0a71c798c8 UI: Use a more compact DateTime format 2022-05-04 19:26:47 +02:00
Pablo Vazquez
fb774e2e45 Web: Replace status with indicator 2022-05-04 18:51:20 +02:00
Pablo Vazquez
478415018e Web: Style tweak to definition lists 2022-05-04 18:51:05 +02:00
Pablo Vazquez
f2d4294b7b Web: More margin around app name in navbar 2022-05-04 18:50:08 +02:00
Pablo Vazquez
8f6ef5ae5e Web: Prefer dark color scheme by default
So built-in browser widgets use dark colors
2022-05-04 18:49:46 +02:00
Pablo Vazquez
3a288bc1c1 Web: Add gap around the main app 2022-05-04 18:49:10 +02:00
Pablo Vazquez
319716f6f8 Web: Color tweaks to column background and titles 2022-05-04 18:48:46 +02:00
Pablo Vazquez
4f1b1be90b Web: Style tweaks to Tabulator tables 2022-05-04 18:47:55 +02:00
Pablo Vazquez
dad5da49be Web: Style tweak to buttons 2022-05-04 15:34:59 +02:00
Pablo Vazquez
c3f60303a8 Web: Fix page width overflow 2022-05-04 15:33:57 +02:00
Pablo Vazquez
9904c4a3cb Web: Style adjustments to Tabulator tables 2022-05-04 15:33:45 +02:00
Pablo Vazquez
6dad727954 Web: Style app-version 2022-05-04 15:32:52 +02:00
Pablo Vazquez
14ea7fc0a5 Web: Set titles for dt elements in tables
Since the cell has a fixed width and can be cropped.
2022-05-04 15:32:29 +02:00
Pablo Vazquez
5dae53c1c5 Web: Adjust size of tables
* Do not set height of table manually.
* Set the width of ID cells as characters, instead of percentage.
2022-05-04 15:30:40 +02:00
Pablo Vazquez
c10b7f97c9 Web: Positive wording text for Job/Task Details
Also, do not mention left/right on labels since the position of sections
can vary (for example on smaller screens).
2022-05-04 15:25:29 +02:00
Pablo Vazquez
0d683e4786 Web: Move task details to the bottom on smaller screens 2022-05-04 12:57:02 +02:00
Pablo Vazquez
0c8def66aa Web: Use definition lists for Task and Job details 2022-05-04 12:56:30 +02:00
Pablo Vazquez
a6d2b4235b CSS: Cleanup
Use CSS variables for font family body, and minor contrast and padding adjustments.
2022-05-04 12:54:39 +02:00