Compare commits
No commits in common. "6fe31d99a900110a3abc31d6b7951c92bbd5b002" and "d581d787deaea890d2ff16996fcc4328ae44fde3" have entirely different histories.
6fe31d99a9
...
d581d787de
@ -214,15 +214,6 @@ class NotificationRule(models.Model):
|
||||
raise ValueError(f"Invalid YAML: {e}")
|
||||
return parsed
|
||||
|
||||
@property
|
||||
def matches(self):
|
||||
"""
|
||||
Get the total number of matches for this rule.
|
||||
"""
|
||||
if isinstance(self.match, dict):
|
||||
truthy_values = [x for x in self.match.values() if x is not False]
|
||||
return f"{len(truthy_values)}/{len(self.match)}"
|
||||
|
||||
def get_notification_settings(self, check=True):
|
||||
"""
|
||||
Get the notification settings for this rule.
|
||||
|
@ -20,7 +20,6 @@
|
||||
<th>topic</th>
|
||||
<th>enabled</th>
|
||||
<th>data length</th>
|
||||
<th>match</th>
|
||||
<th>actions</th>
|
||||
</thead>
|
||||
{% for item in object_list %}
|
||||
@ -44,7 +43,6 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ item.data|length }}</td>
|
||||
<td>{{ item.matches }}</td>
|
||||
<td>
|
||||
<div class="buttons">
|
||||
<button
|
||||
|
@ -113,6 +113,7 @@ class DrilldownTableView(SingleTableView):
|
||||
sizes = settings.MAIN_SIZES
|
||||
|
||||
if request.GET:
|
||||
print("GET")
|
||||
self.template_name = "index.html"
|
||||
# GET arguments in URL like ?query=xyz
|
||||
query_params = request.GET.dict()
|
||||
@ -120,6 +121,7 @@ class DrilldownTableView(SingleTableView):
|
||||
if request.resolver_match.url_name == "search_partial":
|
||||
self.template_name = "partials/results_table.html"
|
||||
elif request.POST:
|
||||
print("POST")
|
||||
query_params = request.POST.dict()
|
||||
else:
|
||||
self.template_name = "index.html"
|
||||
@ -127,6 +129,7 @@ class DrilldownTableView(SingleTableView):
|
||||
# Don't try to search, since there's clearly nothing to do
|
||||
params_with_defaults = {}
|
||||
add_defaults(params_with_defaults)
|
||||
print("GOT TO CONTEXT")
|
||||
context = {
|
||||
"sizes": sizes,
|
||||
"params": params_with_defaults,
|
||||
|
Loading…
Reference in New Issue
Block a user