Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Oct 11, 2018
2 parents a512d90 + 37bee59 commit 3082991
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions app/react/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {} };
}
Expand All @@ -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();
}
Expand Down Expand Up @@ -80,6 +83,7 @@ class App extends Component {
<Confirm {...this.state.confirmOptions}/>
<TranslateForm/>
{this.props.children}
<GoogleAnalytics/>
</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion app/react/App/GoogleAnalytics.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import React, { Component } from 'react';

Expand All @@ -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) {
Expand Down Expand Up @@ -47,3 +48,5 @@ export function mapStateToProps({ settings }) {
analyticsTrackingId: settings.collection.get('analyticsTrackingId')
};
}

export default connect(mapStateToProps)(GoogleAnalytics);
4 changes: 0 additions & 4 deletions app/react/App/Root.js
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -51,7 +49,6 @@ class Root extends Component {
];
}

const analyticsTrackingId = store.getState().settings.collection.get('analyticsTrackingId');
return (
<html>
<head>
Expand All @@ -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"
/>
<link rel="shortcut icon" href="/public/favicon.ico"/>
<GoogleAnalytics analyticsTrackingId={analyticsTrackingId}/>
</head>
<body>
<div id="root" dangerouslySetInnerHTML={{ __html: this.props.content }} />
Expand Down
2 changes: 1 addition & 1 deletion app/react/App/specs/GoogleAnalytics.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3082991

Please sign in to comment.