This commit is contained in:
insanity 2017-07-28 15:51:34 +09:00
parent 5e1bf81395
commit d673019a90
27 changed files with 99 additions and 71 deletions

View File

@ -3,9 +3,9 @@ import MetaInfraType from '@overflow/meta/api/model/MetaInfraType';
import Probe from '@overflow/probe/api/model/Probe'; import Probe from '@overflow/probe/api/model/Probe';
import Target from '@overflow/target/api/model/Target'; import Target from '@overflow/target/api/model/Target';
interface Infra { export interface Infra {
id: number; id?: number;
type: MetaInfraType; infraType: MetaInfraType;
childId: number; childId: number;
createDate: Date; createDate: Date;
probe: Probe; probe: Probe;

View File

@ -3,7 +3,7 @@ import MetaInfraVendor from '@overflow/meta/api/model/MetaInfraVendor';
interface InfraOS { interface InfraOS {
id: number; id?: number;
machine: InfraMachine; machine: InfraMachine;
meta: string; meta: string;
createDate: Date; createDate: Date;

View File

@ -2,7 +2,7 @@
import InfraOS from './InfraOS'; import InfraOS from './InfraOS';
interface InfraOSApplication { interface InfraOSApplication {
id: number; id?: number;
os: InfraOS; os: InfraOS;
name: string; name: string;
createDate: Date; createDate: Date;

View File

@ -1,7 +1,7 @@
import InfraOS from './InfraOS'; import InfraOS from './InfraOS';
interface InfraOSDaemon { interface InfraOSDaemon {
id: number; id?: number;
os: InfraOS; os: InfraOS;
name: string; name: string;
createDate: Date; createDate: Date;

View File

@ -2,7 +2,7 @@ import InfraOS from './InfraOS';
import MetaInfraVendor from '@overflow/meta/api/model/MetaInfraVendor'; import MetaInfraVendor from '@overflow/meta/api/model/MetaInfraVendor';
interface InfraOSPort { interface InfraOSPort {
id: number; id?: number;
os: InfraOS; os: InfraOS;
createDate: Date; createDate: Date;
port: number; port: number;

View File

@ -2,7 +2,7 @@ import InfraHost from './InfraHost';
import MetaInfraVendor from '@overflow/meta/api/model/MetaInfraVendor'; import MetaInfraVendor from '@overflow/meta/api/model/MetaInfraVendor';
interface InfraService { interface InfraService {
id: number; id?: number;
host: InfraHost; host: InfraHost;
portType: string; portType: string;
port: number; port: number;

View File

@ -2,10 +2,10 @@
import MetaInputType from './MetaInputType'; import MetaInputType from './MetaInputType';
import MetaCrawler from './MetaCrawler'; import MetaCrawler from './MetaCrawler';
interface MetaCrawlerInputItem { export interface MetaCrawlerInputItem {
id: number; id?: number;
metaInputType: MetaInputType; inputType: MetaInputType;
metaCrawler: MetaCrawler; crawler: MetaCrawler;
description: string; description: string;
name: string; name: string;
createDate: Date; createDate: Date;

View File

@ -1,6 +1,6 @@
interface MetaInfraType { interface MetaInfraType {
id: number; id?: number;
name: string; name: string;
createDate: Date; createDate: Date;
} }

View File

@ -2,10 +2,10 @@
import MetaInfraType from './MetaInfraType'; import MetaInfraType from './MetaInfraType';
interface MetaInfraVendor { interface MetaInfraVendor {
id: number; id?: number;
name: string; name: string;
createDate: Date; createDate: Date;
metaInfraType: MetaInfraType; infraType: MetaInfraType;
} }
export enum MetaInfraVendor_Machine_ID { export enum MetaInfraVendor_Machine_ID {

View File

@ -1,6 +1,6 @@
interface MetaInputType { interface MetaInputType {
id: number; id?: number;
name: string; name: string;
description: string; description: string;
createDate: Date; createDate: Date;

View File

@ -1,6 +1,6 @@
interface MetaNoAuthProbeStatus { interface MetaNoAuthProbeStatus {
id: number; id?: number;
name: string; name: string;
} }

View File

@ -1,6 +1,6 @@
interface MetaNotification { interface MetaNotification {
id: number; id?: number;
createDate: Date; createDate: Date;
name: string; name: string;
description: string; description: string;

View File

@ -1,6 +1,6 @@
interface MetaProbeArchitecture { interface MetaProbeArchitecture {
id: number; id?: number;
architecture: string; architecture: string;
createDate: Date; createDate: Date;
} }

View File

@ -1,6 +1,6 @@
interface MetaProbeOs { interface MetaProbeOs {
id: number; id?: number;
name: string; name: string;
createDate: Date; createDate: Date;
} }

View File

@ -3,7 +3,7 @@ import MetaProbeOs from './MetaProbeOs';
import MetaProbeArchitecture from './MetaProbeArchitecture'; import MetaProbeArchitecture from './MetaProbeArchitecture';
interface MetaProbePackage { interface MetaProbePackage {
id: number; id?: number;
version: MetaProbeVersion; version: MetaProbeVersion;
os: MetaProbeOs; os: MetaProbeOs;
architecture: MetaProbeArchitecture; architecture: MetaProbeArchitecture;

View File

@ -1,6 +1,6 @@
interface MetaProbeTaskType { interface MetaProbeTaskType {
id: number; id?: number;
name: string; name: string;
description: string; description: string;
createDate: Date; createDate: Date;

View File

@ -1,6 +1,6 @@
interface MetaProbeVersion { interface MetaProbeVersion {
id: number; id?: number;
version: string; version: string;
createDate: Date; createDate: Date;
} }

View File

@ -3,8 +3,8 @@ import MetaProbeArchitecture from './MetaProbeArchitecture';
import MetaSensorItemType from './MetaSensorItemType'; import MetaSensorItemType from './MetaSensorItemType';
interface MetaSensorItem { interface MetaSensorItem {
id: number; id?: number;
metaSensorItemType: MetaSensorItemType; itemType: MetaSensorItemType;
key: string; key: string;
name: string; name: string;
createDate: Date; createDate: Date;

View File

@ -1,6 +1,6 @@
interface MetaSensorItemType { interface MetaSensorItemType {
id: number; id?: number;
name: string; name: string;
description: string; description: string;
createDate: Date; createDate: Date;

View File

@ -1,6 +1,6 @@
interface MetaSensorStatus { interface MetaSensorStatus {
id: number; id?: number;
name: string; name: string;
} }

View File

@ -1,10 +1,11 @@
import MetaInfraVendor from './MetaInfraVendor'; import MetaInfraVendor from './MetaInfraVendor';
import MetaCrawler from './MetaCrawler'; import MetaCrawler from './MetaCrawler';
interface MetaVendorCrawler { interface MetaVendorCrawler {
id: number; id?: number;
metaCrawler: MetaCrawler; crawler: MetaCrawler;
metaInfraVendor: MetaInfraVendor; infraVendor: MetaInfraVendor;
createDate: Date; createDate: Date;
} }

View File

@ -3,12 +3,12 @@ import MetaInfraVendor from './MetaInfraVendor';
import MetaSensorItem from './MetaSensorItem'; import MetaSensorItem from './MetaSensorItem';
interface MetaVendorCrawlerSensorItem { interface MetaVendorCrawlerSensorItem {
id: number; id?: number;
interval: string; interval: string;
warnCondition: string; warnCondition: string;
createDate: Date; createDate: Date;
metaSensorItem: MetaSensorItem; sensorItem: MetaSensorItem;
metaInfraVendor: MetaInfraVendor; vendor: MetaInfraVendor;
crawlerId: number; crawlerId: number;
} }

View File

@ -7,8 +7,8 @@ interface Probe {
id?: number; id?: number;
status: MetaProbeStatus; // INITIAL / NORMAL status: MetaProbeStatus; // INITIAL / NORMAL
description: string; description: string;
createDate?: Date; createDate: Date;
domain?: Domain; domain: Domain;
probeKey: string; probeKey: string;
encryptionKey: string; encryptionKey: string;
targetCount: number; targetCount: number;

View File

@ -3,13 +3,13 @@ import MetaProbeTaskType from '@overflow/meta/api/model/MetaProbeTaskType';
interface ProbeTask { interface ProbeTask {
id?: number; id?: number;
metaProbeTaskType: MetaProbeTaskType; taskType: MetaProbeTaskType;
probe: Probe; probe: Probe;
data: string; data: string;
createDate?: Date; createDate: Date;
sendDate?: Date; sendDate: Date;
startDate?: Date; startDate: Date;
endDate?: Date; endDate: Date;
succeed: boolean; succeed: boolean;
} }

View File

@ -8,7 +8,7 @@ import {
Container, Container,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
import Probe from '@overflow/probe/api/model/Probe'; import Probe from '@overflow/probe/api/model/Probe';
import { Discovery } from '../../../discovery/react/components/Discovery'; import { Discovery } from '@overflow/discovery/react/components/Discovery';
export interface StateProps { export interface StateProps {
id: string; id: string;
@ -49,10 +49,6 @@ export class ProbeDetailInfo extends React.Component<Props, State> {
}, },
'cidr': '192.168.1.0/24', 'cidr': '192.168.1.0/24',
'displayName': '192.168.1.105\'s probe', 'displayName': '192.168.1.105\'s probe',
'infraHost': {
'ip': '192.168.1.105',
'mac': 'ab:cd:ef:gh:ij',
},
'targetCount': '20', 'targetCount': '20',
'sensorCount': '30', 'sensorCount': '30',
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ', 'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',

View File

@ -8,6 +8,7 @@ import {
Container, Container,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
import Probe from '@overflow/probe/api/model/Probe'; import Probe from '@overflow/probe/api/model/Probe';
import InfraHost from '@overflow/infra/api/model/InfraHost';
export interface StateProps { export interface StateProps {
id: string; id: string;
@ -19,7 +20,7 @@ export interface DispatchProps {
export type Props = StateProps & DispatchProps; export type Props = StateProps & DispatchProps;
export interface State { export interface State {
probe: any; // todo. fix to Probe host: InfraHost;
} }
@ -28,14 +29,14 @@ export class ProbeHost extends React.Component<Props, State> {
constructor(props: Props, context: State) { constructor(props: Props, context: State) {
super(props, context); super(props, context);
this.state = { this.state = {
probe: null, host: null,
}; };
} }
public componentWillMount(): void { public componentWillMount(): void {
// todo. getting probe by probeId // todo. getting probe by probeId
let p = { let p: any = {
'id': '11', 'id': '11',
'status': { 'status': {
'name': 'STARTED', 'name': 'STARTED',
@ -43,22 +44,28 @@ export class ProbeHost extends React.Component<Props, State> {
'domain': { 'domain': {
'name': 'insanity\'s domain', 'name': 'insanity\'s domain',
}, },
'cidr': '192.168.1.0/24', 'host': {
'displayName': '192.168.1.105\'s probe', 'id': 111,
'targetCount': '20', 'os': {
'sensorCount': '30', 'machine': {
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ', 'meta': 'machine meta',
'description': 'description1111111111', },
'createDate': '2017-01-01', 'meta': 'os meta',
'authorizeDate': '2017-01-01', 'vendor': {
'restartDate': '2017-01-01', 'name': 'vendor name',
'authorizeMember': { 'type': {
'name': 'insanity', 'name': 'vendor type name',
},
},
},
'ip': 3232235881,
'mac': 8796753988883,
'createDate': null,
}, },
}; };
this.setState({ this.setState({
probe: p, host: p.host,
}); });
} }
@ -70,9 +77,33 @@ export class ProbeHost extends React.Component<Props, State> {
<Table.Body> <Table.Body>
<Table.Row> <Table.Row>
<Table.Cell collapsing> <Table.Cell collapsing>
<Header size='small'>Name</Header> <Header size='small'>IP</Header>
</Table.Cell> </Table.Cell>
<Table.Cell>todo</Table.Cell> <Table.Cell>{this.state.host.ip}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell collapsing>
<Header size='small'>MAC</Header>
</Table.Cell>
<Table.Cell>{this.state.host.mac}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell collapsing>
<Header size='small'>OS meta</Header>
</Table.Cell>
<Table.Cell>{this.state.host.os.meta}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell collapsing>
<Header size='small'>OS vendor name</Header>
</Table.Cell>
<Table.Cell>{this.state.host.os.vendor.name}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell collapsing>
<Header size='small'>OS vendor type</Header>
</Table.Cell>
<Table.Cell>{this.state.host.os.vendor.type.name}</Table.Cell>
</Table.Row> </Table.Row>
</Table.Body> </Table.Body>
</Table> </Table>

View File

@ -35,7 +35,7 @@ export class ProbeList extends React.Component<Props, State> {
public componentWillMount(): void { public componentWillMount(): void {
this.data = [ this.data = [
{ {
'id': '11', 'id': 11,
'status': { 'status': {
'name': 'NORMAL', 'name': 'NORMAL',
}, },
@ -48,13 +48,13 @@ export class ProbeList extends React.Component<Props, State> {
// 'ip': '192.168.1.105', // 'ip': '192.168.1.105',
// 'mac': 'ab:cd:ef:gh:ij', // 'mac': 'ab:cd:ef:gh:ij',
// }, // },
'targetCount': '20', 'targetCount': 20,
'sensorCount': '30', 'sensorCount': 30,
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ', 'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',
'description': 'description1111111111', 'description': 'description1111111111',
}, },
{ {
'id': '22', 'id': 22,
'status': { 'status': {
'name': 'INITIAL', 'name': 'INITIAL',
}, },
@ -63,13 +63,13 @@ export class ProbeList extends React.Component<Props, State> {
}, },
'displayName': '192.168.1.105\'s probe', 'displayName': '192.168.1.105\'s probe',
'cidr': '192.168.1.0/24', 'cidr': '192.168.1.0/24',
'targetCount': '20', 'targetCount': 30,
'sensorCount': '30', 'sensorCount': 40,
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ', 'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',
'description': 'description1111111111', 'description': 'description1111111111',
}, },
{ {
'id': '33', 'id': 33,
'status': { 'status': {
'name': 'NORMAL', 'name': 'NORMAL',
}, },
@ -78,8 +78,8 @@ export class ProbeList extends React.Component<Props, State> {
}, },
'cidr': '192.168.1.0/24', 'cidr': '192.168.1.0/24',
'displayName': '192.168.1.105\'s probe', 'displayName': '192.168.1.105\'s probe',
'targetCount': '20', 'targetCount': 50,
'sensorCount': '30', 'sensorCount': 60,
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ', 'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',
'description': 'description1111111111', 'description': 'description1111111111',
}, },