X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fframework%2Fwidgets%2Fskyquake_container%2FskyquakeContainerStore.js;h=56ebdda03bfb77a6933ac16410f210feadda8cfe;hp=d1a8a9e28440ed3afee8e73e8fc751d9b9b184e5;hb=4ef8c40c2c013c21f5487330daeab2561ba25fb3;hpb=4f7855e76fe46d8678b178a341ac9e8cc9f27f8a diff --git a/skyquake/framework/widgets/skyquake_container/skyquakeContainerStore.js b/skyquake/framework/widgets/skyquake_container/skyquakeContainerStore.js index d1a8a9e28..56ebdda03 100644 --- a/skyquake/framework/widgets/skyquake_container/skyquakeContainerStore.js +++ b/skyquake/framework/widgets/skyquake_container/skyquakeContainerStore.js @@ -20,9 +20,10 @@ import Alt from './skyquakeAltInstance.js'; import SkyquakeContainerSource from './skyquakeContainerSource.js'; import SkyquakeContainerActions from './skyquakeContainerActions'; -import _ from 'lodash'; +import _indexOf from 'lodash/indexOf'; //Temporary, until api server is on same port as webserver -var rw = require('utils/rw.js'); +import rw from 'utils/rw.js'; + var API_SERVER = rw.getSearchParams(window.location).api_server; var UPLOAD_SERVER = rw.getSearchParams(window.location).upload_server; @@ -100,7 +101,7 @@ class SkyquakeContainerStore { } else { // Temp to test before adding multi-sources data.notification.source = streamSource; - if (_.indexOf(self.notifications, data.notification) == -1) { + if (_indexOf(self.notifications, data.notification) == -1) { // newly appreared event. // Add to the notifications list and setState self.notifications.unshift(data.notification); @@ -236,4 +237,4 @@ function getCurrentPlugin() { } } -export default Alt.createStore(SkyquakeContainerStore); +export default Alt.createStore(SkyquakeContainerStore, 'SkyquakeContainerStore');