Просмотр исходного кода

Closes #3264: Annotate changelog retention time on UI

Jeremy Stretch 6 лет назад
Родитель
Сommit
dfcd2c247d

+ 1 - 0
CHANGELOG.md

@@ -177,6 +177,7 @@ scheme. This change was introuced in django-cors-headers 3.0.
 * [#2920](https://github.com/digitalocean/netbox/issues/2920) - Rename Interface `form_factor` to `type` (backward-compatible until v2.7)
 * [#2920](https://github.com/digitalocean/netbox/issues/2920) - Rename Interface `form_factor` to `type` (backward-compatible until v2.7)
 * [#2926](https://github.com/digitalocean/netbox/issues/2926) - Add change logging to the Tag model
 * [#2926](https://github.com/digitalocean/netbox/issues/2926) - Add change logging to the Tag model
 * [#3038](https://github.com/digitalocean/netbox/issues/3038) - OR logic now used when multiple values of a query filter are passed
 * [#3038](https://github.com/digitalocean/netbox/issues/3038) - OR logic now used when multiple values of a query filter are passed
+* [#3264](https://github.com/digitalocean/netbox/issues/3264) - Annotate changelog retention time on UI
 
 
 ## Bug Fixes
 ## Bug Fixes
 
 

+ 5 - 0
netbox/templates/extras/object_changelog.html

@@ -5,4 +5,9 @@
 {% block content %}
 {% block content %}
     {% if obj %}<h1>{{ obj }}</h1>{% endif %}
     {% if obj %}<h1>{{ obj }}</h1>{% endif %}
     {% include 'panel_table.html' with table=objectchanges_table %}
     {% include 'panel_table.html' with table=objectchanges_table %}
+    {% if settings.CHANGELOG_RETENTION %}
+        <div class="pull-right text-muted">
+            Changelog retention: {{ settings.CHANGELOG_RETENTION }} days
+        </div>
+    {% endif %}
 {% endblock %}
 {% endblock %}

+ 5 - 0
netbox/templates/extras/objectchange_list.html

@@ -9,6 +9,11 @@
 <div class="row">
 <div class="row">
 	<div class="col-md-9">
 	<div class="col-md-9">
         {% include 'utilities/obj_table.html' %}
         {% include 'utilities/obj_table.html' %}
+        {% if settings.CHANGELOG_RETENTION %}
+            <div class="pull-right text-muted">
+                Changelog retention: {{ settings.CHANGELOG_RETENTION }} days
+            </div>
+        {% endif %}
     </div>
     </div>
     <div class="col-md-3 noprint">
     <div class="col-md-3 noprint">
 		{% include 'inc/search_panel.html' %}
 		{% include 'inc/search_panel.html' %}