Removed hard coded localhost from filemanager socket. Added comparison of filemanager...
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Fri, 10 Mar 2017 14:30:25 +0000 (09:30 -0500)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Fri, 10 Mar 2017 14:30:25 +0000 (09:30 -0500)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/composer/src/src/components/filemanager/FileManagerSource.js
skyquake/plugins/composer/src/src/stores/ComposerAppStore.js

index 325d026..fec49f1 100644 (file)
@@ -150,7 +150,7 @@ const FileManagerSource = {
                     type: 'POST',
                     beforeSend: Utils.addAuthorizationStub,
                     data: {
                     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);
                     },
                     success: function(data, textStatus, jqXHR) {
                         Utils.checkAndResolveSocketRequest(data, resolve, reject);
@@ -175,7 +175,7 @@ const FileManagerSource = {
                     type: 'POST',
                     beforeSend: Utils.addAuthorizationStub,
                     data: {
                     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);
                     },
                     success: function(data, textStatus, jqXHR) {
                         Utils.checkAndResolveSocketRequest(data, resolve, reject);
index ff24cbb..97813ea 100644 (file)
@@ -492,8 +492,10 @@ class ComposerAppStore {
                                files: false
                        }
                }
                                files: false
                        }
                }
+               if(!_.isEqual(newState.files, this.files) || ! _.isEqual(newState.fileState, this.fileState)) {
+                       this.setState(newState);
+               }
 
 
-                       this.setState(newState);
         }
                function normalizeTree(data) {
                        let f = {
         }
                function normalizeTree(data) {
                        let f = {