import React, { Component } from 'react';
import moment from 'moment';
import { Row, Col } from 'amos-framework';
import { impEquInterface3dAction } from '../../../../../../services/3dService';
import ServerInterfaceDetail from './ServerInterfaceDetail';


/**
 * 服务器网络接口信息
 *
 * @class ServerInterfaceTab
 * @extends {Component}
 */
class ServerInterfaceTab extends Component {
  constructor(props) {
    super(props);
    this.state = {
      // dataList: []
    };
  }

  componentDidMount(){
    // const { equimentId } = this.props;
    // equimentId && this.queryImpEquInterface3d(equimentId);
  }

  queryImpEquInterface3d =(equimentId)=>{
    // impEquInterface3dAction(equimentId).then(dataList =>{
    //   this.setState({ dataList });
    // });
  }

  render() {
    // const { dataList = [] } = this.state;
    const { dataList = [] } = this.props;
    return (
        <div class='impEqu-server-body'>
            <Row>
                {
                  dataList && dataList.map(e => {
                    return (<Col span={12}> <ServerInterfaceDetail data={ JSON.parse(e.metricJson)  || {}}/></Col>)
                  })
                }
                {/* <Col span={12}> <ServerInterfaceDetail data={dataList[1] || {}}/></Col> */}
            </Row>
            
        </div>
    );
  }
}

ServerInterfaceTab.propTypes = {

};

export default ServerInterfaceTab;
