|
|
@ -16,7 +16,9 @@ class BreakPoint extends React.Component {
|
|
|
|
method: 'ALL',
|
|
|
|
method: 'ALL',
|
|
|
|
url: '',
|
|
|
|
url: '',
|
|
|
|
action: '1',
|
|
|
|
action: '1',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
haveRules: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.handleClose = this.handleClose.bind(this)
|
|
|
|
this.handleClose = this.handleClose.bind(this)
|
|
|
@ -45,14 +47,17 @@ class BreakPoint extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
this.props.onSave(rules)
|
|
|
|
this.props.onSave(rules)
|
|
|
|
this.handleClose()
|
|
|
|
this.handleClose()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({ haveRules: rules.length ? true : false })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const { rule } = this.state
|
|
|
|
const { rule, haveRules } = this.state
|
|
|
|
|
|
|
|
const variant = haveRules ? 'success' : 'primary'
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Button size="sm" onClick={this.handleShow}>BreakPoint</Button>
|
|
|
|
<Button variant={variant} size="sm" onClick={this.handleShow}>BreakPoint</Button>
|
|
|
|
|
|
|
|
|
|
|
|
<Modal show={this.state.show} onHide={this.handleClose}>
|
|
|
|
<Modal show={this.state.show} onHide={this.handleClose}>
|
|
|
|
<Modal.Header closeButton>
|
|
|
|
<Modal.Header closeButton>
|
|
|
@ -60,7 +65,6 @@ class BreakPoint extends React.Component {
|
|
|
|
</Modal.Header>
|
|
|
|
</Modal.Header>
|
|
|
|
|
|
|
|
|
|
|
|
<Modal.Body>
|
|
|
|
<Modal.Body>
|
|
|
|
<Form>
|
|
|
|
|
|
|
|
<Form.Group as={Row}>
|
|
|
|
<Form.Group as={Row}>
|
|
|
|
<Form.Label column sm={2}>Method</Form.Label>
|
|
|
|
<Form.Label column sm={2}>Method</Form.Label>
|
|
|
|
<Col sm={10}>
|
|
|
|
<Col sm={10}>
|
|
|
@ -89,7 +93,6 @@ class BreakPoint extends React.Component {
|
|
|
|
</Form.Control>
|
|
|
|
</Form.Control>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
</Form.Group>
|
|
|
|
</Form.Group>
|
|
|
|
</Form>
|
|
|
|
|
|
|
|
</Modal.Body>
|
|
|
|
</Modal.Body>
|
|
|
|
|
|
|
|
|
|
|
|
<Modal.Footer>
|
|
|
|
<Modal.Footer>
|
|
|
@ -97,7 +100,7 @@ class BreakPoint extends React.Component {
|
|
|
|
Close
|
|
|
|
Close
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Button variant="primary" onClick={this.handleSave}>
|
|
|
|
<Button variant="primary" onClick={this.handleSave}>
|
|
|
|
Save Changes
|
|
|
|
Save
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</Modal.Footer>
|
|
|
|
</Modal.Footer>
|
|
|
|
</Modal>
|
|
|
|
</Modal>
|
|
|
|