diff --git a/src/ts/@overflow/infra/react/components/InfraDetail.tsx b/src/ts/@overflow/infra/react/components/InfraDetail.tsx index 7b70031..a71f5b0 100644 --- a/src/ts/@overflow/infra/react/components/InfraDetail.tsx +++ b/src/ts/@overflow/infra/react/components/InfraDetail.tsx @@ -66,7 +66,7 @@ export class InfraDetail extends React.Component { public ConvertInfra = () => { // let type = this.props.infra.type.name; let NewTableDatas: Array; - let type = this.state.testInfra.type.name; + let type = this.state.testInfra.infraType.name; switch (type) { case 'MACHINE': break; @@ -175,106 +175,106 @@ export class InfraTable extends React.Component { const InfraJson: any = { - 'id': 3, - 'type': { - 'id': 2, - 'name': 'HOST', - 'createDate': 1498379502894, - }, - 'childId': 1, - 'createDate': 1501207730841, - 'probe': { - 'id': 1, - 'status': { - 'id': 1, - 'name': 'INITIAL', - }, - 'description': 'snoop probe', - 'createDate': 1501153288513, - 'domain': { - 'id': 1, - 'name': 'overFlow\'s domain', - 'createDate': 1498443944866, - }, - 'probeKey': '899fdd145bcc11e7b611080027658d13', - 'encryptionKey': '8c51fa9c5bcc11e7980a080027658d13', - 'targetCount': 0, - 'sensorCount': 0, - 'displayName': 'test probe', - 'cidr': '192.168.1.0/24', - 'authorizeDate': 1501153288513, - 'authorizeMember': { - 'id': 1, - 'email': 'overflow@loafle.com', - 'pw': 'qwer5795', - 'name': 'overFlow', - 'phone': '000-000-0000', - 'companyName': 'loafle', - 'createDate': 1498442847625, - 'status': { - 'id': 2, - 'name': 'NORMAL', - }, - }, - 'infraHost': { - 'id': 1, - 'os': { - 'id': 1, - 'machine': { - 'id': 1, - 'meta': '', - 'createDate': 1501152866677, - }, - 'meta': '', - 'createDate': 1501152947326, - 'vendor': { - 'id': 26, - 'name': 'Windows', - 'createDate': 1501136812985, - 'metaInfraType': { - 'id': 3, - 'name': 'OS', - 'createDate': 1498379502906, - }, - }, - }, - 'ip': 3232235980, - 'mac': 8796753988883, - 'createDate': 1501153030607, - }, - }, - 'target': { - 'id': 1, - 'createDate': 1501154289555, - 'displayName': 'ghost target', - 'description': 'i am target', - }, + 'id': 3, + 'infraType': { + 'id': 2, + 'name': 'HOST', + 'createDate': 1498379502894, + }, + 'childId': 1, + 'createDate': 1501207730841, + 'probe': { + 'id': 1, + 'status': { + 'id': 1, + 'name': 'INITIAL', + }, + 'description': 'snoop probe', + 'createDate': 1501153288513, + 'domain': { + 'id': 1, + 'name': 'overFlow\'s domain', + 'createDate': 1498443944866, + }, + 'probeKey': '899fdd145bcc11e7b611080027658d13', + 'encryptionKey': '8c51fa9c5bcc11e7980a080027658d13', + 'targetCount': 0, + 'sensorCount': 0, + 'displayName': 'test probe', + 'cidr': '192.168.1.0/24', + 'authorizeDate': 1501153288513, + 'authorizeMember': { + 'id': 1, + 'email': 'overflow@loafle.com', + 'pw': 'qwer5795', + 'name': 'overFlow', + 'phone': '000-000-0000', + 'companyName': 'loafle', + 'createDate': 1498442847625, + 'status': { + 'id': 2, + 'name': 'NORMAL', + }, + }, + 'host': { + 'id': 1, + 'os': { + 'id': 1, + 'machine': { + 'id': 1, + 'meta': '', + 'createDate': 1501152866677, + }, + 'meta': '', + 'createDate': 1501152947326, + 'vendor': { + 'id': 26, + 'name': 'Windows', + 'createDate': 1501136812985, + 'infraType': { + 'id': 3, + 'name': 'OS', + 'createDate': 1498379502906, + }, + }, + }, + 'ip': 3232235980, + 'mac': 8796753988883, + 'createDate': 1501153030607, + } + }, + 'target': { + 'id': 1, + 'createDate': 1501154289555, + 'displayName': 'ghost target', + 'description': 'i am target', + }, }; const InfraHostJson: any = { - 'id': 1, - 'os': { - 'id': 1, - 'machine': { - 'id': 1, - 'meta': '', - 'createDate': 1501152866677, - }, - 'meta': '', - 'createDate': 1501152947326, - 'vendor': { - 'id': 26, - 'name': 'Windows', - 'createDate': 1501136812985, - 'metaInfraType': { - 'id': 3, - 'name': 'OS', - 'createDate': 1498379502906, - }, - }, - }, - 'ip': 3232235980, - 'mac': 8796753988883, - 'createDate': 1501153030607, + 'id': 1, + 'os': { + 'id': 1, + 'machine': { + 'id': 1, + 'meta': '', + 'createDate': 1501152866677, + }, + 'meta': '', + 'createDate': 1501152947326, + 'vendor': { + 'id': 26, + 'name': 'Windows', + 'createDate': 1501136812985, + 'infraType': { + 'id': 3, + 'name': 'OS', + 'createDate': 1498379502906, + }, + }, + }, + 'ip': 3232235980, + 'mac': 8796753988883, + 'createDate': 1501153030607, }; diff --git a/src/ts/@overflow/target/react/components/TargetDetail.tsx b/src/ts/@overflow/target/react/components/TargetDetail.tsx index 21abb20..edc2005 100644 --- a/src/ts/@overflow/target/react/components/TargetDetail.tsx +++ b/src/ts/@overflow/target/react/components/TargetDetail.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { Button, Table, Header, Container } from 'semantic-ui-react'; import { DetailContainer } from '@overflow/commons/react/component/DetailContainer'; import { TargetDetailInfra } from './TargetDetailInfra'; +import InfraDetailContainer from '@overflow/infra/react/InfraDetail'; import Target from '@overflow/target/api/model/Target'; @@ -59,7 +60,7 @@ export class TargetDetail extends React.Component {
- +