diff --git a/src/ts/@overflow/noauthprobe/api/model/NoAuthProbe.ts b/src/ts/@overflow/noauthprobe/api/model/NoAuthProbe.ts index 99da8f4..e89f5b5 100644 --- a/src/ts/@overflow/noauthprobe/api/model/NoAuthProbe.ts +++ b/src/ts/@overflow/noauthprobe/api/model/NoAuthProbe.ts @@ -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; diff --git a/src/ts/@overflow/noauthprobe/react/components/NoauthProbeList.tsx b/src/ts/@overflow/noauthprobe/react/components/NoauthProbeList.tsx index 74556f8..a6ad781 100644 --- a/src/ts/@overflow/noauthprobe/react/components/NoauthProbeList.tsx +++ b/src/ts/@overflow/noauthprobe/react/components/NoauthProbeList.tsx @@ -115,11 +115,21 @@ export class NoauthProbeList extends React.Component { return true; } public showList(): JSX.Element[] { - return this.state.selected.map((probe: NoAuthProbe, index: number) => ( -
- {probe.ipAddress} -
- )); + + let elem: Array = new Array(); + + this.state.selected.map((probe: NoAuthProbe, index: number) => { + + let map: any = JSON.parse(probe.description); + + elem.push( +
+ {map.network.address} +
, + ); + }); + + return elem; } public render(): JSX.Element { @@ -191,19 +201,33 @@ export class NoauthProbeList extends React.Component { ; } - return this.props.noauthList.map((probe: NoAuthProbe, index: number) => ( - - - - - {index + 1} - {probe.ipAddress} - {probe.macAddress} - {probe.hostName} - {Utils.date2date(probe.createDate)} - {probe.apiKey} - - )); + let elem: Array = 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( + + + + + {index + 1} + ipv4 - {ipv4}
ipv6 - {ipv6}
+ {map.network.macAddress} + {map.host.name} + {Utils.date2date(probe.createDate)} + {probe.apiKey} +
, + ); + + }); + + return elem; } }