Skip to content
Snippets Groups Projects
Commit 306b3471 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Give name to csv files

Fixes #119
parent f4c89307
No related branches found
No related tags found
1 merge request!65Give name to csv files
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</v-col> </v-col>
<v-col > <v-col >
<vue-json-to-csv :json-data="Regions"> <vue-json-to-csv :json-data="Regions" :csv-title="'LD-independent lead SNPs - '+ this.project.id">
<v-btn small color="#298e49" style="color:#fff; text-transform:capitalize;" v-on:click="processExportAllJASSPVAL()" > <v-btn small color="#298e49" style="color:#fff; text-transform:capitalize;" v-on:click="processExportAllJASSPVAL()" >
Export LD-independent lead SNPs Export LD-independent lead SNPs
</v-btn> </v-btn>
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
:items-per-page="5" :items-per-page="5"
class="elevation-1" class="elevation-1"
></v-data-table> ></v-data-table>
<vue-json-to-csv :json-data="significantsRegions"> <vue-json-to-csv :json-data="significantsRegions" :csv-title="'Significants regions - '+ this.project.id">
<v-btn small color="#298e49" style="color:#fff;">export csv</v-btn> <v-btn small color="#298e49" style="color:#fff;">export csv</v-btn>
<!-- <button> <!-- <button>
<b>export csv</b> <b>export csv</b>
......
...@@ -129,6 +129,7 @@ def get_full_sumstat(project_id: str): ...@@ -129,6 +129,7 @@ def get_full_sumstat(project_id: str):
print("CREATED CSV FILE") print("CREATED CSV FILE")
return FileResponse( return FileResponse(
project.get_csv_path(), project.get_csv_path(),
filename=f"genome_full_{project_id}.csv",
media_type="text/csv", media_type="text/csv",
) )
...@@ -138,6 +139,7 @@ def get_data_manhattan(project_id: str): ...@@ -138,6 +139,7 @@ def get_data_manhattan(project_id: str):
return Response( return Response(
content=load_project(project_id=project_id).get_project_genomedata(), content=load_project(project_id=project_id).get_project_genomedata(),
media_type="text/csv", media_type="text/csv",
headers={"content-disposition": f"attachment; filename=genome_{project_id}.csv"},
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment