Sybren A. Stüvel
350cf85cd2
Removed unused imports
2018-02-13 14:36:16 +01:00
Sybren A. Stüvel
f2888069db
Added pillar.api.utils.utcnow() which returns a datetime for 'now'
...
This replaces pillar.web.utils.datetime_now() and can be used in a wider
setting (since we don't import web stuff in the api, but we do vice versa).
2018-02-13 14:36:05 +01:00
Sybren A. Stüvel
d0520484bb
User admin: Show selected user as 'active'
2018-02-13 10:24:49 +01:00
Sybren A. Stüvel
d114b5631a
User admin: removed cancel button
...
It didn't do anything useful, but did break the GUI.
2018-02-13 10:21:43 +01:00
Sybren A. Stüvel
ce33ce994f
Elastic: Allow resetting and reindexing in one CLI command
...
Use `manage.py elastic reindex [indexname] --reset` to reset first and then
reindex.
2018-02-13 10:19:05 +01:00
Sybren A. Stüvel
05d5882c68
Remove deploy.sh
2018-02-02 12:47:47 +01:00
Sybren A. Stüvel
0c238284b0
Typo
2018-02-01 15:18:43 +01:00
Sybren A. Stüvel
d85c45f10f
Not using let in JS, as Gulp minify doesn't understand it :(
2018-02-01 14:28:12 +01:00
Sybren A. Stüvel
06b2adf923
Added all the in-use texture map types to the texture node type
...
Note that we now name 'occlusion' (as it's used in production) as
'ambient occlusion'. The database needs to be migrated for this.
2018-02-01 14:13:50 +01:00
Sybren A. Stüvel
1ca2f336c4
Proper error handling for node type editor
2018-02-01 14:13:01 +01:00
Sybren A. Stüvel
284873ddd4
Unify and simplify texture map type labels
2018-02-01 12:04:12 +01:00
Sybren A. Stüvel
d86c215c34
More texture map types
...
These are actually in use in production.
2018-02-01 11:10:16 +01:00
Sybren A. Stüvel
1b57b333df
Removed the URLer service
...
We don't have a need for it any more, so it can go.
2018-01-31 14:33:41 +01:00
Sybren A. Stüvel
08a814525b
Implement project undelete as PATCH
...
This is done via a custom PATCH due to the lack of transactions of MongoDB;
we cannot undelete both project-referenced files and file-referenced
projects in one atomic operation.
2018-01-31 14:15:23 +01:00
Sybren A. Stüvel
27153bd74a
Remove use of URLER service, replaced it with direct MongoDB query.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
20d80dee61
cache_for_request should take function itself into account too
...
Previously it only looked at the arguments to the function, but not the
function itself.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
ca7d528c85
Mass-attaching project pictures for /p/ endpoint
...
Previously we did an API call for each picture_square and picture_header
for each project listed in /p/. Now we do one API call that fetches only
the pictures needed, in one go; in other words, it fetches less data in
less HTTP calls.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
f8ff30fb4d
(un)delete on project also (un)delete file documents.
...
Note that undeleting files cannot be done via Eve, as it doesn't support
PATCHing collections. Instead, direct MongoDB modification is used to set
_deleted=False and provide new _etag and _updated values.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
7d1b08bf58
refresh_links_for_backend: log to backend-specific child logger.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
60abf6d4a9
on_pre_get_files: remove refresh of files
...
It is possible to perform a GET request that has an empty `lookup`
param, like {'_id': {'$in': ['objectID1', 'objectID2', ...]}}. Such a
request would cause a refresh of *all* file documents, which is far too
heavy to do in one client HTTP request.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
7c384d1f45
Link refresh: allow refreshing links for soft-deleted projects.
...
Since files aren't deleted (yet) when projects are deleted, it can happen
that a file is refreshed but then cannot reference a deleted project.
By removing the project ID from the PATCH, Eve doesn't have enough info to
check this, and it'll work fine.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
f18d5580c1
Fixed unicode/bytes issues in CDN file path hashing.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
9177f77e69
Link refresh: gracefully handle case where 'file_path' is not set.
...
In this case an error is logged and the entire link regeneration is
aborted. In other words, variations aren't refreshed either.
2018-01-31 10:08:17 +01:00
Sybren A. Stüvel
4b5a961e14
Speed up authentication by trusting g.current_user if set.
2018-01-31 10:08:17 +01:00
Francesco Siddi
ed1e348d67
Display publishing status of a texture node only to editors
2018-01-26 16:11:56 +01:00
Sybren A. Stüvel
660b7a3811
Added 'maintenance refresh_content_disposition' CLI command
...
This command fixes the filename in the Content-Disposition header of file
variations on Google Cloud Storage. This is to fix the existing files after
fixing T51477.
2018-01-26 16:03:11 +01:00
Sybren A. Stüvel
e5fb156224
Fix logging in check_home_project_groups CLI command
2018-01-26 15:05:49 +01:00
Sybren A. Stüvel
de1eab4596
GCS: the slash is a separator, and not part of the directory name itself.
2018-01-26 14:58:42 +01:00
Sybren A. Stüvel
de1c227ccd
GCS storage: use self.subdir instead of hard-coded '_'
2018-01-26 14:58:25 +01:00
Sybren A. Stüvel
230b2c669c
Implement rename-after-Zencoder-is-done using our Storage API.
...
This means it's no longer GCS-specific, and can be tested using the local
storage implementation.
Required implementation of a rename operation. To mirror Google's API, I've
implemented the renaming of a Blob as a function on the Bucket class.
To me this makes sense, as it requires creating a new Blob instance, which
shouldn't be done by another Blob.
2018-01-26 14:54:34 +01:00
Sybren A. Stüvel
2e2314c16b
Replace storage backend 'pillar' with 'local'
...
The backend 'pillar' is obsolete; 'local' is the modernity and uses our
nice storage API.
2018-01-26 14:13:03 +01:00
Sybren A. Stüvel
75e2402420
Removed unused import
2018-01-26 12:49:53 +01:00
Sybren A. Stüvel
fb121a9601
Test actual Zencoder notification.
...
This notification was taken from our API history and was actually sent to
us by Zencoder.
2018-01-26 12:49:45 +01:00
Sybren A. Stüvel
f8c3408f18
Properly handle errors when saving updated file doc after Zencoder notif.
...
We never checked the return values from the put_internal() call, so errors
would have passed silently into the night.
2018-01-26 12:49:15 +01:00
Sybren A. Stüvel
89ca0516a9
Better handling of Zencoder error notifications.
2018-01-26 12:29:22 +01:00
Sybren A. Stüvel
5ae98507e3
Added missing unittest for encoding.size_descriptor()
2018-01-26 12:15:56 +01:00
Sybren A. Stüvel
66ac8c6587
Modernised ZencoderNotificationTest
2018-01-26 12:15:42 +01:00
Sybren A. Stüvel
fd95135f66
PEP 8 formatting and removal of unused import
2018-01-26 11:42:56 +01:00
Sybren A. Stüvel
987d6d03a6
Fix T49280: Make texture files (in texture node) sortable
...
Rather than making them sortable, I made them automatically sorted upon
saving the node. The colour map comes first, then the other maps in
alphabetical order.
2018-01-26 11:42:42 +01:00
Sybren A. Stüvel
9b3a836c83
Fix for project-less files
2018-01-26 10:45:11 +01:00
Sybren A. Stüvel
741cdf6e12
Elastic: regenerate picture URL before inserting into ElasticSearch
...
This ensures the thumbnail URL is public so that it won't expire.
Since this now requires API calls to Google, I've increased the number of
parallel threads used for indexing, since they'll be waiting for network
I/O more.
2018-01-26 10:29:28 +01:00
Sybren A. Stüvel
0744aeb42f
app → current_app
...
'app' doesn't exist.
2018-01-26 09:37:25 +01:00
Sybren A. Stüvel
ae7489d8e7
Don't hide form items in CSS
...
If those should be hidden, it should be done in the form_schema of the
node types, and not with CSS.
2018-01-25 17:31:13 +01:00
Sybren A. Stüvel
666da0adda
Show status in texture view_embed
2018-01-25 16:17:26 +01:00
Sybren A. Stüvel
889b5dc1c5
Removed redundant if around for
2018-01-25 16:17:18 +01:00
Sybren A. Stüvel
b3a36f2833
Fix T49930: bug in texture count
2018-01-25 15:51:15 +01:00
Sybren A. Stüvel
dd8d19178b
Removed unused function
2018-01-25 15:50:48 +01:00
Sybren A. Stüvel
840e8ba29b
Fix issue when editing org without IP range.
...
Stupid JavaScript ''.split('\n') results in Array('') instead of Array().
2018-01-25 14:35:33 +01:00
Sybren A. Stüvel
6a17949fdf
Added Roles & Capabilities page to user settings
...
Thanks @fsiddi for helping with the explanatory text.
2018-01-25 14:01:28 +01:00
Sybren A. Stüvel
0a0c47205f
Use Jinja2 inheritance to render settings pages.
...
This gives us more flexibility than using {% include %}.
2018-01-25 14:01:28 +01:00