added targetdetail

infra host
This commit is contained in:
snoop 2017-07-28 16:15:39 +09:00
parent 60f212aeee
commit 5851e86ce0
2 changed files with 101 additions and 100 deletions

View File

@ -66,7 +66,7 @@ export class InfraDetail extends React.Component<Props, State> {
public ConvertInfra = () => { public ConvertInfra = () => {
// let type = this.props.infra.type.name; // let type = this.props.infra.type.name;
let NewTableDatas: Array<TableData>; let NewTableDatas: Array<TableData>;
let type = this.state.testInfra.type.name; let type = this.state.testInfra.infraType.name;
switch (type) { switch (type) {
case 'MACHINE': case 'MACHINE':
break; break;
@ -176,7 +176,7 @@ export class InfraTable extends React.Component<InfraTableProps, any> {
const InfraJson: any = { const InfraJson: any = {
'id': 3, 'id': 3,
'type': { 'infraType': {
'id': 2, 'id': 2,
'name': 'HOST', 'name': 'HOST',
'createDate': 1498379502894, 'createDate': 1498379502894,
@ -216,7 +216,7 @@ const InfraJson: any = {
'name': 'NORMAL', 'name': 'NORMAL',
}, },
}, },
'infraHost': { 'host': {
'id': 1, 'id': 1,
'os': { 'os': {
'id': 1, 'id': 1,
@ -231,7 +231,7 @@ const InfraJson: any = {
'id': 26, 'id': 26,
'name': 'Windows', 'name': 'Windows',
'createDate': 1501136812985, 'createDate': 1501136812985,
'metaInfraType': { 'infraType': {
'id': 3, 'id': 3,
'name': 'OS', 'name': 'OS',
'createDate': 1498379502906, 'createDate': 1498379502906,
@ -241,7 +241,7 @@ const InfraJson: any = {
'ip': 3232235980, 'ip': 3232235980,
'mac': 8796753988883, 'mac': 8796753988883,
'createDate': 1501153030607, 'createDate': 1501153030607,
}, }
}, },
'target': { 'target': {
'id': 1, 'id': 1,
@ -267,7 +267,7 @@ const InfraHostJson: any = {
'id': 26, 'id': 26,
'name': 'Windows', 'name': 'Windows',
'createDate': 1501136812985, 'createDate': 1501136812985,
'metaInfraType': { 'infraType': {
'id': 3, 'id': 3,
'name': 'OS', 'name': 'OS',
'createDate': 1498379502906, 'createDate': 1498379502906,

View File

@ -2,6 +2,7 @@ import * as React from 'react';
import { Button, Table, Header, Container } from 'semantic-ui-react'; import { Button, Table, Header, Container } from 'semantic-ui-react';
import { DetailContainer } from '@overflow/commons/react/component/DetailContainer'; import { DetailContainer } from '@overflow/commons/react/component/DetailContainer';
import { TargetDetailInfra } from './TargetDetailInfra'; import { TargetDetailInfra } from './TargetDetailInfra';
import InfraDetailContainer from '@overflow/infra/react/InfraDetail';
import Target from '@overflow/target/api/model/Target'; import Target from '@overflow/target/api/model/Target';
@ -59,7 +60,7 @@ export class TargetDetail extends React.Component<Props, State> {
<Container fluid> <Container fluid>
<TargetBasicInfo target={this.state.target} infra={this.state.infra} /> <TargetBasicInfo target={this.state.target} infra={this.state.infra} />
<br /> <br />
<TargetDetailInfra target={this.state.target} infra={this.state.infra} /> <InfraDetailContainer target={this.state.target} infra={this.state.infra} />
<br /> <br />
<Button primary floated={'right'} negative onClick={this.handleRemoveTarget}>Remove</Button> <Button primary floated={'right'} negative onClick={this.handleRemoveTarget}>Remove</Button>
</Container> </Container>