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';
|
import Domain from '@overflow/domain/api/model/Domain';
|
||||||
|
|
||||||
interface NoAuthProbe {
|
interface NoAuthProbe {
|
||||||
id?: number;
|
// id?: number;
|
||||||
hostName?: string;
|
// hostName?: string;
|
||||||
macAddress?: number;
|
// macAddress?: number;
|
||||||
ipAddress?: number;
|
// ipAddress?: number;
|
||||||
status?: MetaNoAuthProbeStatus;
|
// status?: MetaNoAuthProbeStatus;
|
||||||
tempProbeKey?: string;
|
// tempProbeKey?: string;
|
||||||
createDate?: Date;
|
// createDate?: Date;
|
||||||
apiKey?: string;
|
// apiKey?: string;
|
||||||
domain?: Domain;
|
// domain?: Domain;
|
||||||
probe?: Probe;
|
// probe?: Probe;
|
||||||
|
id: number;
|
||||||
|
description: string;
|
||||||
|
status: MetaNoAuthProbeStatus;
|
||||||
|
tempProbeKey: string;
|
||||||
|
createDate: Date;
|
||||||
|
apiKey: string;
|
||||||
|
domain: Domain;
|
||||||
|
probe: Probe;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NoAuthProbe;
|
export default NoAuthProbe;
|
||||||
|
|
|
@ -115,11 +115,21 @@ export class NoauthProbeList extends React.Component<Props, State> {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public showList(): JSX.Element[] {
|
public showList(): JSX.Element[] {
|
||||||
return this.state.selected.map((probe: NoAuthProbe, index: number) => (
|
|
||||||
|
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}>
|
<div key={index}>
|
||||||
{probe.ipAddress}
|
{map.network.address}
|
||||||
</div>
|
</div>,
|
||||||
));
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
return elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
|
@ -191,19 +201,33 @@ export class NoauthProbeList extends React.Component<Props, State> {
|
||||||
</Table.Row>;
|
</Table.Row>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.props.noauthList.map((probe: NoAuthProbe, index: number) => (
|
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.Row key={index} onClick={this.handleSelect.bind(this, probe)} active={this.handleRowActive(probe)}>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell collapsing>
|
||||||
<Checkbox checked={this.checkExist(probe)} />
|
<Checkbox checked={this.checkExist(probe)} />
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell textAlign={'center'}>{index + 1}</Table.Cell>
|
<Table.Cell textAlign={'center'}>{index + 1}</Table.Cell>
|
||||||
<Table.Cell textAlign={'center'}>{probe.ipAddress}</Table.Cell>
|
<Table.Cell textAlign={'center'}>ipv4 - {ipv4} <br/> ipv6 - {ipv6}</Table.Cell>
|
||||||
<Table.Cell textAlign={'center'}>{probe.macAddress}</Table.Cell>
|
<Table.Cell textAlign={'center'}>{map.network.macAddress}</Table.Cell>
|
||||||
<Table.Cell>{probe.hostName}</Table.Cell>
|
<Table.Cell>{map.host.name}</Table.Cell>
|
||||||
<Table.Cell textAlign={'center'}>{Utils.date2date(probe.createDate)}</Table.Cell>
|
<Table.Cell textAlign={'center'}>{Utils.date2date(probe.createDate)}</Table.Cell>
|
||||||
<Table.Cell textAlign={'center'}>{probe.apiKey}</Table.Cell>
|
<Table.Cell textAlign={'center'}>{probe.apiKey}</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>,
|
||||||
));
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return elem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user