fix(xo-web/remotes): fix editing bucket and directory for S3 (#5276)
This commit is contained in:
parent
ccd34c1610
commit
f755365e23
@ -22,6 +22,7 @@
|
|||||||
- [API] Fix `this.removeSubjectFromResourceSet is not a function` error on calling `resourceSet.removeSubject` via `xo-cli` [#5265](https://github.com/vatesfr/xen-orchestra/issues/5265) (PR [#5266](https://github.com/vatesfr/xen-orchestra/pull/5266))
|
- [API] Fix `this.removeSubjectFromResourceSet is not a function` error on calling `resourceSet.removeSubject` via `xo-cli` [#5265](https://github.com/vatesfr/xen-orchestra/issues/5265) (PR [#5266](https://github.com/vatesfr/xen-orchestra/pull/5266))
|
||||||
- [Import OVA] Fix frozen UI when dropping a big OVA on the page (PR [#5274](https://github.com/vatesfr/xen-orchestra/pull/5274))
|
- [Import OVA] Fix frozen UI when dropping a big OVA on the page (PR [#5274](https://github.com/vatesfr/xen-orchestra/pull/5274))
|
||||||
- [Remotes/S3] Fix S3 backup of 50GB+ files [#5197](https://github.com/vatesfr/xen-orchestra/issues/5197) (PR[ #5242](https://github.com/vatesfr/xen-orchestra/pull/5242) )
|
- [Remotes/S3] Fix S3 backup of 50GB+ files [#5197](https://github.com/vatesfr/xen-orchestra/issues/5197) (PR[ #5242](https://github.com/vatesfr/xen-orchestra/pull/5242) )
|
||||||
|
- [Remotes] Fix editing bucket and directory for S3 remotes [#5233](https://github.com/vatesfr/xen-orchestra/issues/5233) (PR [5276](https://github.com/vatesfr/xen-orchestra/pull/5276))
|
||||||
|
|
||||||
### Packages to release
|
### Packages to release
|
||||||
|
|
||||||
|
@ -56,12 +56,20 @@ export default decorate([
|
|||||||
name,
|
name,
|
||||||
options = remote.options || '',
|
options = remote.options || '',
|
||||||
password = remote.password,
|
password = remote.password,
|
||||||
path = remote.path,
|
|
||||||
port = remote.port,
|
port = remote.port,
|
||||||
proxyId = remote.proxy,
|
proxyId = remote.proxy,
|
||||||
type = remote.type,
|
type = remote.type,
|
||||||
username = remote.username,
|
username = remote.username,
|
||||||
} = state
|
} = state
|
||||||
|
let { path = remote.path } = state
|
||||||
|
if (type === 's3') {
|
||||||
|
const {
|
||||||
|
parsedPath,
|
||||||
|
bucket = parsedPath.split('/')[0],
|
||||||
|
directory = parsedPath.split('/')[1],
|
||||||
|
} = state
|
||||||
|
path = bucket + '/' + directory
|
||||||
|
}
|
||||||
return editRemote(remote, {
|
return editRemote(remote, {
|
||||||
name,
|
name,
|
||||||
url: format({
|
url: format({
|
||||||
@ -96,8 +104,6 @@ export default decorate([
|
|||||||
path,
|
path,
|
||||||
port,
|
port,
|
||||||
proxyId,
|
proxyId,
|
||||||
bucket,
|
|
||||||
directory,
|
|
||||||
type = 'nfs',
|
type = 'nfs',
|
||||||
username,
|
username,
|
||||||
} = state
|
} = state
|
||||||
@ -109,6 +115,7 @@ export default decorate([
|
|||||||
type,
|
type,
|
||||||
}
|
}
|
||||||
if (type === 's3') {
|
if (type === 's3') {
|
||||||
|
const { bucket, directory } = state
|
||||||
urlParams.path = bucket + '/' + directory
|
urlParams.path = bucket + '/' + directory
|
||||||
}
|
}
|
||||||
username && (urlParams.username = username)
|
username && (urlParams.username = username)
|
||||||
@ -150,9 +157,9 @@ export default decorate([
|
|||||||
password = remote.password || '',
|
password = remote.password || '',
|
||||||
parsedPath,
|
parsedPath,
|
||||||
path = parsedPath || '',
|
path = parsedPath || '',
|
||||||
parsedBucket = parsedPath && parsedPath.split('/')[0],
|
parsedBucket = parsedPath != null && parsedPath.split('/')[0],
|
||||||
bucket = parsedBucket || '',
|
bucket = parsedBucket || '',
|
||||||
parsedDirectory,
|
parsedDirectory = parsedPath != null && parsedPath.split('/')[1],
|
||||||
directory = parsedDirectory || '',
|
directory = parsedDirectory || '',
|
||||||
port = remote.port,
|
port = remote.port,
|
||||||
proxyId = remote.proxy,
|
proxyId = remote.proxy,
|
||||||
|
Loading…
Reference in New Issue
Block a user