Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(xo-web/proxy): ability to open support tunnel on XO Proxy #7127

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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),
MathieuRA marked this conversation as resolved.
Show resolved Hide resolved
icon: 'open-tunnel',
label: _('openTunnel'),
level: 'primary',
},
{
handler: ({ id }, { router }) =>
router.push({
Expand Down
Loading