feat(xo-web/XOA/Support): button to restart xo-server service (#7056)
This commit is contained in:
parent
6665d6a8e6
commit
869f7ffab0
@ -14,6 +14,7 @@
|
||||
- [Host/Advanced] New button to download system logs [#3968](https://github.com/vatesfr/xen-orchestra/issues/3968) (PR [#7048](https://github.com/vatesfr/xen-orchestra/pull/7048))
|
||||
- [Home/Hosts, Pools] Display host brand and version (PR [#7027](https://github.com/vatesfr/xen-orchestra/pull/7027))
|
||||
- [SR] Ability to reclaim space [#1204](https://github.com/vatesfr/xen-orchestra/issues/1204) (PR [#7054](https://github.com/vatesfr/xen-orchestra/pull/7054))
|
||||
- [XOA] New button to restart XO Server directly from the UI (PR [#7056](https://github.com/vatesfr/xen-orchestra/pull/7056))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -240,6 +240,8 @@ const messages = {
|
||||
xoaCheck: 'XOA check',
|
||||
closeTunnel: 'Close tunnel',
|
||||
createSupportTicket: 'Create a support ticket',
|
||||
restartXoServer: 'Restart XO Server',
|
||||
restartXoServerConfirm: 'Restarting XO Server will interrupt any backup job or XO task that is currently running. Xen Orchestra will also be unavailable for a few seconds. Are you sure you want to restart XO Server?',
|
||||
openTunnel: 'Open tunnel',
|
||||
supportCommunity: 'The XOA check and the support tunnel are available in XOA.',
|
||||
supportTunnel: 'Support tunnel',
|
||||
|
@ -3454,6 +3454,19 @@ export const getApplianceInfo = () => _call('xoa.getApplianceInfo')
|
||||
|
||||
export const getApiApplianceInfo = () => fetch('./rest/v0/appliance').then(resp => resp.json())
|
||||
|
||||
export const restartXoServer = async () => {
|
||||
await confirm({
|
||||
icon: 'restart',
|
||||
title: _('restartXoServer'),
|
||||
body: _('restartXoServerConfirm'),
|
||||
strongConfirm: {
|
||||
messageId: 'restartXoServer',
|
||||
},
|
||||
})
|
||||
|
||||
await _call('xoa.restartXoServer')
|
||||
}
|
||||
|
||||
// Proxy --------------------------------------------------------------------
|
||||
|
||||
export const getAllProxies = () => _call('proxy.getAll')
|
||||
|
@ -1239,6 +1239,10 @@
|
||||
@extend .fa;
|
||||
@extend .fa-cloud-upload;
|
||||
}
|
||||
&-restart {
|
||||
@extend .fa;
|
||||
@extend .fa-refresh;
|
||||
}
|
||||
|
||||
// XOSAN related
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { addSubscriptions, adminOnly, getXoaPlan } from 'utils'
|
||||
import { Card, CardBlock, CardHeader } from 'card'
|
||||
import { Container, Row, Col } from 'grid'
|
||||
import { injectState, provideState } from 'reaclette'
|
||||
import { closeTunnel, openTunnel, subscribeTunnelState } from 'xo'
|
||||
import { closeTunnel, openTunnel, restartXoServer, subscribeTunnelState } from 'xo'
|
||||
import { reportOnSupportPanel } from 'report-bug-button'
|
||||
|
||||
const ansiUp = new AnsiUp()
|
||||
@ -43,6 +43,9 @@ const Support = decorate([
|
||||
<ActionButton btnStyle='primary' disabled={COMMUNITY} handler={reportOnSupportPanel} icon='ticket'>
|
||||
{_('createSupportTicket')}
|
||||
</ActionButton>
|
||||
<ActionButton btnStyle='danger' disabled={COMMUNITY} handler={restartXoServer} icon='restart' className='ml-1'>
|
||||
{_('restartXoServer')}
|
||||
</ActionButton>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
|
Loading…
Reference in New Issue
Block a user