test
This commit is contained in:
parent
3870bc5cbe
commit
1a18ae9dbc
|
@ -5,6 +5,7 @@ import { Table,
|
|||
Header,
|
||||
Container,
|
||||
} from 'semantic-ui-react';
|
||||
import NoAuthProbe from '@overflow/noauthprobe/api/model/NoAuthProbe';
|
||||
|
||||
export interface Props {
|
||||
|
||||
|
@ -19,7 +20,7 @@ export class NoauthProbes extends React.Component<any, any> {
|
|||
private data: any;
|
||||
private selectedIds: Array<string>;
|
||||
|
||||
constructor(props: any, context: any) {
|
||||
constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
this.state = {
|
||||
selected: [],
|
||||
|
|
|
@ -7,10 +7,11 @@ import { Button,
|
|||
Container,
|
||||
} from 'semantic-ui-react';
|
||||
import { TargetTable } from './Targets';
|
||||
import Probe from '@overflow/probe/api/model/Probe';
|
||||
|
||||
export interface Props {
|
||||
probe: object;
|
||||
onBack(): void;
|
||||
probe: Probe;
|
||||
onBack?(): void;
|
||||
}
|
||||
|
||||
export interface State {
|
||||
|
@ -19,7 +20,7 @@ export interface State {
|
|||
|
||||
export class ProbeDetails extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: any, context: any) {
|
||||
constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
this.state = {
|
||||
};
|
||||
|
@ -39,9 +40,10 @@ export class ProbeDetails extends React.Component<Props, State> {
|
|||
}
|
||||
}
|
||||
|
||||
export class ProbeBasicInfo extends React.Component<any, any> {
|
||||
|
||||
constructor(props: any, context: any) {
|
||||
export class ProbeBasicInfo extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
this.state = {
|
||||
};
|
||||
|
@ -60,7 +62,9 @@ export class ProbeBasicInfo extends React.Component<any, any> {
|
|||
|
||||
|
||||
public showStartStopBtn(): JSX.Element {
|
||||
if (this.props.probe.metaProbeStatus.name === 'STARTED') {
|
||||
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} />;
|
||||
|
@ -83,7 +87,7 @@ export class ProbeBasicInfo extends React.Component<any, any> {
|
|||
<Table.Cell collapsing>
|
||||
<Header size='small'>Status</Header>
|
||||
</Table.Cell>
|
||||
<Table.Cell>{this.props.probe.metaProbeStatus.name}</Table.Cell>
|
||||
<Table.Cell>{this.props.probe.status.name}</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell collapsing>
|
||||
|
|
|
@ -19,7 +19,7 @@ export interface Props {
|
|||
const osNames = ['Windows', 'Debian', 'Ubuntu', 'Fedora', 'CentOS'];
|
||||
|
||||
export class ProbeDown extends React.Component<any, any> {
|
||||
constructor(props: any, context: any) {
|
||||
constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
|
||||
this.state = { activeItem: osNames[0] };
|
||||
|
|
|
@ -2,6 +2,7 @@ import * as React from 'react';
|
|||
import { Table, Header, Container, Form, Checkbox, Button } from 'semantic-ui-react';
|
||||
import { ProbeDetails } from './ProbeDetails';
|
||||
import { ListContainer } from './commons/ListContainer';
|
||||
import Probe from '@overflow/probe/api/model/Probe';
|
||||
|
||||
export interface Props {
|
||||
|
||||
|
@ -10,14 +11,14 @@ export interface Props {
|
|||
export interface State {
|
||||
selected: object;
|
||||
isDetail: boolean;
|
||||
list: object[];
|
||||
list: Probe[];
|
||||
}
|
||||
|
||||
export class Probes extends React.Component<Props, State> {
|
||||
|
||||
private data: any;
|
||||
|
||||
constructor(props: any, context: any) {
|
||||
constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
|
@ -94,7 +95,7 @@ export class Probes extends React.Component<Props, State> {
|
|||
});
|
||||
}
|
||||
|
||||
public handleSearch(result: object[]): void {
|
||||
public handleSearch(result: Probe[]): void {
|
||||
this.setState({
|
||||
list: result,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user