mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #22570 from mvdbeek/worktree-webdav-template-migration
Restore WebDAV template v0; add v1 for url -> base_url rename
This commit is contained in:
@@ -1,6 +1,49 @@
|
||||
- id: webdav
|
||||
version: 0
|
||||
name: WebDAV (e.g. Nextcloud, Owncloud, Opencloud)
|
||||
description: |
|
||||
The WebDAV protocol is a simple way to access files over the internet. Here, you can connect to any WebDAV server.
|
||||
variables:
|
||||
url:
|
||||
label: Server Domain (e.g. https://myowncloud.org)
|
||||
type: string
|
||||
help: |
|
||||
The domain of the WebDAV server you are connecting to. This should be the full URL
|
||||
including the protocol (http or https) and the domain name.
|
||||
root:
|
||||
label: WebDAV server Path (e.g., /a/sub/path/remote.php/webdav, /remote.php/dav/files/username)
|
||||
type: string
|
||||
help: |
|
||||
The full server path to the WebDAV service.
|
||||
login:
|
||||
label: Username
|
||||
type: string
|
||||
help: |
|
||||
The username to use to connect to the WebDAV server. This should be the username you use
|
||||
to log in to the WebDAV server.
|
||||
writable:
|
||||
label: Writable?
|
||||
type: boolean
|
||||
optional: true
|
||||
default: false
|
||||
help: Allow Galaxy to write data to this WebDAV server.
|
||||
secrets:
|
||||
password:
|
||||
label: Password
|
||||
help: |
|
||||
The password to use to connect to the WebDAV server. This should be the password you use
|
||||
to log in to the WebDAV server.
|
||||
configuration:
|
||||
type: webdav
|
||||
url: '{{ variables.url }}'
|
||||
root: '{{ variables.root }}'
|
||||
login: '{{ variables.login }}'
|
||||
writable: '{{ variables.writable }}'
|
||||
password: '{{ secrets.password }}'
|
||||
|
||||
- id: webdav
|
||||
version: 1
|
||||
name: WebDAV (e.g. Nextcloud, Owncloud, Opencloud)
|
||||
description: |
|
||||
The WebDAV protocol is a simple way to access files over the internet. Here, you can connect to any WebDAV server.
|
||||
variables:
|
||||
@@ -40,4 +83,3 @@
|
||||
login: '{{ variables.login }}'
|
||||
writable: '{{ variables.writable }}'
|
||||
password: '{{ secrets.password }}'
|
||||
|
||||
@@ -268,8 +268,9 @@ class WebdavConfigMixin:
|
||||
@model_validator(mode="before")
|
||||
@classmethod
|
||||
def ensure_base_url(cls, data: Any) -> Any:
|
||||
# Keep persisted user file sources created before the WebDAV
|
||||
# url -> base_url rename loadable in the preferences UI.
|
||||
# Accept the version-0 WebDAV template's `url` field as an alias of
|
||||
# `base_url` so that v0 templates and any persisted v0 rendered configs
|
||||
# continue to validate after the rename.
|
||||
if isinstance(data, dict) and "base_url" not in data and "url" in data:
|
||||
data = dict(data)
|
||||
data["base_url"] = data.pop("url")
|
||||
|
||||
Reference in New Issue
Block a user