Pass through more variables to the context modal and alter int handling
This commit is contained in:
@@ -241,7 +241,6 @@ class DrilldownContextModal(APIView):
|
||||
|
||||
def post(self, request):
|
||||
if request.resolver_match.url_name == "modal_context_table":
|
||||
print("POST CONTEXT TABLE")
|
||||
self.template_name = "modals/context_table.html"
|
||||
|
||||
size = 20
|
||||
@@ -255,8 +254,12 @@ class DrilldownContextModal(APIView):
|
||||
for key in mandatory:
|
||||
if key not in query_params:
|
||||
query_params[key] = None
|
||||
if query_params["index"] == "int":
|
||||
if "mtype" not in query_params:
|
||||
query_params["mtype"] = None
|
||||
query_params["sorting"] = "desc"
|
||||
|
||||
if query_params["index"] == "int" and query_params["mtype"] == "msg":
|
||||
query_params["index"] = "main"
|
||||
# Create the query with the context helper
|
||||
search_query = construct_query(
|
||||
query_params["index"],
|
||||
@@ -287,8 +290,9 @@ class DrilldownContextModal(APIView):
|
||||
"date": query_params["date"],
|
||||
"index": query_params["index"],
|
||||
"num": query_params["num"],
|
||||
"type": query_params["type"],
|
||||
"mtype": query_params["mtype"],
|
||||
}
|
||||
print("CONTEXT", context)
|
||||
|
||||
return render(request, self.template_name, context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user