From 8e9c0653dd6c6862123c9609ae34e1206d86456e Mon Sep 17 00:00:00 2001
From: talig <talig@amdocs.com>
Date: Wed, 20 Dec 2017 14:30:43 +0200
Subject: Add collaboration feature

Issue-ID: SDC-767
Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795
Signed-off-by: talig <talig@amdocs.com>
---
 openecomp-ui/src/sdc-app/Application.jsx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

(limited to 'openecomp-ui/src/sdc-app/Application.jsx')

diff --git a/openecomp-ui/src/sdc-app/Application.jsx b/openecomp-ui/src/sdc-app/Application.jsx
index 10e866a602..4915d26044 100644
--- a/openecomp-ui/src/sdc-app/Application.jsx
+++ b/openecomp-ui/src/sdc-app/Application.jsx
@@ -14,13 +14,28 @@
  * permissions and limitations under the License.
  */
 import React from 'react';
+import PropTypes from 'prop-types';
 import {Provider} from 'react-redux';
 import GlobalModal from 'nfvo-components/modal/GlobalModal.js';
 import Loader from 'nfvo-components/loader/Loader.jsx';
+import WebSocketUtil from 'nfvo-utils/WebSocketUtil.js';
+import UserNotificationsActionHelper from 'sdc-app/onboarding/userNotifications/UserNotificationsActionHelper.js';
 import store from './AppStore.js';
 
 
 class Application extends React.Component {
+	static propTypes = {
+		openSocket: PropTypes.bool
+	};
+	componentDidMount() {
+		const {openSocket = true} = this.props;
+		if(openSocket) {
+			UserNotificationsActionHelper.notificationsFirstHandling(store.dispatch);
+		}
+	}
+	componentWillUnmount() {
+		WebSocketUtil.close();
+	}
 	render() {
 		return (
 			<Provider store={store}>
-- 
cgit 1.2.3-korg

