Commit Graph

956 Commits

Author SHA1 Message Date
b34fee514a OAPI: include worker's "last seen" timestamp
Include the worker's "last seen" timestamp in the worker summary, details,
and SocketIO updates.

This is different from the "updated" timestamp, which indicates the last
time the worker entry in the database was updated (which could also be
in response to a status change request from the web interface).
2022-07-04 12:47:25 +02:00
fcb261f5d3 Move the webapp from /app/… to /app/v3/…
This will help in the future to host multiple (major) versions of Flamenco
on the same system, redirecting based on their URL prefix.
2022-07-04 12:22:41 +02:00
7d64d1bca4 Move SwaggerUI to /api/v3/swagger-ui
Include the `v3` path component in the Swagger UI URL.
2022-07-04 12:21:18 +02:00
5537f2c07c OAPI: regenerate code 2022-07-04 12:12:45 +02:00
9daecf2b45 OAPI: version all API URLs with /v3/
Change all API URL paths from `/api/…` to `/api/v3/…`. This ensures that
old Flamenco v2 clients/workers stop working when the new Manager is in
place. This also allows redirecting API calls based on the URL, also for
future upgrades.
2022-07-04 12:11:58 +02:00
30f7df5259 OAPI: change Shaman URL paths from /shaman/… to /api/shaman/…
This makes all OpenAPI URLs start with `/api/`.
2022-07-04 12:09:19 +02:00
0e3d822868 Web: refresh page every hour
Do a refresh of the web interface once per hour. This is just to make sure
that long-lived displays (like the TV in the hallway at Blender HQ) pick
up on HTML/JS/CSS changes eventually.
2022-07-04 11:59:19 +02:00
f2f8357df7 Bump thumbnail JPEG quality from 80 to 85
80 was a bit too low. 85 might still be too low, we'll have to see.
2022-07-01 17:44:26 +02:00
5fbdc388ad Job compiler: tweak settings visibility of simple-blender-render
In the `simple-blender-render` job type settings, hide the `chunk_size`
setting from the web frontend, and show the `blendfile` setting instead.

The actual blend file being rendered is important to know, whereas the
chunk size can be inferred from the task names anyway.
2022-07-01 13:36:44 +02:00
ae0125edcd Web: fix URL of 'nothing rendered yet' image 2022-07-01 13:32:43 +02:00
beb8684a38 Web: fix styling of last-rendered image in job details
Instead of putting the styling in `<style scoped>`, I moved it to the
global `base.css`. This made things work again.
2022-07-01 13:10:51 +02:00
d25151184d Add a "Last Rendered" view
Add a "Last Rendered" view to the webapp.

The Manager now stores (in the database) which job was the last
recipient of a rendered image, and serves that to the appropriate
OpenAPI endpoint.

A new SocketIO subscription + accompanying room makes it possible for
the web interface to receive all rendered images (if they survive the
queue, which discards images when it gets too full).
2022-07-01 12:34:40 +02:00
801fa20f12 OAPI: regenerate code 2022-07-01 12:32:42 +02:00
60f3f5482d OAPI: add operation & SocketIO subscription for global last-rendered img
Add an operation to get the last-rendered image from whatever job received
such output from a Worker, and add a SocketIO subscription type to receive
updates about all jobs' last-rendered images.

These are necessary for a global last-rendered image display.
2022-07-01 12:31:18 +02:00
f5f63455d6 Web: add comment to explain URL of last-rendered image
No functional changes.
2022-06-30 19:27:54 +02:00
0a0035eb5b Web: better styling of last-rendered image 2022-06-30 19:27:43 +02:00
2457a63518 Manager: Show "nothing rendered yet" image in job details
Show a "nothing rendered yet" image in the job details when there is no
last-rendered image yet.
2022-06-30 19:20:19 +02:00
56463fa3ec OAPI: regenerate code 2022-06-30 19:19:38 +02:00
cca8155894 OAPI: add 204 as "nothing rendered" response to fetchJobLastRenderedInfo
Add a "204 No Content" response to the `fetchJobLastRenderedInfo` operation,
indicating that there is no rendered output yet.
2022-06-30 19:18:52 +02:00
84d598c813 Web: reload the last-rendered image on SocketIO notification 2022-06-30 18:37:12 +02:00
0fc5ba0bc6 Manager: broadcast last-rendered image info via SocketIO
After processing an image in the "last-rendered" processor, a SocketIO
object is sent to clients to indicate the last-rendered image needs to
be (re)loaded.

This also moves the previously existing "done callback" from a single
function to a per-image callback, so that it can be called with the
right information in there, and only when that particular image is
actually done processing.

