-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(xo-web/backup): UI mirror backup implementation (#6858)
See #6854
- Loading branch information
Showing
14 changed files
with
649 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
packages/xo-web/src/xo-app/backup/new/healthCheck/ScheduleHealthCheck.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import _ from 'intl' | ||
import Icon from 'icon' | ||
import React from 'react' | ||
import Tags from 'tags' | ||
import { conditionalTooltip } from 'tooltip' | ||
import { getXoaPlan, ENTERPRISE } from 'xoa-plans' | ||
import { SelectSr } from 'select-objects' | ||
|
||
import { FormGroup } from '../../utils' | ||
|
||
const ScheduleHealthCheck = ({ schedule, toggleHealthCheck, setHealthCheckTags, setHealthCheckSr }) => ( | ||
<FormGroup> | ||
<label> | ||
<strong> | ||
<a | ||
className='text-info' | ||
rel='noreferrer' | ||
href='https://xen-orchestra.com/docs/backups.html#backup-health-check' | ||
target='_blank' | ||
> | ||
<Icon icon='info' /> | ||
</a>{' '} | ||
{_('healthCheck')} | ||
</strong>{' '} | ||
{conditionalTooltip( | ||
<input | ||
type='checkbox' | ||
checked={schedule.healthCheckVmsWithTags !== undefined} | ||
disabled={getXoaPlan().value < ENTERPRISE.value} | ||
onChange={toggleHealthCheck} | ||
name='healthCheck' | ||
/>, | ||
getXoaPlan().value < ENTERPRISE.value ? _('healthCheckAvailableEnterpriseUser') : undefined | ||
)} | ||
</label> | ||
{schedule.healthCheckVmsWithTags !== undefined && ( | ||
<div className='mb-2'> | ||
<strong>{_('vmsTags')}</strong> | ||
<br /> | ||
<em> | ||
<Icon icon='info' /> {_('healthCheckTagsInfo')} | ||
</em> | ||
<p className='h2'> | ||
<Tags labels={schedule.healthCheckVmsWithTags} onChange={setHealthCheckTags} /> | ||
</p> | ||
<strong>{_('healthCheckChooseSr')}</strong> | ||
<SelectSr | ||
onChange={setHealthCheckSr} | ||
placeholder={_('healthCheckChooseSr')} | ||
required | ||
value={schedule.healthCheckSr} | ||
/> | ||
</div> | ||
)} | ||
</FormGroup> | ||
) | ||
|
||
export default ScheduleHealthCheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.