Skip to content

Commit

Permalink
add slice_name and table_name for title (#1567)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alanna Scott authored Nov 9, 2016
1 parent a475551 commit 0c221a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions caravel/templates/caravel/explorev2.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{% extends "caravel/basic.html" %}

{% block title %}
{% if slice_name %}
[slice] {{ slice_name }}
{% else %}
[explore] {{ table_name }}
{% endif %}
{% endblock %}

{% block body %}
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/explorev2/explorev2.css">
<div
Expand Down
4 changes: 3 additions & 1 deletion caravel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,9 @@ def explore(self, datasource_type, datasource_id):
}
return self.render_template(
"caravel/explorev2.html",
bootstrap_data=json.dumps(bootstrap_data))
bootstrap_data=json.dumps(bootstrap_data),
slice_name=slc.slice_name,
table_name=viz_obj.datasource.table_name)
else:
return self.render_template(
"caravel/explore.html",
Expand Down

0 comments on commit 0c221a2

Please sign in to comment.