X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fframework%2Futils%2Futils.js;h=fc6b5927177d9d72c2a7e13806590b4007e73997;hb=3a533017a7a7213c0a63cd755bd6cd50c22ec004;hp=8a54ff338a965fdcd33b8e774649a4d2c1b615fc;hpb=a6690e0878612ca0ffb7119c95a033dd1d7d1246;p=osm%2FUI.git diff --git a/skyquake/framework/utils/utils.js b/skyquake/framework/utils/utils.js index 8a54ff338..fc6b59271 100644 --- a/skyquake/framework/utils/utils.js +++ b/skyquake/framework/utils/utils.js @@ -18,9 +18,9 @@ //Login needs to be refactored. Too many cross dependencies var AuthActions = require('../widgets/login/loginAuthActions.js'); var $ = require('jquery'); -var rw = require('utils/rw.js'); +import rw from './rw.js'; var API_SERVER = rw.getSearchParams(window.location).api_server; -let NODE_PORT = require('utils/rw.js').getSearchParams(window.location).api_port || ((window.location.protocol == 'https:') ? 8443 : 8000); +let NODE_PORT = rw.getSearchParams(window.location).api_port || ((window.location.protocol == 'https:') ? 8443 : 8000); var SockJS = require('sockjs-client'); var Utils = {}; @@ -189,7 +189,7 @@ Utils.setAuthentication = function(username, password, cb) { window.sessionStorage.setItem("auth", AuthBase64); self.detectInactivity(); $.ajax({ - url: '//' + window.location.hostname + ':' + NODE_PORT + '/check-auth?api_server=' + API_SERVER, + url: '//' + window.location.hostname + ':' + window.location.port + '/check-auth?api_server=' + API_SERVER, type: 'GET', beforeSend: Utils.addAuthorizationStub, success: function(data) {