Skip to content

Commit

Permalink
#14132: Extend EventRule template
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Dec 4, 2023
1 parent 5d57e98 commit deadde8
Showing 1 changed file with 49 additions and 14 deletions.
63 changes: 49 additions & 14 deletions netbox/templates/extras/eventrule.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ <h5 class="card-header">
</table>
</div>
</div>
<div class="card">
<h5 class="card-header">
{% trans "Object Types" %}
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
{% for ct in object.content_types.all %}
<tr>
<td>{{ ct }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<div class="card">
<h5 class="card-header">
{% trans "Events" %}
Expand Down Expand Up @@ -59,20 +73,6 @@ <h5 class="card-header">
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">
{% trans "Object Types" %}
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
{% for ct in object.content_types.all %}
<tr>
<td>{{ ct }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<div class="card">
<h5 class="card-header">
{% trans "Conditions" %}
Expand All @@ -85,6 +85,41 @@ <h5 class="card-header">
{% endif %}
</div>
</div>
<div class="card">
<h5 class="card-header">
{% trans "Action" %}
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th scope="row">{% trans "Type" %}</th>
<td>{{ object.get_action_type_display }}</td>
</tr>
<tr>
<th scope="row">{% trans "Object" %}</th>
<td>
{% if object.action_type == 'script' %}
<a href="{% url 'extras:script' module=object.action_object.python_name name=object.action_parameters.script_name %}">
{{ object.action_object }} / {{ object.action_parameters.script_name }}
</a>
{% else %}
{{ object.action_object|linkify }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">{% trans "Data" %}</th>
<td>
{% if object.action_data %}
<pre>{{ object.action_data|json }}</pre>
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
</table>
</div>
</div>
{% include 'inc/panels/custom_fields.html' %}
{% include 'inc/panels/tags.html' %}
{% plugin_right_page object %}
Expand Down

0 comments on commit deadde8

Please sign in to comment.