Commit graph

3744 commits

Author SHA1 Message Date
Yohan Boniface
064473c816 chore: add default_acl in S3 options in documentation 2024-12-17 13:19:25 +01:00
Yohan Boniface
6db3032bdb fix: do not autoescape static tag
When using django-storage S3, this will escape the final static URL,
containing query string (so & will become &).
2024-12-17 13:07:46 +01:00
Yohan Boniface
05c27aed98
feat: parse files in parallel at import when multiple (#2372)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
cf https://github.com/umap-project/umap/pull/2363#discussion_r1882966275
2024-12-16 21:36:42 +01:00
Yohan Boniface
d08531121b feat: parse files in parallel at import when multiple 2024-12-16 19:49:58 +01:00
Yohan Boniface
06c2438ff1
fixup: fix save center and zoom (#2371)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Broken since map split.
2024-12-16 18:30:37 +01:00
Yohan Boniface
b92490eacc
feat: load all datalayers in parallel (#2370) 2024-12-16 18:26:55 +01:00
Yohan Boniface
cdb5d79297
chore: clean CSS loader (#2369)
- change the CSS (cf
https://github.com/umap-project/umap/issues/564#issuecomment-2541883101)
- change the way we pass events (and their id) to Leaflet.Loading
2024-12-16 18:24:43 +01:00
Yohan Boniface
ecdc58948f fixup: fix save center and zoom
Broken since map split.
2024-12-16 18:22:44 +01:00
Yohan Boniface
e3f02a475f feat: load all datalayers in parallel 2024-12-16 18:03:45 +01:00
Yohan Boniface
9c3f8db548 chore: clean CSS loader
- change the CSS (cf https://github.com/umap-project/umap/issues/564#issuecomment-2541883101)
- change the way we pass events (and their id) to Leaflet.Loading
2024-12-16 18:01:01 +01:00
Yohan Boniface
09faa763f9
feat: add a back button to importers dialog (#2364)
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
![image](https://github.com/user-attachments/assets/99445f06-f48f-4b0b-88f6-f696e067416d)
2024-12-13 15:49:45 +01:00
Yohan Boniface
fe06a0ff8e chore: add more tests for team related views 2024-12-13 14:44:54 +01:00
Yohan Boniface
b578ceced4 feat: add a back button to importers dialog 2024-12-13 12:27:41 +01:00
Yohan Boniface
7c808393f0 chore: make all backends point to S3 in the documentation example 2024-12-13 11:20:33 +01:00
Yohan Boniface
45a0ec5d42 fix: add default saved message
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Now that we do not always do a save on the map itself, we may have
no feedback message in case we only save layers.
2024-12-13 10:05:20 +01:00
Yohan Boniface
cbab6e03f8 fix: properly close the translate parentesis 2024-12-13 09:48:03 +01:00
Yohan Boniface
54aa687ba1 2.8.0a2 2024-12-13 09:33:24 +01:00
Yohan Boniface
8346459f28 i18n 2024-12-13 09:31:02 +01:00
Yohan Boniface
cd24bf0b3d
feat: refactor importer feedback (#2363)
We basically make the all import chain return the results as promise, so
the importer can act at the end of the process and:
- zoom only to the imported data (in case the layer already as some)
- display a counter of imported data when import is successfull
- display an alert when nothing has been imported

cf #564
2024-12-13 09:18:08 +01:00
Yohan Boniface
30b685ae43
chore: more logs in the ajax proxy validate url (#2362)
This should only be used in localhost, but there are a bunch of check
and it's often that we need to add print to understand why the URL does
not validate, which is usually an issue with the SITE_URL or this kind.
So let's make those print permanent.
2024-12-13 09:12:12 +01:00
Yohan Boniface
de921660c9 feat: refactor importer feedback
We basically make the all import chain return the results as promise, so
the importer can act at the end of the process and:
- zoom only to the imported data (in case the layer already as some)
- display a counter of imported data when import is successfull
- display an alert when nothing has been imported

cf #564
2024-12-12 21:52:54 +01:00
Yohan Boniface
8db974b96a chore: more logs in the ajax proxy validate url
This should only be used in localhost, but there are a bunch of
check and it's often that we need to add print to understand why
the URL does not validate, which is usually an issue with the SITE_URL
or this kind. So let's make those print permanent.
2024-12-12 21:06:09 +01:00
Yohan Boniface
dd89984e28
fix: make sure we set X-DataLayer-Version even when using X-Accel-Redirect (#2361)
Some checks are pending
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
2024-12-12 18:20:14 +01:00
Yohan Boniface
86c634db28 fix: make sure we set X-DataLayer-Version even when using X-Accel-Redirect 2024-12-12 18:19:02 +01:00
Yohan Boniface
a574db73e5
chore: review empty_trash command (#2360)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
- do not try to print map.id after delete (it's None)
- rely on date instead of minutes/microseconds
2024-12-12 16:32:34 +01:00
Yohan Boniface
5d0b7dff4c chore: review empty_trash command
- do not try to print map.id after delete (it's None)
- rely on date instead of minutes/microseconds
2024-12-12 13:47:40 +01:00
Yohan Boniface
b40b4e6306 changelog
Some checks are pending
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
2024-12-11 20:01:26 +01:00
Yohan Boniface
ddfef9cbe7 2.8.0a1 2024-12-11 19:25:10 +01:00
Yohan Boniface
e372b6410e
chore: make S3 dependencies optional (#2359) 2024-12-11 19:23:39 +01:00
Yohan Boniface
dc93ec99e8 chore: add s3 dependencies to Docker install 2024-12-11 19:21:05 +01:00
Yohan Boniface
8b65674e0a chore: make S3 dependencies optional 2024-12-11 19:16:17 +01:00
Yohan Boniface
c25ee5e29c changelog 2024-12-11 18:44:32 +01:00
Yohan Boniface
8f9ee89d18 2.8.0a0 2024-12-11 18:40:35 +01:00
Yohan Boniface
5370c9311a i18n 2024-12-11 18:16:31 +01:00
Yohan Boniface
eebef3420a
feat: add elevation gain and loss in extended properties (#2343)
![image](https://github.com/user-attachments/assets/c6a330e2-b981-4603-aa29-e70885a6f4fe)
2024-12-11 17:56:15 +01:00
Yohan Boniface
80ff4ed899
feat: move labelKey field on the top datalayer form (#2350)
fix #2331
2024-12-11 17:49:24 +01:00
Yohan Boniface
c41bf9129d
feat: display wikipedia link in OSM popup template when possible (#2358)
![image](https://github.com/user-attachments/assets/b22fd52e-1dfc-48f5-9f9e-0db12bf87fbe)

(And move popup related CSS to a dedicated file.)

cf #661
2024-12-11 17:48:40 +01:00
Yohan Boniface
c45c235ffe
feat: support storing layer data in S3 like servers (#2304)
This adds two now storage classes, `UmapFileSystem` and `UmapS3`.

The first class now handle the current storage behaviour (which was in
the DataLayer class), and the second one the S3 support.

Todo:

- [x] unit tests for the S3 class
- [x] understand how to deal with gzip in S3
- [x] clone

fix #2290
2024-12-11 17:46:19 +01:00
Yohan Boniface
c4ded4404e feat: display wikipedia link in OpenStreetMap popup template 2024-12-11 16:09:13 +01:00
Yohan Boniface
71389edca7 chore: move popup related CSS to a separate file 2024-12-11 16:08:29 +01:00
Yohan Boniface
8fb3c27445 fixup: properly read gzipped content from S3
We did not find a native way to do this from django-storages API.
2024-12-10 19:03:19 +01:00
Yohan Boniface
47524dacce chore: cache DataLayer._reference_version
Prevent to send a HEAD request head time to S3 (when using S3)
2024-12-10 19:03:19 +01:00
David Larlet
834970b725 chore: add command to migrate from fs to S3 2024-12-10 19:03:19 +01:00
David Larlet
14e74d15c1 chore: always gzip geojson in S3 storage 2024-12-10 19:03:19 +01:00
Yohan Boniface
1ac9a06195 chore: do not fail if S3 bucket does not handle versions
And mention the need of activating versioning in the doc.
2024-12-10 19:03:19 +01:00
Yohan Boniface
249367fd3a chore: install s3 dep for develop/CI 2024-12-10 19:03:19 +01:00
Yohan Boniface
81fa31f50b chore: add basic tests for S3 storage 2024-12-10 19:03:19 +01:00
Yohan Boniface
a04624c4c8 feat: support storing layer data in S3 like servers
fix #2290
2024-12-10 18:51:58 +01:00
Yohan Boniface
82b81706ab chore: add missing migration for new share_status values
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
2024-12-10 17:54:58 +01:00
Yohan Boniface
73e7f60cdf
feat: introduce Map.share_status=DRAFT and DELETED (#2357)
This PR introduce two new share_status: `DRAFT` and `DELETED`.

So all status are now:

        (DRAFT, _("Draft (private)")),
        (PUBLIC, _("Everyone (public)")),
        (OPEN, _("Anyone with link")),
        (PRIVATE, _("Editors and team only")),
        (BLOCKED, _("Blocked")),
        (DELETED, _("Deleted")),

Here are the impact of such introduction, on the draft side:
- by default maps are now create in draft status, and they are not
visible from others than owner (or collaborators if any); this can be
changed for a given instance with the setting
`UMAP_DEFAULT_SHARE_STATUS`
- now even anonymous owned maps have a share status, given one of the
goals is to make a better distinction between maps ready to be shared
and other, this also apply to maps without logged in owners

![image](https://github.com/user-attachments/assets/41dae9fe-0ae6-4ada-ace3-dc782c6cf972)
- when the map in in draft mode, the "Save" button on the frontend says
"Save draft", so to make the state clear

![image](https://github.com/user-attachments/assets/ca2ffb79-17fa-4a1c-9e81-a759c2a415a1)
- now the visibility of the map is immediately visible on the top bar
(while before this was only displayed after first save)

![image](https://github.com/user-attachments/assets/3d9efa86-3fac-4150-b01e-b7f1ea79114b)

Note: add the end `DRAFT` and `PRIVATE` are very similar, but I made the
choice to keep the two, so one can still distinguish their draft maps
from their ready map they want to keep private.

On the delete side:
- when deleting a map, it's now set as `share_status=DELETED`, which act
as a sort of trash; so it become easier to recover a map, with it's full
datalayers, etc. (the only thing which will not be restored is the
previous share_status, which should be draft again after a restore; the
restore function itself is not implemented)
- there is a new command `empty_trash` which delete for real maps in
DELETED status and with last_modified > 30 days (by default, can be
changed with a command line argument)
- deleted maps disappear from all views: home, search, dashboard…
- in the future, we could create a new view "My Trash", where one could
see their deleted map not yet deleted for real (and that should be the
opportunity to also add the `restore` function, which for now can be
done by simply changing the share_status from the shell or the admin)
- all the purgatory related code has been removed

fix #2207
2024-12-10 17:48:08 +01:00