fixed noauthprobe
This commit is contained in:
parent
4d1eb970ce
commit
d7dda6f910
|
@ -3,16 +3,24 @@ import MetaNoAuthProbeStatus from '@overflow/meta/api/model/MetaNoAuthProbeStatu
|
|||
import Domain from '@overflow/domain/api/model/Domain';
|
||||
|
||||
interface NoAuthProbe {
|
||||
id?: number;
|
||||
hostName?: string;
|
||||
macAddress?: number;
|
||||
ipAddress?: number;
|
||||
status?: MetaNoAuthProbeStatus;
|
||||
tempProbeKey?: string;
|
||||
createDate?: Date;
|
||||
apiKey?: string;
|
||||
domain?: Domain;
|
||||
probe?: Probe;
|
||||
// id?: number;
|
||||
// hostName?: string;
|
||||
// macAddress?: number;
|
||||
// ipAddress?: number;
|
||||
// status?: MetaNoAuthProbeStatus;
|
||||
// tempProbeKey?: string;
|
||||
// createDate?: Date;
|
||||
// apiKey?: string;
|
||||
// domain?: Domain;
|
||||
// probe?: Probe;
|
||||
id: number;
|
||||
description: string;
|
||||
status: MetaNoAuthProbeStatus;
|
||||
tempProbeKey: string;
|
||||
createDate: Date;
|
||||
apiKey: string;
|
||||
domain: Domain;
|
||||
probe: Probe;
|
||||
}
|
||||
|
||||
export default NoAuthProbe;
|
||||
|
|
|
@ -115,11 +115,21 @@ export class NoauthProbeList extends React.Component<Props, State> {
|
|||
return true;
|
||||
}
|
||||
public showList(): JSX.Element[] {
|
||||
return this.state.selected.map((probe: NoAuthProbe, index: number) => (
|
||||
<div key={index}>
|
||||
{probe.ipAddress}
|
||||
</div>
|
||||
));
|
||||
|
||||
let elem: Array<JSX.Element> = new Array();
|
||||
|
||||
this.state.selected.map((probe: NoAuthProbe, index: number) => {
|
||||
|
||||
let map: any = JSON.parse(probe.description);
|
||||
|
||||
elem.push(
|
||||
<div key={index}>
|
||||
{map.network.address}
|
||||
</div>,
|
||||
);
|
||||
});
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
|
@ -191,19 +201,33 @@ export class NoauthProbeList extends React.Component<Props, State> {
|
|||
</Table.Row>;
|
||||
}
|
||||
|
||||
return this.props.noauthList.map((probe: NoAuthProbe, index: number) => (
|
||||
<Table.Row key={index} onClick={this.handleSelect.bind(this, probe)} active={this.handleRowActive(probe)}>
|
||||
<Table.Cell collapsing>
|
||||
<Checkbox checked={this.checkExist(probe)} />
|
||||
</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{index + 1}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{probe.ipAddress}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{probe.macAddress}</Table.Cell>
|
||||
<Table.Cell>{probe.hostName}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{Utils.date2date(probe.createDate)}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{probe.apiKey}</Table.Cell>
|
||||
</Table.Row>
|
||||
));
|
||||
let elem: Array<JSX.Element> = new Array();
|
||||
|
||||
this.props.noauthList.map((probe: NoAuthProbe, index: number) => {
|
||||
|
||||
let map: any = JSON.parse(probe.description);
|
||||
|
||||
let addressArray: string[] = map.network.address.split('|', 2);
|
||||
let ipv4: string = addressArray[0];
|
||||
let ipv6: string = addressArray[1];
|
||||
|
||||
elem.push(
|
||||
<Table.Row key={index} onClick={this.handleSelect.bind(this, probe)} active={this.handleRowActive(probe)}>
|
||||
<Table.Cell collapsing>
|
||||
<Checkbox checked={this.checkExist(probe)} />
|
||||
</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{index + 1}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>ipv4 - {ipv4} <br/> ipv6 - {ipv6}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{map.network.macAddress}</Table.Cell>
|
||||
<Table.Cell>{map.host.name}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{Utils.date2date(probe.createDate)}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{probe.apiKey}</Table.Cell>
|
||||
</Table.Row>,
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
return elem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user