Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #85 from watson-developer-cloud/terms-of-use
Browse files Browse the repository at this point in the history
feat(Layout): add Terms of Use
  • Loading branch information
jeff-arn authored May 21, 2019
2 parents f6814b8 + dbe74ce commit 9d787c9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
5 changes: 5 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,8 @@
.disclaimer--message .base--h6{
padding-top: 6px;
}

.gdpr-info {
font-size: 10pt;
margin-top: 1em;
}
10 changes: 8 additions & 2 deletions test/unit/test.express.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ const app = require('../../app');


describe('express', () => {
it('load home page when GET /', () => request(app).get('/').expect(200));
it('load home page when GET /', () => {
request(app).get('/').expect(200);
});

it('404 when page not found', () => request(app).get('/foo/bar').expect(404));
it('404 when page not found', () => {
request(app)
.get('/foo/bar')
.expect(new Error('Not Found'));
});
});
7 changes: 7 additions & 0 deletions views/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Header, Jumbotron } from 'watson-react-components';

// eslint-disable-next-line
const DESCRIPTION = 'Natural Language Classifier applies deep learning techniques to make predictions about the best predefined classes for short sentences or phrases.';
const TERMS_OF_USE_URL = 'https://watson-developer-cloud.github.io/terms?name=Natural%20Language%20Classifier%20Demo';

export class Layout extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -56,6 +57,12 @@ export class Layout extends React.Component {
startInBluemix="https://cloud.ibm.com/registration/?target=%2Fcatalog%2Fservices%2Fnatural-language-classifier%3FhideTours%3Dtrue%26cm_mmc%3D-_-Watson%2BCore_Watson%2BCore%2B-%2BPlatform-_-WW_WW-_-wdc-ref%26cm_mmc%3D-_-Watson%2BCore_Watson%2BCore%2B-%2BPlatform-_-WW_WW-_-wdc-ref%26cm_mmca1%3D000000OF%26cm_mmca2%3D10000409"
description={DESCRIPTION}
/> : null }
<div className="_container _container_large gdpr-info">
By using this application, you agree to the &nbsp;
<a target="_blank" rel="noreferrer noopener" href={TERMS_OF_USE_URL}>
Terms of Use
</a>
</div>
<div id="root">
{children}
</div>
Expand Down

0 comments on commit 9d787c9

Please sign in to comment.