Stats Page Foundation with Chart.js

This commit is contained in:
Qstick
2021-01-09 00:04:55 -05:00
parent 76c271fab0
commit 88d1a3db6f
15 changed files with 394 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import * as customFilters from './customFilterActions';
import * as history from './historyActions';
import * as indexers from './indexerActions';
import * as indexerIndex from './indexerIndexActions';
import * as indexerStats from './indexerStatsActions';
import * as movies from './movieActions';
import * as oAuth from './oAuthActions';
import * as paths from './pathActions';
@@ -27,6 +28,7 @@ export default [
movies,
indexers,
indexerIndex,
indexerStats,
settings,
system,
tags

View File

@@ -0,0 +1,46 @@
import { createThunk, handleThunks } from 'Store/thunks';
import createFetchHandler from './Creators/createFetchHandler';
import createHandleActions from './Creators/createHandleActions';
//
// Variables
export const section = 'indexerStats';
//
// State
export const defaultState = {
isFetching: false,
isPopulated: false,
error: null,
items: [],
details: {
isFetching: false,
isPopulated: false,
error: null,
items: []
}
};
//
// Actions Types
export const FETCH_INDEXER_STATS = 'indexerStats/fetchIndexerStats';
//
// Action Creators
export const fetchIndexerStats = createThunk(FETCH_INDEXER_STATS);
//
// Action Handlers
export const actionHandlers = handleThunks({
[FETCH_INDEXER_STATS]: createFetchHandler(section, '/indexerStats')
});
//
// Reducers
export const reducers = createHandleActions({}, defaultState, section);