feat(xo-web/settings/remotes): type defaults to NFS (#3114)

Fixes #3103
This commit is contained in:
Julien Fontanet
2018-06-27 17:04:55 +02:00
committed by GitHub
parent 989d27154d
commit 05d10ef985
2 changed files with 27 additions and 26 deletions

View File

@@ -17,6 +17,7 @@
- [Backup NG form] Ability to enable/disable a schedule [#3062](https://github.com/vatesfr/xen-orchestra/issues/3062)
- New backup/health view with non-existent backup snapshots table [#3090](https://github.com/vatesfr/xen-orchestra/issues/3090)
- Disable cancel/destroy tasks when not allowed [#3076](https://github.com/vatesfr/xen-orchestra/issues/3076)
- Default remote type is NFS [#3103](https://github.com/vatesfr/xen-orchestra/issues/3103) (PR [#3114](https://github.com/vatesfr/xen-orchestra/pull/3114))
### Bugs

View File

@@ -216,26 +216,26 @@ const INDIVIDUAL_ACTIONS = [
answer =>
answer.success
? alert(
<span>
<Icon icon='success' />{' '}
{_('remoteTestSuccess', { name: remote.name })}
</span>,
_('remoteTestSuccessMessage')
)
<span>
<Icon icon='success' />{' '}
{_('remoteTestSuccess', { name: remote.name })}
</span>,
_('remoteTestSuccessMessage')
)
: alert(
<span>
<Icon icon='error' />{' '}
{_('remoteTestFailure', { name: remote.name })}
</span>,
<p>
<dl className='dl-horizontal'>
<dt>{_('remoteTestError')}</dt>
<dd>{answer.error}</dd>
<dt>{_('remoteTestStep')}</dt>
<dd>{answer.step}</dd>
</dl>
</p>
)
<span>
<Icon icon='error' />{' '}
{_('remoteTestFailure', { name: remote.name })}
</span>,
<p>
<dl className='dl-horizontal'>
<dt>{_('remoteTestError')}</dt>
<dd>{answer.error}</dd>
<dt>{_('remoteTestStep')}</dt>
<dd>{answer.step}</dd>
</dl>
</p>
)
),
icon: 'diagnosis',
label: _('remoteTestTip'),
@@ -272,7 +272,7 @@ export default class Remotes extends Component {
constructor (props) {
super(props)
this.state = {
type: 'file',
type: 'nfs',
}
}
@@ -283,11 +283,11 @@ export default class Remotes extends Component {
some(values, ['name', this.refs.name.value])
)
? alert(
<span>
<Icon icon='error' /> {_('remoteTestName')}
</span>,
<p>{_('remoteTestNameFailure')}</p>
)
<span>
<Icon icon='error' /> {_('remoteTestName')}
</span>,
<p>{_('remoteTestNameFailure')}</p>
)
: this._createRemote()
_createRemote = async () => {
@@ -306,7 +306,7 @@ export default class Remotes extends Component {
const url = format(urlParams)
return createRemote(name && name.value, url).then(
() => {
this.setState({ type: 'file' })
this.setState({ type: 'nfs' })
path && (path.value = '')
username && (username.value = '')
password && (password.value = '')