Skip to content

Commit

Permalink
Initial template for KG integration warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
cramakri committed Jan 30, 2019
1 parent 452ee58 commit 999cb45
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/project/Project.present.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,25 @@ class MergeRequestSuggestions extends Component {
}
}

/**
* If appropriate, show a warning banner that the project has not been integration with the knowledge graph.
*/
class KnowledgeGraphIntegrationWarningBanner extends Component {
render() {
const doesUserHaveRights = false;
const isProjectedIntegrated = false;
if (!doesUserHaveRights || isProjectedIntegrated) return null;
return (
<Row>
<Col xs={12} md={9}>
<div>Knowledge-graph integration is not turned on.</div>
</Col>
</Row>
)

}
}

class ProjectViewHeaderOverview extends Component {

render() {
Expand Down Expand Up @@ -179,6 +198,7 @@ class ProjectViewHeaderOverview extends Component {
</p>
</Col>
</Row>
<KnowledgeGraphIntegrationWarningBanner {...this.props} />
</Container>
)
}
Expand Down

0 comments on commit 999cb45

Please sign in to comment.