Skip to content

Commit

Permalink
Redirect to druid datasource page when the user wants to add slice. A…
Browse files Browse the repository at this point in the history
…lso, provide a link to the table page (#625)
  • Loading branch information
x4base authored and mistercrunch committed Jun 15, 2016
1 parent b38590a commit ea8a7ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions caravel/templates/caravel/add_slice.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script>
var msg = "Click on a table link to create a Slice";
window.location = "/r/msg/?url={{ '/tablemodelview/list/' }}&msg=" + msg;
var msg = "Click on a datasource link to create a Slice, " +
"or click on a table link <a href='/tablemodelview/list/'>here</a> " +
"to create a Slice for a table";
window.location = "/r/msg/?url={{ '/druiddatasourcemodelview/list/' }}&msg=" + msg;
</script>
2 changes: 1 addition & 1 deletion caravel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def shortner(self):
@expose("/msg/")
def msg(self):
"""Redirects to specified url while flash a message"""
flash(request.args.get("msg"), "info")
flash(Markup(request.args.get("msg")), "info")
return redirect(request.args.get("url"))

appbuilder.add_view_no_menu(R)
Expand Down

0 comments on commit ea8a7ec

Please sign in to comment.