1. Allow to work behind port forwarding
   - use request's port instead of hardcoded
2. Support deployemnt separately from SO:
   - add api_server as app parameter
   - remove unnecesary using on client side

Signed-off-by: Gennadiy Dubina <gennadiy.dubina@dataart.com>
diff --git a/skyquake/framework/utils/utils.js b/skyquake/framework/utils/utils.js
index 8a54ff3..e8e9ad1 100644
--- a/skyquake/framework/utils/utils.js
+++ b/skyquake/framework/utils/utils.js
@@ -189,7 +189,7 @@
     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) {
diff --git a/skyquake/framework/widgets/JSONViewer/JSONViewer.scss b/skyquake/framework/widgets/JSONViewer/JSONViewer.scss
index 08fcefd..62495b2 100644
--- a/skyquake/framework/widgets/JSONViewer/JSONViewer.scss
+++ b/skyquake/framework/widgets/JSONViewer/JSONViewer.scss
@@ -1,4 +1,5 @@
 .JSONViewer {
+	max-width: 640px;
 	/*
 	copied from node_modules/prismjs/themes/prismjs.css
 */
diff --git a/skyquake/framework/widgets/skyquake_container/skyquakeContainerSource.js b/skyquake/framework/widgets/skyquake_container/skyquakeContainerSource.js
index 49356a4..ae2147a 100644
--- a/skyquake/framework/widgets/skyquake_container/skyquakeContainerSource.js
+++ b/skyquake/framework/widgets/skyquake_container/skyquakeContainerSource.js
@@ -55,7 +55,7 @@
             remote: function(state, recordID) {
                 return new Promise(function(resolve, reject) {
                     $.ajax({
-                        url: '//' + window.location.hostname + ':' + NODE_PORT + '/api/operational/restconf-state/streams?api_server=' + API_SERVER,
+                        url: '//' + window.location.hostname + ':' + window.location.port + '/api/operational/restconf-state/streams?api_server=' + API_SERVER,
                         type: 'GET',
                         beforeSend: Utils.addAuthorizationStub,
                         success: function(data) {
@@ -78,7 +78,7 @@
             remote: function(state, location, streamSource) {
                 return new Promise((resolve, reject) => {
                     $.ajax({
-                        url: '//' + window.location.hostname + ':' + NODE_PORT + '/socket-polling?api_server=' + API_SERVER,
+                        url: '//' + window.location.hostname + ':' + window.location.port + '/socket-polling',
                         type: 'POST',
                         beforeSend: Utils.addAuthorizationStub,
                         data: {