28 Commits

Author SHA1 Message Date
Sybren A. Stüvel
09dbcfe512 Remove the need to get elements by their ID
Referencing elements outside the current component by ID is not a good
approach; using `this.$el.parentElement` is a bit cleaner.
2022-05-27 16:44:51 +02:00
Sybren A. Stüvel
339aafc1e4 Cleanup: add missing trailing comma
This comma isn't strictly necessary, but makes the diff cleaner when adding
new functions.
2022-05-27 16:43:40 +02:00
Sybren A. Stüvel
60836c77e0 Remove need for global resizeTasksListTable function 2022-05-27 16:43:12 +02:00
Pablo Vazquez
1310e5c9e2 Web: Set height for Tasks List on load and window resize
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).
2022-05-25 17:14:21 +02:00
Sybren A. Stüvel
1ac72bd3fc Web: no longer do filtering when clicking on the 'status' table cell
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.
2022-05-20 16:54:30 +02:00
Sybren A. Stüvel
0a3009d6ed Web: fix race condition where job/task update comes in before table is init
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.
2022-05-20 12:18:40 +02:00
Sybren A. Stüvel
744fabea78 OAPI: rename pkg/api/flamenco-manager.yaml to flamenco-openapi.yaml
Rename `pkg/api/flamenco-manager.yaml` to `flamenco-openapi.yaml`, to
distinguish the OpenAPI definition file from the Flamenco Manager
configuration file of the same name (but in a different directory).

No functional changes.
2022-05-19 15:22:37 +02:00
Sybren A. Stüvel
ddc3acd652 Web: add status filtering to task table 2022-05-17 15:37:29 +02:00
Sybren A. Stüvel
dc7729cfed Web: cleanup, remove unused parameter 2022-05-17 15:09:47 +02:00
Sybren A. Stüvel
01a81bb3dd Web: move Task tabulator options into the mounted() function
This basically mirrors what 8f27ea97 did for the jobs table.

No functional changes.
2022-05-17 15:09:25 +02:00
Sybren A. Stüvel
84ba3ec8b2 Web: cleanup, explain why commented-out code is kept 2022-05-17 15:05:25 +02:00
Sybren A. Stüvel
908953c8d4 Web: cleanup, remove some unused code 2022-05-17 15:05:17 +02:00
Sybren A. Stüvel
9fd4d55fdb Web: move status indicator code into its own function
Status indicators are used in Tabulator cells, and it's unknown whether
we can use Vue components there. Moving the code to a central place makes
it a bit easier to reuse the function in various places.
2022-05-16 17:31:30 +02:00
Pablo Vazquez
ae13ff6410 Web: Remove custom styling for tasks-list-container
Style comes from Tabulator, no need to set properties again.
2022-05-12 15:53:57 +02:00
Pablo Vazquez
d0d40c8e46 Web: Set a fixed height for Tabulator tables.
It's ugly but couldn't find a way to make it responsive and not break
the Virtual DOM.
2022-05-12 15:53:57 +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
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
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
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
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
Sybren A. Stüvel
0c79701bea Web: Don't remember selected task
If the selected task doesn't exist (because you selected another job),
Tabulator would select all tasks. That's not what I want.
2022-05-03 16:28:39 +02:00
Sybren A. Stüvel
50c8cd39f2 Task update notifications via SocketIO
Manager now sends out task updates via SocketIO, and the web interface
handles those.

Note that there is a `BroadcastTaskUpdate()` function, but not a
`BroadcastNewTask`. The 'new job' broadcast is sent after the job's
tasks have been created, and thus there is no need for a separate
broadcast per task.
2022-05-03 11:26:24 +02:00
Sybren A. Stüvel
4ebf4f31f9 Web: add task table 2022-04-29 13:11:19 +02:00