This commit is contained in:
snoop 2017-07-14 17:17:29 +09:00
parent c79b768589
commit 684a0aaecd

View File

@ -1,27 +1,46 @@
import * as React from 'react';
import { Checkbox, Container, Label, Accordion, Icon, List, ListItemProps } from 'semantic-ui-react';
export class Tree extends React.Component<any, any> {
constructor(props: any, context: any) {
super(props, context);
this.state = {
};
console.log(jsonData);
// fs.readFile('../../../../../dh.json', this.handlJSONFile);
}
handlJSONFile = (err: any, data: any) => {
}
render() {
return (
<Container>
<List>
<List.Item selection>
<Label basic onClick={() => {
this.setState({tt:!this.state.tt});
}}>Host</Label>
this.setState({ tt: !this.state.tt });
}}>Host</Label>
<Checkbox />
</List.Item>
{this.state.tt ? <List.Item selection >
{this.state.tt ? <List.Item selection >
<List.List>
<List.Item>Port 22 NOR</List.Item>
<List.Item>Port 443 TLS</List.Item>
@ -32,7 +51,183 @@ export class Tree extends React.Component<any, any> {
</Container>
);
}
}
const jsonData = [{
"firstScanRange": 1,
"lastScanRange": 10000,
"name": "",
"ip": 3232235818,
"mac": 91754662925,
"os":"Windows",
"ports": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "SSH",
"target":true
}],
"portType": "TCP",
"portNumber": 22
},
{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "HTTP"
}],
"portType": "TCP",
"portNumber": 443
},
{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "HTTP"
}],
"portType": "TCP",
"portNumber": 80
}],
"createDate": 1498470178000,
"updateDate": 1498470178000
},
{
"firstScanRange": 1,
"lastScanRange": 10000,
"name": "",
"ip": 3232235781,
"mac": 91754660625,
"os":"Windows",
"ports": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "SSH"
}],
"portType": "TCP",
"portNumber": 22
},
{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "HTTP"
}],
"portType": "TCP",
"portNumber": 80
},
{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "HTTP"
}],
"portType": "TCP",
"portNumber": 1936
},
{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": null,
"portType": "TCP",
"portNumber": 443
}],
"createDate": 1498470178000,
"updateDate": 1498470178000
},
{
"firstScanRange": 1,
"lastScanRange": 10000,
"name": "",
"ip": 3232235797,
"mac": 91754662913,
"os":"Windows",
"target":true,
"ports": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "HTTP"
}],
"portType": "TCP",
"portNumber": 80
},
{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "SSH"
}],
"portType": "TCP",
"portNumber": 22
},
{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "HTTP"
}],
"portType": "TCP",
"portNumber": 3343
},
{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"services": [{
"createDate": -62135596800000,
"updateDate": -62135596800000,
"portType": "TCP",
"serviceName": "HTTP"
}],
"portType": "TCP",
"portNumber": 443
}],
"createDate": 1498470178000,
"updateDate": 1498470178000
},
{
"firstScanRange": 1,
"lastScanRange": 10000,
"name": "",
"ip": 3232235877,
"mac": 75361038758387,
"os":"Windows",
"ports": null,
"createDate": 1498470179000,
"updateDate": 1498470179000
}
]