From: Laurence Maultsby Date: Fri, 10 Mar 2017 14:30:25 +0000 (-0500) Subject: Removed hard coded localhost from filemanager socket. Added comparison of filemanager... X-Git-Tag: v2.0.0~38 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=commitdiff_plain;h=4448de0491e9fdd6424f460a9f646379998590bf Removed hard coded localhost from filemanager socket. Added comparison of filemanager data to prevent unnecessary re-rendering of details manager Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/composer/src/src/components/filemanager/FileManagerSource.js b/skyquake/plugins/composer/src/src/components/filemanager/FileManagerSource.js index 325d0263c..fec49f134 100644 --- a/skyquake/plugins/composer/src/src/components/filemanager/FileManagerSource.js +++ b/skyquake/plugins/composer/src/src/components/filemanager/FileManagerSource.js @@ -150,7 +150,7 @@ const FileManagerSource = { type: 'POST', beforeSend: Utils.addAuthorizationStub, data: { - url: 'http://localhost:8000/composer/api/file-manager/jobs/' + packageID + '?api_server=' + API_SERVER, + url: 'composer/api/file-manager/jobs/' + packageID + '?api_server=' + API_SERVER, }, success: function(data, textStatus, jqXHR) { Utils.checkAndResolveSocketRequest(data, resolve, reject); @@ -175,7 +175,7 @@ const FileManagerSource = { type: 'POST', beforeSend: Utils.addAuthorizationStub, data: { - url: 'http://localhost:8000/composer/api/file-manager?api_server=' + utils.getSearchParams(window.location).api_server +'&package_type=' + type + '&package_id=' + id + url: 'composer/api/file-manager?api_server=' + utils.getSearchParams(window.location).api_server +'&package_type=' + type + '&package_id=' + id }, success: function(data, textStatus, jqXHR) { Utils.checkAndResolveSocketRequest(data, resolve, reject); diff --git a/skyquake/plugins/composer/src/src/stores/ComposerAppStore.js b/skyquake/plugins/composer/src/src/stores/ComposerAppStore.js index ff24cbb92..97813ea02 100644 --- a/skyquake/plugins/composer/src/src/stores/ComposerAppStore.js +++ b/skyquake/plugins/composer/src/src/stores/ComposerAppStore.js @@ -492,8 +492,10 @@ class ComposerAppStore { files: false } } + if(!_.isEqual(newState.files, this.files) || ! _.isEqual(newState.fileState, this.fileState)) { + this.setState(newState); + } - this.setState(newState); } function normalizeTree(data) { let f = {