The notification message sent via SocketIO also contains the necessary
info to render the image, so that the web client doesn't have to call
the `fetchJobLastRenderedInfo` operation.
2022-06-30 18:36:24 +02:00
123674cf57 OAPI: regenerate code 2022-06-30 18:33:36 +02:00
c9500b85c2 OAPI: add SocketIOLastRenderedUpdate for broadcasting last-rendered imgs
`SocketIOLastRenderedUpdate` objects are meant to be broadcast to SocketIO
clients (i.e. the web interface). They are sent to the job-specific room,
just like task updates.
2022-06-30 18:32:42 +02:00
73e1c1930f Web: run dev server on /app/ base URL
Flamenco Manager serves the webapp on `/app/…`, and now the development
server uses the same base URL.
2022-06-30 18:31:53 +02:00
f1c15dfa2c Make debug-job-render.sh less Blender Studio-specific
Don't output to `/render/_flamenco/...`, but to `/tmp/...` instead.
2022-06-30 18:30:35 +02:00
75723daba2 Improve the static webapp building & embedding
Some smaller changes to make the webapp building smoother, and also to
make sure there are no errors on a clean Git checkout.
2022-06-30 17:41:36 +02:00
b082433757 Web: show last-rendered image in job details
It doesn't update automatically yet (still needs SocketIO notifications),
and there is no check yet for whether there is actually any last-rendered
image at all, but at least there is a component that shows the image.
2022-06-28 17:37:09 +02:00
cc56e5b22e Web: auto-detect whether the port number should be overridden
It's a bit clumsy (if the web port is :8081, override it to :8080 for the
API requests), but works in our case.
2022-06-28 17:15:27 +02:00
159e003745 Web: remove the last bit of the 'Settings' tab
Apparently the header link was still in there.
2022-06-28 17:14:44 +02:00
6efd67b05c Manager: implement FetchJobLastRenderedInfo() API operation
Allow querying for the URL & available versions of a job's last-rendered
image.
2022-06-28 17:08:00 +02:00
668e25fe95 OAPI: regenerate code 2022-06-28 17:07:08 +02:00
5d30459359 OAPI: add endpoint to get URLs of last-rendered images of a job 2022-06-28 17:05:52 +02:00
e6bf60cb77 Addon: fix issue where Shaman checkout directory wasn't used properly
Shaman prevents duplicate checkout directories, and communicates the actual
location back to the client. This wasn't used by the add-on though, so
the Flamenco job definition would point to the wrong files.
2022-06-28 16:28:28 +02:00
be0fbcca8e Add deployment script
It's quite specific to Blender HQ, but still might be nice as inspiration
for others.
2022-06-28 13:08:52 +02:00
f508bd7e92 FEATURES.md: add idea for versioning API 2022-06-28 12:59:26 +02:00
c613c1993a Manager: serve favicons at root web URL 2022-06-28 12:46:51 +02:00
26867c4b96 Addon packer: make sure the top level of the ZIP is the module
When installing, Blender will just unzip directly into the addons dir,
so the ZIP has to contain the `flamenco` package directory.

This also makes things simpler, naming-wise. We can offer the addon from
the Manager web interface as `flamenco3-addon.zip`, and still have it
install into the `addons/flamenco` directory.
2022-06-28 12:44:05 +02:00
37d8fbdf5e Web: remove 'settings' view
It's not in use, and better to not have it at all then.
2022-06-28 12:32:09 +02:00
c3345131c7 Rename flamenco-addon.zip to flamenco3-addon.zip
Just to be explicit this is for the new Flamenco version.
2022-06-28 12:17:57 +02:00
e358862db7 FEATURES.md: some bookkeeping 2022-06-28 12:10:45 +02:00
d60eab20bb Worker: allow setting the Manager URL from the commandline
This makes it possible to start Flamenco Worker at Blender Studio with
a worker-local current working directory, with the executable in a shared
filesystem.
2022-06-28 11:43:40 +02:00
24344e9632 Cleanup: worker, simplify setting the manager URL
The return value of `FileConfigWrangler.SetManagerURL()` was never used,
so now the function doesn't return anything any more.
2022-06-28 11:42:47 +02:00
4e4f67d20a FEATURES.md: some bookkeeping 2022-06-28 11:42:03 +02:00
08dc210616 Makefile: add commented-out command useful when debugging
Add the command that's needed to disable JavaScript minification, useful
for debugging JS errors.

No functional changes.
2022-06-28 10:49:48 +02:00
c856be30e4 Cleanup: web, remove unused import 2022-06-28 10:47:24 +02:00
6d9e5d5299 Web: fix JavaScript issue that only pops up in production
Fix an issue ("`this` is undefined) that only pops up when serving the
static files from `yarn build`, and not when using the Vite devserver.
2022-06-28 10:47:16 +02:00
e9bc55cfc8 Web: don't hard-code the API port
Having the web API client override the HTTP port for the API URL is fine
during development (when the web content is served through the Vite
devserver), but not in production.
2022-06-28 10:30:26 +02:00
d6cfff4031 Worker: treat empty config file the same as a missing one
EOF while parsing the config file is now handled as an indication that
the default config should be used, rather than a fatal error.
2022-06-28 10:24:46 +02:00
fb89658530 Refactor: replace os.IsNotExist() with errors.Is(err, fs.ErrNotExist()
`os.IsNotExist()` is from before `errors.Is()` existed. The latter is the
recommended approach, as it also recognised wrapped errors.

No functional changes, except for recognising more cases of "does not
exist" errors as such.
2022-06-28 10:24:46 +02:00
2045a087ca Web: add link to the API explorer
Add a link to `/api/swagger-ui/` to the top bar, which allows exploration
of the API.
2022-06-27 16:13:15 +02:00