448 Commits

Author SHA1 Message Date
Sybren A. Stüvel
4ea6f99c3e Manager: dynamically generate allowed CORS origins
Remove the hard-coded list of allowed CORS origins, and build it
dynamically from the list of "own URLs", i.e. the URLs at which the
Manager expects to be available.

This list of "own URLs" is constructed from the available network
interfaces.
2022-04-15 14:27:52 +02:00
Sybren A. Stüvel
1847c5219d Web: fix unexpected scrollbar on Firefox
Firefox will still have an additional 1px vertical line at the bottom of
the page, even when `#app` should take 100% of the vertical space. This
causes a scrollbar to show up. Setting the height at `calc(100vh - 1px)`
solves this.
2022-04-15 14:27:51 +02:00
Sybren A. Stüvel
5c28fcd1b7 Web: set colours on the html & body element
Setting the CSS `color` and `background-color` properties on the top-level
elements will make Firefox understand the dark theme, and colour the scroll
bar appropriately.
2022-04-15 14:27:24 +02:00
Sybren A. Stüvel
1535d7531b Document the use of SocketIO in README.md 2022-04-15 13:51:32 +02:00
Sybren A. Stüvel
315c7cfde7 Web: fix layout of jobs table
This ensures it uses virtual DOM, which is waaaaaaay faster.
CSS variables are used to compute the max height for the Jobs Table grid
cell, to make sure the Tabulator height can be set to 100% without
overflowing.
2022-04-14 09:54:57 +02:00
Sybren A. Stüvel
93b065217e Web: always fetch fresh job on selection in the tabulator 2022-04-14 09:41:04 +02:00
Sybren A. Stüvel
c6bc614f2a Web: add commented-out debug code
The code ensures the jobs table gets filled with partial jobs (as from
a WebSocket JobUpdate object), helping to test such updates.
2022-04-14 09:41:04 +02:00
Sybren A. Stüvel
81ad3575db Web: only fetch selected job if not yet fully known 2022-04-14 09:41:04 +02:00
Sybren A. Stüvel
e672289a11 OAPI: include all info for the jobs table in the JobUpdate schema
By having all info for the jobs table in the `JobUpdate` schema, it won't
have to query for the full job when a new job is added. This fetching of
the full job is now delayed until someone clicks on the table row.
2022-04-14 09:41:04 +02:00
Sybren A. Stüvel
3ab1e9a450 Web: add API query spinner
The spinner starts fading in when API calls take longer than 100ms.

Not used yet, how to hook it up to API calls is still being discovered.
2022-04-14 09:41:04 +02:00
Sybren A. Stüvel
d5477091d9 Web: Remove Vue-generated default README.md 2022-04-14 09:41:04 +02:00
Francesco Siddi
313061cf06 Web: Initial design with dark theme in mind 2022-04-12 20:03:52 +02:00
Sybren A. Stüvel
6161853136 Web: reduce console logs a bit 2022-04-12 16:11:52 +02:00
Sybren A. Stüvel
77cc0f36e6 Web: remove API example code, enough examples in the code now 2022-04-12 16:10:51 +02:00
Sybren A. Stüvel
2c8ee18fef Web: include metadata and settings in job details 2022-04-12 16:10:39 +02:00
Sybren A. Stüvel
0694ab8e02 Web: nicer handling of SocketIO connection issues 2022-04-12 16:00:47 +02:00
Sybren A. Stüvel
ec814afa91 Web: show Flamenco name & version in header 2022-04-12 15:54:58 +02:00
Sybren A. Stüvel
caa3481561 Web: emit jobUpdate event with API object instead of straight JSON
Instead of just emitting the straight parsed-JSON object that the SocketIO
library gives us, feed it to the OpenAPI client type system to ensure it's
parsed in the same way as any regular API response.

This is mostly to get datetimes as JS `Date` object instead of as string.
2022-04-12 15:43:50 +02:00
Sybren A. Stüvel
48acf55d6b Web: document cohesion of JobsTable and JobDetails components 2022-04-12 15:42:37 +02:00
Sybren A. Stüvel
316ba6953b Web: show job details column
This may be a nice moment to reconsider using Pinia as a data store, as
we now have two views (job table + job details) that should share a data
set.
2022-04-12 15:28:18 +02:00
Sybren A. Stüvel
d650ff5dcf Web: add empty job & task detail column components 2022-04-12 14:37:48 +02:00
Sybren A. Stüvel
a92435459e Web: tweak job table layout 2022-04-12 14:26:07 +02:00
Sybren A. Stüvel
69e6b2bd99 Web: Flamenco favicon 2022-04-12 12:54:27 +02:00
Sybren A. Stüvel
b12af4c60e Update README.md to reflect the new way to set up the web dev environment 2022-04-12 12:41:24 +02:00
Sybren A. Stüvel
555c935790 Web: Replace Vue 2 with Vue 3 webapp
Replace the Vue v2 webapp with a Vue v3 one, and embed the OpenAPI
client in the webapp itself (instead of being its own npm project).

