diff --git a/README.md b/README.md index 3c1619f644..20b68efb34 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Intallation guide # Dependencies - **NodeJs 8.11.x** For ease of update, use nvm: https://github.com/creationix/nvm -- **Elasticsearch 5.5.x** https://www.elastic.co/guide/en/elasticsearch/reference/5.5/install-elasticsearch.html (Make sure to have 5.5, some sections of the instructions use 5.x which would install a different version) +- **ElasticSearch 5.5.x** https://www.elastic.co/guide/en/elasticsearch/reference/5.5/install-elasticsearch.html (Make sure to have 5.5, some sections of the instructions use 5.x which would install a different version). Please note that ElasticSearch requires java. - **MongoDB 3.4.x** https://docs.mongodb.com/v3.4/installation/ (there are known issues with 3.6, please ensure 3.4) - **Yarn** https://yarnpkg.com/en/docs/install - **pdftotext** 0.67.0 https://poppler.freedesktop.org/ @@ -87,6 +87,10 @@ $ export PORT=3000 Again, please notice that there is no need to export any value for a normal installation and only do so if you are certain you need different defaults. If these values are not correctly overridden, Uwazi will fail to run properly. +For production environments, you may need to activate your system's sendmail so user's receive sign up and password recovery notifications. + +Alternatively, you can use a custom SMTP configuration to send these emails. Find this option in settings > collection. + ### Upgrading Uwazi and data migrations Updating Uwazi is pretty straight forward using git: diff --git a/app/react/App/App.js b/app/react/App/App.js index f7b000523d..0249c4344d 100644 --- a/app/react/App/App.js +++ b/app/react/App/App.js @@ -11,17 +11,19 @@ import { TranslateForm } from 'app/I18N'; import { loadIcons } from 'UI/Icon/library'; import { Icon } from 'UI'; +import './scss/styles.scss'; + import Menu from './Menu'; import SiteName from './SiteName'; import Confirm from './Confirm'; - -import './scss/styles.scss'; +import GoogleAnalytics from './GoogleAnalytics'; loadIcons(); class App extends Component { constructor(props, context) { super(props, context); + // change fetch to use api and test it properly this.fetch = props.fetch || fetch; this.state = { showmenu: false, confirmOptions: {} }; } @@ -46,6 +48,7 @@ class App extends Component { renderTools() { return React.Children.map(this.props.children, (child) => { + //condition not tested if (child.type.renderTools) { return child.type.renderTools(); } @@ -80,6 +83,7 @@ class App extends Component { {this.props.children} + diff --git a/app/react/App/GoogleAnalytics.js b/app/react/App/GoogleAnalytics.js index 28af5ccc2a..eae1763b4a 100644 --- a/app/react/App/GoogleAnalytics.js +++ b/app/react/App/GoogleAnalytics.js @@ -1,3 +1,4 @@ +import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; @@ -9,7 +10,7 @@ export function trackPage() { } } -export default class GoogleAnalytics extends Component { +export class GoogleAnalytics extends Component { constructor(props) { super(props); if (!props.analyticsTrackingId || !isClient) { @@ -47,3 +48,5 @@ export function mapStateToProps({ settings }) { analyticsTrackingId: settings.collection.get('analyticsTrackingId') }; } + +export default connect(mapStateToProps)(GoogleAnalytics); diff --git a/app/react/App/Root.js b/app/react/App/Root.js index 3f22cec9da..89311a2c2e 100644 --- a/app/react/App/Root.js +++ b/app/react/App/Root.js @@ -1,8 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import serialize from 'serialize-javascript'; -import GoogleAnalytics from './GoogleAnalytics'; -import { store } from 'app/store'; class Root extends Component { renderInitialData() { @@ -51,7 +49,6 @@ class Root extends Component { ]; } - const analyticsTrackingId = store.getState().settings.collection.get('analyticsTrackingId'); return ( @@ -66,7 +63,6 @@ class Root extends Component { href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,300,400,500,700|Roboto+Slab:100,300,400,700|Roboto:100,300,400,500,700,900" /> -
diff --git a/app/react/App/specs/GoogleAnalytics.spec.js b/app/react/App/specs/GoogleAnalytics.spec.js index 4c21acfe3f..df820f3158 100644 --- a/app/react/App/specs/GoogleAnalytics.spec.js +++ b/app/react/App/specs/GoogleAnalytics.spec.js @@ -2,7 +2,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import GoogleAnalytics, { trackPage } from '../GoogleAnalytics'; +import { GoogleAnalytics, trackPage } from '../GoogleAnalytics'; describe('GoogleAnalytics', () => { let component;