Skip to content

Commit 012a0aa

Browse files
committed
Adding link to example files
1 parent 9569ada commit 012a0aa

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

ckg/report_manager/apps/dataUploadApp.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import dash_core_components as dcc
22
import dash_html_components as html
33
from ckg.report_manager.apps import basicApp
4-
from ckg.graphdb_connector import connector
4+
from ckg import ckg_utils
55

66

77
DataTypes = ['experimental_design', 'clinical', 'proteomics', 'interactomics', 'phosphoproteomics']
@@ -31,6 +31,12 @@ def buildPage(self):
3131
style={'width': '20%'}),
3232
html.Br(),
3333
html.Div(id='upload-form', children=[
34+
html.Div(children=[html.A("Download example files",
35+
id='example_files',
36+
href= '/example_files',
37+
n_clicks=0,
38+
className="button_link")],
39+
style={'width':'100%', 'padding-left': '87%', 'padding-right': '0%'}),
3440
html.Div(children=[html.Label('Select upload data type:', style={'marginTop': 10})],
3541
style={'width': '49%', 'marginLeft': '0%', 'verticalAlign': 'top', 'fontSize': '18px'}),
3642
html.Div(children=[dcc.RadioItems(id='upload-data-type-picker', options=[{'label': i, 'value': i} for i in DataTypes], value=None,

ckg/report_manager/apps/homepageStats.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import dash_html_components as html
88
from ckg import ckg_utils
99
from ckg.graphdb_connector import connector
10-
from ckg.graphdb_builder import builder_utils
1110
from ckg.analytics_core.viz import viz
1211
from ckg.analytics_core import utils
1312

ckg/report_manager/index.py

+5
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,11 @@ def route_report_url(value):
396396
uri = os.path.join(ckg_config['downloads_directory'], value + '.zip')
397397
return flask.send_file(uri, attachment_filename=value + '.zip', as_attachment=True, cache_timeout=-1)
398398

399+
@application.route('/example_files')
400+
def route_example_files_url():
401+
uri = os.path.join(ckg_config['data_directory'], 'example_files.zip')
402+
return flask.send_file(uri, attachment_filename='example_files.zip', as_attachment=True, cache_timeout=-1)
403+
399404
###Callback regenerate project
400405
@app.callback(Output('regenerate', 'href'),
401406
[Input('regenerate', 'n_clicks'),

data/example_files.zip

313 KB
Binary file not shown.

0 commit comments

Comments
 (0)