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:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user