diff --git a/app/urls.py b/app/urls.py index 6f59587..75ee9d2 100644 --- a/app/urls.py +++ b/app/urls.py @@ -89,6 +89,7 @@ urlpatterns = [ # path("drilldown/", Drilldown.as_view(), name="drilldown"), path("modal/", ThresholdInfoModal.as_view(), name="modal_drilldown"), path("context/", DrilldownContextModal.as_view(), name="modal_context"), + path("context_table/", DrilldownContextModal.as_view(), name="modal_context_table"), ## path("ui/insights/", Insights.as_view(), name="insights"), path("ui/insights/search/", InsightsSearch.as_view(), name="search_insights"), diff --git a/core/lib/context.py b/core/lib/context.py index cf474b6..dacc676 100644 --- a/core/lib/context.py +++ b/core/lib/context.py @@ -1,6 +1,3 @@ -from core.lib.opensearch import client, run_main_query -from django.conf import settings - def construct_query(net, channel, src, num, size): # Get the initial query extra_must = [] @@ -21,11 +18,21 @@ def construct_query(net, channel, src, num, size): "should": query_should, } }, - *extra_must + *extra_must, ] } }, - "fields": ["nick", "ident", "host", "channel", "ts", "msg", "type", "net", "src"], + "fields": [ + "nick", + "ident", + "host", + "channel", + "ts", + "msg", + "type", + "net", + "src", + ], "_source": False, } - return query \ No newline at end of file + return query diff --git a/core/templates/modals/context.html b/core/templates/modals/context.html index 8f61505..78840e4 100644 --- a/core/templates/modals/context.html +++ b/core/templates/modals/context.html @@ -5,34 +5,42 @@ -