From fdaef45234b88295330c5ef9d36bc18346f1b9ab Mon Sep 17 00:00:00 2001 From: snoop Date: Fri, 25 Aug 2017 18:31:10 +0900 Subject: [PATCH] sensor regist after~ --- .../@overflow/meta/react/components/CrawlerSelector.tsx | 2 +- src/ts/@overflow/sensor/react/SensorConfigStepper.tsx | 7 +++++++ .../sensor/react/components/SensorConfigStepper.tsx | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ts/@overflow/meta/react/components/CrawlerSelector.tsx b/src/ts/@overflow/meta/react/components/CrawlerSelector.tsx index 14d8884..3e389ac 100644 --- a/src/ts/@overflow/meta/react/components/CrawlerSelector.tsx +++ b/src/ts/@overflow/meta/react/components/CrawlerSelector.tsx @@ -52,7 +52,7 @@ export class CrawlerSelector extends React.Component): SensorConfigStepper dispatch(asyncRequestActions.request('SensorService', 'registSensorConfig', RegistSensorConfigActions.REQUEST, JSON.stringify(sensor), JSON.stringify(sensorItemList))); }, + onMoveSensors: () => { + dispatch(routerPush('/sensors')); + }, + onMoveTargetSensors: (infraId: number) => { + dispatch(routerPush('/target/' + String(infraId) + '/sensor')); + }, }; } diff --git a/src/ts/@overflow/sensor/react/components/SensorConfigStepper.tsx b/src/ts/@overflow/sensor/react/components/SensorConfigStepper.tsx index fc05b55..5add4bd 100644 --- a/src/ts/@overflow/sensor/react/components/SensorConfigStepper.tsx +++ b/src/ts/@overflow/sensor/react/components/SensorConfigStepper.tsx @@ -48,6 +48,8 @@ export interface SensorConfigStepperStateProps { export interface SensorConfigStepperDispatchProps { onRegistSensorConfig?(sensor: Sensor, sensorItemList: SensorItem[]): void; + onMoveSensors?(): void; + onMoveTargetSensors?(targetId: number): void; } export type SensorConfigStepperProps = SensorConfigStepperStateProps & SensorConfigStepperDispatchProps; @@ -115,6 +117,12 @@ export class SensorConfigStepper extends React.Component