Skip to content
This repository has been archived by the owner on Oct 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #355 from CanDIG/daisieh/no-ui
Browse files Browse the repository at this point in the history
remove js-based frontend
  • Loading branch information
kcranston authored Jun 16, 2022
2 parents 4994415 + 0db111a commit cafdf6b
Show file tree
Hide file tree
Showing 19 changed files with 6 additions and 2,363 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ RUN pip install -r requirements.txt
RUN pip install /app/candig-server

# Uncomment below lines if you want to ingest some mock data
RUN mkdir candig-example-data && \
wget https://raw.githubusercontent.com/CanDIG/candig-ingest/master/candig/ingest/mock_data/clinical_metadata_tier1.json && \
wget https://raw.githubusercontent.com/CanDIG/candig-ingest/master/candig/ingest/mock_data/clinical_metadata_tier2.json && \
ingest candig-example-data/registry.db mock1 clinical_metadata_tier1.json && \
ingest candig-example-data/registry.db mock2 clinical_metadata_tier2.json
# RUN mkdir candig-example-data && \
# wget https://raw.githubusercontent.com/CanDIG/candig-ingest/master/candig/ingest/mock_data/clinical_metadata_tier1.json && \
# wget https://raw.githubusercontent.com/CanDIG/candig-ingest/master/candig/ingest/mock_data/clinical_metadata_tier2.json && \
# ingest candig-example-data/registry.db mock1 clinical_metadata_tier1.json && \
# ingest candig-example-data/registry.db mock2 clinical_metadata_tier2.json

ENTRYPOINT ["candig_server"]
60 changes: 1 addition & 59 deletions candig/server/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,34 +311,6 @@ def load_access_map():
app.access_map.initializeUserAccess()


def render_candig_template(template_path, **kwargs):
"""
Wrapper for flask render template to customize dashboard using ID
s
:param template_path: template file to render
:param kwargs: additional variables
:return: call to flask.render_template
"""

session_id = ''
session_user = 'n/a'

if app.config.get('TYK_ENABLED'):
try:
session_id = flask.request.headers["Authorization"][7:]
session_user = _parseTokenPayload(session_id)["preferred_username"]
except KeyError:
raise exceptions.NotAuthenticatedException()

return flask.render_template(
template_path,
prepend_path=app.config.get('TYK_LISTEN_PATH', ''),
username=session_user,
**kwargs
)


def reset():
"""
Resets the flask app; used in testing
Expand Down Expand Up @@ -1042,40 +1014,10 @@ def wrapper(*args, **kwargs):
return wrapper


@app.route('/')
@requires_auth
def index():
return render_candig_template('dashboard.html')


@app.route('/gene_search')
@requires_auth
def gene_search():
return render_candig_template('gene_search.html')


@app.route('/patients_overview')
@requires_auth
def patients_overview():
return render_candig_template('patients_overview.html')


@app.route('/sample_analysis')
@requires_auth
def sample_analysis():
return render_candig_template('sample_analysis.html')


@app.route('/custom_visualization')
@requires_auth
def custom_visualization():
return render_candig_template('custom_visualization.html')


@app.route('/api_info')
@requires_auth
def swagger():
return render_candig_template('swagger.html')
return flask.render_template('swagger.html')


@app.route('/serverinfo')
Expand Down
1 change: 0 additions & 1 deletion candig/server/static/core/js/dist/custom_visualization.js

This file was deleted.

Loading

0 comments on commit cafdf6b

Please sign in to comment.