mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Warn if UI won't update due to SignalR errors
This commit is contained in:
parent
9c64ba6cbd
commit
4fd772f62b
4 changed files with 47 additions and 8 deletions
24
frontend/src/Store/Selectors/createHealthCheckSelector.js
Normal file
24
frontend/src/Store/Selectors/createHealthCheckSelector.js
Normal file
|
@ -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://github.com/Lidarr/Lidarr/wiki/Health-Checks#could-not-connect-to-signalr'
|
||||
});
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export default createHealthCheckSelector;
|
Loading…
Add table
Add a link
Reference in a new issue