fixed address split

This commit is contained in:
snoop 2017-09-15 19:36:40 +09:00
parent eab3256dce
commit e00a63915a

View File

@ -208,11 +208,15 @@ export class NoauthProbeList extends React.Component<Props, State> {
this.props.noauthList.map((probe: NoAuthProbe, index: number) => {
// let map: any = JSON.parse(probe.description);
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];
let addressArray: string[] = map.network.address.split('|', 2);
let ipv4: string = addressArray[0];
let ipv6: string = addressArray[1];
map.network.ipv4 = ipv4;
map.network.ipv6 = ipv6;
delete map.network.address;
elem.push(
<Table.Row key={index} onClick={this.handleSelect.bind(this, probe)} active={this.handleRowActive(probe)}>
@ -223,7 +227,7 @@ export class NoauthProbeList extends React.Component<Props, State> {
{/*<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> <JSONPretty json={ probe.description } /></Table.Cell>
<Table.Cell fontSize='2'><JSONPretty json={ JSON.stringify(map) } /></Table.Cell>
<Table.Cell textAlign={'center'}>{Utils.date2date(probe.createDate)}</Table.Cell>
<Table.Cell textAlign={'center'}>{probe.apiKey}</Table.Cell>
</Table.Row>,