X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fframework%2Fwidgets%2Fskyquake_container%2FskyquakeContainerSource.js;h=8afaf83f33306fcd22ab8d7e322dc0b30e802b5a;hp=a26de2b3da433016e604b531877eed3613a50899;hb=2da8b7a246ba17396c5bc218a0b7f1685fb8d304;hpb=267d43e391d633c26d45db31125612355665f193 diff --git a/skyquake/framework/widgets/skyquake_container/skyquakeContainerSource.js b/skyquake/framework/widgets/skyquake_container/skyquakeContainerSource.js index a26de2b3d..8afaf83f3 100644 --- a/skyquake/framework/widgets/skyquake_container/skyquakeContainerSource.js +++ b/skyquake/framework/widgets/skyquake_container/skyquakeContainerSource.js @@ -18,13 +18,14 @@ import Alt from './skyquakeAltInstance.js'; import $ from 'jquery'; import SkyquakeContainerActions from './skyquakeContainerActions' +import rw from 'utils/rw.js'; +import Utils from 'utils/utils.js'; -let Utils = require('utils/utils.js'); -let API_SERVER = require('utils/rw.js').getSearchParams(window.location).api_server; +let API_SERVER = rw.getSearchParams(window.location).api_server; let HOST = API_SERVER; -let NODE_PORT = require('utils/rw.js').getSearchParams(window.location).api_port || ((window.location.protocol == 'https:') ? 8443 : 8000); -let DEV_MODE = require('utils/rw.js').getSearchParams(window.location).dev_mode || false; -let RW_REST_API_PORT = require('utils/rw.js').getSearchParams(window.location).rw_rest_api_port || 8008; +let NODE_PORT = rw.getSearchParams(window.location).api_port || ((window.location.protocol == 'https:') ? 8443 : 8000); +let DEV_MODE = rw.getSearchParams(window.location).dev_mode || false; +let RW_REST_API_PORT = rw.getSearchParams(window.location).rw_rest_api_port || 8008; if (DEV_MODE) { HOST = window.location.protocol + '//' + window.location.hostname; @@ -78,7 +79,7 @@ export default { remote: function(state, location, streamSource) { return new Promise((resolve, reject) => { $.ajax({ - url: '//' + window.location.hostname + ':' + window.location.port + '/socket-polling', + url: '//' + window.location.hostname + ':' + window.location.port + '/socket-polling?api_server=' + API_SERVER, type: 'POST', beforeSend: Utils.addAuthorizationStub, data: {