This is an automated email from the ASF dual-hosted git repository. machristie pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit c8944350c7e812b9cd2932d9770a57090918d5c8 Author: Marcus Christie <[email protected]> AuthorDate: Thu Jan 18 10:22:04 2018 -0500 AIRAVATA-2598 Disable compute host selector until deployments loaded --- .../experiment/ComputationalResourceSchedulingEditor.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ComputationalResourceSchedulingEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ComputationalResourceSchedulingEditor.vue index dc35e34..38ee6dd 100644 --- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ComputationalResourceSchedulingEditor.vue +++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ComputationalResourceSchedulingEditor.vue @@ -9,7 +9,8 @@ v-model="resourceHostId" :options="computeResourceOptions" required @change="computeResourceChanged" - :state="getValidationState('resourceHostId')"> + :state="getValidationState('resourceHostId')" + :disabled="loading"> <template slot="first"> <option :value="null" disabled>Select a Compute Resource</option> </template> @@ -58,6 +59,8 @@ export default { applicationDeployments: [], appDeploymentId: null, resourceHostId: null, + // TODO: replace this with Loading spinner, better mechanism + loadingCount: 0, } }, components: { @@ -81,6 +84,9 @@ export default { computeResourceOptions.sort((a, b) => a.text.localeCompare(b.text)); return computeResourceOptions; }, + loading: function() { + return this.loadingCount > 0; + } }, methods: { computeResourceChanged: function(selectedComputeResourceId) { @@ -94,14 +100,18 @@ export default { this.appDeploymentId = selectedApplicationDeployment.appDeploymentId; }, loadApplicationDeployments: function(appModuleId) { + this.loadingCount++; services.ApplicationModuleService.getApplicationDeployments(appModuleId) .then(applicationDeployments => { this.applicationDeployments = applicationDeployments; - }); + }) + .then(()=> {this.loadingCount--;}, () => {this.loadingCount--;}); }, loadComputeResourcesForApplicationInterface: function(appInterfaceId) { + this.loadingCount++; services.ApplicationInterfaceService.getComputeResources(appInterfaceId) - .then(computeResources => this.computeResources = computeResources); + .then(computeResources => this.computeResources = computeResources) + .then(()=> {this.loadingCount--;}, () => {this.loadingCount--;}); }, queueSettingsChanged: function() { // QueueSettingsEditor updates the full -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
