diff --git a/src/ts/@overflow/sensor/react/SensorList.tsx b/src/ts/@overflow/sensor/react/SensorList.tsx index be83567..fc7d1f2 100644 --- a/src/ts/@overflow/sensor/react/SensorList.tsx +++ b/src/ts/@overflow/sensor/react/SensorList.tsx @@ -34,7 +34,7 @@ export function mapDispatchToProps(dispatch: Dispatch): SensorListDispatchP dispatch(ReadAllByProbeActions.request(probe)); }, onReadAllByDomain: (domain: Domain) => { - dispatch(asyncRequestActions.request('SensorService', 'readAllByDomain', ReadAllByDomainActions.REQUEST, domain)); + dispatch(asyncRequestActions.request('SensorService', 'readAllByDomain', ReadAllByDomainActions.REQUEST, JSON.stringify(domain))); }, onSelectSensor: (id: number) => { dispatch(routerPush('/sensor/' + String(id))); diff --git a/src/ts/@overflow/sensor/react/components/SensorList.tsx b/src/ts/@overflow/sensor/react/components/SensorList.tsx index 5d71311..d9beb85 100644 --- a/src/ts/@overflow/sensor/react/components/SensorList.tsx +++ b/src/ts/@overflow/sensor/react/components/SensorList.tsx @@ -11,6 +11,7 @@ export interface StateProps { probe?: Probe; target?: Target; sensorList?: Sensor[]; + targetId?: number; } export interface DispatchProps { @@ -37,64 +38,22 @@ export class SensorList extends React.Component { public componentWillMount(): void { let probe: Probe = { - id: Number(this.props.probeId), + id: Number(1), }; this.props.onReadAllByProbe(probe); }