You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
590 B
25 lines
590 B
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/lidarr/system#could-not-connect-to-signalr'
|
|
});
|
|
}
|
|
|
|
return items;
|
|
}
|
|
);
|
|
}
|
|
|
|
export default createHealthCheckSelector;
|