1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-18 21:35:27 -04:00

Use react-query for Health UI

This commit is contained in:
Mark McDowall
2025-10-21 20:31:12 -07:00
parent 9bc9d6d400
commit 0552a81180
7 changed files with 36 additions and 59 deletions
@@ -18,13 +18,6 @@ const backupsSection = 'system.backups';
// State
export const defaultState = {
health: {
isFetching: false,
isPopulated: false,
error: null,
items: []
},
diskSpace: {
isFetching: false,
isPopulated: false,
@@ -61,7 +54,6 @@ export const defaultState = {
//
// Actions Types
export const FETCH_HEALTH = 'system/health/fetchHealth';
export const FETCH_DISK_SPACE = 'system/diskSpace/fetchDiskSPace';
export const FETCH_TASK = 'system/tasks/fetchTask';
@@ -78,7 +70,6 @@ export const SHUTDOWN = 'system/shutdown';
//
// Action Creators
export const fetchHealth = createThunk(FETCH_HEALTH);
export const fetchDiskSpace = createThunk(FETCH_DISK_SPACE);
export const fetchTask = createThunk(FETCH_TASK);
@@ -96,7 +87,6 @@ export const shutdown = createThunk(SHUTDOWN);
// Action Handlers
export const actionHandlers = handleThunks({
[FETCH_HEALTH]: createFetchHandler('system.health', '/health'),
[FETCH_DISK_SPACE]: createFetchHandler('system.diskSpace', '/diskspace'),
[FETCH_TASK]: createFetchHandler('system.tasks', '/system/task'),
[FETCH_TASKS]: createFetchHandler('system.tasks', '/system/task'),