X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fframework%2Fwidgets%2Fskyquake_container%2FeventCenter.jsx;h=7df4e3ec20896f864fa9c607e232c7892c51b2cb;hp=75d2d52db27fc82f6bd87279f090f955cbb41edd;hb=223366ccc6537984552d07f827750e14e83219b8;hpb=132f9b77e1c32b82eb1c27cea048a5c1f2bfcb56 diff --git a/skyquake/framework/widgets/skyquake_container/eventCenter.jsx b/skyquake/framework/widgets/skyquake_container/eventCenter.jsx index 75d2d52db..7df4e3ec2 100644 --- a/skyquake/framework/widgets/skyquake_container/eventCenter.jsx +++ b/skyquake/framework/widgets/skyquake_container/eventCenter.jsx @@ -28,7 +28,9 @@ import { Link } from 'react-router'; import Utils from 'utils/utils.js'; import Crouton from 'react-crouton'; import TreeView from 'react-treeview'; -import _ from 'lodash'; +import _isEqual from 'lodash/isEqual'; +import _merge from 'lodash/merge'; +import _indexOf from 'lodash/indexOf'; import '../../../node_modules/react-treeview/react-treeview.css'; import './eventCenter.scss'; @@ -48,7 +50,7 @@ export default class EventCenter extends React.Component { if (props.newNotificationEvent && props.newNotificationMsg) { if (latestNotification) { latestNotification = JSON.parse(latestNotification); - if (!_.isEqual(props.newNotificationMsg, latestNotification)) { + if (!_isEqual(props.newNotificationMsg, latestNotification)) { stateObject.newNotificationEvent = props.newNotificationEvent; stateObject.newNotificationMsg = props.newNotificationMsg; sessionStorage.setItem('latestNotification', JSON.stringify(stateObject.newNotificationMsg)); @@ -67,7 +69,7 @@ export default class EventCenter extends React.Component { } if (notificationList) { - stateObject.notifications = _.merge(notificationList, props.notifications); + stateObject.notifications = _merge(notificationList, props.notifications); } else { stateObject.notifications = props.notifications; } @@ -112,7 +114,7 @@ export default class EventCenter extends React.Component { notificationFields.eventTime = notification.eventTime; Object.keys(notification).map((notificationKey) => { - if (_.indexOf(['source', 'eventTime'], notificationKey) == -1) { + if (_indexOf(['source', 'eventTime'], notificationKey) == -1) { notificationFields.eventKey = notificationKey; notificationFields.details = notification[notificationFields.eventKey]; }