noauth probe

This commit is contained in:
insanity 2017-07-25 19:28:03 +09:00
parent 03ee142a59
commit 96f20d5784
3 changed files with 15 additions and 6 deletions

View File

@ -9,6 +9,7 @@ import Home from '../Home';
import ProbeList from '../../views/monitoring/probe/List';
import TargetList from '../../views/infrastructure/target/List';
import SensorList from '../monitoring/sensor/List';
import NoauthList from '../../views/monitoring/probe/NoAuth';
import TitleBarContainer from '@overflow/app/views/layout/TitleBarContainer';
export interface Props extends RouteComponentProps<any> {
@ -37,6 +38,7 @@ export class AppLayout extends React.Component<Props, State> {
<Route exact={true} path={`${this.props.match.url}probes`} component={ProbeList}/>
<Route exact={true} path={`${this.props.match.url}targets`} component={TargetList}/>
<Route exact={true} path={`${this.props.match.url}sensors`} component={SensorList}/>
<Route exact={true} path={`${this.props.match.url}noauth_probes`} component={NoauthList}/>
<Redirect to='/error/404' />
</Switch>
<Footer />

View File

@ -52,6 +52,7 @@ class LeftMenu extends React.Component<Props, State> {
</Menu.Header>
<Menu.Menu>
<Menu.Item onClick={(e) => this.props.onChangeUrl('/probes')} style={{ 'marginLeft': '30px' }}>Probe</Menu.Item>
<Menu.Item onClick={(e) => this.props.onChangeUrl('/noauth_probes')} style={{ 'marginLeft': '30px' }}>NoauthProbe</Menu.Item>
<Menu.Item href='#/' style={{ 'marginLeft': '30px' }}>Sensors</Menu.Item>
</Menu.Menu>
</Menu.Item>

View File

@ -1,5 +1,6 @@
import * as React from 'react';
import { Table,
import {
Table,
Checkbox,
Button,
Header,
@ -18,7 +19,7 @@ export interface DispatchProps {
export type Props = StateProps & DispatchProps;
export interface State {
selected: NoAuthProbe[];
selected: NoAuthProbe[];
}
export class NoauthProbeList extends React.Component<any, any> {
@ -100,7 +101,7 @@ export class NoauthProbeList extends React.Component<any, any> {
alert(this.state.selected);
}
public handleRowActive(id: string):boolean {
public handleRowActive(id: string): boolean {
if (this.state.selected.indexOf(id) === -1) {
return false;
}
@ -111,7 +112,6 @@ export class NoauthProbeList extends React.Component<any, any> {
return (
<Container fluid>
<Header as='h3' dividing>Noauth Probes</Header>
<Table celled selectable striped>
<Table.Header>
<Table.Row>
@ -140,10 +140,16 @@ export class NoauthProbeList extends React.Component<any, any> {
</Table.Row>
))}
</Table.Body>
<Table.Footer>
<Table.Row>
<Table.HeaderCell colSpan='7'>
<Button primary floated={'right'} onClick={this.handleAccept.bind(this)}>Accept</Button>
<Button floated={'right'} onClick={this.handleDeny.bind(this)}>Deny</Button>
</Table.HeaderCell>
</Table.Row>
</Table.Footer>
</Table>
<Button primary floated={'right'} onClick={this.handleAccept.bind(this)}>Accept</Button>
<Button floated={'right'} onClick={this.handleDeny.bind(this)}>Deny</Button>
</Container>
);
}