X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Fstores%2FCatalogPackageManagerStore.js;h=3a82114a085ab811bad8a2e4d3518447e6055d5d;hp=22d63590fc07e0555707b57d5ee5abec07c03c0e;hb=e4df686d0a75f68183f594363253f059d1ed3a2b;hpb=bf7fb7be119bdd14806000ca6ddf67e2ce3491f3 diff --git a/skyquake/plugins/composer/src/src/stores/CatalogPackageManagerStore.js b/skyquake/plugins/composer/src/src/stores/CatalogPackageManagerStore.js index 22d63590f..3a82114a0 100644 --- a/skyquake/plugins/composer/src/src/stores/CatalogPackageManagerStore.js +++ b/skyquake/plugins/composer/src/src/stores/CatalogPackageManagerStore.js @@ -1,6 +1,6 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -119,12 +119,15 @@ class CatalogPackageManagerStore { onUploadCatalogPackageStatusUpdated(response) { const upload = updateStatusInfo(response); this.updatePackage(upload); + console.log('updating package upload') // if pending with no transaction id - do nothing // bc DropZone.js will notify upload progress if (upload.pending && upload.transactionId) { + console.log('checking status') delayStatusCheck(this.getInstance().requestCatalogPackageUploadStatus, upload); } else if (upload.success) { this.getInstance().loadCatalogs(); + console.log('finished uploading to node, requesting status from rest') } } @@ -202,7 +205,7 @@ function updateStatusInfo(response) { statusInfo.pending = true; statusInfo.progress = 100; statusInfo.message = 'Upload completed.'; - statusInfo.transactionId = responseData['transaction-id'] || catalogPackage.transactionId; + statusInfo.transactionId = responseData['transaction_id'] || responseData['transaction-id'] || catalogPackage.transactionId; break; case 'upload-error': statusInfo.error = true; @@ -211,7 +214,7 @@ function updateStatusInfo(response) { case 'download-requested': statusInfo.pending = true; statusInfo.progress = 25; - statusInfo.transactionId = responseData['transaction-id'] || catalogPackage.transactionId; + statusInfo.transactionId = responseData['transaction_id'] || responseData['transaction-id'] || catalogPackage.transactionId; break; case 'pending': statusInfo.pending = true;