Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Opening sql queries in new tab is very useful" #276

Merged
merged 1 commit into from
Apr 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions silk/templates/silk/sql.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@
{% block js %}
<script type="text/javascript" src="{% static 'silk/lib/sortable.js' %}"></script>
{{ block.super }}
<script>
function openInNewTab(url) {
var win = window.open(url, '_blank');
win.focus();
}
</script>
{% endblock %}


{% block style %}
<style>
.right-aligned {
Expand Down Expand Up @@ -118,15 +111,15 @@
</tr>
{% for sql_query in items %}
<!-- TODO: Pretty grimy... -->
<tr class="data-row" onclick="openInNewTab(' \
<tr class="data-row" onclick="window.location=' \
{% if profile and silk_request %}\
{% url "silk:request_and_profile_sql_detail" silk_request.id profile.id sql_query.id %}\
{% elif profile %}\
{% url "silk:profile_sql_detail" profile.id sql_query.id %}\
{% elif silk_request %}\
{% url "silk:request_sql_detail" silk_request.id sql_query.id %}\
{% endif %}\
');">
';">
<td class="left-aligned">+{{ sql_query.start_time_relative }}</td>
<td class="left-aligned">{{ sql_query.tables_involved|join:", " }}</td>
<td class="right-aligned">{{ sql_query.num_joins }}</td>
Expand Down