From deadde8700f270fa812993daedb904954a905b49 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 4 Dec 2023 11:12:20 -0500 Subject: [PATCH] #14132: Extend EventRule template --- netbox/templates/extras/eventrule.html | 63 ++++++++++++++++++++------ 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/netbox/templates/extras/eventrule.html b/netbox/templates/extras/eventrule.html index 86c330121..eff7e60e5 100644 --- a/netbox/templates/extras/eventrule.html +++ b/netbox/templates/extras/eventrule.html @@ -27,6 +27,20 @@ +
+
+ {% trans "Object Types" %} +
+
+ + {% for ct in object.content_types.all %} + + + + {% endfor %} +
{{ ct }}
+
+
{% trans "Events" %} @@ -59,20 +73,6 @@ {% plugin_left_page object %}
-
-
- {% trans "Object Types" %} -
-
- - {% for ct in object.content_types.all %} - - - - {% endfor %} -
{{ ct }}
-
-
{% trans "Conditions" %} @@ -85,6 +85,41 @@ {% endif %}
+
+
+ {% trans "Action" %} +
+
+ + + + + + + + + + + + + +
{% trans "Type" %}{{ object.get_action_type_display }}
{% trans "Object" %} + {% if object.action_type == 'script' %} + + {{ object.action_object }} / {{ object.action_parameters.script_name }} + + {% else %} + {{ object.action_object|linkify }} + {% endif %} +
{% trans "Data" %} + {% if object.action_data %} +
{{ object.action_data|json }}
+ {% else %} + {{ ''|placeholder }} + {% endif %} +
+
+
{% include 'inc/panels/custom_fields.html' %} {% include 'inc/panels/tags.html' %} {% plugin_right_page object %}