Fix some Manticore queries
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user