fixed noauthprobe list - added json-pretty
This commit is contained in:
parent
8d938d6861
commit
5eb3ee406b
|
@ -36,6 +36,7 @@
|
|||
"@types/react-tap-event-plugin": "^0.0.30",
|
||||
"@types/redux": "^3.6.0",
|
||||
"@types/whatwg-fetch": "^0.0.33",
|
||||
"@types/react-json-pretty":"^1.3.2",
|
||||
"awesome-typescript-loader": "^3.1.3",
|
||||
"check-dependencies": "^1.0.1",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
|
@ -68,7 +69,8 @@
|
|||
"webpack-dev-server": "^2.5.0",
|
||||
"webpack-merge": "^4.1.0",
|
||||
"webpack-visualizer-plugin": "^0.1.11",
|
||||
"@types/recharts":"^0.22.5"
|
||||
"@types/recharts":"^0.22.5",
|
||||
"react-json-pretty":"^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"auth0-lock": "^10.18.0",
|
||||
|
|
|
@ -13,6 +13,8 @@ import NoAuthProbe from '@overflow/noauthprobe/api/model/NoAuthProbe';
|
|||
import Domain from '@overflow/domain/api/model/Domain';
|
||||
import { ListContainer } from '@overflow/commons/react/component/ListContainer';
|
||||
import * as Utils from '@overflow/commons/util/Utils';
|
||||
import * as JSONPretty from 'react-json-pretty';
|
||||
|
||||
export interface StateProps {
|
||||
noauthList?: NoAuthProbe[];
|
||||
}
|
||||
|
@ -140,9 +142,10 @@ export class NoauthProbeList extends React.Component<Props, State> {
|
|||
<Table.Row>
|
||||
<Table.HeaderCell />
|
||||
<Table.HeaderCell textAlign={'center'}>No.</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Host IP</Table.HeaderCell>
|
||||
{/*<Table.HeaderCell textAlign={'center'}>Host IP</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Host Mac</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Host Name</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Host Name</Table.HeaderCell>*/}
|
||||
<Table.HeaderCell textAlign={'center'}>Description</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Created At</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>API Key</Table.HeaderCell>
|
||||
</Table.Row>
|
||||
|
@ -205,11 +208,11 @@ 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];
|
||||
|
||||
elem.push(
|
||||
<Table.Row key={index} onClick={this.handleSelect.bind(this, probe)} active={this.handleRowActive(probe)}>
|
||||
|
@ -217,9 +220,10 @@ export class NoauthProbeList extends React.Component<Props, State> {
|
|||
<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'}>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>{map.host.name}</Table.Cell>*/}
|
||||
<Table.Cell> <JSONPretty json={ probe.description } /></Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{Utils.date2date(probe.createDate)}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{probe.apiKey}</Table.Cell>
|
||||
</Table.Row>,
|
||||
|
|
Loading…
Reference in New Issue
Block a user