-
Notifications
You must be signed in to change notification settings - Fork 265
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/menu): add warning icon in proxies menu #7237
Conversation
dfe6eea
to
4876663
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this code will not work in all error cases. If the proxy is unreachable, we won't be able to determine its state.
For that you have to add some code in the subscribeProxiesApplianceUpdaterState
subscription, or directly to the getProxyApplianceUpdaterState
method in src/common/xo/index.js
.
// src/common/xo/index.js#subscribeProxiesApplianceUpdaterState
...
if (proxiesApplianceUpdaterState[proxyId] === undefined) {
proxiesApplianceUpdaterState[proxyId] = createSubscription(async () => {
try {
return await getProxyApplianceUpdaterState(proxyId)
} catch (error) {
console.error(error)
return { state: 'error' }
}
})
}
...
Or
export const getProxyApplianceUpdaterState = async (id) => {
try {
return await _call('proxy.getApplianceUpdaterState', { id })
} catch (error) {
console.error(error)
return { state: 'error' }
}
}
364fd0a
to
bddc276
Compare
3e331a3
to
6c0b768
Compare
a654df7
to
b7b47eb
Compare
b7b47eb
to
16c9761
Compare
16c9761
to
b60a9fc
Compare
See Zammad#19126
Description
Add a warning icon in Proxies menu if unable to check proxy upgrade
Screenshot
Checklist
Fixes #007
,See xoa-support#42
,See https://...
)Introduced by
CHANGELOG.unreleased.md