From 69bc212984dd2d946cd5accbecb736137b65cfbc Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 25 Jul 2017 11:16:51 +0900 Subject: [PATCH] test --- src/ts/@overflow/probe/react/ProbeDetail.tsx | 6 +- .../{ProbeDetail.tsx => ProbeDetailInfo.tsx} | 59 ++++++------------- .../probe/react/components/ProbeList.tsx | 1 - 3 files changed, 20 insertions(+), 46 deletions(-) rename src/ts/@overflow/probe/react/components/{ProbeDetail.tsx => ProbeDetailInfo.tsx} (58%) diff --git a/src/ts/@overflow/probe/react/ProbeDetail.tsx b/src/ts/@overflow/probe/react/ProbeDetail.tsx index 0fc17e1..08809ff 100644 --- a/src/ts/@overflow/probe/react/ProbeDetail.tsx +++ b/src/ts/@overflow/probe/react/ProbeDetail.tsx @@ -1,9 +1,9 @@ import { connect, Dispatch } from 'react-redux'; import { - ProbeDetail, + ProbeDetailInfo, StateProps as ProbeDetailStateProps, DispatchProps as ProbeDetailDispatchProps, -} from './components/ProbeDetail'; +} from './components/ProbeDetailInfo'; export function mapStateToProps(state: any, props: any): ProbeDetailStateProps { return { @@ -16,4 +16,4 @@ export function mapDispatchToProps(dispatch: Dispatch): ProbeDetailDispatch }; } -export default connect(mapStateToProps, mapDispatchToProps)(ProbeDetail); +export default connect(mapStateToProps, mapDispatchToProps)(ProbeDetailInfo); diff --git a/src/ts/@overflow/probe/react/components/ProbeDetail.tsx b/src/ts/@overflow/probe/react/components/ProbeDetailInfo.tsx similarity index 58% rename from src/ts/@overflow/probe/react/components/ProbeDetail.tsx rename to src/ts/@overflow/probe/react/components/ProbeDetailInfo.tsx index 1ccae35..8f24232 100644 --- a/src/ts/@overflow/probe/react/components/ProbeDetail.tsx +++ b/src/ts/@overflow/probe/react/components/ProbeDetailInfo.tsx @@ -21,38 +21,23 @@ export interface DispatchProps { export type Props = StateProps & DispatchProps; export interface State { + probe: Probe; } -export class ProbeDetail extends React.Component { + +export class ProbeDetailInfo extends React.Component { constructor(props: Props, context: State) { super(props, context); this.state = { - params: null, + probe: null, }; } - public render(): JSX.Element { - return ( - - Probe Detail....id: {this.props.id} - {/* - */} - - ); - } -} - -export interface DetailProps { - probe: Probe; -} - -export class ProbeBasicInfo extends React.Component { - - constructor(props: DetailProps, context: State) { - super(props, context); - this.state = { - }; + public componentWillMount(): void { + this.setState({ + probe: null, + }); } public handleStartStop(event: any, data: any): void { @@ -62,65 +47,55 @@ export class ProbeBasicInfo extends React.Component { alert('Discovery'); } - // public showStartStopBtn(): JSX.Element { - // let temp: any = null; - // temp = this.props.probe; - // if (temp.metaProbeStatus.name === 'STARTED') { - // return