test
This commit is contained in:
parent
7e6846a2a8
commit
69bc212984
|
@ -1,9 +1,9 @@
|
||||||
import { connect, Dispatch } from 'react-redux';
|
import { connect, Dispatch } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
ProbeDetail,
|
ProbeDetailInfo,
|
||||||
StateProps as ProbeDetailStateProps,
|
StateProps as ProbeDetailStateProps,
|
||||||
DispatchProps as ProbeDetailDispatchProps,
|
DispatchProps as ProbeDetailDispatchProps,
|
||||||
} from './components/ProbeDetail';
|
} from './components/ProbeDetailInfo';
|
||||||
|
|
||||||
export function mapStateToProps(state: any, props: any): ProbeDetailStateProps {
|
export function mapStateToProps(state: any, props: any): ProbeDetailStateProps {
|
||||||
return {
|
return {
|
||||||
|
@ -16,4 +16,4 @@ export function mapDispatchToProps(dispatch: Dispatch<any>): ProbeDetailDispatch
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(ProbeDetail);
|
export default connect(mapStateToProps, mapDispatchToProps)(ProbeDetailInfo);
|
||||||
|
|
|
@ -21,38 +21,23 @@ export interface DispatchProps {
|
||||||
export type Props = StateProps & DispatchProps;
|
export type Props = StateProps & DispatchProps;
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
|
probe: Probe;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ProbeDetail extends React.Component<Props, State> {
|
|
||||||
|
export class ProbeDetailInfo extends React.Component<Props, State> {
|
||||||
|
|
||||||
constructor(props: Props, context: State) {
|
constructor(props: Props, context: State) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
this.state = {
|
this.state = {
|
||||||
params: null,
|
probe: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public render(): JSX.Element {
|
public componentWillMount(): void {
|
||||||
return (
|
this.setState({
|
||||||
<Container fluid>
|
probe: null,
|
||||||
Probe Detail....id: {this.props.id}
|
});
|
||||||
{/* <ProbeBasicInfo probe={null} />
|
|
||||||
<TargetTable /> */}
|
|
||||||
</Container>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DetailProps {
|
|
||||||
probe: Probe;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ProbeBasicInfo extends React.Component<DetailProps, State> {
|
|
||||||
|
|
||||||
constructor(props: DetailProps, context: State) {
|
|
||||||
super(props, context);
|
|
||||||
this.state = {
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleStartStop(event: any, data: any): void {
|
public handleStartStop(event: any, data: any): void {
|
||||||
|
@ -62,65 +47,55 @@ export class ProbeBasicInfo extends React.Component<DetailProps, State> {
|
||||||
alert('Discovery');
|
alert('Discovery');
|
||||||
}
|
}
|
||||||
|
|
||||||
// public showStartStopBtn(): JSX.Element {
|
|
||||||
// let temp: any = null;
|
|
||||||
// temp = this.props.probe;
|
|
||||||
// if (temp.metaProbeStatus.name === 'STARTED') {
|
|
||||||
// return <Button content='Stop' icon='stop' labelPosition='left' color={'blue'} floated={'right'} onClick={this.handleStartStop} />;
|
|
||||||
// } else {
|
|
||||||
// return <Button content='Start' icon='play' labelPosition='left' color={'blue'} floated={'right'} onClick={this.handleStartStop} />;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<Container fluid>
|
<Container>
|
||||||
{/* <Header as='h3' dividing>Probe Info</Header>
|
|
||||||
<Table celled={false}>
|
<Table celled={false}>
|
||||||
<Table.Body>
|
<Table.Body>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell collapsing>
|
||||||
<Header size='small'>Domain</Header>
|
<Header size='small'>Domain</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>{this.props.probe.domain.name}</Table.Cell>
|
<Table.Cell>todo</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell collapsing>
|
||||||
<Header size='small'>Status</Header>
|
<Header size='small'>Status</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>{this.props.probe.status.name}</Table.Cell>
|
<Table.Cell>todo</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell collapsing>
|
||||||
<Header size='small'>Host IP</Header>
|
<Header size='small'>Host IP</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>????</Table.Cell>
|
<Table.Cell>todo</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell collapsing>
|
||||||
<Header size='small'>Host Name</Header>
|
<Header size='small'>Host Name</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>????</Table.Cell>
|
<Table.Cell>todo</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell collapsing>
|
||||||
<Header size='small'>Authorized at</Header>
|
<Header size='small'>Authorized at</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>{this.props.probe.createDate}</Table.Cell>
|
<Table.Cell>todo</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell collapsing>
|
||||||
<Header size='small'>Description</Header>
|
<Header size='small'>Description</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>{this.props.probe.description}</Table.Cell>
|
<Table.Cell>todo</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
</Table.Body>
|
</Table.Body>
|
||||||
</Table>
|
</Table>
|
||||||
|
|
||||||
<Button content='Discovery' icon='search' labelPosition='left' floated={'right'} positive onClick={this.handleDiscovery} />
|
<Button content='Discovery' icon='search' labelPosition='left' floated={'right'} positive onClick={this.handleDiscovery} />
|
||||||
{this.showStartStopBtn()} */}
|
{/* {this.showStartStopBtn()} */}
|
||||||
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Table, Header, Container, Form, Checkbox, Button } from 'semantic-ui-react';
|
import { Table, Header, Container, Form, Checkbox, Button } from 'semantic-ui-react';
|
||||||
import { ProbeDetail } from './ProbeDetail';
|
|
||||||
import { ListContainer } from '@overflow/commons/react/component/ListContainer';
|
import { ListContainer } from '@overflow/commons/react/component/ListContainer';
|
||||||
import Probe from '@overflow/probe/api/model/Probe';
|
import Probe from '@overflow/probe/api/model/Probe';
|
||||||
import Domain from '@overflow/domain/api/model/Domain';
|
import Domain from '@overflow/domain/api/model/Domain';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user