sensor list
This commit is contained in:
parent
65bbc0bb06
commit
ee278a6ce3
|
@ -12,7 +12,8 @@ import readNoAuthProbeReducer from '@overflow/noauthprobe/redux/reducer/read_all
|
|||
import readAllTargetByProbeReducer from '@overflow/target/redux/reducer/readAllByProbe';
|
||||
import readTargetReducer from '@overflow/target/redux/reducer/read';
|
||||
|
||||
import readAllByTargetReducer from '@overflow/sensor/redux/reducer/read_all_by_target';
|
||||
import sensorReadAllByTargetReducer from '@overflow/sensor/redux/reducer/read_all_by_target';
|
||||
import sensorReadAllByDomainReducer from '@overflow/sensor/redux/reducer/read_all_by_domain';
|
||||
import SensorReadReducer from '@overflow/sensor/redux/reducer/read';
|
||||
import SensorItemReadAllBySensorReducer from '@overflow/sensor/redux/reducer/item_read_all_by_sensor';
|
||||
|
||||
|
@ -59,7 +60,8 @@ const reduxConfig: ReduxConfig = {
|
|||
signInReducer,
|
||||
readAllProbeReducer,
|
||||
readProbeReducer,
|
||||
readAllByTargetReducer,
|
||||
sensorReadAllByTargetReducer,
|
||||
sensorReadAllByDomainReducer,
|
||||
SensorReadReducer,
|
||||
signUpReducer,
|
||||
SensorItemReadAllBySensorReducer,
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import { ReducersMapObject } from 'redux';
|
||||
import Target from '@overflow/target/api/model/Target';
|
||||
import Sensor from '@overflow/sensor/api/model/Sensor';
|
||||
|
||||
import * as ReadAllByDomainActionTypes from '../action/read_all_by_domain';
|
||||
import ReadAllByTargetDomain, { defaultState as readAllByDomainDefaultState } from '../state/ReadAllByDomain';
|
||||
import ReadAllByDomain, { defaultState as readAllByDomainDefaultState } from '../state/ReadAllByDomain';
|
||||
|
||||
const reducer: ReducersMapObject = {
|
||||
[ReadAllByDomainActionTypes.REQUEST_SUCCESS]:
|
||||
(state: ReadAllByTargetDomain = readAllByDomainDefaultState, action: Action<Target>):
|
||||
ReadAllByTargetDomain => {
|
||||
return state;
|
||||
(state: ReadAllByDomain = readAllByDomainDefaultState, action: Action<Sensor[]>):
|
||||
ReadAllByDomain => {
|
||||
return {
|
||||
...state,
|
||||
SensorList:<Sensor[]>action.payload,
|
||||
};
|
||||
},
|
||||
[ReadAllByDomainActionTypes.REQUEST_FAILURE]:
|
||||
(state: ReadAllByTargetDomain = readAllByDomainDefaultState, action: Action<Error>):
|
||||
ReadAllByTargetDomain => {
|
||||
(state: ReadAllByDomain = readAllByDomainDefaultState, action: Action<Error>):
|
||||
ReadAllByDomain => {
|
||||
return state;
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user