Skip to content

Commit

Permalink
NN-397 Add loading symbol to pathway set generation
Browse files Browse the repository at this point in the history
  • Loading branch information
TripZz committed Nov 26, 2023
1 parent f1573bd commit 1a11e0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/components/enrichment/PathwaySet.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<template>
<div id="pathways-set">
<div class="generate-set-button">
<div class="export-text" v-on:click="apply_enrichment()">Generate pathway set</div>
<div v-if="await_load == true" class="loading_pane" ></div>
<div v-if="await_load == false" class="export-text" v-on:click="apply_enrichment()">Generate pathway set</div>
</div>
<div class="pathway-apply-section">

Expand Down Expand Up @@ -51,7 +52,8 @@ export default {
data() {
return{
set_dict: new Set(),
layer: 0
layer: 0,
await_load: false
}
},
methods: {
Expand All @@ -66,13 +68,15 @@ export default {
formData.append('genes', genes)
formData.append('species_id', com.gephi_data.nodes[0].species);
this.await_load = true
//POST request for generating pathways
com.sourceToken = this.axios.CancelToken.source();
com.axios
.post(com.api.subgraph, formData, { cancelToken: com.sourceToken.token })
.then((response) => {
com.set_dict.add({"name": `layer ${com.layer}`, "genes": genes, "terms": response.data.sort((t1, t2) => t1.fdr_rate - t2.fdr_rate), "status": false})
com.layer += 1
this.await_load = false
})
},
remove_set(entry){
Expand Down

0 comments on commit 1a11e0c

Please sign in to comment.