Skip to content

Commit

Permalink
model tab, update version
Browse files Browse the repository at this point in the history
  • Loading branch information
saifulkhan committed Nov 27, 2020
1 parent 4ff7f40 commit 0638f46
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
15 changes: 12 additions & 3 deletions app/base/templates/site_template/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<a href="{{ url_for('home_blueprint.route_default') }}" class="simple-text logo-mini">
<img src="/static/assets/img/Favicon64x64.png" alt=""/>
<br/>
RAMP VIS 0.4
RAMP VIS 0.5
</a>
</div>

Expand Down Expand Up @@ -63,6 +63,13 @@
</a>
</li>

<li class="nav-item" id="models">
<a class="nav-link" href="/models">
<i class="material-icons">model_training</i>
<p><b>Models</b></p>
</a>
</li>

<li class="nav-item" id="dynamic">
<a class="nav-link" href="/dynamic">
<i class="material-icons">dynamic_feed</i>
Expand Down Expand Up @@ -110,11 +117,12 @@
<div class="collapse" id="tablesExamples">
<ul class="nav">
<li class="nav-item" id="pages">
<a class="nav-link" href="/table-pages-v0.4">
<a class="nav-link" href="/table-pages-v0.5">
<span class="sidebar-mini"> OP </span>
<span class="sidebar-normal"> Pages - Released (V0.4)</span>
<span class="sidebar-normal"> Pages - Released (V0.5)</span>
</a>
</li>
<!--
<li class="nav-item" id="pages">
<a class="nav-link" href="/released-pages">
<span class="sidebar-mini"> OP </span>
Expand All @@ -133,6 +141,7 @@
<span class="sidebar-normal"> Pages - Test</span>
</a>
</li>
-->
<li class="nav-item " id="settings">
<a class="nav-link" href="/settings">
<span class="sidebar-mini"> S </span>
Expand Down
File renamed without changes.
20 changes: 18 additions & 2 deletions app/home/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@ def route_analytics():
return render_template('page-500.html'), 500


@blueprint.route('/models')
def route_models():
print('route_models:')

try:
table = ontology.get_pages_by_type('model')
print('models: data = ', table)
return render_template('plots.html', table=table)

except TemplateNotFound:
return render_template('page-404.html'), 404

except:
return render_template('page-500.html'), 500


@blueprint.route('/dynamic')
def route_dynamic():
print('dynamic:')
Expand Down Expand Up @@ -132,13 +148,13 @@ def route_settings():
#
# v.0.4 all pages generated by pages.json
#
@blueprint.route('table-pages-v0.4')
@blueprint.route('table-pages-v0.5')
def route_released_pages_1():
print('route_released_pages_1:')
try:
table = ontology.get_all_pages()
print('route_released_pages_1: page_data = ', table)
return render_template('table-pages-v0.4.html', table=table)
return render_template('table-pages-v0.5.html', table=table)

except TemplateNotFound:
return render_template('page-404.html'), 404
Expand Down
4 changes: 2 additions & 2 deletions app/service/database/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@
{
"id": 201,
"name": "eera-hospital-age-groups",
"type": "plot",
"type": "model",
"bind": [
{ "vis_id": 14, "data_id": 301, "query_params": [ { "col": "H" } ], "title": "" }
],
Expand All @@ -1234,7 +1234,7 @@
{
"id": 202,
"name": "eera-death-age-groups",
"type": "plot",
"type": "model",
"bind": [
{ "vis_id": 14, "data_id": 301, "query_params": [ { "col": "D" } ], "title": "" }
],
Expand Down

0 comments on commit 0638f46

Please sign in to comment.