Commit 439d21d9 authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

Merge branch 'explicite-filename' into 'master'

Give name to csv files

Closes #119

See merge request !65
parents 2d7b2cdf 5eab012d
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,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>
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,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"},
) )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment