From de2ff9b1f699dcc859dac23c6c40eff4e6b93e74 Mon Sep 17 00:00:00 2001 From: Jacob Porter Date: Thu, 28 May 2020 19:07:23 -0400 Subject: [PATCH 1/4] Added call to _setVisibleAttr. Fixes #2362 --- public/js/p3/widget/PathwaySummaryGridContainer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/js/p3/widget/PathwaySummaryGridContainer.js b/public/js/p3/widget/PathwaySummaryGridContainer.js index 5697d1ba5f..7a805547e4 100644 --- a/public/js/p3/widget/PathwaySummaryGridContainer.js +++ b/public/js/p3/widget/PathwaySummaryGridContainer.js @@ -49,6 +49,9 @@ define([ return; } // console.log("PathwaySummaryGridContainer _setStateAttr: ", state); + if (!this._firstView) { + this._setVisibleAttr(true); + } if (this.grid) { // console.log(" call set state on this.grid: ", this.grid); this.grid.set('state', state); From 0ee718a9ba7cfab74d49cd0e8dc476971028e1b2 Mon Sep 17 00:00:00 2001 From: Jacob Porter Date: Fri, 5 Jun 2020 03:59:54 -0400 Subject: [PATCH 2/4] Added timeout functionality for pathway summary. Related to #2362. --- public/js/p3/store/PathwaySummaryMemoryStore.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/public/js/p3/store/PathwaySummaryMemoryStore.js b/public/js/p3/store/PathwaySummaryMemoryStore.js index d35b30a768..05b8d6bcda 100644 --- a/public/js/p3/store/PathwaySummaryMemoryStore.js +++ b/public/js/p3/store/PathwaySummaryMemoryStore.js @@ -96,7 +96,7 @@ define([ 'json.facet': '{stat:{field:{field:pathway_id,limit:-1,facet:{gene_count:"unique(feature_id)"}}}}' }; - this._loadingDeferred = when(request.post(_self.apiServer + '/pathway/', { + this._loadingDeferred = when(request.post(_self.apiServer + 'pathway/', { handleAs: 'json', headers: { Accept: 'application/solr+json', @@ -173,7 +173,7 @@ define([ return p + '=' + query[p]; }).join('&'); - return when(request.post(_self.apiServer + '/pathway/', { + return when(request.post(_self.apiServer + 'pathway/', { handleAs: 'json', headers: { Accept: 'application/solr+json', @@ -221,7 +221,17 @@ define([ return true; }, function (err) { console.error('Error in PathwaySummaryMemoryStore: ', err); + Topic.publish('PathwaySummary', 'hideLoadingMask'); + Topic.publish('PathwaySummary', 'timeOut'); + setTimeout(function () { alert('The query took too long or could not be loaded.', err); }, 1000); }); + }, function (err) { + console.error('Error in PathwaySummaryMemoryStore: ', err); + if (err.message != 'Request canceled') { + Topic.publish('PathwaySummary', 'hideLoadingMask'); + Topic.publish('PathwaySummary', 'timeOut'); + setTimeout(function () { alert('The query took too long or could not be loaded.', err); }, 1000); + } }); return this._loadingDeferred; } From bff6d120a3f93d773037299db64698a71be2e66a Mon Sep 17 00:00:00 2001 From: Jacob Porter Date: Fri, 5 Jun 2020 04:08:03 -0400 Subject: [PATCH 3/4] Added timeout functionality for pathway summary. Related to #2362. --- public/js/p3/widget/viewer/PathwaySummary.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/js/p3/widget/viewer/PathwaySummary.js b/public/js/p3/widget/viewer/PathwaySummary.js index b17bc69fbd..d04fc64321 100644 --- a/public/js/p3/widget/viewer/PathwaySummary.js +++ b/public/js/p3/widget/viewer/PathwaySummary.js @@ -47,6 +47,9 @@ define([ case 'updateHeader': this.totalCountNode.innerHTML = lang.replace('Out of {summary.total} genes selected, {summary.found} genes found in {summary.pathways} pathways', { summary: value }); break; + case 'timeOut': + this.totalCountNode.innerHTML = lang.replace('The query took too long or could not be loaded.'); + break; case 'showLoadingMask': this.loadingMask.show(); break; From 8fc3c42d5100b4060e3cdc445f1d498548e09f2c Mon Sep 17 00:00:00 2001 From: Jacob Porter Date: Thu, 25 Jun 2020 16:10:19 -0400 Subject: [PATCH 4/4] Added slash back into pathway query. --- public/js/p3/store/PathwaySummaryMemoryStore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/p3/store/PathwaySummaryMemoryStore.js b/public/js/p3/store/PathwaySummaryMemoryStore.js index 05b8d6bcda..32db7b3fb9 100644 --- a/public/js/p3/store/PathwaySummaryMemoryStore.js +++ b/public/js/p3/store/PathwaySummaryMemoryStore.js @@ -96,7 +96,7 @@ define([ 'json.facet': '{stat:{field:{field:pathway_id,limit:-1,facet:{gene_count:"unique(feature_id)"}}}}' }; - this._loadingDeferred = when(request.post(_self.apiServer + 'pathway/', { + this._loadingDeferred = when(request.post(_self.apiServer + '/pathway/', { handleAs: 'json', headers: { Accept: 'application/solr+json', @@ -173,7 +173,7 @@ define([ return p + '=' + query[p]; }).join('&'); - return when(request.post(_self.apiServer + 'pathway/', { + return when(request.post(_self.apiServer + '/pathway/', { handleAs: 'json', headers: { Accept: 'application/solr+json',