parent
0034f0a1d3
commit
ce35bbaeb4
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
|
- [Remotes] Fix "undefined" mount option issue [#3361](https://github.com/vatesfr/xen-orchestra/issues/3361) (PR [#3363](https://github.com/vatesfr/xen-orchestra/pull/3363))
|
||||||
|
|
||||||
### Released packages
|
### Released packages
|
||||||
|
|
||||||
- xo-server v5.26.0
|
- xo-server v5.26.0
|
||||||
|
@ -89,13 +89,16 @@ export default class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async createRemote ({ name, url, options }) {
|
async createRemote ({ name, url, options }) {
|
||||||
const remote = await this._remotes.add({
|
const params = {
|
||||||
name,
|
name,
|
||||||
url,
|
url,
|
||||||
options,
|
|
||||||
enabled: false,
|
enabled: false,
|
||||||
error: '',
|
error: '',
|
||||||
})
|
}
|
||||||
|
if (options !== undefined) {
|
||||||
|
params.options = options
|
||||||
|
}
|
||||||
|
const remote = await this._remotes.add(params)
|
||||||
return /* await */ this.updateRemote(remote.get('id'), { enabled: true })
|
return /* await */ this.updateRemote(remote.get('id'), { enabled: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ export default [
|
|||||||
domain = remote.domain,
|
domain = remote.domain,
|
||||||
host = remote.host,
|
host = remote.host,
|
||||||
name,
|
name,
|
||||||
options = remote.options,
|
options = remote.options || '',
|
||||||
password = remote.password,
|
password = remote.password,
|
||||||
path = remote.path,
|
path = remote.path,
|
||||||
port = remote.port,
|
port = remote.port,
|
||||||
@ -64,7 +64,7 @@ export default [
|
|||||||
type,
|
type,
|
||||||
username,
|
username,
|
||||||
}),
|
}),
|
||||||
options,
|
options: options !== '' ? options : null,
|
||||||
}).then(reset)
|
}).then(reset)
|
||||||
},
|
},
|
||||||
createRemote: ({ reset }) => async (state, { remotes }) => {
|
createRemote: ({ reset }) => async (state, { remotes }) => {
|
||||||
@ -107,7 +107,7 @@ export default [
|
|||||||
}
|
}
|
||||||
|
|
||||||
const url = format(urlParams)
|
const url = format(urlParams)
|
||||||
return createRemote(name, url, options)
|
return createRemote(name, url, options !== '' ? options : undefined)
|
||||||
.then(reset)
|
.then(reset)
|
||||||
.catch(err => error('Create Remote', err.message || String(err)))
|
.catch(err => error('Create Remote', err.message || String(err)))
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user