Breadcrumbs are served as JSON at `/nodes/{node ID}/breadcrumbs`, with
the top-level parent listed first and the node itself listed last:
{breadcrumbs: [
...
{_id: "parentID",
name: "The Parent Node",
node_type: "group",
url: "/p/project/parentID"},
{_id: "deadbeefbeefbeefbeeffeee",
name: "The Node Itself",
node_type: "asset",
url: "/p/project/nodeID",
_self: true},
]}
When a parent node is missing, it has a breadcrumb like this:
{_id: "deadbeefbeefbeefbeeffeee",
_exists': false,
name': '-unknown-'}
Of course this will be the first in the breadcrumbs list, as we won't be
able to determine the parent of a deleted/non-existing node.
Breadcrumbs are rendered with Vue.js in Blender Cloud (not in Pillar);
see projects/view.pug.
Original commit 3b59d3ee9a
Breaking commit 32e25ce129
The breaking commit was actually meant to remove the need for this
hook logic entirely, by relying on a custom validator instead.
This works for nodes, but it currently does not work for projects.
The issue needs to be further investigated via T63006.
Use this decorator on Flask endpoints that should respond with CORS
headers. These headers are sent in a reply when the browser sends an
`Origin` request header; for more info see [1].
This commit rolls back the previous commit (0ee1d0d3), as this new
approach with a separate decorator is both easier to use and less
error-prone.
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
This makes the `require_login` decorator always return a Flask response.
Previously it could also raise a `Forbidden` exception; now it returns a
403 Forbidden response in that case too.
There were a few redirects (for example, trying to log in while already
logged in) that would incorrectly redirect to the main page. They use the
`next_after_login` session variable now.
For the user:
Ctrl + L-Mouse to select multiple tasks/shots/assets and then edit
the nodes as before. When multiple items are selected a chain icon
can be seen in editor next to the fields. If the chain is broken
it indicates that the values are not the same on all the selected
items.
When a field has been edited it will be marked with a green background
color.
The items are saved one by one in parallel. This means that one item
could fail to be saved, while the others get updated.
For developers:
The editor and activities has been ported to Vue. The table and has
been updated to support multi select.
MultiEditEngine is the core of the multi edit. It keeps track of
what values differs and what has been edited.
Notifications for when someone posted a comment on your node
was not created.
Root cause was that default values defined in schema was not set,
resulting in activity subscriptions not being active.
There were 2 bugs preventing them to be set:
* The way the caching of markdown as html was implemented caused
default values not to be set.
* Eve/Cerberus regression causes nested default values to fail
https://github.com/pyeve/eve/issues/1174
Also, a 3rd bug caused nodes without a parent not to have a
subscription.
Migration scripts:
How markdown fields is cached has changed, and unused properties
of attachments has been removed.
./manage.py maintenance replace_pillar_node_type_schemas
Set the default values of activities-subscription
./manage.py maintenance fix_missing_activities_subscription_defaults
* Removed main drop down menu
* Added "My cloud" to user menu
* Attract/Flamenco is found under Production Tools menu
* Attract/Flamenco has the same navigation as its project
These are used by Flamenco to store task logs as gzipped text files, but to
send them to the browser with such HTTP headers that the browser can gunzip
them and display directly (rather than having to download & gunzip yourself).
For now this returns a bucket in the default storage backend, since
individual projects do not have a 'storage backend' setting (this is
set per file, not per project).
Strings were already passed to this function, even though it was declared
as taking an ObjectID. Instead of updating all callers, I just made it
convert strings to ObjectID.
* Drag and drop files to comment editor to add a file attachment
* Using Vue to render comments
Since comments now has attachments we need to update the schemas
./manage.py maintenance replace_pillar_node_type_schemas
This is about fixing file documents that do not have a `project` key at
all. Those were deleted by the `delete_projectless_files` management
command and restored manually. These commands can fix those file
documents properly, by checking which project they're referenced in, and
setting their `project` property.
Finding the references (`manage.py maintenance find_projects_for_files`)
is a heavy operation as it inspects all nodes and all projects. This can
be done offline on a cloned database, and the result stored in a JSON
file. This JSON file can then be processed on the production server
(`manage.py maintenance fix_projects_for_files /path/to/file.json --go`)
to perform the fix.
This should work around a bug in Celery where long Celery tasks would
time out and be re-queued, causing an infinite loop.
See https://github.com/celery/celery/issues/3430 for more info.
Changed how and what we store in elastic to unify it with how we store
things in mongodb so we can have more generic javascript code
to render the data.
Elastic changes:
Added:
Node.project.url
Altered to store id instead of url
Node.picture
Made Post searchable
./manage.py elastic reset_index
./manage.py elastic reindex
Thanks to Pablo and Sybren
project.
Javascript tutti.js and timeline.js is needed, and then the following to
init the timeline:
$('.timeline')
.timeline({
url: '/api/timeline'
});
# Javascript Notes:
## ES6 transpile:
* Files in src/scripts/js/es6/common will be transpiled from
modern es6 js to old es5 js, and then added to tutti.js
* Files in src/scripts/js/es6/individual will be transpiled from
modern es6 js to old es5 js to individual module files
## JS Testing
* Added the Jest test framework to write javascript tests.
* `npm test` will run all the javascript tests
Thanks to Sybren for reviewing
This adds a new Blinker signal `user_logged_in` that is only sent when
the user logs in via the web interface (and not on every token
authentication and every API call).