From 03365d88eddb051861c730531f54d11cdaa1b268 Mon Sep 17 00:00:00 2001 From: Paul Traylor Date: Thu, 15 Aug 2019 14:42:18 +0900 Subject: [PATCH 1/3] Fix relation from promgen.Rule to promgen.Site --- promgen/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/promgen/models.py b/promgen/models.py index 72d4e0f91..f9e0de175 100644 --- a/promgen/models.py +++ b/promgen/models.py @@ -26,7 +26,7 @@ class Site(django.contrib.sites.models.Site): # Proxy model for sites so that we can easily # query our related Rules - rule_set = GenericRelation('Rule') + rule_set = GenericRelation('promgen.Rule', for_concrete_model=False) def get_absolute_url(self): return reverse('rules-list') From 9c69c331d120b442d9c848c6d45c762f26fffd5f Mon Sep 17 00:00:00 2001 From: Paul Traylor Date: Thu, 15 Aug 2019 14:42:34 +0900 Subject: [PATCH 2/3] Fix link for rule-test --- promgen/templates/promgen/rule_detail.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/promgen/templates/promgen/rule_detail.html b/promgen/templates/promgen/rule_detail.html index 187c22f7c..48b641cb1 100644 --- a/promgen/templates/promgen/rule_detail.html +++ b/promgen/templates/promgen/rule_detail.html @@ -41,10 +41,10 @@

Rule: {{ rule.name }}

From dd9b829ac73fe65347f92c00201157eee034bb7a Mon Sep 17 00:00:00 2001 From: Paul Traylor Date: Thu, 15 Aug 2019 14:42:53 +0900 Subject: [PATCH 3/3] Fix stray $ --- promgen/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/promgen/urls.py b/promgen/urls.py index bd1036800..df055ecbb 100644 --- a/promgen/urls.py +++ b/promgen/urls.py @@ -103,7 +103,7 @@ # Public API # Legacy API - path('alert$', csrf_exempt(views.Alert.as_view())), + path('alert', csrf_exempt(views.Alert.as_view())), path('api/v1/config', csrf_exempt(views.ApiConfig.as_view())), # Promgen API
- {{rule.parent.name}} + {{rule.parent.name}} - + {{ rule.parent|rulemacro }}