.
This commit is contained in:
		
							parent
							
								
									3f1fa9d5f7
								
							
						
					
					
						commit
						d3d11901ab
					
				@ -83,7 +83,6 @@ export class Probes extends React.Component<any, any> {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  handleSearch(searchWord: string) {
 | 
			
		||||
    console.log(searchWord);
 | 
			
		||||
    let founds = new Array();
 | 
			
		||||
    for (let probe of this.data) {
 | 
			
		||||
      if (probe.domain.name.toLowerCase().indexOf(searchWord) !== -1
 | 
			
		||||
@ -115,6 +114,23 @@ export class Probes extends React.Component<any, any> {
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  renderRows() {
 | 
			
		||||
    if(this.state.list.length === 0) {
 | 
			
		||||
      return <Table.Row error >
 | 
			
		||||
        <Table.Cell textAlign='center' colSpan='5'>No results found.</Table.Cell>
 | 
			
		||||
      </Table.Row>;
 | 
			
		||||
    }
 | 
			
		||||
    return this.state.list.map((probe: any, index: number) => (
 | 
			
		||||
      <Table.Row key={index} onClick={this.handleSelect.bind(this, probe)}>
 | 
			
		||||
        <Table.Cell >{probe.domain.name}</Table.Cell>
 | 
			
		||||
        <Table.Cell>{index}</Table.Cell>
 | 
			
		||||
        <Table.Cell negative={this.checkCellStatus(probe.metaProbeStatus)} textAlign={'center'}>{probe.metaProbeStatus.name}</Table.Cell>
 | 
			
		||||
        <Table.Cell textAlign={'center'} >todo. {probe.targetCnt}</Table.Cell>
 | 
			
		||||
        <Table.Cell textAlign={'center'} >todo. {probe.sensorCnt}</Table.Cell>
 | 
			
		||||
      </Table.Row>
 | 
			
		||||
    ));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  render() {
 | 
			
		||||
    if (this.state.isDetail) {
 | 
			
		||||
      return <ProbeDetails probe={this.state.selected} onBack={() => this.setState({ isDetail: false })} />;
 | 
			
		||||
@ -133,15 +149,7 @@ export class Probes extends React.Component<any, any> {
 | 
			
		||||
          </Table.Header>
 | 
			
		||||
 | 
			
		||||
          <Table.Body>
 | 
			
		||||
            {this.state.list.map((probe: any, index: number) => (
 | 
			
		||||
              <Table.Row key={index} onClick={this.handleSelect.bind(this, probe)}>
 | 
			
		||||
                <Table.Cell >{probe.domain.name}</Table.Cell>
 | 
			
		||||
                <Table.Cell>{index}</Table.Cell>
 | 
			
		||||
                <Table.Cell negative={this.checkCellStatus(probe.metaProbeStatus)} textAlign={'center'}>{probe.metaProbeStatus.name}</Table.Cell>
 | 
			
		||||
                <Table.Cell textAlign={'center'} >todo. {probe.targetCnt}</Table.Cell>
 | 
			
		||||
                <Table.Cell textAlign={'center'} >todo. {probe.sensorCnt}</Table.Cell>
 | 
			
		||||
              </Table.Row>
 | 
			
		||||
            ))}
 | 
			
		||||
            {this.renderRows()}
 | 
			
		||||
          </Table.Body>
 | 
			
		||||
        </Table>
 | 
			
		||||
      </Container>;
 | 
			
		||||
 | 
			
		||||
@ -33,7 +33,7 @@ export class LeftMenu extends React.Component<any, any> {
 | 
			
		||||
            </Menu.Item>
 | 
			
		||||
            <Menu.Item name='Monitoring' >
 | 
			
		||||
              <Icon name='bar graph' />
 | 
			
		||||
              <Dropdown item text='Monitoring' >
 | 
			
		||||
              <Dropdown text='Monitoring' pointing>
 | 
			
		||||
                <Dropdown.Menu>
 | 
			
		||||
                  <Dropdown.Header>Monitoring</Dropdown.Header>
 | 
			
		||||
                  <Dropdown.Item>Probe</Dropdown.Item>
 | 
			
		||||
@ -44,7 +44,7 @@ export class LeftMenu extends React.Component<any, any> {
 | 
			
		||||
 | 
			
		||||
            <Menu.Item name='Infrastructure' >
 | 
			
		||||
              <Icon name='sitemap' />
 | 
			
		||||
              <Dropdown item text='Infrastructure' >
 | 
			
		||||
              <Dropdown text='Infrastructure' >
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                <Dropdown.Menu>
 | 
			
		||||
@ -78,7 +78,7 @@ export class LeftMenu extends React.Component<any, any> {
 | 
			
		||||
 | 
			
		||||
            <Menu.Item>
 | 
			
		||||
              <Icon name='play circle' />
 | 
			
		||||
              <Dropdown item text='Custom'>
 | 
			
		||||
              <Dropdown text='Custom'>
 | 
			
		||||
                <Dropdown.Menu>
 | 
			
		||||
                  <Dropdown.Header>Custom</Dropdown.Header>
 | 
			
		||||
                  <Dropdown.Item href='#/test2'> SignUp </Dropdown.Item>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user