From 2e5df1fe8b997e13638d5ed8e95326c3bff214f6 Mon Sep 17 00:00:00 2001 From: Mihai Date: Tue, 25 May 2021 21:50:53 +0200 Subject: [PATCH] Start adding progress indicators (#2) --- src/components/ReferenceInformation.vue | 171 +++++++++++++----------- src/components/ViewVariants.vue | 38 ++++-- 2 files changed, 124 insertions(+), 85 deletions(-) diff --git a/src/components/ReferenceInformation.vue b/src/components/ReferenceInformation.vue index 25eea0e..5c87a23 100644 --- a/src/components/ReferenceInformation.vue +++ b/src/components/ReferenceInformation.vue @@ -1,83 +1,97 @@ @@ -100,6 +114,8 @@ export default { record: null, gene: null, selector: null, + progress: true, + no_response: true, }; }, created: function () { @@ -122,19 +138,20 @@ export default { }; } MutalyzerService.referenceModel(params).then((response) => { + this.progress = false; if (response.data) { this.reference_model = response.data; this.record = this.getRecord(this.reference_model); this.gene = this.getGene(this.reference_model); this.selector = this.getSelector(this.reference_model); + this.no_response = false; + } else { + this.no_response = true; } }); }, methods: { getRecord(annotations) { - if (annotations.type != "record") { - return; - } let output = { id: annotations.id }; if (annotations.qualifiers) { output.details = this.extractQualifiers(annotations.qualifiers); diff --git a/src/components/ViewVariants.vue b/src/components/ViewVariants.vue index 99d39ae..e2fa999 100644 --- a/src/components/ViewVariants.vue +++ b/src/components/ViewVariants.vue @@ -1,5 +1,11 @@