mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-26 08:16:10 +08:00
Show error alert when data is not available
This commit is contained in:
@@ -8,6 +8,7 @@ import { RedisInfo } from "../api";
|
||||
|
||||
interface RedisInfoState {
|
||||
loading: boolean;
|
||||
error: string;
|
||||
address: string;
|
||||
data: RedisInfo | null;
|
||||
rawData: string | null;
|
||||
@@ -15,6 +16,7 @@ interface RedisInfoState {
|
||||
|
||||
const initialState: RedisInfoState = {
|
||||
loading: false,
|
||||
error: "",
|
||||
address: "",
|
||||
data: null,
|
||||
rawData: null,
|
||||
@@ -35,11 +37,13 @@ export default function redisInfoReducer(
|
||||
return {
|
||||
...state,
|
||||
loading: false,
|
||||
error: action.error,
|
||||
};
|
||||
|
||||
case GET_REDIS_INFO_SUCCESS:
|
||||
return {
|
||||
loading: false,
|
||||
error: "",
|
||||
address: action.payload.address,
|
||||
data: action.payload.info,
|
||||
rawData: action.payload.raw_info,
|
||||
|
||||
Reference in New Issue
Block a user