diff --git a/js/pages/incidence-rates/components/iranalysis/components/results.html b/js/pages/incidence-rates/components/iranalysis/components/results.html index 665fb77a4..8a2464901 100644 --- a/js/pages/incidence-rates/components/iranalysis/components/results.html +++ b/js/pages/incidence-rates/components/iranalysis/components/results.html @@ -142,15 +142,24 @@

+ + + + - - diff --git a/js/pages/incidence-rates/components/iranalysis/components/results.js b/js/pages/incidence-rates/components/iranalysis/components/results.js index e77519f9f..58a7756f3 100644 --- a/js/pages/incidence-rates/components/iranalysis/components/results.js +++ b/js/pages/incidence-rates/components/iranalysis/components/results.js @@ -38,13 +38,7 @@ define([ this.selectedSourceId = sharedState.IRAnalysis.selectedSourceId; this.selectedSourceId.subscribe(() => this.expandSelectedSource()); this.hasSourceAccess = authApi.hasSourceAccess; - this.generationSources = ko.computed(() => params.sources().map(s => ({ - ...s.source, - disabled: this.isInProgress(s) || !this.hasSourceAccess(s.source.sourceKey), - disabledReason: this.isInProgress(s) - ? ko.i18n('ir.results.generationInProgress', 'Generation is in progress')() - : !this.hasSourceAccess(s.source.sourceKey) ? ko.i18n('ir.results.accessDenied', 'Access denied')() : null, - }))); + this.execute = params.execute; this.cancelExecution = params.cancelExecution; this.stoppingSources = params.stoppingSources; @@ -165,6 +159,16 @@ define([ return (sourceItem.info() && constants.isInProgress(sourceItem.info().executionInfo.status)); } + isStopping(sourceItem) { + return ko.pureComputed(() => { + if (sourceItem.info() && Object.keys(this.stoppingSources()).length > 0) { + return(this.stoppingSources()[sourceItem.source.sourceKey]); + } else { + return(false); + } + }); + } + isSummaryLoading(sourceItem) { return sourceItem.source && this.loadingSummary && this.loadingSummary().find(sourceKey => sourceKey === sourceItem.source.sourceKey); }