Fix some Manticore queries

This commit is contained in:
2022-09-06 11:53:32 +01:00
parent 3b8735be72
commit 87324de666
6 changed files with 215 additions and 225 deletions

View File

@@ -12,7 +12,8 @@ from rest_framework.parsers import FormParser
from rest_framework.views import APIView
from core.lib.context import construct_query
#from core.lib.opensearch import query_results
# from core.lib.opensearch import query_results
from core.lib.manticore import query_results
from core.lib.threshold import (
annotate_num_chans,
@@ -367,6 +368,8 @@ class DrilldownContextModal(APIView):
if query_params["type"] not in ["znc", "auth"]:
annotate = True
# Create the query with the context helper
if query_params["num"].isdigit():
query_params["num"] = int(query_params["num"])
search_query = construct_query(
query_params["index"],
query_params["net"],
@@ -403,6 +406,7 @@ class DrilldownContextModal(APIView):
# for index, item in enumerate(results["object_list"]):
# results["object_list"][index]["time"] = item["time"]+"SSS"
unique = str(uuid.uuid4())[:8]
print("PARAMS", query_params)
context = {
"net": query_params["net"],
"channel": query_params["channel"],