Use HX-Replace-Url properly and don't include column shifter twice on load
This commit is contained in:
parent
0518c9fe1c
commit
c5856ce20b
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
{% block panel_content %}
|
{% block panel_content %}
|
||||||
{% include 'partials/notify.html' %}
|
{% include 'partials/notify.html' %}
|
||||||
<script src="{% static 'js/column-shifter.js' %}"></script>
|
|
||||||
{% if cache is not None %}
|
{% if cache is not None %}
|
||||||
<span class="icon has-tooltip-bottom" data-tooltip="Cached">
|
<span class="icon has-tooltip-bottom" data-tooltip="Cached">
|
||||||
<i class="fa-solid fa-database"></i>
|
<i class="fa-solid fa-database"></i>
|
||||||
|
|
|
@ -209,9 +209,9 @@ class DrilldownTableView(SingleTableView):
|
||||||
# Still push the URL so they can share it to get assistance
|
# Still push the URL so they can share it to get assistance
|
||||||
if request.GET:
|
if request.GET:
|
||||||
if request.htmx:
|
if request.htmx:
|
||||||
response["HX-Replace"] = reverse("home") + "?" + url_params
|
response["HX-Replace-Url"] = reverse("home") + "?" + url_params
|
||||||
elif request.POST:
|
elif request.POST:
|
||||||
response["HX-Replace"] = reverse("home") + "?" + url_params
|
response["HX-Replace-Url"] = reverse("home") + "?" + url_params
|
||||||
return response
|
return response
|
||||||
|
|
||||||
# Create data for chart.js sentiment graph
|
# Create data for chart.js sentiment graph
|
||||||
|
@ -265,7 +265,7 @@ class DrilldownTableView(SingleTableView):
|
||||||
response = self.render_to_response(context)
|
response = self.render_to_response(context)
|
||||||
# if not request.method == "GET":
|
# if not request.method == "GET":
|
||||||
if "client_uri" in context:
|
if "client_uri" in context:
|
||||||
response["HX-Replace"] = reverse("home") + "?" + context["client_uri"]
|
response["HX-Replace-Url"] = reverse("home") + "?" + context["client_uri"]
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue