Skip to content

Commit

Permalink
Show restart button only on relevant pages
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w committed Feb 28, 2018
1 parent b5a9b76 commit 874d9c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion project-fortis-interfaces/src/components/Admin/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ class Admin extends React.Component {
const { index, showModal } = this.state;
const { settings, watchlist } = this.props;

const shouldShowRestartPipelineButton =
index === WATCHLIST_TAB ||
index === TRUSTED_SOURCES ||
index === STREAM_TAB;

return (
<div>
<div className="container-fluid">
Expand Down Expand Up @@ -142,9 +147,10 @@ class Admin extends React.Component {
</div>
</TabPanel>
</Tabs>
{ shouldShowRestartPipelineButton ?
<div className="row adminContainer">
<Button className="pull-right" bsStyle="danger" onClick={this.openModal}>Restart Pipeline</Button>
</div>
</div> : null }
</div>
</div>
</div>
Expand Down

0 comments on commit 874d9c6

Please sign in to comment.