- Vue v2.x -> v3.x
- Tabulator v4.x -> v5.1
- Moment JS -> replaced with Luxon JS
- Vue CLI/UI -> replaced with Vite
2022-04-12 12:34:49 +02:00
Sybren A. Stüvel
c0b2c6c234 Manager: CORS origins should be without trailing slash 2022-04-12 12:34:10 +02:00
Sybren A. Stüvel
48417f7f14 Manager: Fix unittests after recent changes to the job compiler script
d98dbaa3 introduced a change to the job compiler, which wasn't taken into
account in the unit test.
2022-04-11 14:08:40 +02:00
Sybren A. Stüvel
c79983bafb Worker: include -r {fps} in FFmpeg command
This should force the output created by FFmpeg to match the desired FPS.
2022-04-11 12:09:28 +02:00
Sybren A. Stüvel
cb494a4c03 Made go-sqlite a direct dependency 2022-04-11 11:42:46 +02:00
Sybren A. Stüvel
e9212de196 Worker: simplify "context done" checks 2022-04-09 16:57:39 +02:00
Sybren A. Stüvel
d98dbaa333 Worker: implement ffmpeg for frame-to-video conversion on Windows 2022-04-09 16:20:29 +02:00
Sybren A. Stüvel
38aedfe8cc Worker: make blender-finder find blender.exe and not blender-launcher.exe
`blender-launcher.exe` doesn't pipe Blender's stdout/stderr output, so it's
not useful for Flamenco.
2022-04-09 16:16:19 +02:00
Sybren A. Stüvel
0959179225 Worker: redirect stderr to stdout at the right moment
It should be done after stdout has been assigned a pipe, and not before.
2022-04-09 16:14:44 +02:00
Sybren A. Stüvel
4181708709 Worker: automatically find Blender on Windows via file association
On Windows, when the Manager doesn't explicitly point at a Blender to use,
use the the application associated with `.blend` files instead.
2022-04-09 15:05:34 +02:00
Sybren A. Stüvel
bf47afc32b Worker: reduce log level of "fetching tasks" message 2022-04-09 12:52:28 +02:00
Sybren A. Stüvel
7a19e2f38d Manager: use absolute storage path
This helps to get things consistent on Windows and Linux. Otherwise a path
like `/some/path` is absolute on one platform but not on the other. This is
mostly for getting the unit tests in this package to work on Windows, but
using absolute paths also helps in clarity of error logging.
2022-04-09 12:03:11 +02:00
Sybren A. Stüvel
7f5978a0f2 Use go install instead of go get to install code generators 2022-04-09 11:50:24 +02:00
Sybren A. Stüvel
cc20b850ec Worker: separate contexts of upstream buffer
The upstream buffer takes care of two things: communication with Flamenco
Manager (first context) and buffering things in a SQLite database (second
context). This commit separates those two contexts, so that shutting down
the application isn't going to prevent buffering things in the database.
2022-04-08 16:49:53 +02:00
Sybren A. Stüvel
959a235c59 Worker: don't log error when rolling back already-committed transaction 2022-04-08 16:48:28 +02:00
Sybren A. Stüvel
f155715d12 Web: re-fetch jobs after reconnecting to backend
If the backend connection was lost, and then obtained again, just fetch
all available jobs to ensure the presented data is fresh.
2022-04-08 15:03:04 +02:00
Sybren A. Stüvel
e7fc2c6f6e Worker: add various extra error checks 2022-04-08 14:47:20 +02:00
Sybren A. Stüvel
1960b668aa Cleanup: remove unused code 2022-04-08 14:47:07 +02:00
Sybren A. Stüvel
2e2205c00e Manager: return error from sendAPIError()
Small bugfix.
2022-04-08 14:46:36 +02:00
Sybren A. Stüvel
2830d1eda8 Update FEATRURES.md 2022-04-08 14:34:38 +02:00
Sybren A. Stüvel
62ea7dcf1d Worker: avoid task errors on shutdown
When shutting down, the main worker context closes. This causes the
subprocess to be killed, which in turn caused a task execution error. This
now no longer happens, as such errors are expected on shutdown and do not
indicate task failure.
2022-04-08 14:32:25 +02:00
Sybren A. Stüvel
96e5e84881 Web: proper updating & sorting of jobs in Tabulator 2022-04-08 13:08:53 +02:00
Sybren A. Stüvel
def1778aa6 Debug echo job: sleep for a shorter time 2022-04-08 12:05:30 +02:00
Sybren A. Stüvel
9ec39b0b41 Web: import moment.js in a way Tabulator can find 2022-04-08 12:05:14 +02:00
Sybren A. Stüvel
06bf3c0482 Cleanup: manager, fix copy-paste from original OpenAPI example code 2022-04-08 12:04:58 +02:00
Sybren A. Stüvel
863ecee954 OAPI: regenerate OpenAPI code 2022-04-08 12:04:34 +02:00