New: Warn if UI won't update due to SignalR errors

This commit is contained in:
ta264
2020-05-18 21:36:48 +01:00
committed by Qstick
parent 786247e9bc
commit 44d73f3e7e
4 changed files with 47 additions and 8 deletions
@@ -0,0 +1,24 @@
import { createSelector } from 'reselect';
function createHealthCheckSelector() {
return createSelector(
(state) => state.system.health,
(state) => state.app,
(health, app) => {
const items = [...health.items];
if (!app.isConnected) {
items.push({
source: 'UI',
type: 'warning',
message: 'Could not connect to SignalR, UI won\'t update',
wikiUrl: 'https://wiki.servarr.com/Readarr_System#could_not_connect_to_signalr'
});
}
return items;
}
);
}
export default createHealthCheckSelector;