-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/geonode/monitoring/frontend/monitoring/src/backend.js b/geonode/monitoring/frontend/monitoring/src/backend.js
new file mode 100644
index 00000000000..6c1a462d528
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/backend.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default './api';
diff --git a/geonode/monitoring/frontend/src/components/atoms/hover-paper/index.js b/geonode/monitoring/frontend/monitoring/src/components/atoms/hover-paper/index.js
similarity index 50%
rename from geonode/monitoring/frontend/src/components/atoms/hover-paper/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/atoms/hover-paper/index.js
index 94e239f28c2..5f6cfe09c2d 100644
--- a/geonode/monitoring/frontend/src/components/atoms/hover-paper/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/atoms/hover-paper/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import Paper from 'material-ui/Paper';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/atoms/hr/index.js b/geonode/monitoring/frontend/monitoring/src/components/atoms/hr/index.js
new file mode 100644
index 00000000000..d94e03c576f
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/atoms/hr/index.js
@@ -0,0 +1,41 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import PropTypes from 'prop-types';
+import styles from './styles';
+
+
+class HR extends React.Component {
+ static propTypes = {
+ children: PropTypes.node,
+ style: PropTypes.object,
+ }
+
+ render() {
+ return (
+
+ );
+ }
+}
+
+
+export default HR;
diff --git a/geonode/monitoring/frontend/monitoring/src/components/atoms/hr/styles.js b/geonode/monitoring/frontend/monitoring/src/components/atoms/hr/styles.js
new file mode 100644
index 00000000000..56d5b73fb33
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/atoms/hr/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ hr: {
+ borderTop: '1px solid #eee',
+ height: 0,
+ borderLeft: 0,
+ borderRight: 0,
+ marginTop: 10,
+ marginBottom: 10,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/atoms/map/actions.js b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/actions.js
similarity index 53%
rename from geonode/monitoring/frontend/src/components/atoms/map/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/atoms/map/actions.js
index f40a5365a66..46cf7d17bec 100644
--- a/geonode/monitoring/frontend/src/components/atoms/map/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/atoms/map/constants.js b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/constants.js
new file mode 100644
index 00000000000..52d7ffff7c1
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'MAP';
diff --git a/geonode/monitoring/frontend/src/components/atoms/map/index.js b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/index.js
similarity index 86%
rename from geonode/monitoring/frontend/src/components/atoms/map/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/atoms/map/index.js
index 2b364a4abfe..9211451436c 100644
--- a/geonode/monitoring/frontend/src/components/atoms/map/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/atoms/map/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/reducers.js
new file mode 100644
index 00000000000..49bc2dbc1c6
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/reducers.js
@@ -0,0 +1,34 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import MAP from './constants';
+
+export default function mapData(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case MAP:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/atoms/map/styles.js b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/styles.js
new file mode 100644
index 00000000000..4faba2e8c03
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/atoms/map/styles.js
@@ -0,0 +1,26 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ root: {
+ position: 'relative',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/alert/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/alert/index.js
similarity index 57%
rename from geonode/monitoring/frontend/src/components/cels/alert/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/alert/index.js
index 9c7fee7f884..f7f7bd34561 100644
--- a/geonode/monitoring/frontend/src/components/cels/alert/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/alert/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import HoverPaper from '../../atoms/hover-paper';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/alert/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/alert/styles.js
new file mode 100644
index 00000000000..6624c0afc5f
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/alert/styles.js
@@ -0,0 +1,50 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ marginTop: 10,
+ },
+
+ date: {
+ fontWeight: 'bold',
+ marginBottom: 5,
+ },
+
+ short: {
+ color: '#ffa031',
+ marginBottom: 5,
+ },
+
+ hiddenDetail: {
+ maxHeight: 0,
+ overflow: 'hidden',
+ transition: 'max-height 0.5s ease-out',
+ },
+
+ shownDetail: {
+ maxHeight: 50,
+ overflow: 'hidden',
+ transition: 'max-height 0.5s ease-in',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/alerts/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/alerts/index.js
similarity index 65%
rename from geonode/monitoring/frontend/src/components/cels/alerts/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/alerts/index.js
index 7d5cfd36c81..1f8e483382d 100644
--- a/geonode/monitoring/frontend/src/components/cels/alerts/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/alerts/index.js
@@ -1,10 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import HoverPaper from '../../atoms/hover-paper';
import actions from '../../organisms/alert-list/actions';
import styles from './styles';
-
+import {withRouter} from 'react-router-dom';
const mapStateToProps = (state) => ({
alertList: state.alertList.response,
@@ -23,15 +44,11 @@ class Alerts extends React.Component {
timestamp: PropTypes.instanceOf(Date),
}
- static contextTypes = {
- router: PropTypes.object.isRequired,
- }
-
constructor(props) {
super(props);
this.handleClick = () => {
- this.context.router.push('/alerts');
+ this.props.history.push('/alerts');
};
this.get = (interval = this.props.interval) => {
@@ -76,4 +93,4 @@ class Alerts extends React.Component {
}
-export default Alerts;
+export default withRouter(Alerts);
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/alerts/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/alerts/styles.js
new file mode 100644
index 00000000000..334c4c24e91
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/alerts/styles.js
@@ -0,0 +1,44 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ width: 'calc(50% - 10px)',
+ paddingTop: 10,
+ cursor: 'grabbing',
+ },
+
+ stat: {
+ lineHeight: '80px',
+ },
+
+ clickable: {
+ width: '100%',
+ height: '100%',
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/cpu/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/cpu/index.js
similarity index 51%
rename from geonode/monitoring/frontend/src/components/cels/cpu/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/cpu/index.js
index 371b4a8e7ef..2196098eabe 100644
--- a/geonode/monitoring/frontend/src/components/cels/cpu/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/cpu/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/cpu/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/cpu/styles.js
new file mode 100644
index 00000000000..5d68d44e37e
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/cpu/styles.js
@@ -0,0 +1,26 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/errors-rate/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/errors-rate/index.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/cels/errors-rate/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/errors-rate/index.js
index 7d3caf8f43d..506766880e2 100644
--- a/geonode/monitoring/frontend/src/components/cels/errors-rate/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/errors-rate/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/errors-rate/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/errors-rate/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/errors-rate/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/errors/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/errors/index.js
similarity index 64%
rename from geonode/monitoring/frontend/src/components/cels/errors/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/errors/index.js
index 1e665f95eae..3e5e87a2259 100644
--- a/geonode/monitoring/frontend/src/components/cels/errors/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/errors/index.js
@@ -1,10 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import HoverPaper from '../../atoms/hover-paper';
import actions from '../../organisms/error-list/actions';
import styles from './styles';
-
+import {withRouter} from 'react-router-dom';
const mapStateToProps = (state) => ({
errorList: state.errorList.response,
@@ -23,15 +44,11 @@ class Errors extends React.Component {
timestamp: PropTypes.instanceOf(Date),
}
- static contextTypes = {
- router: PropTypes.object.isRequired,
- }
-
constructor(props) {
super(props);
this.handleClick = () => {
- this.context.router.push('/errors');
+ this.props.history.push('/errors');
};
this.get = (interval = this.props.interval) => {
@@ -75,4 +92,4 @@ class Errors extends React.Component {
}
-export default Errors;
+export default withRouter(Errors);
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/errors/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/errors/styles.js
new file mode 100644
index 00000000000..334c4c24e91
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/errors/styles.js
@@ -0,0 +1,44 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ width: 'calc(50% - 10px)',
+ paddingTop: 10,
+ cursor: 'grabbing',
+ },
+
+ stat: {
+ lineHeight: '80px',
+ },
+
+ clickable: {
+ width: '100%',
+ height: '100%',
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/frequent-layers/actions.js b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/actions.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/cels/frequent-layers/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/actions.js
index 8f41ede1396..ebed471edb1 100644
--- a/geonode/monitoring/frontend/src/components/cels/frequent-layers/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/constants.js b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/constants.js
new file mode 100644
index 00000000000..c6130e62726
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'FREQUENT_LAYERS';
diff --git a/geonode/monitoring/frontend/src/components/cels/frequent-layers/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/index.js
similarity index 68%
rename from geonode/monitoring/frontend/src/components/cels/frequent-layers/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/index.js
index aefe8b6e0b8..5360ca040d1 100644
--- a/geonode/monitoring/frontend/src/components/cels/frequent-layers/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/reducers.js
new file mode 100644
index 00000000000..1ad92a63737
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/reducers.js
@@ -0,0 +1,34 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import FREQUENT_LAYERS from './constants';
+
+export default function frequentLayers(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case FREQUENT_LAYERS:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/styles.js
new file mode 100644
index 00000000000..07912bd8ee2
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/frequent-layers/styles.js
@@ -0,0 +1,35 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ root: {
+ marginTop: 10,
+ },
+
+ title: {
+ marginBottom: 5,
+ },
+
+ table: {
+ border: '1px solid #ddd',
+ width: '100%',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/geonode-data/actions.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/actions.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/cels/geonode-data/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/actions.js
index ad8924f31f9..d277670b238 100644
--- a/geonode/monitoring/frontend/src/components/cels/geonode-data/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/constants.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/constants.js
new file mode 100644
index 00000000000..fafb4982b58
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'GEONODE_AVERAGE_RESPONSE';
diff --git a/geonode/monitoring/frontend/src/components/cels/geonode-data/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/index.js
similarity index 69%
rename from geonode/monitoring/frontend/src/components/cels/geonode-data/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/index.js
index 971c0c87e81..c30ba1a9ef1 100644
--- a/geonode/monitoring/frontend/src/components/cels/geonode-data/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/reducers.js
new file mode 100644
index 00000000000..0f14f777e1c
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/reducers.js
@@ -0,0 +1,34 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import GEONODE_AVERAGE_RESPONSE from './constants';
+
+export default function geonodeAverageResponse(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEONODE_AVERAGE_RESPONSE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-data/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/geonode-status/actions/cpu.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/cpu.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/cels/geonode-status/actions/cpu.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/cpu.js
index 0ba2397d1ac..64f58f8132b 100644
--- a/geonode/monitoring/frontend/src/components/cels/geonode-status/actions/cpu.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/cpu.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/index.js
new file mode 100644
index 00000000000..914cec73af5
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/index.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import cpu from './cpu';
+import mem from './mem';
+
+
+export default {
+ getCpu: cpu.get,
+ resetCpu: cpu.reset,
+ getMem: mem.get,
+ resetMem: mem.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/geonode-status/actions/mem.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/mem.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/cels/geonode-status/actions/mem.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/mem.js
index 254fdd05abe..4df0baebe46 100644
--- a/geonode/monitoring/frontend/src/components/cels/geonode-status/actions/mem.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/actions/mem.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/constants.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/constants.js
new file mode 100644
index 00000000000..3f015b63b6b
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/constants.js
@@ -0,0 +1,23 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const GEONODE_CPU_STATUS = 'GEONODE_CPU_STATUS';
+export const GEONODE_MEM_STATUS = 'GEONODE_MEM_STATUS';
diff --git a/geonode/monitoring/frontend/src/components/cels/geonode-status/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/index.js
similarity index 81%
rename from geonode/monitoring/frontend/src/components/cels/geonode-status/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/index.js
index ae1f219fe4a..68ef0c0ddbe 100644
--- a/geonode/monitoring/frontend/src/components/cels/geonode-status/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/reducers.js
new file mode 100644
index 00000000000..f387c86166c
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/reducers.js
@@ -0,0 +1,47 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { GEONODE_CPU_STATUS, GEONODE_MEM_STATUS } from './constants';
+
+export function geonodeCpuStatus(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEONODE_CPU_STATUS:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function geonodeMemStatus(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEONODE_MEM_STATUS:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/geoserver-status/actions/cpu.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/cpu.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/cels/geoserver-status/actions/cpu.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/cpu.js
index ed5e47a59ad..467f765491a 100644
--- a/geonode/monitoring/frontend/src/components/cels/geoserver-status/actions/cpu.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/cpu.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/index.js
new file mode 100644
index 00000000000..914cec73af5
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/index.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import cpu from './cpu';
+import mem from './mem';
+
+
+export default {
+ getCpu: cpu.get,
+ resetCpu: cpu.reset,
+ getMem: mem.get,
+ resetMem: mem.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/geoserver-status/actions/mem.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/mem.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/cels/geoserver-status/actions/mem.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/mem.js
index 9751cbd2a7c..f4ec95bee5e 100644
--- a/geonode/monitoring/frontend/src/components/cels/geoserver-status/actions/mem.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/actions/mem.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/constants.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/constants.js
new file mode 100644
index 00000000000..d6aebc89be1
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/constants.js
@@ -0,0 +1,23 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const GEOSERVER_CPU_STATUS = 'GEOSERVER_CPU_STATUS';
+export const GEOSERVER_MEM_STATUS = 'GEOSERVER_MEM_STATUS';
diff --git a/geonode/monitoring/frontend/src/components/cels/geoserver-status/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/index.js
similarity index 80%
rename from geonode/monitoring/frontend/src/components/cels/geoserver-status/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/index.js
index b0c73c2efd4..f8b53ba1307 100644
--- a/geonode/monitoring/frontend/src/components/cels/geoserver-status/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/reducers.js
new file mode 100644
index 00000000000..8136cc8934c
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/reducers.js
@@ -0,0 +1,47 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { GEOSERVER_CPU_STATUS, GEOSERVER_MEM_STATUS } from './constants';
+
+export function geoserverCpuStatus(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEOSERVER_CPU_STATUS:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function geoserverMemStatus(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEOSERVER_MEM_STATUS:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/geoserver-status/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/health-check/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/health-check/index.js
similarity index 65%
rename from geonode/monitoring/frontend/src/components/cels/health-check/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/health-check/index.js
index f838bd70300..4b75f47d417 100644
--- a/geonode/monitoring/frontend/src/components/cels/health-check/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/health-check/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/health-check/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/health-check/styles.js
new file mode 100644
index 00000000000..4d4714fbc56
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/health-check/styles.js
@@ -0,0 +1,38 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ width: 'calc(50% - 10px)',
+ paddingTop: 10,
+ },
+
+ stat: {
+ height: 80,
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/layer-select/actions.js b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/actions.js
similarity index 53%
rename from geonode/monitoring/frontend/src/components/cels/layer-select/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/actions.js
index f33b6e01e51..dd6bebc9e39 100644
--- a/geonode/monitoring/frontend/src/components/cels/layer-select/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/constants.js b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/constants.js
new file mode 100644
index 00000000000..ac813b7e202
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'LAYER_LIST';
diff --git a/geonode/monitoring/frontend/src/components/cels/layer-select/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/index.js
similarity index 71%
rename from geonode/monitoring/frontend/src/components/cels/layer-select/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/index.js
index a2506e360a3..f54130163ec 100644
--- a/geonode/monitoring/frontend/src/components/cels/layer-select/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/reducers.js
new file mode 100644
index 00000000000..6b009ede3e6
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/reducers.js
@@ -0,0 +1,34 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import LAYER_LIST from './constants';
+
+export default function layerList(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case LAYER_LIST:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/styles.js
new file mode 100644
index 00000000000..8f483536459
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/layer-select/styles.js
@@ -0,0 +1,26 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ root: {
+ maxWidth: 200,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/memory/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/memory/index.js
similarity index 52%
rename from geonode/monitoring/frontend/src/components/cels/memory/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/memory/index.js
index edfafb316e7..afdfceabbff 100644
--- a/geonode/monitoring/frontend/src/components/cels/memory/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/memory/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/memory/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/memory/styles.js
new file mode 100644
index 00000000000..5d68d44e37e
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/memory/styles.js
@@ -0,0 +1,26 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/response-table/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/response-table/index.js
similarity index 51%
rename from geonode/monitoring/frontend/src/components/cels/response-table/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/response-table/index.js
index b9529094335..d1b6338eea9 100644
--- a/geonode/monitoring/frontend/src/components/cels/response-table/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/response-table/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import HR from '../../atoms/hr';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/response-table/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/response-table/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/response-table/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/response-time/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/response-time/index.js
similarity index 62%
rename from geonode/monitoring/frontend/src/components/cels/response-time/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/response-time/index.js
index 9f680f98c3c..a28200041fd 100644
--- a/geonode/monitoring/frontend/src/components/cels/response-time/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/response-time/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/response-time/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/response-time/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/response-time/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/table-row/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/table-row/index.js
new file mode 100644
index 00000000000..9602080612f
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/table-row/index.js
@@ -0,0 +1,38 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import PropTypes from 'prop-types';
+import { TableRow } from 'material-ui/Table';
+
+class MyTableRow extends React.Component {
+ static propTypes = {
+ children: PropTypes.node,
+ }
+ render() {
+ return (
+ {this.props.children}
+ );
+ }
+}
+
+
+export default MyTableRow;
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/table-row/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/table-row/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/table-row/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/throughput/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/throughput/index.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/cels/throughput/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/throughput/index.js
index 2c93943bed3..253e3c72469 100644
--- a/geonode/monitoring/frontend/src/components/cels/throughput/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/throughput/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/throughput/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/throughput/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/throughput/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/uptime/actions.js b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/actions.js
similarity index 52%
rename from geonode/monitoring/frontend/src/components/cels/uptime/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/uptime/actions.js
index 6bd58aec039..540bea81b7d 100644
--- a/geonode/monitoring/frontend/src/components/cels/uptime/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/constants.js b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/constants.js
new file mode 100644
index 00000000000..0f2fcc107aa
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'UPTIME';
diff --git a/geonode/monitoring/frontend/src/components/cels/uptime/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/index.js
similarity index 64%
rename from geonode/monitoring/frontend/src/components/cels/uptime/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/uptime/index.js
index 6381d8fc52a..922e5aa6b91 100644
--- a/geonode/monitoring/frontend/src/components/cels/uptime/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/reducers.js
new file mode 100644
index 00000000000..203841eae27
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/reducers.js
@@ -0,0 +1,34 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import UPTIME from './constants';
+
+export default function uptime(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case UPTIME:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/styles.js
new file mode 100644
index 00000000000..e7c11c1cfe9
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/uptime/styles.js
@@ -0,0 +1,35 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ width: 'calc(50% - 10px)',
+ paddingTop: 10,
+ },
+
+ stat: {
+ lineHeight: '80px',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/cels/ws-data/actions.js b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/actions.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/cels/ws-data/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/actions.js
index 4c02456e540..facc6a7b70e 100644
--- a/geonode/monitoring/frontend/src/components/cels/ws-data/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/constants.js b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/constants.js
new file mode 100644
index 00000000000..92cc843110c
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'WS_SERVICE_DATA';
diff --git a/geonode/monitoring/frontend/src/components/cels/ws-data/index.js b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/index.js
similarity index 73%
rename from geonode/monitoring/frontend/src/components/cels/ws-data/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/index.js
index 03a32ba61cd..c5d96114b52 100644
--- a/geonode/monitoring/frontend/src/components/cels/ws-data/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/reducers.js
new file mode 100644
index 00000000000..d0f27e3cdf5
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/reducers.js
@@ -0,0 +1,35 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import WS_SERVICE_DATA from './constants';
+
+
+export default function wsServiceData(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case WS_SERVICE_DATA:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/styles.js b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/styles.js
new file mode 100644
index 00000000000..4e2cc4b966a
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/cels/ws-data/styles.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ marginTop: 5,
+ },
+
+ geonode: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/molecules/average-cpu/index.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-cpu/index.js
similarity index 51%
rename from geonode/monitoring/frontend/src/components/molecules/average-cpu/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/molecules/average-cpu/index.js
index a4a680f111d..ded242e53f3 100644
--- a/geonode/monitoring/frontend/src/components/molecules/average-cpu/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-cpu/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import CircularProgress from 'material-ui/CircularProgress';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/average-cpu/styles.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-cpu/styles.js
new file mode 100644
index 00000000000..3e8b209cd60
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-cpu/styles.js
@@ -0,0 +1,39 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ flexDirection: 'column',
+ padding: 10,
+ marginTop: 10,
+ marginBottom: 10,
+ lineHeight: 2,
+ width: 'calc(50% - 10px)',
+ },
+
+ stat: {
+ fontSize: 25,
+ lineHeight: 2.5,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/molecules/average-memory/index.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-memory/index.js
similarity index 59%
rename from geonode/monitoring/frontend/src/components/molecules/average-memory/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/molecules/average-memory/index.js
index 3d89e0f80c7..9e1c1b21cee 100644
--- a/geonode/monitoring/frontend/src/components/molecules/average-memory/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-memory/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import CircularProgress from 'material-ui/CircularProgress';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/average-memory/styles.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-memory/styles.js
new file mode 100644
index 00000000000..3e8b209cd60
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-memory/styles.js
@@ -0,0 +1,39 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ flexDirection: 'column',
+ padding: 10,
+ marginTop: 10,
+ marginBottom: 10,
+ lineHeight: 2,
+ width: 'calc(50% - 10px)',
+ },
+
+ stat: {
+ fontSize: 25,
+ lineHeight: 2.5,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/molecules/average-response-time/index.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-response-time/index.js
similarity index 52%
rename from geonode/monitoring/frontend/src/components/molecules/average-response-time/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/molecules/average-response-time/index.js
index cb1424c1d33..e83c4200bb4 100644
--- a/geonode/monitoring/frontend/src/components/molecules/average-response-time/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-response-time/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import CircularProgress from 'material-ui/CircularProgress';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/average-response-time/styles.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-response-time/styles.js
new file mode 100644
index 00000000000..3e8b209cd60
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/average-response-time/styles.js
@@ -0,0 +1,39 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ flexDirection: 'column',
+ padding: 10,
+ marginTop: 10,
+ marginBottom: 10,
+ lineHeight: 2,
+ width: 'calc(50% - 10px)',
+ },
+
+ stat: {
+ fontSize: 25,
+ lineHeight: 2.5,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/molecules/max-response-time/index.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/max-response-time/index.js
similarity index 52%
rename from geonode/monitoring/frontend/src/components/molecules/max-response-time/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/molecules/max-response-time/index.js
index 11548a47afa..15a3582ee54 100644
--- a/geonode/monitoring/frontend/src/components/molecules/max-response-time/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/max-response-time/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import CircularProgress from 'material-ui/CircularProgress';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/max-response-time/styles.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/max-response-time/styles.js
new file mode 100644
index 00000000000..3e8b209cd60
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/max-response-time/styles.js
@@ -0,0 +1,39 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ flexDirection: 'column',
+ padding: 10,
+ marginTop: 10,
+ marginBottom: 10,
+ lineHeight: 2,
+ width: 'calc(50% - 10px)',
+ },
+
+ stat: {
+ fontSize: 25,
+ lineHeight: 2.5,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/molecules/total-requests/index.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/total-requests/index.js
similarity index 52%
rename from geonode/monitoring/frontend/src/components/molecules/total-requests/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/molecules/total-requests/index.js
index e859ba8d581..7707d00f225 100644
--- a/geonode/monitoring/frontend/src/components/molecules/total-requests/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/total-requests/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import CircularProgress from 'material-ui/CircularProgress';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/total-requests/styles.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/total-requests/styles.js
new file mode 100644
index 00000000000..a4154f4b44d
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/total-requests/styles.js
@@ -0,0 +1,38 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ flexDirection: 'column',
+ padding: 10,
+ marginTop: 10,
+ marginBottom: 20,
+ lineHeight: 2,
+ },
+
+ stat: {
+ fontSize: 25,
+ lineHeight: 2.5,
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/index.js
new file mode 100644
index 00000000000..ec5616bb4d1
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/index.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import list from './list';
+import service from './service';
+
+
+export default {
+ getServices: list.get,
+ resetServices: list.reset,
+ setService: service.set,
+ resetService: service.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/molecules/ws-service-select/actions/list.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/list.js
similarity index 53%
rename from geonode/monitoring/frontend/src/components/molecules/ws-service-select/actions/list.js
rename to geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/list.js
index b00b64e24fe..17e142086f3 100644
--- a/geonode/monitoring/frontend/src/components/molecules/ws-service-select/actions/list.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/list.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/service.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/service.js
new file mode 100644
index 00000000000..3e1016346e6
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/actions/service.js
@@ -0,0 +1,46 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { createAction } from 'redux-actions';
+import { WS_SERVICE } from '../constants';
+
+
+const reset = createAction(
+ WS_SERVICE,
+ () => ({ status: 'initial' })
+);
+
+
+const set = createAction(
+ WS_SERVICE,
+ service => ({
+ service,
+ status: 'success',
+ })
+);
+
+
+const actions = {
+ reset,
+ set,
+};
+
+export default actions;
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/constants.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/constants.js
new file mode 100644
index 00000000000..dc937cdca94
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/constants.js
@@ -0,0 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const WS_SERVICES = 'WS_SERVICES';
+export const WS_SERVICE = 'WS_SERVICE';
+export const WS_SERVICE_DATA = 'WS_SERVICE_DATA';
diff --git a/geonode/monitoring/frontend/src/components/molecules/ws-service-select/index.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/index.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/molecules/ws-service-select/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/index.js
index 5b490585ebe..658bd7e60c0 100644
--- a/geonode/monitoring/frontend/src/components/molecules/ws-service-select/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
@@ -29,15 +50,16 @@ class WSServiceSelect extends React.Component {
};
}
- componentWillMount() {
+ UNSAFE_componentWillMount() {
this.props.getServices();
}
-
- componentWillReceiveProps(nextProps) {
+
+ UNSAFE_componentWillReceiveProps(nextProps) {
if (this.props.selected) {return;}
const services = nextProps.services;
if (services && services.event_types && services.event_types.length > 0) {
- this.props.setService(services.event_types[0].name);
+ const firstSelected = services.event_types.find(({ name }) => name === 'OWS:ALL') || services.event_types[0];
+ this.props.setService(firstSelected && firstSelected.name);
}
}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/reducers.js
new file mode 100644
index 00000000000..2969a0e308e
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/molecules/ws-service-select/reducers.js
@@ -0,0 +1,48 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { WS_SERVICES, WS_SERVICE } from './constants';
+
+
+export function wsServices(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case WS_SERVICES:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function wsService(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case WS_SERVICE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/src/components/organisms/alert-list/actions.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/actions.js
similarity index 53%
rename from geonode/monitoring/frontend/src/components/organisms/alert-list/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/actions.js
index b26efccdab4..8de97b1d2c6 100644
--- a/geonode/monitoring/frontend/src/components/organisms/alert-list/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/constants.js
new file mode 100644
index 00000000000..1c66b541760
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'ALERT_LIST';
diff --git a/geonode/monitoring/frontend/src/components/organisms/alert-list/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/index.js
similarity index 67%
rename from geonode/monitoring/frontend/src/components/organisms/alert-list/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/index.js
index 0e3a3bf49b1..b9896f22697 100644
--- a/geonode/monitoring/frontend/src/components/organisms/alert-list/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
@@ -8,7 +29,7 @@ import HoverPaper from '../../atoms/hover-paper';
import Alert from '../../cels/alert';
import actions from './actions';
import styles from './styles';
-
+import {withRouter} from 'react-router-dom';
const mapStateToProps = (state) => ({
alerts: state.alertList.response,
@@ -20,9 +41,6 @@ const mapStateToProps = (state) => ({
@connect(mapStateToProps, actions)
class AlertList extends React.Component {
- static contextTypes = {
- router: PropTypes.object.isRequired,
- }
static propTypes = {
alerts: PropTypes.object,
@@ -36,7 +54,7 @@ class AlertList extends React.Component {
super(props);
this.handleClick = () => {
- this.context.router.push('/alerts/settings');
+ this.props.history.push('/alerts-settings');
};
this.get = (interval = this.props.interval) => {
@@ -84,4 +102,4 @@ class AlertList extends React.Component {
}
-export default AlertList;
+export default withRouter(AlertList);
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/reducers.js
new file mode 100644
index 00000000000..a506baf299b
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/reducers.js
@@ -0,0 +1,35 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import ALERT_LIST from './constants';
+
+
+export default function alertList(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case ALERT_LIST:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/styles.js
new file mode 100644
index 00000000000..79c555890ba
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-list/styles.js
@@ -0,0 +1,47 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ marginTop: 20,
+ },
+
+ header: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+
+ icon: {
+ minWidth: 36,
+ },
+
+ list: {
+ padding: 10,
+ },
+
+ spinner: {
+ width: '100%',
+ display: 'flex',
+ justifyContent: 'center',
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-setting/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-setting/index.js
new file mode 100644
index 00000000000..8aece10d06b
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/alert-setting/index.js
@@ -0,0 +1,52 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Link } from 'react-router-dom';
+import HR from '../../atoms/hr';
+
+
+class AlertsSetting extends React.Component {
+ static propTypes = {
+ alert: PropTypes.object.isRequired,
+ autoFocus: PropTypes.bool,
+ }
+
+ static defaultProps = {
+ autoFocus: false,
+ }
+
+ render() {
+ return (
+
+
+
+
{this.props.alert.name}
+
+ {this.props.alert.description}
+
+ );
+ }
+}
+
+
+export default AlertsSetting;
diff --git a/geonode/monitoring/frontend/src/components/organisms/error-detail/actions.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/actions.js
similarity index 53%
rename from geonode/monitoring/frontend/src/components/organisms/error-detail/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/actions.js
index c6b51427709..5993ef08ed9 100644
--- a/geonode/monitoring/frontend/src/components/organisms/error-detail/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/constants.js
new file mode 100644
index 00000000000..a55f3537295
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'ERROR_DETAIL';
diff --git a/geonode/monitoring/frontend/src/components/organisms/error-detail/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/index.js
similarity index 78%
rename from geonode/monitoring/frontend/src/components/organisms/error-detail/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/index.js
index bbef5390cb8..89f42854eb4 100644
--- a/geonode/monitoring/frontend/src/components/organisms/error-detail/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/reducers.js
new file mode 100644
index 00000000000..684c1994008
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/reducers.js
@@ -0,0 +1,35 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import ERROR_DETAIL from './constants';
+
+
+export default function errorDetails(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case ERROR_DETAIL:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/styles.js
new file mode 100644
index 00000000000..ef48b1b6b4e
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-detail/styles.js
@@ -0,0 +1,46 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ marginTop: 20,
+ },
+
+ header: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ marginBottom: 10,
+ },
+
+ title: {
+ display: 'inline',
+ },
+
+ tab: {
+ padding: 10,
+ },
+
+ log: {
+ marginTop: 10,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/error-list/actions.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/actions.js
similarity index 54%
rename from geonode/monitoring/frontend/src/components/organisms/error-list/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/actions.js
index a0bb77eeb33..1e206a066cf 100644
--- a/geonode/monitoring/frontend/src/components/organisms/error-list/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/constants.js
new file mode 100644
index 00000000000..c32e68057c6
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'ERROR_LIST';
diff --git a/geonode/monitoring/frontend/src/components/organisms/error-list/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/index.js
similarity index 71%
rename from geonode/monitoring/frontend/src/components/organisms/error-list/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/index.js
index d55a7f9546c..3d725583f2d 100644
--- a/geonode/monitoring/frontend/src/components/organisms/error-list/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
@@ -12,7 +33,7 @@ import {
} from 'material-ui/Table';
import styles from './styles';
import actions from './actions';
-
+import {withRouter} from 'react-router-dom';
const mapStateToProps = (state) => ({
errorList: state.errorList.response,
@@ -23,9 +44,6 @@ const mapStateToProps = (state) => ({
@connect(mapStateToProps, actions)
class ErrorList extends React.Component {
- static contextTypes = {
- router: PropTypes.object.isRequired,
- }
static propTypes = {
errorList: PropTypes.object,
@@ -38,7 +56,7 @@ class ErrorList extends React.Component {
super(props);
this.handleClick = (row, column, event) => {
- this.context.router.push(`/errors/${event.target.dataset.id}`);
+ this.props.history.push(`/errors/${event.target.dataset.id}`);
};
}
@@ -89,4 +107,4 @@ class ErrorList extends React.Component {
}
-export default ErrorList;
+export default withRouter(ErrorList);
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/reducers.js
new file mode 100644
index 00000000000..69cfeca72c8
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/reducers.js
@@ -0,0 +1,35 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import ERROR_LIST from './constants';
+
+
+export default function errorList(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case ERROR_LIST:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/styles.js
new file mode 100644
index 00000000000..bfdf5917fd6
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/error-list/styles.js
@@ -0,0 +1,41 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ marginTop: 20,
+ },
+
+ header: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+
+ title: {
+ display: 'inline',
+ },
+
+ icon: {
+ minWidth: 36,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/error.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/error.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/error.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/error.js
index 8a58c7317b1..fffced9bcee 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/error.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/error.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/index.js
new file mode 100644
index 00000000000..4e3a3cbb605
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/index.js
@@ -0,0 +1,37 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import responses from './responses';
+import throughput from './throughput';
+import error from './error';
+import responseTimes from '../../../cels/geonode-data/actions';
+
+
+export default {
+ getResponses: responses.get,
+ resetResponses: responses.reset,
+ getResponseTimes: responseTimes.get,
+ resetResponseTimes: responseTimes.reset,
+ getThroughputs: throughput.get,
+ resetThroughputs: throughput.reset,
+ getErrors: error.get,
+ resetErrors: error.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/responses.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/responses.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/responses.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/responses.js
index 2462f594d8b..5bd8a44e5d1 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/responses.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/responses.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/throughput.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/throughput.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/throughput.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/throughput.js
index 12af0cb5641..7129de7274c 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/actions/throughput.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/actions/throughput.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/constants.js
new file mode 100644
index 00000000000..781f0c192d7
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/constants.js
@@ -0,0 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const GEONODE_RESPONSE_SEQUENCE = 'GEONODE_RESPONSE_SEQUENCE';
+export const GEONODE_THROUGHPUT_SEQUENCE = 'GEONODE_THROUGHPUT_SEQUENCE';
+export const GEONODE_ERROR_SEQUENCE = 'GEONODE_ERROR_SEQUENCE';
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/index.js
similarity index 80%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-analytics/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/index.js
index 03641823da0..912a41d16f0 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/reducers.js
similarity index 50%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-analytics/reducers.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/reducers.js
index 9fbe59f749e..b4f712cfd2e 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-analytics/reducers.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/reducers.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { GEONODE_RESPONSE_SEQUENCE } from './constants';
import { GEONODE_THROUGHPUT_SEQUENCE } from './constants';
import { GEONODE_ERROR_SEQUENCE } from './constants';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/styles.js
new file mode 100644
index 00000000000..1f886a81af8
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-analytics/styles.js
@@ -0,0 +1,28 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '50%',
+ padding: 10,
+ marginRight: 10,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/actions/errors.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/errors.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/actions/errors.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/errors.js
index a3d4fd96579..0e1d1363e70 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/actions/errors.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/errors.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/index.js
new file mode 100644
index 00000000000..803ff3f90ee
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/index.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import responses from './responses';
+import errors from './errors';
+
+
+export default {
+ getResponses: responses.get,
+ resetResponses: responses.reset,
+ getErrors: errors.get,
+ resetErrors: errors.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/actions/responses.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/responses.js
similarity index 57%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/actions/responses.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/responses.js
index 7dff5b852d8..5d53c106556 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/actions/responses.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/actions/responses.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/constants.js
new file mode 100644
index 00000000000..51ae340d2c5
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/constants.js
@@ -0,0 +1,23 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const GEONODE_LAYER_RESPONSE = 'GEONODE_LAYER_RESPONSE';
+export const GEONODE_LAYER_ERROR = 'GEONODE_LAYER_ERROR';
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/index.js
similarity index 74%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/index.js
index 5921f3f95fd..f84b2438ee2 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-layers-analytics/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/reducers.js
new file mode 100644
index 00000000000..85a7b5cdb7e
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/reducers.js
@@ -0,0 +1,48 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { GEONODE_LAYER_ERROR, GEONODE_LAYER_RESPONSE } from './constants';
+
+
+export function geonodeLayerResponse(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEONODE_LAYER_RESPONSE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function geonodeLayerError(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEONODE_LAYER_ERROR:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/styles.js
new file mode 100644
index 00000000000..9ec244a4c61
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-layers-analytics/styles.js
@@ -0,0 +1,34 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ marginRight: 20,
+ },
+
+ header: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-status/actions/cpu.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/cpu.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-status/actions/cpu.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/cpu.js
index 2ab87a84a23..639c2a98d76 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-status/actions/cpu.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/cpu.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/index.js
new file mode 100644
index 00000000000..16fe515c806
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/index.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import cpu from './cpu';
+import memory from './memory';
+
+
+export default {
+ getCpu: cpu.get,
+ resetCpu: cpu.reset,
+ getMemory: memory.get,
+ resetMemory: memory.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-status/actions/memory.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/memory.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-status/actions/memory.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/memory.js
index ae2fdd91d84..4620d48d5e2 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-status/actions/memory.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/actions/memory.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/constants.js
new file mode 100644
index 00000000000..bd0b1c28f77
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/constants.js
@@ -0,0 +1,23 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const GEONODE_CPU_SEQUENCE = 'GEONODE_CPU_SEQUENCE';
+export const GEONODE_MEMORY_SEQUENCE = 'GEONODE_MEMORY_SEQUENCE';
diff --git a/geonode/monitoring/frontend/src/components/organisms/geonode-status/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/index.js
similarity index 81%
rename from geonode/monitoring/frontend/src/components/organisms/geonode-status/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/index.js
index 372880da838..823e27d1024 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geonode-status/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/reducers.js
new file mode 100644
index 00000000000..adba37a66a8
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/reducers.js
@@ -0,0 +1,48 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { GEONODE_CPU_SEQUENCE, GEONODE_MEMORY_SEQUENCE } from './constants';
+
+
+export function geonodeCpuSequence(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEONODE_CPU_SEQUENCE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function geonodeMemorySequence(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEONODE_MEMORY_SEQUENCE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/styles.js
new file mode 100644
index 00000000000..7e9210a44c7
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geonode-status/styles.js
@@ -0,0 +1,32 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ },
+
+ stat: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/geoserver-status/actions/cpu.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/cpu.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/organisms/geoserver-status/actions/cpu.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/cpu.js
index 1f4f676af8c..6bd7e13e5e4 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geoserver-status/actions/cpu.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/cpu.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/index.js
new file mode 100644
index 00000000000..16fe515c806
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/index.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import cpu from './cpu';
+import memory from './memory';
+
+
+export default {
+ getCpu: cpu.get,
+ resetCpu: cpu.reset,
+ getMemory: memory.get,
+ resetMemory: memory.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/geoserver-status/actions/memory.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/memory.js
similarity index 59%
rename from geonode/monitoring/frontend/src/components/organisms/geoserver-status/actions/memory.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/memory.js
index 9b228deaf06..ed6b5b6ea31 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geoserver-status/actions/memory.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/actions/memory.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/constants.js
new file mode 100644
index 00000000000..ff762da1939
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/constants.js
@@ -0,0 +1,23 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const GEOSERVER_CPU_SEQUENCE = 'GEOSERVER_CPU_SEQUENCE';
+export const GEOSERVER_MEMORY_SEQUENCE = 'GEOSERVER_MEMORY_SEQUENCE';
diff --git a/geonode/monitoring/frontend/src/components/organisms/geoserver-status/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/index.js
similarity index 75%
rename from geonode/monitoring/frontend/src/components/organisms/geoserver-status/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/index.js
index d1e45ab25d8..16d2e61d3a4 100644
--- a/geonode/monitoring/frontend/src/components/organisms/geoserver-status/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
@@ -60,24 +81,12 @@ class GeoserverStatus extends React.Component {
}
componentWillMount() {
- // this.get();
+ this.setHost(this.props);
}
componentWillReceiveProps(nextProps) {
- if (nextProps && nextProps.services && nextProps.timestamp) {
- let host = nextProps.services[0].name;
- let firstTime = false;
- if (this.state.host === '') {
- firstTime = true;
- this.setState({ host });
- } else {
- host = this.state.host;
- }
- if (firstTime || nextProps.timestamp !== this.props.timestamp) {
- this.get(host, nextProps.interval);
- }
- }
+ this.setHost(nextProps);
}
componentWillUnmount() {
@@ -136,6 +145,22 @@ class GeoserverStatus extends React.Component {
);
}
+
+ setHost = (props) => {
+ if (props && props.services && props.timestamp) {
+ let host = props.services[0].name;
+ let firstTime = false;
+ if (this.state.host === '') {
+ firstTime = true;
+ this.setState({ host });
+ } else {
+ host = this.state.host;
+ }
+ if (firstTime || props.timestamp !== this.props.timestamp) {
+ this.get(host, props.interval);
+ }
+ }
+ }
}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/reducers.js
new file mode 100644
index 00000000000..1a78dbd5881
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/reducers.js
@@ -0,0 +1,48 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { GEOSERVER_CPU_SEQUENCE, GEOSERVER_MEMORY_SEQUENCE } from './constants';
+
+
+export function geoserverCpuSequence(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEOSERVER_CPU_SEQUENCE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function geoserverMemorySequence(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case GEOSERVER_MEMORY_SEQUENCE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/styles.js
new file mode 100644
index 00000000000..7e9210a44c7
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/geoserver-status/styles.js
@@ -0,0 +1,32 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ },
+
+ stat: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/hardware-performance/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/hardware-performance/index.js
new file mode 100644
index 00000000000..20a77b643e0
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/hardware-performance/index.js
@@ -0,0 +1,59 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import RaisedButton from 'material-ui/RaisedButton';
+import ChartIcon from 'material-ui/svg-icons/av/equalizer';
+import HoverPaper from '../../atoms/hover-paper';
+import GeonodeStatus from '../../cels/geonode-status';
+import GeoserverStatus from '../../cels/geoserver-status';
+import styles from './styles';
+import {withRouter} from 'react-router-dom';
+
+class HardwarePerformance extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.handleClick = () => {
+ this.props.history.push('/performance/hardware');
+ };
+ }
+
+ render() {
+ return (
+
+
+
Hardware Performance
+ }
+ />
+
+
+
+
+ );
+ }
+}
+
+
+export default withRouter(HardwarePerformance);
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/hardware-performance/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/hardware-performance/styles.js
new file mode 100644
index 00000000000..d6c873ddacb
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/hardware-performance/styles.js
@@ -0,0 +1,40 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ },
+
+ header: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+
+ title: {
+ display: 'inline',
+ },
+
+ icon: {
+ minWidth: 36,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/header/actions.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/header/actions.js
similarity index 59%
rename from geonode/monitoring/frontend/src/components/organisms/header/actions.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/header/actions.js
index b98faf380ff..38c5bab8402 100644
--- a/geonode/monitoring/frontend/src/components/organisms/header/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/header/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, formatNow } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/header/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/header/constants.js
new file mode 100644
index 00000000000..f7ba4c0b5f6
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/header/constants.js
@@ -0,0 +1,23 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const INTERVAL = 'INTERVAL';
+export const AUTO_REFRESH_INTERVAL = 10 * 1000;
diff --git a/geonode/monitoring/frontend/src/components/organisms/header/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/header/index.js
similarity index 82%
rename from geonode/monitoring/frontend/src/components/organisms/header/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/header/index.js
index abb4e13cc7a..2f78bd8a248 100644
--- a/geonode/monitoring/frontend/src/components/organisms/header/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/header/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
@@ -10,7 +31,7 @@ import { minute, hour, day, week } from '../../../constants';
import actions from './actions';
import styles from './styles';
import { AUTO_REFRESH_INTERVAL } from './constants';
-
+import {withRouter} from 'react-router-dom';
const mapStateToProps = (state) => ({
from: state.interval.from,
@@ -21,9 +42,6 @@ const mapStateToProps = (state) => ({
@connect(mapStateToProps, actions)
class Header extends React.Component {
- static contextTypes = {
- router: PropTypes.object.isRequired,
- }
static propTypes = {
autoRefresh: PropTypes.bool,
@@ -115,7 +133,7 @@ class Header extends React.Component {
style={styles.time}
icon={}
disabled={props.back === undefined}
- onClick={() => this.context.router.push(props.back)}
+ onClick={() => this.props.history.push(props.back)}
/>
Latest:.
+#
+#########################################################################
+*/
+
+import { formatNow } from '../../../utils';
+import { INTERVAL } from './constants';
+import { minute } from '../../../constants';
+
+
+export function interval(
+ state = {
+ interval: 10 * minute,
+ timestamp: formatNow(),
+ },
+ action,
+) {
+ switch (action.type) {
+ case INTERVAL:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/header/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/header/styles.js
new file mode 100644
index 00000000000..f0dfaedbd46
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/header/styles.js
@@ -0,0 +1,62 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ marginLeft: 20,
+ marginRight: 20,
+ },
+
+ item: {
+ display: 'flex',
+ alignItems: 'center',
+ },
+
+ interval: {
+ marginLeft: 10,
+ marginRight: 10,
+ },
+
+ time: {
+ minWidth: 10,
+ },
+
+ timeLabel: {
+ paddingLeft: 5,
+ paddingRight: 5,
+ textTransform: 'none',
+ },
+
+ icon: {
+ marginLeft: 5,
+ },
+
+ label: {
+ paddingRight: 10,
+ textTransform: 'none',
+ },
+
+ timestamp: {
+ fontWeight: 'bold',
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/most-active-ips/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/most-active-ips/index.js
new file mode 100644
index 00000000000..90bec420c66
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/most-active-ips/index.js
@@ -0,0 +1,42 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import HoverPaper from '../../atoms/hover-paper';
+import Map from '../../atoms/map';
+import styles from './styles';
+
+
+class MostActiveIPs extends React.Component {
+ render() {
+ return (
+
+
Most Active IPs
+
+
+
+
+ );
+ }
+}
+
+
+export default MostActiveIPs;
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/most-active-ips/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/most-active-ips/styles.js
new file mode 100644
index 00000000000..d3e1b1b4c8c
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/most-active-ips/styles.js
@@ -0,0 +1,28 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ marginTop: 10,
+ padding: 10,
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/software-performance/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/software-performance/index.js
new file mode 100644
index 00000000000..1df3ae3657b
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/software-performance/index.js
@@ -0,0 +1,60 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import RaisedButton from 'material-ui/RaisedButton';
+import ChartIcon from 'material-ui/svg-icons/av/equalizer';
+import HoverPaper from '../../atoms/hover-paper';
+import GeonodeData from '../../cels/geonode-data';
+import WSData from '../../cels/ws-data';
+import styles from './styles';
+import {withRouter} from 'react-router-dom';
+
+class SoftwarePerformance extends React.Component {
+
+ constructor(props) {
+ super(props);
+
+ this.handleClick = () => {
+ this.props.history.push('/performance/software');
+ };
+ }
+
+ render() {
+ return (
+
+
+
Software Performance
+ }
+ />
+
+
+
+
+ );
+ }
+}
+
+
+export default withRouter(SoftwarePerformance);
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/software-performance/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/software-performance/styles.js
new file mode 100644
index 00000000000..d81b74d49cf
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/software-performance/styles.js
@@ -0,0 +1,40 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '50%',
+ padding: 10,
+ },
+
+ header: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ },
+
+ title: {
+ display: 'inline',
+ },
+
+ icon: {
+ minWidth: 36,
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/stats/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/stats/index.js
new file mode 100644
index 00000000000..31ce89a8699
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/stats/index.js
@@ -0,0 +1,48 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import HealthCheck from '../../cels/health-check';
+import Uptime from '../../cels/uptime';
+import Alerts from '../../cels/alerts';
+import Errors from '../../cels/errors';
+import styles from './styles';
+
+
+class Stats extends React.Component {
+ render() {
+ return (
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+
+export default Stats;
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/stats/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/stats/styles.js
new file mode 100644
index 00000000000..25e341984e9
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/stats/styles.js
@@ -0,0 +1,47 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ marginTop: 20,
+ marginBottom: 20,
+ },
+
+ metric: {
+ marginRight: 0,
+ },
+
+ first: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ width: '50%',
+ paddingRight: 10,
+ },
+
+ second: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ width: '50%',
+ paddingLeft: 10,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/error.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/error.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/error.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/error.js
index add9fc6345d..4e323117a34 100644
--- a/geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/error.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/error.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/index.js
new file mode 100644
index 00000000000..544c11c8c2f
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/index.js
@@ -0,0 +1,37 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import responses from './responses';
+import throughput from './throughput';
+import error from './error';
+import responseTimes from '../../../cels/ws-data/actions';
+
+
+export default {
+ getResponses: responses.get,
+ resetResponses: responses.reset,
+ getResponseTimes: responseTimes.get,
+ resetResponseTimes: responseTimes.reset,
+ getThroughputs: throughput.get,
+ resetThroughputs: throughput.reset,
+ getErrors: error.get,
+ resetErrors: error.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/responses.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/responses.js
similarity index 58%
rename from geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/responses.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/responses.js
index 28dc113c188..5a55d728e4f 100644
--- a/geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/responses.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/responses.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/throughput.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/throughput.js
similarity index 59%
rename from geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/throughput.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/throughput.js
index c6eafcaed45..8c21de0494d 100644
--- a/geonode/monitoring/frontend/src/components/organisms/ws-analytics/actions/throughput.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/actions/throughput.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch, sequenceInterval } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/constants.js
new file mode 100644
index 00000000000..f26ab962597
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/constants.js
@@ -0,0 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const WS_RESPONSE_SEQUENCE = 'WS_RESPONSE_SEQUENCE';
+export const WS_THROUGHPUT_SEQUENCE = 'WS_THROUGHPUT_SEQUENCE';
+export const WS_ERROR_SEQUENCE = 'WS_ERROR_SEQUENCE';
diff --git a/geonode/monitoring/frontend/src/components/organisms/ws-analytics/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/index.js
similarity index 81%
rename from geonode/monitoring/frontend/src/components/organisms/ws-analytics/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/index.js
index 815b136953e..c7e60e8c8d4 100644
--- a/geonode/monitoring/frontend/src/components/organisms/ws-analytics/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/reducers.js
new file mode 100644
index 00000000000..77a07e4ab6c
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/reducers.js
@@ -0,0 +1,63 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { WS_RESPONSE_SEQUENCE } from './constants';
+import { WS_THROUGHPUT_SEQUENCE } from './constants';
+import { WS_ERROR_SEQUENCE } from './constants';
+
+
+export function wsResponseSequence(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case WS_RESPONSE_SEQUENCE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function wsThroughputSequence(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case WS_THROUGHPUT_SEQUENCE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function wsErrorSequence(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case WS_ERROR_SEQUENCE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/styles.js
new file mode 100644
index 00000000000..571437fcb47
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-analytics/styles.js
@@ -0,0 +1,28 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '50%',
+ padding: 10,
+ marginLeft: 10,
+ },
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/actions/errors.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/errors.js
similarity index 56%
rename from geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/actions/errors.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/errors.js
index 30b8b193bc7..40f95f4030f 100644
--- a/geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/actions/errors.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/errors.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/index.js
new file mode 100644
index 00000000000..803ff3f90ee
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/index.js
@@ -0,0 +1,31 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import responses from './responses';
+import errors from './errors';
+
+
+export default {
+ getResponses: responses.get,
+ resetResponses: responses.reset,
+ getErrors: errors.get,
+ resetErrors: errors.reset,
+};
diff --git a/geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/actions/responses.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/responses.js
similarity index 57%
rename from geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/actions/responses.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/responses.js
index d5283f552e2..1b727944378 100644
--- a/geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/actions/responses.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/actions/responses.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../../utils';
import apiUrl from '../../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/constants.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/constants.js
new file mode 100644
index 00000000000..d10fad76f9c
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/constants.js
@@ -0,0 +1,23 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const WS_LAYER_RESPONSE = 'WS_LAYER_RESPONSE';
+export const WS_LAYER_ERROR = 'WS_LAYER_ERROR';
diff --git a/geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/index.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/index.js
similarity index 75%
rename from geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/index.js
rename to geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/index.js
index 29d589a56eb..f1440dc6024 100644
--- a/geonode/monitoring/frontend/src/components/organisms/ws-layers-analytics/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/reducers.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/reducers.js
new file mode 100644
index 00000000000..b3cf9709278
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/reducers.js
@@ -0,0 +1,48 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { WS_LAYER_ERROR, WS_LAYER_RESPONSE } from './constants';
+
+
+export function wsLayerResponse(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case WS_LAYER_RESPONSE:
+ return action.payload;
+ default:
+ return state;
+ }
+}
+
+
+export function wsLayerError(
+ state = { status: 'initial' },
+ action,
+) {
+ switch (action.type) {
+ case WS_LAYER_ERROR:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/styles.js b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/styles.js
new file mode 100644
index 00000000000..4ec27cb12d0
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/components/organisms/ws-layers-analytics/styles.js
@@ -0,0 +1,33 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ content: {
+ width: '100%',
+ padding: 10,
+ },
+
+ header: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/constants.js b/geonode/monitoring/frontend/monitoring/src/constants.js
new file mode 100644
index 00000000000..a2372ea0d84
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/constants.js
@@ -0,0 +1,35 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const postLogoutURL = '/login/';
+
+
+export const errors = {
+ login: {
+ UNAUTHORIZED: 'Unable to log you in. Wrong email or password',
+ },
+};
+
+export const second = 1;
+export const minute = 60;
+export const hour = minute * 60;
+export const day = hour * 24;
+export const week = day * 7;
diff --git a/geonode/monitoring/frontend/monitoring/src/containers/actions.js b/geonode/monitoring/frontend/monitoring/src/containers/actions.js
new file mode 100644
index 00000000000..955d797880d
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/containers/actions.js
@@ -0,0 +1,32 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { createAction } from 'redux-actions';
+import { THEME } from './constants';
+
+
+const changeTheme = createAction(THEME, theme => theme);
+
+
+const actions = { changeTheme };
+
+
+export default actions;
diff --git a/geonode/monitoring/frontend/src/containers/app/actions.js b/geonode/monitoring/frontend/monitoring/src/containers/app/actions.js
similarity index 57%
rename from geonode/monitoring/frontend/src/containers/app/actions.js
rename to geonode/monitoring/frontend/monitoring/src/containers/app/actions.js
index 089a83be94e..f2b60ec09be 100644
--- a/geonode/monitoring/frontend/src/containers/app/actions.js
+++ b/geonode/monitoring/frontend/monitoring/src/containers/app/actions.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../utils';
import apiUrl from '../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/containers/app/constants.js b/geonode/monitoring/frontend/monitoring/src/containers/app/constants.js
new file mode 100644
index 00000000000..780383e9fcd
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/containers/app/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default 'SERVICES';
diff --git a/geonode/monitoring/frontend/src/containers/app/index.js b/geonode/monitoring/frontend/monitoring/src/containers/app/index.js
similarity index 71%
rename from geonode/monitoring/frontend/src/containers/app/index.js
rename to geonode/monitoring/frontend/monitoring/src/containers/app/index.js
index cd4af107511..7b39d234c1b 100644
--- a/geonode/monitoring/frontend/src/containers/app/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/containers/app/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
@@ -14,7 +35,6 @@ import Home from '../../pages/home';
import SWPerf from '../../pages/software-performance';
import reset from '../../reset.js';
-import fonts from '../../fonts/fonts.js';
import actions from './actions';
import styles from './styles';
@@ -40,7 +60,6 @@ class App extends React.Component {
render() {
return (
-
{this.props.children}
diff --git a/geonode/monitoring/frontend/monitoring/src/containers/app/reducers.js b/geonode/monitoring/frontend/monitoring/src/containers/app/reducers.js
new file mode 100644
index 00000000000..3376c448a33
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/containers/app/reducers.js
@@ -0,0 +1,35 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import SERVICES from './constants';
+
+
+export function services(
+ state = { open: false, services: '' },
+ action
+) {
+ switch (action.type) {
+ case SERVICES:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/containers/app/styles.js b/geonode/monitoring/frontend/monitoring/src/containers/app/styles.js
new file mode 100644
index 00000000000..0dcecbdf2d7
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/containers/app/styles.js
@@ -0,0 +1,26 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export default {
+ root: {
+ backgroundColor: '#f2f2f2',
+ },
+};
diff --git a/geonode/monitoring/frontend/monitoring/src/containers/constants.js b/geonode/monitoring/frontend/monitoring/src/containers/constants.js
new file mode 100644
index 00000000000..cbfb43153c2
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/containers/constants.js
@@ -0,0 +1,22 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const THEME = 'THEME';
diff --git a/geonode/monitoring/frontend/monitoring/src/containers/main.js b/geonode/monitoring/frontend/monitoring/src/containers/main.js
new file mode 100644
index 00000000000..022f3c63b65
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/containers/main.js
@@ -0,0 +1,49 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import PropTypes from 'prop-types';
+import { connect } from 'react-redux';
+import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
+import { StyleRoot } from 'radium';
+
+const mapStateToProps = (state) => ({
+ theme: state.theme.theme,
+});
+
+
+function Main(props) {
+ return (
+
+
+ {props.children}
+
+
+ );
+}
+
+
+Main.propTypes = {
+ theme: PropTypes.object,
+};
+
+
+export default connect(mapStateToProps)(Main);
diff --git a/geonode/monitoring/frontend/monitoring/src/containers/reducers.js b/geonode/monitoring/frontend/monitoring/src/containers/reducers.js
new file mode 100644
index 00000000000..6eb84d91a95
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/containers/reducers.js
@@ -0,0 +1,36 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import { THEME } from './constants';
+import themes from '../themes';
+
+
+export default function theme(
+ state = { open: false, theme: themes.light },
+ action
+) {
+ switch (action.type) {
+ case THEME:
+ return action.payload;
+ default:
+ return state;
+ }
+}
diff --git a/geonode/monitoring/frontend/monitoring/src/containers/root.js b/geonode/monitoring/frontend/monitoring/src/containers/root.js
new file mode 100644
index 00000000000..50455ee3135
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/containers/root.js
@@ -0,0 +1,38 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import { Provider } from 'react-redux';
+import Main from './main';
+import store from '../store';
+
+
+function Root() {
+ return (
+
+
+
+
+
+ );
+}
+
+export default Root;
diff --git a/geonode/monitoring/frontend/monitoring/src/index.js b/geonode/monitoring/frontend/monitoring/src/index.js
new file mode 100644
index 00000000000..e2c3ac91586
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/index.js
@@ -0,0 +1,38 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import React from 'react';
+import { render } from 'react-dom';
+import Root from './containers/root';
+import injectTapEventPlugin from 'react-tap-event-plugin';
+
+// Needed for onTouchTap
+// http://stackoverflow.com/a/34015469/988941
+injectTapEventPlugin();
+
+
+const spinner = document.getElementById('spinner');
+spinner.style.display = 'none';
+
+render(
+ ,
+ document.getElementById('monitoring')
+);
diff --git a/geonode/monitoring/frontend/src/pages/alert-config/actions/get.js b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/get.js
similarity index 53%
rename from geonode/monitoring/frontend/src/pages/alert-config/actions/get.js
rename to geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/get.js
index a00cff9371e..8bd8a9d02ae 100644
--- a/geonode/monitoring/frontend/src/pages/alert-config/actions/get.js
+++ b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/get.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/index.js b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/index.js
new file mode 100644
index 00000000000..f208f0990aa
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/index.js
@@ -0,0 +1,29 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+import getActions from './get';
+import setActions from './set';
+
+
+export default {
+ get: getActions.get,
+ set: setActions.set,
+};
diff --git a/geonode/monitoring/frontend/src/pages/alert-config/actions/set.js b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/set.js
similarity index 54%
rename from geonode/monitoring/frontend/src/pages/alert-config/actions/set.js
rename to geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/set.js
index e2aa33e535e..f8e851206c4 100644
--- a/geonode/monitoring/frontend/src/pages/alert-config/actions/set.js
+++ b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/set.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import { createAction } from 'redux-actions';
import { fetch } from '../../../utils';
import apiUrl from '../../../backend';
diff --git a/geonode/monitoring/frontend/monitoring/src/pages/alert-config/constants.js b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/constants.js
new file mode 100644
index 00000000000..27b4329047d
--- /dev/null
+++ b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/constants.js
@@ -0,0 +1,23 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
+export const ALERT_CONFIG_GET = 'ALERT_CONFIG_GET';
+export const ALERT_CONFIG_SET = 'ALERT_CONFIG_SET';
diff --git a/geonode/monitoring/frontend/src/pages/alert-config/index.js b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/index.js
similarity index 86%
rename from geonode/monitoring/frontend/src/pages/alert-config/index.js
rename to geonode/monitoring/frontend/monitoring/src/pages/alert-config/index.js
index 424a006e248..f05520c1e21 100644
--- a/geonode/monitoring/frontend/src/pages/alert-config/index.js
+++ b/geonode/monitoring/frontend/monitoring/src/pages/alert-config/index.js
@@ -1,3 +1,24 @@
+/*
+#########################################################################
+#
+# Copyright (C) 2019 OSGeo
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+#########################################################################
+*/
+
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
@@ -23,7 +44,7 @@ class AlertConfig extends React.Component {
static propTypes = {
alertConfig: PropTypes.object,
get: PropTypes.func.isRequired,
- params: PropTypes.object,
+ match: PropTypes.object,
set: PropTypes.func.isRequired,
}
@@ -51,7 +72,7 @@ class AlertConfig extends React.Component {
this.handleSubmit = (event) => {
event.preventDefault();
const data = stateToData(this.state);
- this.props.set(this.props.params.alertId, data);
+ this.props.set(this.props.match.params.alertId, data);
};
this.handleInputChange = (event, name) => {
@@ -88,7 +109,7 @@ class AlertConfig extends React.Component {
}
componentWillMount() {
- this.props.get(this.props.params.alertId);
+ this.props.get(this.props.match.params.alertId);
}
componentWillReceiveProps(nextProps) {
@@ -180,7 +201,7 @@ class AlertConfig extends React.Component {
});
return (