feat(xo-web/dashboard/overview): display 'Report' for admin only (#4126)
Fixes #4123
This commit is contained in:
parent
916ca5576a
commit
5edee4bae0
@ -6,6 +6,7 @@
|
||||
- [Backup/Schedule] Add warning regarding DST when you add a schedule [#4042](https://github.com/vatesfr/xen-orchestra/issues/4042) (PR [#4056](https://github.com/vatesfr/xen-orchestra/pull/4056))
|
||||
- [Import] Avoid blocking the UI when dropping a big OVA file on the UI (PR [#4018](https://github.com/vatesfr/xen-orchestra/pull/4018))
|
||||
- [Backup NG/Overview] Make backup list title clearer [#4111](https://github.com/vatesfr/xen-orchestra/issues/4111) (PR [#4129](https://github.com/vatesfr/xen-orchestra/pull/4129))
|
||||
- [Dashboard] Hide "Report" section for non-admins [#4123](https://github.com/vatesfr/xen-orchestra/issues/4123) (PR [#4126](https://github.com/vatesfr/xen-orchestra/pull/4126))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -489,35 +489,37 @@ class DefaultCard extends Component {
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<Icon icon='menu-dashboard-stats' /> {_('dashboardReport')}
|
||||
</CardHeader>
|
||||
<CardBlock className='text-xs-center'>
|
||||
<ActionButton
|
||||
btnStyle='primary'
|
||||
disabled={!canSendTheReport}
|
||||
handler={sendUsageReport}
|
||||
icon=''
|
||||
>
|
||||
{_('dashboardSendReport')}
|
||||
</ActionButton>
|
||||
<br />
|
||||
{!canSendTheReport && (
|
||||
<span>
|
||||
<Link to='/settings/plugins' className='text-info'>
|
||||
<Icon icon='info' /> {_('dashboardSendReportInfo')}
|
||||
</Link>
|
||||
<br />
|
||||
</span>
|
||||
)}
|
||||
{_('dashboardSendReportMessage')}
|
||||
</CardBlock>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
{props.isAdmin && (
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<Icon icon='menu-dashboard-stats' /> {_('dashboardReport')}
|
||||
</CardHeader>
|
||||
<CardBlock className='text-xs-center'>
|
||||
<ActionButton
|
||||
btnStyle='primary'
|
||||
disabled={!canSendTheReport}
|
||||
handler={sendUsageReport}
|
||||
icon=''
|
||||
>
|
||||
{_('dashboardSendReport')}
|
||||
</ActionButton>
|
||||
<br />
|
||||
{!canSendTheReport && (
|
||||
<span>
|
||||
<Link to='/settings/plugins' className='text-info'>
|
||||
<Icon icon='info' /> {_('dashboardSendReportInfo')}
|
||||
</Link>
|
||||
<br />
|
||||
</span>
|
||||
)}
|
||||
{_('dashboardSendReportMessage')}
|
||||
</CardBlock>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
)}
|
||||
<Row>
|
||||
<Col>
|
||||
<PatchesCard hosts={this._getHosts()} />
|
||||
|
Loading…
Reference in New Issue
Block a user