Skip to content

Commit

Permalink
feat(xo-web/proxy): ability to open support tunnel on XO Proxy (#7127)
Browse files Browse the repository at this point in the history
Requires #7126
  • Loading branch information
pdonias committed Oct 25, 2023
1 parent f14f716 commit 339d920
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [Dashboard/Health] Displays number of VDIs to coalesce (PR [#7111](https://github.com/vatesfr/xen-orchestra/pull/7111))
- [Self] Show number of VMs that belong to each Resource Set (PR [#7114](https://github.com/vatesfr/xen-orchestra/pull/7114))
- [About] For source users, display if their XO is up to date [#5934](https://github.com/vatesfr/xen-orchestra/issues/5934) (PR [#7091](https://github.com/vatesfr/xen-orchestra/pull/7091))
- [Proxy] Ability to open support tunnel on XO Proxy (PRs [#7126](https://github.com/vatesfr/xen-orchestra/pull/7126) [#7127](https://github.com/vatesfr/xen-orchestra/pull/7127))

### Bug fixes

Expand Down
5 changes: 5 additions & 0 deletions packages/xo-web/src/common/xo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3631,6 +3631,11 @@ export const destroyProxyAppliances = proxies =>
export const upgradeProxyAppliance = (proxy, props) =>
_call('proxy.upgradeAppliance', { id: resolveId(proxy), ...props })

export const openTunnelOnProxy = async proxy => {
const result = await _call('proxy.openSupportTunnel', { id: resolveId(proxy) }).catch(err => err.message)
await alert(_('supportTunnel'), <pre>{result}</pre>)
}

export const getProxyApplianceUpdaterState = id => _call('proxy.getApplianceUpdaterState', { id })

export const updateProxyApplianceSettings = (id, props) => _call('proxy.updateApplianceSettings', { id, ...props })
Expand Down
8 changes: 8 additions & 0 deletions packages/xo-web/src/xo-app/proxies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
forgetProxyAppliances,
getLicenses,
getProxyApplianceUpdaterState,
openTunnelOnProxy,
registerProxy,
subscribeProxies,
upgradeProxyAppliance,
Expand Down Expand Up @@ -112,6 +113,13 @@ const INDIVIDUAL_ACTIONS = [
label: _('forceUpgrade'),
level: 'primary',
},
{
collapsed: true,
handler: proxy => openTunnelOnProxy(proxy),
icon: 'open-tunnel',
label: _('openTunnel'),
level: 'primary',
},
{
handler: ({ id }, { router }) =>
router.push({
Expand Down

0 comments on commit 339d920

Please sign in to comment.