Skip to content

Commit

Permalink
Modified to pass in target instead of text (#3548)
Browse files Browse the repository at this point in the history
(cherry picked from commit a273393)
  • Loading branch information
billmurrin authored and dennisoelkers committed Mar 9, 2017
1 parent f9a9d2b commit 2185ae4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions graylog2-web-interface/src/components/search/ShowQueryModal.jsx
Expand Up @@ -23,22 +23,22 @@ var ShowQueryModal = React.createClass({
this.refs.modal.close();
},

render () {
var queryText = JSON.stringify(JSON.parse(this.props.builtQuery), null, ' ');
return (
<BootstrapModalWrapper ref="modal">
<Modal.Header closeButton>
<Modal.Title>Elasticsearch Query</Modal.Title>
</Modal.Header>
<Modal.Body>
<pre>{queryText}</pre>
</Modal.Body>
<Modal.Footer>
<ClipboardButton title="Copy query" text={queryText}/>
</Modal.Footer>
</BootstrapModalWrapper>
);
}
render() {
var queryText = JSON.stringify(JSON.parse(this.props.builtQuery), null, ' ');
return (
<BootstrapModalWrapper ref="modal">
<Modal.Header closeButton>
<Modal.Title>Elasticsearch Query</Modal.Title>
</Modal.Header>
<Modal.Body>
<pre>{queryText}</pre>
</Modal.Body>
<Modal.Footer>
<ClipboardButton title="Copy query" target=".modal-body pre" />
</Modal.Footer>
</BootstrapModalWrapper>
);
}
});

module.exports = ShowQueryModal;

0 comments on commit 2185ae4

Please sign in to comment.