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))
|
- [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))
|
- [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))
|
- [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
|
### Bug fixes
|
||||||
|
|
||||||
|
@ -240,6 +240,8 @@ const messages = {
|
|||||||
xoaCheck: 'XOA check',
|
xoaCheck: 'XOA check',
|
||||||
closeTunnel: 'Close tunnel',
|
closeTunnel: 'Close tunnel',
|
||||||
createSupportTicket: 'Create a support ticket',
|
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',
|
openTunnel: 'Open tunnel',
|
||||||
supportCommunity: 'The XOA check and the support tunnel are available in XOA.',
|
supportCommunity: 'The XOA check and the support tunnel are available in XOA.',
|
||||||
supportTunnel: 'Support tunnel',
|
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 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 --------------------------------------------------------------------
|
// Proxy --------------------------------------------------------------------
|
||||||
|
|
||||||
export const getAllProxies = () => _call('proxy.getAll')
|
export const getAllProxies = () => _call('proxy.getAll')
|
||||||
|
@ -1239,6 +1239,10 @@
|
|||||||
@extend .fa;
|
@extend .fa;
|
||||||
@extend .fa-cloud-upload;
|
@extend .fa-cloud-upload;
|
||||||
}
|
}
|
||||||
|
&-restart {
|
||||||
|
@extend .fa;
|
||||||
|
@extend .fa-refresh;
|
||||||
|
}
|
||||||
|
|
||||||
// XOSAN related
|
// XOSAN related
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import { addSubscriptions, adminOnly, getXoaPlan } from 'utils'
|
|||||||
import { Card, CardBlock, CardHeader } from 'card'
|
import { Card, CardBlock, CardHeader } from 'card'
|
||||||
import { Container, Row, Col } from 'grid'
|
import { Container, Row, Col } from 'grid'
|
||||||
import { injectState, provideState } from 'reaclette'
|
import { injectState, provideState } from 'reaclette'
|
||||||
import { closeTunnel, openTunnel, subscribeTunnelState } from 'xo'
|
import { closeTunnel, openTunnel, restartXoServer, subscribeTunnelState } from 'xo'
|
||||||
import { reportOnSupportPanel } from 'report-bug-button'
|
import { reportOnSupportPanel } from 'report-bug-button'
|
||||||
|
|
||||||
const ansiUp = new AnsiUp()
|
const ansiUp = new AnsiUp()
|
||||||
@ -43,6 +43,9 @@ const Support = decorate([
|
|||||||
<ActionButton btnStyle='primary' disabled={COMMUNITY} handler={reportOnSupportPanel} icon='ticket'>
|
<ActionButton btnStyle='primary' disabled={COMMUNITY} handler={reportOnSupportPanel} icon='ticket'>
|
||||||
{_('createSupportTicket')}
|
{_('createSupportTicket')}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
|
<ActionButton btnStyle='danger' disabled={COMMUNITY} handler={restartXoServer} icon='restart' className='ml-1'>
|
||||||
|
{_('restartXoServer')}
|
||||||
|
</ActionButton>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
Loading…
Reference in New Issue
Block a user