model
This commit is contained in:
parent
5e1bf81395
commit
d673019a90
|
@ -3,9 +3,9 @@ import MetaInfraType from '@overflow/meta/api/model/MetaInfraType';
|
|||
import Probe from '@overflow/probe/api/model/Probe';
|
||||
import Target from '@overflow/target/api/model/Target';
|
||||
|
||||
interface Infra {
|
||||
id: number;
|
||||
type: MetaInfraType;
|
||||
export interface Infra {
|
||||
id?: number;
|
||||
infraType: MetaInfraType;
|
||||
childId: number;
|
||||
createDate: Date;
|
||||
probe: Probe;
|
||||
|
|
|
@ -3,7 +3,7 @@ import MetaInfraVendor from '@overflow/meta/api/model/MetaInfraVendor';
|
|||
|
||||
|
||||
interface InfraOS {
|
||||
id: number;
|
||||
id?: number;
|
||||
machine: InfraMachine;
|
||||
meta: string;
|
||||
createDate: Date;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import InfraOS from './InfraOS';
|
||||
|
||||
interface InfraOSApplication {
|
||||
id: number;
|
||||
id?: number;
|
||||
os: InfraOS;
|
||||
name: string;
|
||||
createDate: Date;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import InfraOS from './InfraOS';
|
||||
|
||||
interface InfraOSDaemon {
|
||||
id: number;
|
||||
id?: number;
|
||||
os: InfraOS;
|
||||
name: string;
|
||||
createDate: Date;
|
||||
|
|
|
@ -2,7 +2,7 @@ import InfraOS from './InfraOS';
|
|||
import MetaInfraVendor from '@overflow/meta/api/model/MetaInfraVendor';
|
||||
|
||||
interface InfraOSPort {
|
||||
id: number;
|
||||
id?: number;
|
||||
os: InfraOS;
|
||||
createDate: Date;
|
||||
port: number;
|
||||
|
|
|
@ -2,7 +2,7 @@ import InfraHost from './InfraHost';
|
|||
import MetaInfraVendor from '@overflow/meta/api/model/MetaInfraVendor';
|
||||
|
||||
interface InfraService {
|
||||
id: number;
|
||||
id?: number;
|
||||
host: InfraHost;
|
||||
portType: string;
|
||||
port: number;
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
import MetaInputType from './MetaInputType';
|
||||
import MetaCrawler from './MetaCrawler';
|
||||
|
||||
interface MetaCrawlerInputItem {
|
||||
id: number;
|
||||
metaInputType: MetaInputType;
|
||||
metaCrawler: MetaCrawler;
|
||||
export interface MetaCrawlerInputItem {
|
||||
id?: number;
|
||||
inputType: MetaInputType;
|
||||
crawler: MetaCrawler;
|
||||
description: string;
|
||||
name: string;
|
||||
createDate: Date;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaInfraType {
|
||||
id: number;
|
||||
id?: number;
|
||||
name: string;
|
||||
createDate: Date;
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
import MetaInfraType from './MetaInfraType';
|
||||
|
||||
interface MetaInfraVendor {
|
||||
id: number;
|
||||
id?: number;
|
||||
name: string;
|
||||
createDate: Date;
|
||||
metaInfraType: MetaInfraType;
|
||||
infraType: MetaInfraType;
|
||||
}
|
||||
|
||||
export enum MetaInfraVendor_Machine_ID {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaInputType {
|
||||
id: number;
|
||||
id?: number;
|
||||
name: string;
|
||||
description: string;
|
||||
createDate: Date;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaNoAuthProbeStatus {
|
||||
id: number;
|
||||
id?: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaNotification {
|
||||
id: number;
|
||||
id?: number;
|
||||
createDate: Date;
|
||||
name: string;
|
||||
description: string;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaProbeArchitecture {
|
||||
id: number;
|
||||
id?: number;
|
||||
architecture: string;
|
||||
createDate: Date;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaProbeOs {
|
||||
id: number;
|
||||
id?: number;
|
||||
name: string;
|
||||
createDate: Date;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import MetaProbeOs from './MetaProbeOs';
|
|||
import MetaProbeArchitecture from './MetaProbeArchitecture';
|
||||
|
||||
interface MetaProbePackage {
|
||||
id: number;
|
||||
id?: number;
|
||||
version: MetaProbeVersion;
|
||||
os: MetaProbeOs;
|
||||
architecture: MetaProbeArchitecture;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaProbeTaskType {
|
||||
id: number;
|
||||
id?: number;
|
||||
name: string;
|
||||
description: string;
|
||||
createDate: Date;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaProbeVersion {
|
||||
id: number;
|
||||
id?: number;
|
||||
version: string;
|
||||
createDate: Date;
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ import MetaProbeArchitecture from './MetaProbeArchitecture';
|
|||
import MetaSensorItemType from './MetaSensorItemType';
|
||||
|
||||
interface MetaSensorItem {
|
||||
id: number;
|
||||
metaSensorItemType: MetaSensorItemType;
|
||||
id?: number;
|
||||
itemType: MetaSensorItemType;
|
||||
key: string;
|
||||
name: string;
|
||||
createDate: Date;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaSensorItemType {
|
||||
id: number;
|
||||
id?: number;
|
||||
name: string;
|
||||
description: string;
|
||||
createDate: Date;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
interface MetaSensorStatus {
|
||||
id: number;
|
||||
id?: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
|
||||
import MetaInfraVendor from './MetaInfraVendor';
|
||||
import MetaCrawler from './MetaCrawler';
|
||||
|
||||
interface MetaVendorCrawler {
|
||||
id: number;
|
||||
metaCrawler: MetaCrawler;
|
||||
metaInfraVendor: MetaInfraVendor;
|
||||
id?: number;
|
||||
crawler: MetaCrawler;
|
||||
infraVendor: MetaInfraVendor;
|
||||
createDate: Date;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ import MetaInfraVendor from './MetaInfraVendor';
|
|||
import MetaSensorItem from './MetaSensorItem';
|
||||
|
||||
interface MetaVendorCrawlerSensorItem {
|
||||
id: number;
|
||||
id?: number;
|
||||
interval: string;
|
||||
warnCondition: string;
|
||||
createDate: Date;
|
||||
metaSensorItem: MetaSensorItem;
|
||||
metaInfraVendor: MetaInfraVendor;
|
||||
sensorItem: MetaSensorItem;
|
||||
vendor: MetaInfraVendor;
|
||||
crawlerId: number;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ interface Probe {
|
|||
id?: number;
|
||||
status: MetaProbeStatus; // INITIAL / NORMAL
|
||||
description: string;
|
||||
createDate?: Date;
|
||||
domain?: Domain;
|
||||
createDate: Date;
|
||||
domain: Domain;
|
||||
probeKey: string;
|
||||
encryptionKey: string;
|
||||
targetCount: number;
|
||||
|
|
|
@ -3,13 +3,13 @@ import MetaProbeTaskType from '@overflow/meta/api/model/MetaProbeTaskType';
|
|||
|
||||
interface ProbeTask {
|
||||
id?: number;
|
||||
metaProbeTaskType: MetaProbeTaskType;
|
||||
taskType: MetaProbeTaskType;
|
||||
probe: Probe;
|
||||
data: string;
|
||||
createDate?: Date;
|
||||
sendDate?: Date;
|
||||
startDate?: Date;
|
||||
endDate?: Date;
|
||||
createDate: Date;
|
||||
sendDate: Date;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
succeed: boolean;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
Container,
|
||||
} from 'semantic-ui-react';
|
||||
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 {
|
||||
id: string;
|
||||
|
@ -49,10 +49,6 @@ export class ProbeDetailInfo extends React.Component<Props, State> {
|
|||
},
|
||||
'cidr': '192.168.1.0/24',
|
||||
'displayName': '192.168.1.105\'s probe',
|
||||
'infraHost': {
|
||||
'ip': '192.168.1.105',
|
||||
'mac': 'ab:cd:ef:gh:ij',
|
||||
},
|
||||
'targetCount': '20',
|
||||
'sensorCount': '30',
|
||||
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
Container,
|
||||
} from 'semantic-ui-react';
|
||||
import Probe from '@overflow/probe/api/model/Probe';
|
||||
import InfraHost from '@overflow/infra/api/model/InfraHost';
|
||||
|
||||
export interface StateProps {
|
||||
id: string;
|
||||
|
@ -19,7 +20,7 @@ export interface DispatchProps {
|
|||
export type Props = StateProps & DispatchProps;
|
||||
|
||||
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) {
|
||||
super(props, context);
|
||||
this.state = {
|
||||
probe: null,
|
||||
host: null,
|
||||
};
|
||||
}
|
||||
|
||||
public componentWillMount(): void {
|
||||
|
||||
// todo. getting probe by probeId
|
||||
let p = {
|
||||
let p: any = {
|
||||
'id': '11',
|
||||
'status': {
|
||||
'name': 'STARTED',
|
||||
|
@ -43,22 +44,28 @@ export class ProbeHost extends React.Component<Props, State> {
|
|||
'domain': {
|
||||
'name': 'insanity\'s domain',
|
||||
},
|
||||
'cidr': '192.168.1.0/24',
|
||||
'displayName': '192.168.1.105\'s probe',
|
||||
'targetCount': '20',
|
||||
'sensorCount': '30',
|
||||
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
||||
'description': 'description1111111111',
|
||||
'createDate': '2017-01-01',
|
||||
'authorizeDate': '2017-01-01',
|
||||
'restartDate': '2017-01-01',
|
||||
'authorizeMember': {
|
||||
'name': 'insanity',
|
||||
'host': {
|
||||
'id': 111,
|
||||
'os': {
|
||||
'machine': {
|
||||
'meta': 'machine meta',
|
||||
},
|
||||
'meta': 'os meta',
|
||||
'vendor': {
|
||||
'name': 'vendor name',
|
||||
'type': {
|
||||
'name': 'vendor type name',
|
||||
},
|
||||
},
|
||||
},
|
||||
'ip': 3232235881,
|
||||
'mac': 8796753988883,
|
||||
'createDate': null,
|
||||
},
|
||||
};
|
||||
|
||||
this.setState({
|
||||
probe: p,
|
||||
host: p.host,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -70,9 +77,33 @@ export class ProbeHost extends React.Component<Props, State> {
|
|||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell collapsing>
|
||||
<Header size='small'>Name</Header>
|
||||
<Header size='small'>IP</Header>
|
||||
</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.Body>
|
||||
</Table>
|
||||
|
|
|
@ -35,7 +35,7 @@ export class ProbeList extends React.Component<Props, State> {
|
|||
public componentWillMount(): void {
|
||||
this.data = [
|
||||
{
|
||||
'id': '11',
|
||||
'id': 11,
|
||||
'status': {
|
||||
'name': 'NORMAL',
|
||||
},
|
||||
|
@ -48,13 +48,13 @@ export class ProbeList extends React.Component<Props, State> {
|
|||
// 'ip': '192.168.1.105',
|
||||
// 'mac': 'ab:cd:ef:gh:ij',
|
||||
// },
|
||||
'targetCount': '20',
|
||||
'sensorCount': '30',
|
||||
'targetCount': 20,
|
||||
'sensorCount': 30,
|
||||
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
||||
'description': 'description1111111111',
|
||||
},
|
||||
{
|
||||
'id': '22',
|
||||
'id': 22,
|
||||
'status': {
|
||||
'name': 'INITIAL',
|
||||
},
|
||||
|
@ -63,13 +63,13 @@ export class ProbeList extends React.Component<Props, State> {
|
|||
},
|
||||
'displayName': '192.168.1.105\'s probe',
|
||||
'cidr': '192.168.1.0/24',
|
||||
'targetCount': '20',
|
||||
'sensorCount': '30',
|
||||
'targetCount': 30,
|
||||
'sensorCount': 40,
|
||||
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
||||
'description': 'description1111111111',
|
||||
},
|
||||
{
|
||||
'id': '33',
|
||||
'id': 33,
|
||||
'status': {
|
||||
'name': 'NORMAL',
|
||||
},
|
||||
|
@ -78,8 +78,8 @@ export class ProbeList extends React.Component<Props, State> {
|
|||
},
|
||||
'cidr': '192.168.1.0/24',
|
||||
'displayName': '192.168.1.105\'s probe',
|
||||
'targetCount': '20',
|
||||
'sensorCount': '30',
|
||||
'targetCount': 50,
|
||||
'sensorCount': 60,
|
||||
'probeKey': '1AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
||||
'description': 'description1111111111',
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user