import React from 'react'; import {Link} from 'react-router-dom'; import {Icon, Table, Label, Message, Button} from 'semantic-ui-react' import Pagination from 'util/pagination/index.jsx' import './index.css'; function LastestLink(props) { let _list = props.list if (_list <= 0) { return null; } let ret = _list.map((item, index) => { return ( {item.branch} ); }); return ret; } // general basic table class MachineTable extends React.Component { constructor(props) { super(props); this.state = { isFirstLoading: true, total: this.props.total, currentPage: 1, } } onPageNumChange(current) { let _this = this this.setState({ currentPage: current }, () => { _this.props.loadfunc(current); }); console.log('current:' + this.state.currentPage) } render() { // let branch = record.pg_info.pg_branch; let _list = this.props.list || [] let style = { display: 'show' }; let listBody = _list.map((machineItem, index) => { let machine = machineItem let system = machine.os_name + ' ' + machine.os_version + ' ' + machine.comp_name + ' ' + machine.comp_version; // let improvedIconClassName = trend.improved > 0 ? 'improved' : 'anonymous' // let quoIconClassName = trend.quo > 0 ? 'quo' : 'anonymous' // let regressiveIconClassName = trend.regressive > 0 ? 'regressive' : 'anonymous' let color = 'positive'; if(machine.state == 'pending'){ color = 'warning'; }else if(machine.state == 'prohibited'){ color = 'negative'; } return (