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 9c64ba6cbd
commit 4fd772f62b
4 changed files with 47 additions and 8 deletions

View file

@ -2,20 +2,21 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import createHealthCheckSelector from 'Store/Selectors/createHealthCheckSelector';
import { fetchHealth } from 'Store/Actions/systemActions';
import { testAllDownloadClients, testAllIndexers } from 'Store/Actions/settingsActions';
import Health from './Health';
function createMapStateToProps() {
return createSelector(
createHealthCheckSelector(),
(state) => state.system.health,
(state) => state.settings.downloadClients.isTestingAll,
(state) => state.settings.indexers.isTestingAll,
(health, isTestingAllDownloadClients, isTestingAllIndexers) => {
(items, health, isTestingAllDownloadClients, isTestingAllIndexers) => {
const {
isFetching,
isPopulated,
items
isPopulated
} = health;
return {

View file

@ -2,19 +2,21 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import createHealthCheckSelector from 'Store/Selectors/createHealthCheckSelector';
import { fetchHealth } from 'Store/Actions/systemActions';
import PageSidebarStatus from 'Components/Page/Sidebar/PageSidebarStatus';
function createMapStateToProps() {
return createSelector(
(state) => state.app,
createHealthCheckSelector(),
(state) => state.system.health,
(app, health) => {
const count = health.items.length;
(app, items, health) => {
const count = items.length;
let errors = false;
let warnings = false;
health.items.forEach((item) => {
items.forEach((item) => {
if (item.type === 'error') {
errors = true;
}