fixed lint

This commit is contained in:
snoop 2017-07-20 13:54:11 +09:00
parent 0569b7861e
commit 3870bc5cbe
2 changed files with 84 additions and 66 deletions

View File

@ -72,7 +72,7 @@ export interface TargetTableProps {
export interface TargetTableState {
list: Array<Target>;
selected: object;
selected: Target;
}
export class TargetTable extends React.Component<TargetTableProps, TargetTableState> {
@ -85,7 +85,7 @@ export class TargetTable extends React.Component<TargetTableProps, TargetTableSt
list: [],
};
}
public handleSelect(selectedTarget: object): void {
public handleSelect(selectedTarget: Target): void {
this.setState({
selected: selectedTarget,
});

View File

@ -1,11 +1,6 @@
import * as React from 'react';
// import update from 'immutability-helper';
import { Checkbox, Container, Label, Accordion, Icon, List, ListItemProps } from 'semantic-ui-react';
@ -19,10 +14,17 @@ import * as Utils from '@overflow/commons/utils/Utils';
export interface Props {
}
export interface State {
}
// import update from 'immutability-helper'
export class Tree extends React.Component<any, any> {
export class Tree extends React.Component<Props, State> {
constructor(props: any, context: any) {
super(props, context);
@ -33,7 +35,7 @@ export class Tree extends React.Component<any, any> {
}
render() {
public render(): JSX.Element {
return (
<Container>
<SensorItemTree />
@ -45,8 +47,15 @@ export class Tree extends React.Component<any, any> {
}
export interface SensorItemTreeProps {
}
export class SensorItemTree extends React.Component<any, any> {
export interface SensorItemTreeState {
}
export class SensorItemTree extends React.Component<SensorItemTreeProps, SensorItemTreeState> {
constructor(props: any, context: any) {
super(props, context);
@ -59,12 +68,12 @@ export class SensorItemTree extends React.Component<any, any> {
// fs.readFile('../../../../../dh.json', this.handlJSONFile);
}
render() {
public render(): JSX.Element {
return (
<Container>
<List selection>
{SensorJsonData.map((data: any, idx: number)=> {
{SensorJsonData.map((data: any, idx: number) => {
console.log('');
})}
</List>
</Container>
@ -74,24 +83,24 @@ export class SensorItemTree extends React.Component<any, any> {
}
const SensorTypeJsonData = [
{
'id' : 1,
'create_date' : '2017-06-26T10:49:39Z',
'description' : 'CPU blah blah blah',
'name' : 'CPU'
},
{
'id' : 2,
'create_date' : '2017-06-26T10:49:39Z',
'description' : 'MEMORY blah blah blah',
'name' : 'MEMORY'
},
{
'id' : 3,
'create_date' : '2017-06-26T10:49:39Z',
'description' : 'DISK blah blah blah',
'name' : 'DISK'
}
{
'id': 1,
'create_date': '2017-06-26T10:49:39Z',
'description': 'CPU blah blah blah',
'name': 'CPU',
},
{
'id': 2,
'create_date': '2017-06-26T10:49:39Z',
'description': 'MEMORY blah blah blah',
'name': 'MEMORY',
},
{
'id': 3,
'create_date': '2017-06-26T10:49:39Z',
'description': 'DISK blah blah blah',
'name': 'DISK',
},
];
const SensorJsonData = [
@ -100,38 +109,47 @@ const SensorJsonData = [
'create_date': '2017-06-26T11:10:08Z',
'key': 'cpu.usage',
'name': 'CPU USAGE',
'type_id': 1
'type_id': 1,
},
{
'id': 2,
'create_date': '2017-06-26T11:10:08Z',
'key': 'cpu.free',
'name': 'CPU FREE',
'type_id': 1
'type_id': 1,
},
{
'id': 3,
'create_date': '2017-06-26T11:10:08Z',
'key': 'mem.usage',
'name': 'MEMORY USAGE',
'type_id': 2
'type_id': 2,
},
{
'id': 4,
'create_date': '2017-06-26T11:10:08Z',
'key': 'mem.free',
'name': 'MEMORY FREE',
'type_id': 2
}
'type_id': 2,
},
];
export class DiscoveryResult extends React.Component<any, any> {
export interface DiscoveryResultProps {
}
export interface DiscoveryResultState {
portState: { [key: number]: boolean; };
}
export class DiscoveryResult extends React.Component<DiscoveryResultProps, DiscoveryResultState> {
constructor(props: any, context: any) {
super(props, context);
this.state = {
portState: [],
portState: {},
};
@ -139,7 +157,7 @@ export class DiscoveryResult extends React.Component<any, any> {
}
render() {
public render(): JSX.Element {
return (
<Container>
@ -239,10 +257,10 @@ const jsonData = [{
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'SSH',
'target': true
'target': true,
}],
'portType': 'TCP',
'portNumber': 22
'portNumber': 22,
},
{
'createDate': -62135596800000,
@ -251,10 +269,10 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'HTTP'
'serviceName': 'HTTP',
}],
'portType': 'TCP',
'portNumber': 443
'portNumber': 443,
},
{
'createDate': -62135596800000,
@ -263,13 +281,13 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'HTTP'
'serviceName': 'HTTP',
}],
'portType': 'TCP',
'portNumber': 80
'portNumber': 80,
}],
'createDate': 1498470178000,
'updateDate': 1498470178000
'updateDate': 1498470178000,
},
{
'firstScanRange': 1,
@ -285,10 +303,10 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'SSH'
'serviceName': 'SSH',
}],
'portType': 'TCP',
'portNumber': 22
'portNumber': 22,
},
{
'createDate': -62135596800000,
@ -297,10 +315,10 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'HTTP'
'serviceName': 'HTTP',
}],
'portType': 'TCP',
'portNumber': 80
'portNumber': 80,
},
{
'createDate': -62135596800000,
@ -309,20 +327,20 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'HTTP'
'serviceName': 'HTTP',
}],
'portType': 'TCP',
'portNumber': 1936
'portNumber': 1936,
},
{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'services': null,
'portType': 'TCP',
'portNumber': 443
'portNumber': 443,
}],
'createDate': 1498470178000,
'updateDate': 1498470178000
'updateDate': 1498470178000,
},
{
'firstScanRange': 1,
@ -339,10 +357,10 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'HTTP'
'serviceName': 'HTTP',
}],
'portType': 'TCP',
'portNumber': 80
'portNumber': 80,
},
{
'createDate': -62135596800000,
@ -351,10 +369,10 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'SSH'
'serviceName': 'SSH',
}],
'portType': 'TCP',
'portNumber': 22
'portNumber': 22,
},
{
'createDate': -62135596800000,
@ -363,10 +381,10 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'HTTP'
'serviceName': 'HTTP',
}],
'portType': 'TCP',
'portNumber': 3343
'portNumber': 3343,
},
{
'createDate': -62135596800000,
@ -375,13 +393,13 @@ const jsonData = [{
'createDate': -62135596800000,
'updateDate': -62135596800000,
'portType': 'TCP',
'serviceName': 'HTTP'
'serviceName': 'HTTP',
}],
'portType': 'TCP',
'portNumber': 443
'portNumber': 443,
}],
'createDate': 1498470178000,
'updateDate': 1498470178000
'updateDate': 1498470178000,
},
{
'firstScanRange': 1,
@ -392,8 +410,8 @@ const jsonData = [{
'os': 'Windows',
'ports': null,
'createDate': 1498470179000,
'updateDate': 1498470179000
}
'updateDate': 1498470179000,
},
]
];